1. 21 6月, 2011 1 次提交
    • C
      Promote virEvent*Handle/Timeout to public API · 6094ad7b
      Cole Robinson 提交于
      Since we virEventRegisterDefaultImpl is now a public API, callers need
      a way to invoke the default registered Handle and Timeout functions. We
      already have general functions for these internally, so promote
      them to the public API.
      
      v2:
          Actually add APIs to libvirt.h
      6094ad7b
  2. 07 6月, 2011 1 次提交
  3. 03 6月, 2011 1 次提交
  4. 02 6月, 2011 3 次提交
  5. 31 5月, 2011 4 次提交
    • M
      Support maximum and current memory flags in libxl driver · bf7f7983
      Markus Groß 提交于
      Add support to set the maximum memory of the domain.
      Also add support to change the memory of the current
      state of the domain, which translates to a running
      domain or the config of the domain.
      
      Based on the code from the qemu driver.
      bf7f7983
    • M
      Add domainSave/Restore to libxl driver · db0274c9
      Markus Groß 提交于
      v3:
      * initialize xml pointer to avoid segfault
      * throw error message if domain is paused as
        libxenlight itself will pause it
      
      v2:
      * header is now padded and has a version field
      * the correct restore function from libxl is used
      * only create the restore event once in libxlVmStart
      db0274c9
    • M
      Add domainCoreDump to libxl driver · e69b1921
      Markus Groß 提交于
      v2:
      * incorporated Jim Fehlig's review
      e69b1921
    • M
      Populate domid field of devices for libxenlight · 648b521e
      Markus Groß 提交于
      This patch fixes the population of the
      libxenlight data structures. Now the devices
      should be removed correctly from the xenstore
      if they are detached.
      648b521e
  6. 29 5月, 2011 2 次提交
    • E
      sched: provide new API shims for remaining drivers · bb6cb66f
      Eric Blake 提交于
      Well, the remaining drivers that already had the get/set
      scheduler parameter functionality to begin with.
      
      For now, this blindly treats VIR_DOMAIN_SCHEDINFO_CURRENT as
      the only supported operation for these 5 domains; it will
      take domain-specific patches if more specific behavior is
      preferred.
      
      * src/esx/esx_driver.c (esxDomainGetSchedulerParameters)
      (esxDomainSetSchedulerParameters): Move guts...
      (esxDomainGetSchedulerParametersFlags)
      (esxDomainSetSchedulerParametersFlags): ...to new functions.
      * src/libxl/libxl_driver.c (libxlDomainGetSchedulerParameters)
      (libxlDomainSetSchedulerParameters)
      (libxlDomainGetSchedulerParametersFlags)
      (libxlDomainSetSchedulerParametersFlags): Likewise.
      * src/lxc/lxc_driver.c (lxcGetSchedulerParameters)
      (lxcSetSchedulerParameters, lxcGetSchedulerParametersFlags)
      (lxcSetSchedulerParametersFlags): Likewise.
      * src/test/test_driver.c (testDomainGetSchedulerParams)
      (testDomainSetSchedulerParams, testDomainGetSchedulerParamsFlags)
      (testDomainSetSchedulerParamsFlags): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainGetSchedulerParameters)
      (xenUnifiedDomainSetSchedulerParameters)
      (xenUnifiedDomainGetSchedulerParametersFlags)
      (xenUnifiedDomainSetSchedulerParametersFlags): Likewise.
      bb6cb66f
    • E
      maint: prefer newer API names internally · 163e5f04
      Eric Blake 提交于
      Rather mechanical in nature.
      
      * src/driver.h: Use newer virTypedParameter API names.
      * src/libvirt.c: Likewise.
      * daemon/remote.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xen_hypervisor.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      163e5f04
  7. 26 5月, 2011 2 次提交
    • M
      Add disk attach/detach support to libxl driver · fffea7fe
      Markus Groß 提交于
      Based on the device attach/detach code from the QEMU driver,
      but using the new functions to create the structures associated.
      * src/libxl/libxl_driver.c: implements domainAttachDevice,
        domainAttachDeviceFlags, domainDetachDevice, domainDetachDeviceFlags
        and domainUpdateDeviceFlags
      fffea7fe
    • M
      Fix libxl vm def handling on domU cleanup · 685753a3
      Markus Groß 提交于
      * src/libxl/libxl_driver.c: in libxlVmCleanup, free up the
        newDef definition if present overwise it would be leaked.
      685753a3
  8. 19 5月, 2011 4 次提交
    • E
      build: silence clang false positive · 7647422a
      Eric Blake 提交于
      Clang couldn't quite see that the same condition of
      (flags & VIR_DOMAIN_MEM_CONFIG) is used twice, such that
      the second block is guaranteed that def was assigned in
      the first block.
      
      * src/libxl/libxl_driver.c (libxlDomainSetMemoryFlags): Add a hint
      for clang.
      7647422a
    • M
      Clarify that virDomainSetSchedulerParameters(Flags) can take subsets · d870ec36
      Matthias Bolte 提交于
      Add invalid argument checks for params and nparams to the public API
      and remove them from the drivers (e.g. xend).
      
      Add subset handling to libxl and test drivers.
      d870ec36
    • M
      Clarify the semantic of virDomainGetSchedulerParameters arguments · e430c0d0
      Matthias Bolte 提交于
      params and nparams are essential and cannot be NULL. Check this in
      libvirt.c and remove redundant checks from the drivers (e.g. xend).
      
      Instead of enforcing that nparams must point to exact same value as
      returned by virDomainGetSchedulerType relax this to a lower bound
      check. This is what some drivers (e.g. xen hypervisor and esx)
      already did. Other drivers (e.g. xend) didn't check nparams at all
      and assumed that there is enough space in params.
      
      Unify the behavior in all drivers to a lower bound check and update
      nparams to the number of valid values in params on success.
      e430c0d0
    • M
      Clarify semantic of nparams argument of virDomainGetSchedulerType · 7b2f20b1
      Matthias Bolte 提交于
      Some drivers assumed it can be NULL (e.g. qemu and lxc) and check it
      before assigning to it, other drivers assumed it must be non-NULL
      (e.g. test and esx) and just assigned to it.
      
      Unify this to nparams being optional and document it.
      7b2f20b1
  9. 16 5月, 2011 6 次提交
    • D
      Add many version number annotations to drivers · 9b1ae97f
      Daniel P. Berrange 提交于
      Add many version number annotations to the internal driver
      tables, to allow hvsupport.html to display more accurate
      information
      9b1ae97f
    • D
      Convert all driver struct intializers to C99 style · 879d409e
      Daniel P. Berrange 提交于
      Change all the driver struct initializers to use the
      C99 style, leaving out unused fields. This will make
      it possible to add new APIs without changing every
      driver. eg change:
      
          qemudDomainResume, /* domainResume */
          qemudDomainShutdown, /* domainShutdown */
          NULL, /* domainReboot */
          qemudDomainDestroy, /* domainDestroy */
      
      to
      
          .domainResume = qemudDomainResume,
          .domainShutdown = qemudDomainShutdown,
          .domainDestroy = qemudDomainDestroy,
      
      And get rid of any existing C99 style initializersr which
      set NULL, eg change
      
           .listPools          = vboxStorageListPools,
           .numOfDefinedPools  = NULL,
           .listDefinedPools   = NULL,
           .findPoolSources    = NULL,
           .poolLookupByName   = vboxStoragePoolLookupByName,
      
      to
      
           .listPools          = vboxStorageListPools,
           .poolLookupByName   = vboxStoragePoolLookupByName,
      879d409e
    • D
      Tweak driver naming for consistency with public API · 360df019
      Daniel P. Berrange 提交于
      Fix some driver names:
      
        s/virDrvCPUCompare/virDrvCompareCPU/
        s/virDrvCPUBaseline/virDrvBaselineCPU/
        s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/
        s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/
        s/virDrvSecretListSecrets/virDrvListSecrets/
      
      And some driver struct field names:
      
        s/getFreeMemory/nodeGetFreeMemory/
      360df019
    • J
      Implement domain state reason · b046c55d
      Jiri Denemark 提交于
      Only in drivers which use virDomainObj, drivers that query hypervisor
      for domain status need to be updated separately in case their hypervisor
      supports this functionality.
      
      The reason is also saved into domain state XML so if a domain is not
      running (i.e., no state XML exists) the reason will be lost by libvirtd
      restart. I think this is an acceptable limitation.
      b046c55d
    • J
      Implement basic virDomainGetState in all drivers · 26d94012
      Jiri Denemark 提交于
      Reason is currently always set to 0 (i.e., *_UNKNOWN).
      26d94012
    • J
      Internal driver API for virDomainGetState · 6feb1341
      Jiri Denemark 提交于
      6feb1341
  10. 14 5月, 2011 1 次提交
  11. 13 5月, 2011 2 次提交
    • C
      libxl: Convert to virDomainEventState · 7405aebe
      Cole Robinson 提交于
      7405aebe
    • M
      screenshot: Defining the internal API · 3c386643
      Michal Privoznik 提交于
      * src/driver.h: Stub code for new API
      * src/esx/esx_driver.c, src/libxl/libxl_driver.c,
        src/lxc/lxc_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        rc/remote/remote_driver.c, rc/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/vmware/vmware_driver.c, src/xen/xen_driver.c,
        src/xen/xen_driver.h, src/xen/xen_hypervisor.c,
        src/xen/xen_inotify.c, src/xen/xend_internal.c,
        src/xen/xm_internal.c, src/xen/xs_internal.c,
        src/xenapi/xenapi_driver.c: Add dummy entries in driver
        table for new APIs
      3c386643
  12. 12 5月, 2011 2 次提交
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4
    • E
      build: remove some dead assignments · 4c6ae9ae
      Eric Blake 提交于
      No syntactic effect; this merely silences some clang warnings.
      
      * src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Drop
      redundant ret=0 statement.
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextDriveDel):
      Likewise.
      4c6ae9ae
  13. 11 5月, 2011 2 次提交
  14. 07 5月, 2011 1 次提交
    • M
      Balloon dom0 in libxl driver · 0d9936f6
      Markus Groß 提交于
      Creating a domU on a freshly booted dom0 does not work,
      because the libxl driver does not allocate memory for the domU.
      After creating a domain with xl libvirt is able to create domains too.
      This patch reserves enough memory for the domU first.
      0d9936f6
  15. 04 5月, 2011 1 次提交
    • E
      libxl: avoid compiler warning · 710f8811
      Eric Blake 提交于
      Detected by gcc:
      
      libxl/libxl_driver.c: In function 'libxlDomainDestroy':
      libxl/libxl_drier.c:1351:30: error: variable 'priv' set but not used [-Werror=unused-but-set-variable]
      
      * src/libxl/libxl_driver.c (libxlDomainDestroy): Delete unused
      variable.
      710f8811
  16. 19 4月, 2011 1 次提交
  17. 08 4月, 2011 1 次提交
  18. 07 4月, 2011 1 次提交
  19. 06 4月, 2011 1 次提交
    • E
      libxl: avoid compiler warning · 3eb869a0
      Eric Blake 提交于
      cc1: warnings being treated as errors
      libxl/libxl_driver.c: In function 'libxlDomainSetVcpusFlags':
      libxl/libxl_driver.c:1570:14: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]
      libxl/libxl_driver.c:1578:15: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]
      
      This was the only use of floor() and ceil(), and floating-point
      is overkill for power-of-two manipulations.
      
      * src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Avoid -lm
      for trivial computations.
      3eb869a0
  20. 05 4月, 2011 1 次提交
  21. 01 4月, 2011 1 次提交
    • D
      Fix libxl driver startup · 03ede2f6
      Daniel Veillard 提交于
        When you happen to have a libvirtd binary compiled with the
      libxenlight driver (say you have installed xen-4.1 libraries)
      but not running a xen enabled system, then libvirtd fails to start.
      
      The cause is that libxlStartup() returns -1 when failing to initialize
      the library, and this propagates to virStateInitialize() which consider
      this a failure. We should only exit libxlStartup with an error code
      if something like an allocation error occurs, not if the driver failed
      to initialize.
      
      * src/libxl/libxl_driver.c: fix libxlStartup() to not return -1
        when failing to initialize the libxenlight library
      03ede2f6
  22. 29 3月, 2011 1 次提交