1. 05 4月, 2013 2 次提交
  2. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  3. 08 2月, 2013 2 次提交
  4. 05 2月, 2013 1 次提交
    • D
      Introduce a virQEMUDriverConfigPtr object · b090aa7d
      Daniel P. Berrange 提交于
      Currently the virQEMUDriverPtr struct contains an wide variety
      of data with varying access needs. Move all the static config
      data into a dedicated virQEMUDriverConfigPtr object. The only
      locking requirement is to hold the driver lock, while obtaining
      an instance of virQEMUDriverConfigPtr. Once a reference is held
      on the config object, it can be used completely lockless since
      it is immutable.
      
      NB, not all APIs correctly hold the driver lock while getting
      a reference to the config object in this patch. This is safe
      for now since the config is never updated on the fly. Later
      patches will address this fully.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b090aa7d
  5. 19 12月, 2012 1 次提交
  6. 29 11月, 2012 1 次提交
  7. 27 9月, 2012 2 次提交
  8. 13 9月, 2012 1 次提交
    • D
      Turn QEMU capabilities object into a full virObjectPtr · beac09fd
      Daniel P. Berrange 提交于
      The current qemu capabilities are stored in a virBitmapPtr
      object, whose type is exposed to callers. We want to store
      more data besides just the flags, so we need to move to a
      struct type. This object will also need to be reference
      counted, since we'll be maintaining a cache of data per
      binary. This change introduces a 'qemuCapsPtr' virObject
      class. Most of the change is just renaming types and
      variables in all the callers
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      beac09fd
  9. 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
  10. 11 7月, 2012 1 次提交
  11. 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
  12. 04 2月, 2012 1 次提交
    • E
      build: expand rule to cover testsuite · 8fe454ce
      Eric Blake 提交于
      The bulk of this patch was done with:
      
      sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c
      
      followed by fixing the few compile errors that resulted.
      
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation):
      Remove tests from exemption.
      * tests/testutils.h: Add common header.
      * tests/commandhelper.c: Fix offenders.
      * tests/cputest.c: Likewise.
      * tests/domainsnapshotxml2xmltest.c: Likewise.
      * tests/interfacexml2xmltest.c: Likewise.
      * tests/networkxml2argvtest.c: Likewise.
      * tests/networkxml2xmltest.c: Likewise.
      * tests/nodedevxml2xmltest.c: Likewise.
      * tests/nodeinfotest.c: Likewise.
      * tests/nwfilterxml2xmltest.c: Likewise.
      * tests/qemuargv2xmltest.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/qemuxmlnstest.c: Likewise.
      * tests/qparamtest.c: Likewise.
      * tests/sexpr2xmltest.c: Likewise.
      * tests/storagepoolxml2xmltest.c: Likewise.
      * tests/storagevolxml2xmltest.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/virshtest.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      * tests/xml2sexprtest.c: Likewise.
      8fe454ce
  13. 21 12月, 2011 1 次提交
    • 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
  14. 02 12月, 2011 1 次提交
    • E
      build: properly skip tests · da8061ee
      Eric Blake 提交于
      I got this failure on FreeBSD:
      
      shunloadtest.c: In function 'main':
      shunloadtest.c:150: error: 'EXIT_AM_SKIP' undeclared (first use in this function)
      
      but inspection showed several other problems, all fixed here.
      
      * tests/domainsnapshotxml2xmltest.c [!WITH_QEMU]: Ensure
      EXIT_AM_SKIP is defined.
      * tests/esxutilstest.c [!WITH_ESX]: Likewise.
      * tests/openvzutilstest.c [!WITH_OPENVZ]: Likewise.
      * tests/qemuargv2xmltest.c [!WITH_QEMU]: Likewise.
      * tests/qemuhelptest.c [!WITH_QEMU]: Likewise.
      * tests/qemuxml2argvtest.c [!WITH_QEMU]: Likewise.
      * tests/qemuxml2xmltest.c [!WITH_QEMU]: Likewise.
      * tests/qemuxmlnstest.c [!WITH_QEMU]: Likewise.
      * tests/shunloadtest.c [!linux]: Likewise.
      * tests/vmx2xmltest.c [!WITH_VMX]: Likewise.
      * tests/xml2vmxtest.c [!WITH_VMX]: Likewise.
      da8061ee
  15. 19 11月, 2011 1 次提交
    • D
      Rename Macvtap management APIs · 43925db7
      Daniel P. Berrange 提交于
      In preparation for code re-organization, rename the Macvtap
      management APIs to have the following patterns
      
        virNetDevMacVLanXXXXX     - macvlan/macvtap interface management
        virNetDevVPortProfileXXXX - virtual port profile management
      
      * src/util/macvtap.c, src/util/macvtap.h: Rename APIs
      * src/conf/domain_conf.c, src/network/bridge_driver.c,
        src/qemu/qemu_command.c, src/qemu/qemu_command.h,
        src/qemu/qemu_driver.c, src/qemu/qemu_hotplug.c,
        src/qemu/qemu_migration.c, src/qemu/qemu_process.c,
        src/qemu/qemu_process.h: Update for renamed APIs
      43925db7
  16. 25 10月, 2011 1 次提交
  17. 19 10月, 2011 1 次提交
    • P
      qemu: Test name-space handling · aa84f966
      Philipp Hahn 提交于
      Add test cases for parsing the qemu-name-space.
      This is based on qemuxml2argv{test,data/}, but can not reside in
      qemuxml2argv{test,data/} because ...
      
      1. qemuxmlns-qemu-ns-domain.xml is not schema-valid and breaks
      domainschematest. The test is still important to detect xmlns:qemu
      bindings to a name-space other than
      http://libvirt.org/schemas/domain/qemu/1.0
      
      2. they break qemuxml2xml, because the xmlns:qemu binding is moved to
      the top-level <domain> element when converting from argv to xml.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      aa84f966