1. 10 9月, 2009 20 次提交
    • D
      Fix use of dlopen modules · fcd4e269
      Daniel P. Berrange 提交于
      Remove the bogus dependancy between node_device.c & storage_backend.c
      by moving the virWaitForDevices into util.h where it can be shared
      safely
      
      * src/storage_backend_disk.c, src/storage_backend_logical.c,
        src/storage_backend_mpath.c, src/storage_backend_scsi.c: Replace
        virStorageBackendWaitForDevices with virFileWaitForDevices
      * src/storage_backend.c, src/storage_backend.h: Remove
        virStorageBackendWaitForDevices, virWaitForDevices
      * src/util.h, src/util.c: Add virFileWaitForDevices
      * configure.in: Move xmlrpc check further down after pkgconfig
        is detected
      * src/Makefile.am: Add missing XMLRPC_CFLAGS/LIBS to opennebula
      * src/libvirt_private.syms: Add many missing exports
      fcd4e269
    • M
      Consolidate "cont" into qemudMonitorSendCont() · 7ec20935
      Miloslav Trmač 提交于
      The interface allows qemudMonitorSendCont() to report errors that are
      not overridden by its callers.
      
      Also fix a potential infinite loop in qemuDomainCoreDump() if sending
      cont repeatedly fails.
      
      * src/qemu_driver.c (qemudMonitorSendCont): New function.
        (qemudAutostartConfigs): Reset error before each call to
        qemudStartVMDaemon().
        (qemudInitCpus, qemudDomainResume, qemudDomainCoreDump,
        qemudDomainRestore, qemudDomainMigratePerform,
        qemudDomainMigrateFinish2): Use qemudMonitorSendCont().
      7ec20935
    • D
      Cleanup sec driver error reporting to use virReportSystemError · 7887e003
      Daniel P. Berrange 提交于
      * src/security_selinux.c: Use virReportSystemError whereever an
        errno is involved
      * src/qemu_driver.c: Don't overwrite error message from the
        security driver
      7887e003
    • D
      Support relabelling of USB and PCI devices · 0e9ae444
      Daniel P. Berrange 提交于
      * src/security.h: Driver API for relabelling host devices
      * src/security_selinux.c: Implement relabelling of PCI and USB
        devices
      * src/qemu_driver.c: Relabel USB/PCI devices before hotplug
      0e9ae444
    • D
      Port QEMU driver to use USB/PCI device helpers · c42c1b8a
      Daniel P. Berrange 提交于
      * src/qemu_driver.c: Remove usbfs/sysfs iterator code and call
        into generic helper APIs instead when setting device permissions
      c42c1b8a
    • D
      Add helper APIs for iterating over PCI device resource files · ec31cd76
      Daniel P. Berrange 提交于
      * src/pci.h, src/pci.c: Helper for iterating over PCI device
        resource files
      * src/libvirt_private.syms: Export pciDeviceFileIterate
      ec31cd76
    • D
      Add helper module for dealing with USB host devices · 1e060bf2
      Daniel P. Berrange 提交于
      * src/Makefile.am: Add usb.h and usb.h to libvirt_util.la
      * src/libvirt_private.syms: Export symbols
      * src/usb.c, src/usb.h: Helper APIs for USB host devices
      1e060bf2
    • D
      Fix more OOM handling bugs · cbe63e52
      Daniel P. Berrange 提交于
      * src/qemu_conf.c: Fix leak of values upon OOM
      * src/xend_internal.c: Fix missing check for OOM failure
      * tests/qemuargv2xmltest.c, tests/qemuxml2argvtest.c: Free
        stateDir upon exit to avoid leak
      cbe63e52
    • D
      Fix logging buffer overrun read · 755915ea
      Daniel P. Berrange 提交于
      * src/logging.c: Fix buffer offset in logging read
      755915ea
    • D
      Fix misc thread locking bugs / bogus warnings · 5c8d3d3b
      Daniel P. Berrange 提交于
      Fix all thread locking bugs reported by object-locking test
      case.
      
      NB, some of the driver locking is getting too coarse. Driver
      mutexes really need to be turned into RW locks instead to
      significantly increase concurrency.
      
      * src/lxc_driver.c: Fix useof driver when unlocked in the methods
        lxcDomainGetInfo, lxcSetSchedulerParameters, and
        lxcGetSchedulerParameters
      * src/opennebula/one_driver.c: Fix missing unlock in oneDomainUndefine.
        Fix use of driver when unlocked in oneDomainGetInfo,
        oneGetOSType, oneDomainShutdown
      * src/qemu_driver.c: Fix use of driver when unlocked in
        qemudDomainSavem, qemuGetSchedulerType, qemuSetSchedulerParameters
        and qemuGetSchedulerParameters
      * src/storage_driver.c: Re-work storagePoolCreate to avoid bogus
        lock checking warning. Re-work storageVolumeCreateXMLFrom to
        remove a potential NULL de-reference & avoid bogus lock check
        warnings
      * src/test.c: Remove testDomainAssignDef since it break lock chekc
        warnings.
      * tests/object-locking.ml: Add oneDriverLock, oneDriverUnlock
        and one_driver_t methods/types to allow lock checking on the
         OpenNebula drivers
      5c8d3d3b
    • M
      Simplify and fix qemudCanonicalizeMachine() · 6ab16aaf
      Mark McLoughlin 提交于
      The algorithm is quite simple:
      
        If the emulator matches a guest's domain:
          if domain has machine type info:
            check the domain's machine type info
          else
            check the guest's default machine type info
        else if the emulator matches the guest's default emulator:
           check the guest's default machine type info
      
      The previous implementation was incorrectly falling back to the default
      machine type info if the domain's machine type info didn't have an
      alias.
      
      * src/qemu_driver.c: simplify and fix qemudCanonicalizeMachine()
      6ab16aaf
    • M
      Probe machine types from kvm binary too · 3e14a8dc
      Mark McLoughlin 提交于
      Currently we only probe the main qemu binary for machine types, but we
      should also probe the kvm binary.
      
      * src/qemu_conf.c: probe kvm binary machines in qemudCapsInitGuest()
      3e14a8dc
    • M
      Look up machine types from all domains in qemudGetOldMachines() · f5dd3bcd
      Mark McLoughlin 提交于
      Rather than just looking at the default domain info, look at all
      domains
      
      * src/qemu_conf.c: look at all domains in qemudGetOldMachines()
      f5dd3bcd
    • M
      Split up qemudGetOldMachines() · 44646747
      Mark McLoughlin 提交于
      We need to look at all the domain infos in guest capabilities, not
      just the defaults.
      
      In order to allow that, split out a qemudGetOldMachinesFromInfo()
      from qemudGetOldMachines(). We'll make more use of it in the next
      patch.
      
      * src/qemu_conf.c: split out qemudGetOldMachinesFromInfo() from
        qemudGetOldMachines()
      44646747
    • M
      Canonicalize the qemu machine type in qemuxml2argvtest · 6e7ab461
      Mark McLoughlin 提交于
      This doesn't have any affect on the current tests because we don't have
      any machine aliases in the current test data.
      
      * src/qemu_conf.h, src/qemu_driver.c: expose qemudCanonicalizeMachine()
        for the tests
      
      * tests/qemuxml2argvtest.c: canonicalize the machine type
      6e7ab461
    • M
      Fix formatting of machine types in capabilities XML · 3fa4a82e
      Mark McLoughlin 提交于
      * src/capabilities.c: fix machine type formatting in
        virCapabilitiesFormatXML()
      3fa4a82e
    • C
      Fix regression from "Avoid polling on FDs with no events" · 100cae73
      Chris Lalancette 提交于
      After the mentioned patch was applied, I noticed that
      shutting down a kvm guest from inside (i.e. poweroff) caused
      the guest to shutdown, but not removed from the list of
      active guests.  DanB pointed out that the problem is that
      the virEventAddHandle() call in the qemu driver was asking
      to watch for 0 events, not HANGUP | ERROR as it should.  Add
      these events so that shutdown works again.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      100cae73
    • J
      qemu_driver.c: factor out more duplication · f2387093
      Jim Meyering 提交于
      * src/qemu_driver.c (qemudDomainRestore): Use the new ...TypeToString
      function here, too.
      f2387093
    • R
      Close logfile fd after spawning qemu · 32456779
      Ryota Ozaki 提交于
      * src/qemu_driver.c: avoid a leak of file descriptor when exec'ing qemu
      32456779
    • C
      Reintroduce support for lzop compression · 8d4ed2ad
      Charles Duffy 提交于
      lzop was removed due to some confusion over whether it provided functional
      advantages distinct from xz. This has been addressed in the mailing list post
      archived at http://permalink.gmane.org/gmane.comp.emulators.libvirt/16487, and
      support for lzop is re-added here.
      
      * libvirt.spec.in: add dependancy on lzop
      * src/qemu.conf: update documentation of save_image_format
      * src/qemu_driver.c: re-add lzop compression option
      8d4ed2ad
  2. 09 9月, 2009 4 次提交
    • D
      Deprecate lzma and lzop in favor of xz, add dep · c5a30558
      Daniel Veillard 提交于
      * src/qemu_driver.c: drop lzma and lzop images compression options
        as they are deprecated by xz
      * libvirt.spec.in: add requires for xz/bzip2/gzip as they are needed
        to implement the compression options
      c5a30558
    • J
      qemu_driver.c: factor out duplication in compression-type handling · aec22258
      Jim Meyering 提交于
      * src/qemu_driver.c (QEMUD_SAVE_FORMAT_LAST): Define.
      (qemudSaveCompressionTypeFromString): Declare.
      (qemudSaveCompressionTypeToString): Declare.
      (qemudDomainSave): Use those functions rather than open-coding them.
      Use "cat >> '%s' ..." in place of equivalent
      "dd of='%s' oflag=append conv=notrunc ...".
      aec22258
    • J
      also allow use of XZ for Qemu image compression · 1aec7d86
      Jim Meyering 提交于
      * src/qemu_driver.c (enum qemud_save_formats) [QEMUD_SAVE_FORMAT_XZ]:
      New member.
      [QEMUD_SAVE_FORMAT_LZMA]: Mark as deprecated.
      Use an explicit value for each member.
      (qemudDomainSave, qemudDomainRestore): Handle the new member.
      * src/qemu.conf: Mention xz, too.
      1aec7d86
    • J
      openvz_conf.c: remove dead store to "p"; use strchrnul · 5965de2f
      Jim Meyering 提交于
      * src/openvz_conf.c (openvzReadNetworkConf): Replace open-coded
      while loop with equivalent use of strchrnul.
      * bootstrap (modules): Add strchrnul.
      5965de2f
  3. 08 9月, 2009 14 次提交
  4. 07 9月, 2009 2 次提交