1. 09 2月, 2010 12 次提交
  2. 05 2月, 2010 12 次提交
  3. 04 2月, 2010 3 次提交
    • D
      Fix restore of QEMU guests with PCI device reservation · 83acdeaf
      Daniel P. Berrange 提交于
      When restoring from a saved guest image, the XML would already
      contain the PCI slot ID of the IDE controller & video card.
      The attempt to explicitly reserve this upfront would thus fail
      everytime.
      
      * src/qemu/qemu_conf.c: Reserve IDE controller / video card
        slot at time of need, rather than upfront
      83acdeaf
    • L
      Another fork() log locking cleanup in file creation · 730801d9
      Laine Stump 提交于
      Similar fix as previous one but for fork() usage when creating
      a file or directory
      
      * src/util/util.c: virLogLock() and virLogUnlock() around fork()
        in virFileCreate() and virDirCreateSimple()
      730801d9
    • C
      Fix log locking problem when using fork() in the library · cd0ef0e0
      Cole Robinson 提交于
      Ad pointed out by Dan Berrange:
      So if some thread in libvirtd is currently executing a logging call,
      while another thread calls virExec(), that other thread no longer
      exists in the child, but its lock is never released. So when the
      child then does virLogReset() it deadlocks.
      
      The only way I see to address this, is for the parent process to call
      virLogLock(), immediately before fork(), and then virLogUnlock()
      afterwards in both parent & child. This will ensure that no other
      thread
      can be holding the lock across fork().
      
      * src/util/logging.[ch] src/libvirt_private.syms: export virLogLock() and
        virLogUnlock()
      * src/util/util.c: lock just before forking and unlock just after - in
        both parent and child.
      cd0ef0e0
  4. 03 2月, 2010 13 次提交
    • D
      Fix locking for udev device add/remove · 8d42b9b4
      David Allan 提交于
      The original udev node device backend neglected to lock the driverState
      struct containing the device list when adding and removing devices
      * src/node_device/node_device_udev.c: add necessary locks in
        udevRemoveOneDevice() and udevAddOneDevice()
      8d42b9b4
    • J
      interface_conf.c: don't use a negative value as allocation size · fe1183a7
      Jim Meyering 提交于
      * src/conf/interface_conf.c (virInterfaceDefParseProtoIPv4): If
      virXPathNodeSet returns -1, indicate failure by returning -1 right away.
      (virInterfaceDefParseProtoIPv6): Likewise.
      fe1183a7
    • J
      virStoragePoolSourceListNewSource: avoid unconditional leak · 71c865f4
      Jim Meyering 提交于
      * src/conf/storage_conf.c (virStoragePoolSourceListNewSource):
      Remove an unused (and leaked) allocation.
      71c865f4
    • J
      xs_internal.c: don't use a negative value as allocation size · 361e46d6
      Jim Meyering 提交于
      * src/xen/xs_internal.c (xenStoreDomainIntroduced): Don't use -1
      as an allocation size upon xenStoreNumOfDomains failure.
      (xenStoreDomainReleased): Likewise.
      361e46d6
    • D
      Ensure QEMU DAC security driver is activated at all times · 9120f004
      Daniel P. Berrange 提交于
      If the primary security driver (SELinux/AppArmour) was disabled
      then the secondary QEMU DAC security driver was also disabled.
      This is mistaken, because the latter must be active at all times
      
      * src/qemu/qemu_driver.c: Ensure DAC driver is always active
      9120f004
    • J
      xen_hypervisor.c: remove all "domain == NULL" tests, ... · 7efec259
      Jim Meyering 提交于
      * src/xen/xen_hypervisor.c: Remove all "domain == NULL" tests.
      * src/xen/xen_hypervisor.h: Instead, use ATTRIBUTE_NONNULL to
      mark each "domain" parameter as "known always to be non-NULL".
      7efec259
    • J
      xen_hypervisor.c: avoid NULL deref for NULL domain argument · b62bf7a7
      Jim Meyering 提交于
      * src/xen/xen_hypervisor.c (xenHypervisorGetVcpus): Don't attempt
      to diagnose an unlikely NULL-domain or NULL-domain->conn error.
      b62bf7a7
    • D
      Tweak USB hostdevice XML handling · 23d6abd2
      Daniel P. Berrange 提交于
      When attaching a USB host device based on vendor/product, libvirt
      will resolve the vendor/product into a device/bus pair. This means
      that when printing XML we should allow device/bus info to be printed
      at any time if present
      
      * src/conf/domain_conf.c, docs/schemas/domain.rng: Allow USB device
        bus info alongside vendor/product
      23d6abd2
    • D
      Fix QEMU hotplug device alias assignment · 719c50ca
      Daniel P. Berrange 提交于
      To allow devices to be hot(un-)plugged it is neccessary to ensure
      they all have a unique device aliases. This fixes the hotplug
      methods to assign device aliases before invoking the monitor
      commands which need them
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Expose methods
        for assigning device aliases for disks, host devices and
        controllers
      * src/qemu/qemu_driver.c: Assign device aliases when hotplugging
        all types of device
      * tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args,
        tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.args:
        Update for changed hostdev naming scheme
      719c50ca
    • D
      Disable QEMU monitor IO debugging by default · db0b9e7d
      Daniel P. Berrange 提交于
      db0b9e7d
    • D
      Re-arrange QEMU device alias assignment code · 16478459
      Daniel P. Berrange 提交于
      This patch re-arranges the QEMU device alias assignment code to
      make it easier to call into the same codeblock when performing
      device hotplug. The new code has the ability to skip over already
      assigned names to facilitate hotplug
      
      * src/qemu/qemu_driver.c: Call qemuAssignDeviceNetAlias()
        instead of qemuAssignNetNames
      * src/qemu/qemu_conf.h: Export qemuAssignDeviceNetAlias()
        instead of qemuAssignNetNames
      * src/qemu/qemu_driver.c: Merge the legacy disk/network alias
        assignment code into the main methods
      16478459
    • D
      Remove direct storage of hostnet_name & vlan · 0943048a
      Daniel P. Berrange 提交于
      The current way of assigning names to the host network backend and
      NIC device in QEMU was over complicated, by varying naming scheme
      based on the NIC model and backend type. This simplifies the naming
      to simply be 'net0' and 'hostnet0', allowing code to easily determine
      the host network name and vlan based off the primary device alias
      name 'net0'. This in turn allows removal of alot of QEMU specific
      code from the XML parser, and makes it easier to assign new unique
      names for NICs that are hotplugged
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove hostnet_name
        and vlan fields from virNetworkDefPtr
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c:
        Use a single network alias naming scheme regardless of NIC type
        or backend type. Determine VLANs from the alias name.
      * tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args,
        tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args,
        tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args: Update
        for new simpler naming scheme
      0943048a
    • D
      Remove use of -netdev arg with QEMU · 49a0f6cd
      Daniel P. Berrange 提交于
      The QEMU 0.12.x tree has the -netdev command line argument, but not
      corresponding monitor command. We can't enable the former, without
      the latter since it will break hotplug/unplug.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Disable -netdev usage
        until 0.13 at earliest
      * tests/qemuxml2argvtest.c: Add test for -netdev syntax
      * tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args,
        tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml: Test
        data files for -netdev syntax
      49a0f6cd