1. 17 12月, 2012 1 次提交
    • G
      qemu: use newer -device video device in qemu commandline · aa51202b
      Guannan Ren 提交于
      '-device VGA' maps to '-vga std'
      '-device cirrus-vga' maps to '-vga cirrus'
      '-device qxl-vga' maps to '-vga qxl'
                   (there is also '-device qxl' for secondary devices)
      '-device vmware-svga' maps to '-vga vmware'
      
      For qemu(>=1.2), we can use -device to replace -vga for video
      device. For the primary video device, the patch tries to use 0x2
      slot for matching old qemu. If the 0x2 slot is allocated already,
      the addr property could help for using any available slot.
      For qemu(< 1.2), we keep using -vga for primary device.
      aa51202b
  2. 07 12月, 2012 1 次提交
  3. 29 11月, 2012 1 次提交
  4. 27 11月, 2012 1 次提交
  5. 22 11月, 2012 1 次提交
  6. 06 11月, 2012 1 次提交
  7. 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
  8. 18 10月, 2012 1 次提交
  9. 16 10月, 2012 1 次提交
  10. 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
  11. 27 9月, 2012 3 次提交
  12. 20 9月, 2012 2 次提交
  13. 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
  14. 15 9月, 2012 1 次提交
  15. 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
  16. 13 9月, 2012 2 次提交
  17. 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
  18. 03 9月, 2012 1 次提交
  19. 01 9月, 2012 1 次提交
  20. 22 8月, 2012 1 次提交
  21. 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
  22. 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
  23. 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
  24. 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
  25. 11 7月, 2012 2 次提交
  26. 05 6月, 2012 1 次提交
  27. 18 5月, 2012 1 次提交
  28. 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
  29. 08 5月, 2012 1 次提交
  30. 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
  31. 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
  32. 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
  33. 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