1. 29 12月, 2011 8 次提交
  2. 28 12月, 2011 3 次提交
    • E
      qemu: fix inf-loop in blkio parameters · 1a3f6608
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=770520
      
      We had two nested loops both trying to use 'i' as the iteration
      variable, which can result in an infinite loop when the inner
      loop interferes with the outer loop.  Introduced in commit 93ab5859.
      
      * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters): Don't
      reuse iteration variable across two loops.
      1a3f6608
    • L
      virsh: move version command to host group · 96b3716c
      Lai Jiangshan 提交于
      Trivial patch, move version command to host commands group.
      
      It has no any related with any domain.
      
      It may connect to the daemon, so the flag is 0 but not VSH_CMD_FLAG_NOCONNECT.
      96b3716c
    • E
      daemon: clean up daemonization · e957b670
      Eric Blake 提交于
      Valgrind detected a pipe fd leak before the parent exits on success,
      introduced in commit 4296cea2; by itself, the leak is not bad, since
      we immediately called _exit(), but we might as well be clean to make
      valgrind analysis easier.  Meanwhile, if the daemon grandchild detects
      an error, the parent failed to flush the error message before exiting.
      Also, we had the possibility of both parent and child returning to the
      caller, such that the user could see duplicated reports of failure
      from the two return paths.  And we might as well be robust to the
      (unlikely) situation of being started with stdin closed.
      
      * daemon/libvirtd.c (daemonForkIntoBackground): Use exit if an
      error message was generated, avoid fd leaks for valgrind's sake,
      avoid returning to caller in both parent and child, and don't
      close a just-dup'd stdin.
      Based on a report by Alex Jia.
      
      * How to reproduce?
        % service libvirtd stop
        % valgrind -v --track-fds=yes /usr/sbin/libvirtd --daemon
      
      * Actual valgrind result:
      
      ==16804== FILE DESCRIPTORS: 7 open at exit.
      ==16804== Open file descriptor 7:
      ==16804==    at 0x321FAD8B87: pipe (in /lib64/libc-2.12.so)
      ==16804==    by 0x41F34D: daemonForkIntoBackground (libvirtd.c:186)
      ==16804==    by 0x4207A0: main (libvirtd.c:1420)
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e957b670
  3. 26 12月, 2011 2 次提交
  4. 25 12月, 2011 1 次提交
  5. 24 12月, 2011 1 次提交
    • E
      docs: remove stray / · d145fe3b
      Eric Blake 提交于
      Commit e5a84d74 added a new attribute in the wrong location;
      commit c8b9fa74 fixed the missing / at the end but not the extra
      / in the middle.
      
      * docs/formatdomain.html.in (elementsDisks): Fix another typo.
      d145fe3b
  6. 23 12月, 2011 3 次提交
  7. 22 12月, 2011 6 次提交
  8. 21 12月, 2011 16 次提交
    • S
      nwfilter: Do not require DHCP requests to be broadcasted · 1c8f0cbb
      Stefan Berger 提交于
      Remove the requirement that DHCP messages have to be broadcasted.
      DHCP requests are most often sent via broadcast but can be directed
      towards a specific DHCP server. For example 'dhclient' takes '-s <server>'
      as a command line parameter thus allowing DHCP requests to be sent to a
      specific DHCP server.
      1c8f0cbb
    • O
      33eca17f
    • E
      tests: run schema checks in sorted order · 6fdbce12
      Eric Blake 提交于
      Having a test that depends on file system timestamps and/or inode
      allocation order gives non-deterministic output.
      
      * tests/schematestutils.sh: Run test in deterministic order.
      6fdbce12
    • M
      tests: Add fake PPC64 emulator for QEMU testing · bbae92f8
      Michael Ellerman 提交于
      Create a fake PPC64 QEMU so that we can run PPC64 QEMU tests when we
      don't have a real version of the emulator available.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      bbae92f8
    • M
      qemu: Add spapr-vio address assignment · d64955a9
      Michael Ellerman 提交于
      Add logic to assign addresses for devices with spapr-vio addresses.
      
      We also do validation of addresses specified by the user, ie. ensuring
      that there are not duplicate addresses on the bus.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      d64955a9
    • B
      Add New address type spapr-vio to domain.rng · 4ba56a94
      Bharata B Rao 提交于
      Original patch by Bharata. Updated to use {1,16} in spaprvioReg based
      on example from Eric Blake.
      Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      4ba56a94
    • M
      Add address type for SPAPR VIO devices · 7e4d896b
      Michael Ellerman 提交于
      For QEMU PPC64 we have a machine type ("pseries") which has a virtual
      bus called "spapr-vio". We need to be able to create devices on this
      bus, and as such need a way to specify the address for those devices.
      
      This patch adds a new address type "spapr-vio", which achieves this.
      
      The addressing is specified with a "reg" property in the address
      definition. The reg is optional, if it is not specified QEMU will
      auto-assign an address for the device.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      7e4d896b
    • A
      docs: improve virsh domxml-*-native command docs · fbdfda14
      Alex Jia 提交于
      * tools/virsh.pod: improve virsh man page for domxml-from-native and
      domxml-to-native commands.
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      fbdfda14
    • A
      virsh: plug mem leaks in domxml-*-native · ea964658
      Alex Jia 提交于
      Detected by valgrind. Leaks introduced in commit 4d5383fd.
      
      * tools/virsh.c: fix memory leaks on cmdDomXMLFromNative and cmdDomXMLToNative.
      
      * how to reproduce?
      
        % virsh dumpxml ${guest} > foo.xml
        % valgrind -v --leak-check=full virsh domxml-from-native qemu-argv foo.xml
        % valgrind -v --leak-check=full virsh domxml-to-native qemu-argv foo.xml
      
      * actual valgrind results:
      
      ==9724== 8,193 bytes in 1 blocks are definitely lost in loss record 31 of 33
      ==9724==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
      ==9724==    by 0x4A06167: realloc (vg_replace_malloc.c:525)
      ==9724==    by 0x4C7510B: virReallocN (memory.c:161)
      ==9724==    by 0x4C84679: virFileReadLimFD (util.c:394)
      ==9724==    by 0x4C84815: virFileReadAll (util.c:455)
      ==9724==    by 0x41A89F: cmdDomXMLFromNative (virsh.c:5532)
      ==9724==    by 0x414872: vshCommandRun (virsh.c:16464)
      ==9724==    by 0x425623: main (virsh.c:17971)
      ==9724==
      ==9724== LEAK SUMMARY:
      ==9724==    definitely lost: 8,193 bytes in 1 blocks
      ==9724==    indirectly lost: 0 bytes in 0 blocks
      ==9724==      possibly lost: 0 bytes in 0 blocks
      ==9724==    still reachable: 127,128 bytes in 1,347 blocks
      
      ==7409== 8,193 bytes in 1 blocks are definitely lost in loss record 31 of 33
      ==7409==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
      ==7409==    by 0x4A06167: realloc (vg_replace_malloc.c:525)
      ==7409==    by 0x4C7510B: virReallocN (memory.c:161)
      ==7409==    by 0x4C84679: virFileReadLimFD (util.c:394)
      ==7409==    by 0x4C84815: virFileReadAll (util.c:455)
      ==7409==    by 0x41A7AF: cmdDomXMLToNative (virsh.c:5578)
      ==7409==    by 0x414892: vshCommandRun (virsh.c:16463)
      ==7409==    by 0x425633: main (virsh.c:17970)
      ==7409==
      ==7409== LEAK SUMMARY:
      ==7409==    definitely lost: 8,193 bytes in 1 blocks
      ==7409==    indirectly lost: 0 bytes in 0 blocks
      ==7409==      possibly lost: 0 bytes in 0 blocks
      ==7409==    still reachable: 127,128 bytes in 1,347 blocks
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      ea964658
    • A
      console: plug memory leaks · 2b603dcb
      Alex Jia 提交于
      Using 'virReallocN' to allocate memory on virConsoleEventOnStdin,
      virConsoleEventOnStdout and virConsoleEventOnStream, however, the
      cleanup function virConsoleShutdown hasn't released these memory.
      
      * tools/console.c: fix memory leaks on virConsoleShutdown.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=767488Signed-off-by: NAlex Jia <ajia@redhat.com>
      2b603dcb
    • M
      qemu: Add a capability flag for -no-acpi · 5abbe04d
      Michael Ellerman 提交于
      Currently non-x86 guests must have <acpi/> defined in <features> to
      prevent libvirt from running qemu with -no-acpi. Although it works, it
      is a hack.
      
      Instead add a capability flag which indicates whether qemu understands
      the -no-acpi option. Use it to control whether libvirt emits -no-acpi.
      
      Current versions of qemu always display -no-acpi in their help output,
      so this patch has no effect. However the development version of qemu
      has been modified such that -no-acpi is only displayed when it is
      actually supported.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      5abbe04d
    • H
      add new command numatune to virsh · 9da9a3b0
      Hu Tao 提交于
      add new command numatune to virsh to get/set numa parameters
      9da9a3b0
    • H
      6758a01b
    • H
      1b051d86
    • H
      add new API virDomain{G, S}etNumaParameters · c57ca570
      Hu Tao 提交于
      Set up the types for the numa functions and insert them into the
      virDriver structure definition.
      c57ca570
    • H
      use cpuset to manage numa · 9d3a721a
      Hu Tao 提交于
      This patch also sets cgroup cpuset parameters for numatune.
      9d3a721a