1. 06 11月, 2012 1 次提交
  2. 22 10月, 2012 1 次提交
    • D
      qemu: Don't blindly assume VNC is supported · 2da776b1
      Doug Goldstein 提交于
      Currently it's assumed that qemu always supports VNC, however it is
      definitely possible to compile qemu without VNC support so we should at
      the very least check for it and handle that correctly.
      2da776b1
  3. 18 10月, 2012 1 次提交
  4. 16 10月, 2012 1 次提交
  5. 09 10月, 2012 1 次提交
    • M
      fix kvm_pv_eoi with kvmclock · 5d692cc7
      Martin Kletzander 提交于
      When both kvmclock and kvm_pv_eoi are configured (either disabled or
      enabled) libvirt will generate invalid CPU specification due to the
      fact that even though kvmclock causes the CPU to be specified, it
      doesn't set have_cpu flag to true (and the new kvm_pv_eoi as well).
      This patch fixes the issue and adds a test exactly for that to show
      that it is fixed correctly (and also to keep it that way in the future
      of course).
      5d692cc7
  6. 27 9月, 2012 3 次提交
  7. 20 9月, 2012 2 次提交
  8. 18 9月, 2012 1 次提交
    • O
      qemu: Use disk wwn in qemu command line · 6e73850b
      Osier Yang 提交于
      All of ide-drive, ide-hd, ide-cd, scsi-disk, scsi-hd, and scsi-cd
      supports wwn property. (NB, scsi-block doesn't support to set wwn).
      
      * src/qemu/qemu_command.c: Error out if underlying QEMU doesn't
      support wwn property for the device; Set wwn for the device otherwise.
      
      * tests/qemuxml2argvdata/qemuxml2argv-disk-ide-wwn.args: New test
      * tests/qemuxml2argvdata/qemuxml2argv-disk-ide-wwn.xml: Likewise
      * tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args: Likewise
      * tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.xml: Likewise
      * tests/qemuxml2argvtest.c: Add the new tests.
      6e73850b
  9. 15 9月, 2012 1 次提交
  10. 14 9月, 2012 1 次提交
    • M
      qemu: Add support for EOI with APIC · fbf9aa12
      Martin Kletzander 提交于
      This patch adds full support for EOI setting for domains. Because this
      is CPU feature (flag), the model needs to be added even when it's not
      specified. Fortunately this problem was already solved with kvmclock,
      so this patch simply abuses that.
      
      And due to the size of the patch (17 lines) I dared to include the tests.
      fbf9aa12
  11. 13 9月, 2012 2 次提交
  12. 04 9月, 2012 1 次提交
    • V
      Rename iolimit to blockio. · 72f1f220
      Viktor Mihajlovski 提交于
      After discussion with DB we decided to rename the new iolimit
      element as it creates the impression it would be there to
      limit (i.e. throttle) I/O instead of specifying immutable
      characteristics of a block device.
      This is also backed by the fact that the term I/O Limits has
      vanished from newer storage admin documentation.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      72f1f220
  13. 03 9月, 2012 1 次提交
  14. 01 9月, 2012 1 次提交
  15. 22 8月, 2012 1 次提交
  16. 08 8月, 2012 1 次提交
    • G
      qemu: add two qemu caps for lsi and virtio-scsi SCSI controllers · 015c603b
      Guannan Ren 提交于
      Rename qemuDefaultScsiControllerModel to qemuCheckScsiControllerModel.
      When scsi model is given explicitly in XML(model > 0) checking if the
      underlying QEMU supports it or not first, raise an error on checking
      failure.
      When the model is not given(mode <= 0), return LSI by default, if
      the QEMU doesn't support it, raise an error.
      015c603b
  17. 07 8月, 2012 1 次提交
    • D
      Convert public datatypes to inherit from virObject · 46ec5f85
      Daniel P. Berrange 提交于
      This converts the following public API datatypes to use the
      virObject infrastructure:
      
        virConnectPtr
        virDomainPtr
        virDomainSnapshotPtr
        virInterfacePtr
        virNetworkPtr
        virNodeDevicePtr
        virNWFilterPtr
        virSecretPtr
        virStreamPtr
        virStorageVolPtr
        virStoragePoolPtr
      
      The code is significantly simplified, since the mutex in the
      virConnectPtr object now only needs to be held when accessing
      the per-connection virError object instance. All other operations
      are completely lock free.
      
      * src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert
        public datatypes to use virObject
      * src/conf/domain_event.c, src/phyp/phyp_driver.c,
        src/qemu/qemu_command.c, src/qemu/qemu_migration.c,
        src/qemu/qemu_process.c, src/storage/storage_driver.c,
        src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
        tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c,
        tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert
        to use virObjectUnref/virObjectRef
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      46ec5f85
  18. 02 8月, 2012 1 次提交
    • P
      qemu: Add support for "none" USB controller · fbe87126
      Peter Krempa 提交于
      This patch enables the "none" USB controller for qemu guests and adds
      valdiation on hot-plugged devices if the guest has USB disabled.
      
      This patch also adds a set of tests to check parsing of domain XMLs that
      use the "none" controller and some forbidden situations concerning it.
      fbe87126
  19. 23 7月, 2012 1 次提交
    • P
      tests: Add support for catching domain XML parsing errors · fa54d2a8
      Peter Krempa 提交于
      This patch enhances qemuxml2argvtest to deal with semantically incorrect
      domain XMLs, that generate errors while parsing.
      
      This patch cleans up macros that invoke the tests and changes boolean
      flags to a bit array flag variable.
      fa54d2a8
  20. 11 7月, 2012 2 次提交
  21. 05 6月, 2012 1 次提交
  22. 18 5月, 2012 1 次提交
  23. 09 5月, 2012 2 次提交
    • O
      numad: Copy 'placement' of <numatune> to <vcpu> by default · 8d26a7fd
      Osier Yang 提交于
      With this patch, one can also fully drive numad by:
      
        <vcpu>2</vcpu>
        <numatune>
          <memory placement='auto'/>
        </numatune>
      
      New tests are added.
      8d26a7fd
    • O
      numad: Set memory policy from numad advisory nodeset · 97010eb1
      Osier Yang 提交于
      Though numad will manage the memory allocation of task dynamically,
      it wants management application (libvirt) to pre-set the memory
      policy according to the advisory nodeset returned from querying numad,
      (just like pre-bind CPU nodeset for domain process), and thus the
      performance could benefit much more from it.
      
      This patch introduces new XML tag 'placement', value 'auto' indicates
      whether to set the memory policy with the advisory nodeset from numad,
      and its value defaults to the value of <vcpu> placement, or 'static'
      if 'nodeset' is specified. Example of the new XML tag's usage:
      
        <numatune>
          <memory placement='auto' mode='interleave'/>
        </numatune>
      
      Just like what current "numatune" does, the 'auto' numa memory policy
      setting uses libnuma's API too.
      
      If <vcpu> "placement" is "auto", and <numatune> is not specified
      explicitly, a default <numatume> will be added with "placement"
      set as "auto", and "mode" set as "strict".
      
      The following XML can now fully drive numad:
      
      1) <vcpu> placement is 'auto', no <numatune> is specified.
      
         <vcpu placement='auto'>10</vcpu>
      
      2) <vcpu> placement is 'auto', no 'placement' is specified for
         <numatune>.
      
         <vcpu placement='auto'>10</vcpu>
         <numatune>
           <memory mode='interleave'/>
         </numatune>
      
      And it's also able to control the CPU placement and memory policy
      independently. e.g.
      
      1) <vcpu> placement is 'auto', and <numatune> placement is 'static'
      
         <vcpu placement='auto'>10</vcpu>
         <numatune>
           <memory mode='strict' nodeset='0-10,^7'/>
         </numatune>
      
      2) <vcpu> placement is 'static', and <numatune> placement is 'auto'
      
         <vcpu placement='static' cpuset='0-24,^12'>10</vcpu>
         <numatune>
           <memory mode='interleave' placement='auto'/>
         </numatume>
      
      A follow up patch will change the XML formatting codes to always output
      'placement' for <vcpu>, even it's 'static'.
      97010eb1
  24. 08 5月, 2012 1 次提交
  25. 04 5月, 2012 1 次提交
    • S
      tests: fix resource leak · a01e6721
      Stefan Berger 提交于
      Error: RESOURCE_LEAK:
      /libvirt/tests/qemuxml2argvtest.c:47:
      alloc_arg: Calling allocation function "virAlloc" on "ret".
      /libvirt/src/util/memory.c:101:
      alloc_fn: Storage is returned from allocation function "calloc".
      /libvirt/src/util/memory.c:101:
      var_assign: Assigning: "*((void **)ptrptr)" = "calloc(1UL, size)".
      /libvirt/tests/qemuxml2argvtest.c:54:
      leaked_storage: Variable "ret" going out of scope leaks the storage it points to.
      a01e6721
  26. 17 4月, 2012 2 次提交
    • O
      qemu: Split ide-drive into ide-cd and ide-hd · a4cda054
      Osier Yang 提交于
      A "ide-drive" device can be either a hard disk or a CD-ROM,
      if there is ",media=cdrom" specified for the backend, it's
      a CD-ROM, otherwise it's a hard disk.
      
      Upstream qemu splitted "ide-drive" into "ide-hd" and "ide-cd"
      since commit 1f56e32, and ",media=cdrom" is not required for
      ide-cd anymore. "ide-drive" is still supported for backwards
      compatibility, but no doubt we should go foward.
      a4cda054
    • O
      qemu: Split scsi-disk into into scsi-hd and scsi-cd · 02e8d0cf
      Osier Yang 提交于
      A "scsi-disk" device can be either a hard disk or a CD-ROM,
      if there is ",media=cdrom" specified for the backend, it's
      a CD-ROM, otherwise it's a hard disk.
      
      But upstream qemu splitted "scsi-disk" into "scsi-hd" and
      "scsi-cd" since commit b443ae, and ",media=cdrom" is not
      required for scsi-cd anymore. "scsi-disk" is still supported
      for backwards compatibility, but no doubt we should go
      foward.
      02e8d0cf
  27. 06 4月, 2012 1 次提交
    • L
      test: fix build errors with gcc 4.7.0 and -O0 · 06a1a45c
      Laine Stump 提交于
      When building on Fedora 17 (which uses gcc 4.7.0) with -O0 in CFLAGS,
      three of the tests failed to compile.
      
      cputest.c and qemuxml2argvtest.c had non-static structs defined
      inside the macro that was being repeatedly invoked. Due to some so-far
      unidentified change in gcc, the stack space used by variables defined
      inside { } is not recovered/re-used when the block ends, so all these
      structs have become additive (this is the same problem worked around
      in commit cf57d345). Fortunately, these two files could be fixed with
      a single line addition of "static" to the struct definition in the
      macro.
      
      virnettlscontexttest.c was a bit different, though. The problem structs
      in the do/while loop of macros had non-constant initializers, so it
      took a bit more work and piecemeal initialization instead of member
      initialization to get things to be happy.
      
      In an ideal world, none of these changes should be necessary, but not
      knowing how long it will be until the gcc regressions are fixed, and
      since the code is just as correct after this patch as before, it makes
      sense to fix libvirt's build for -O0 while also reporting the gcc
      problem.
      06a1a45c
  28. 27 3月, 2012 1 次提交
    • M
      Cleanup for a return statement in source files · 9943276f
      Martin Kletzander 提交于
      Return statements with parameter enclosed in parentheses were modified
      and parentheses were removed. The whole change was scripted, here is how:
      
      List of files was obtained using this command:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$'
      
      Found files were modified with this command:
      sed -i -e                                                                 \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      
      Then checked for nonsense.
      
      The whole command looks like this:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      9943276f
  29. 23 3月, 2012 1 次提交
    • O
      qemu: Do not start with source for removable disks if tray is open · ad7db439
      Osier Yang 提交于
      This is similiar with physical world, one will be surprised if the
      box starts with medium exists while the tray is open.
      
      New tests are added, tests disk-{cdrom,floppy}-tray are for the qemu
      supports "-device" flag, and disk-{cdrom,floppy}-no-device-cap are
      for old qemu, i.e. which doesn't support "-device" flag.
      ad7db439
  30. 14 3月, 2012 1 次提交
  31. 09 3月, 2012 2 次提交
  32. 06 3月, 2012 1 次提交
    • L
      qemu: support type='hostdev' network devices at domain start · 8639a420
      Laine Stump 提交于
      This patch makes sure that each network device ("interface") of
      type='hostdev' appears on both the hostdevs list and the nets list of
      the virDomainDef, and it modifies the qemu driver startup code so that
      these devices will be presented to qemu on the commandline as hostdevs
      rather than as network devices.
      
      It does not add support for hotplug of these type of devices, or code
      to honor the <mac address> or <virtualport> given in the config (both
      of those will be done in separate patches).
      
      Once each device is placed on both lists, much of what this patch does
      is modify places in the code that traverse all the device lists so
      that these hybrid devices are only acted on once - either along with
      the other hostdevs, or along with the other network interfaces. (In
      many cases, only one of the lists is traversed / a specific operation
      is performed on only one type of device. In those instances, the code
      can remain unchanged.)
      
      There is one special case - when building the commandline, interfaces
      are allowed to proceed all the way through
      networkAllocateActualDevice() before deciding to skip the rest of
      netdev-specific processing - this is so that (once we have support for
      networks with pools of hostdev devices) we can get the actual device
      allocated, then rely on the loop processing all hostdevs to generate
      the correct commandline.
      
      (NB: <interface type='hostdev'> is only supported for PCI network
      devices that are SR-IOV Virtual Functions (VF). Standard PCI[e] and
      USB devices, and even the Physical Functions (PF) of SR-IOV devices
      can only be assigned to a guest using the more basic <hostdev> device
      entry. This limitation is mostly due to the fact that non-SR-IOV
      ethernet devices tend to lose mac address configuration whenever the
      card is reset, which happens when a card is assigned to a guest;
      SR-IOV VFs fortunately don't suffer the same problem.)
      8639a420