1. 04 7月, 2016 1 次提交
  2. 27 10月, 2012 2 次提交
    • E
      blockjob: react to active block copy · b3822ed0
      Eric Blake 提交于
      For now, disk migration via block copy job is not implemented in
      libvirt.  But when we do implement it, we have to deal with the
      fact that qemu does not yet provide an easy way to re-start a qemu
      process with mirroring still intact.  Paolo has proposed an idea
      for a persistent dirty bitmap that might make this possible, but
      until that design is complete, it's hard to say what changes
      libvirt would need.  Even something like 'virDomainSave' becomes
      hairy, if you realize the implications that 'virDomainRestore'
      would be stuck with recreating the same mirror layout.
      
      But if we step back and look at the bigger picture, we realize that
      the initial client of live storage migration via disk mirroring is
      oVirt, which always uses transient domains, and that if a transient
      domain is destroyed while a mirror exists, oVirt can easily restart
      the storage migration by creating a new domain that visits just the
      source storage, with no loss in data.
      
      We can make life a lot easier by being cowards for now, forbidding
      certain operations on a domain.  This patch guarantees that we
      never get in a state where we would have to restart a domain with
      a mirroring block copy, by preventing saves, snapshots, migration,
      hot unplug of a disk in use, and conversion to a persistent domain
      (thankfully, it is still relatively easy to 'virsh undefine' a
      running domain to temporarily make it transient, run tests on
      'virsh blockcopy', then 'virsh define' to restore the persistence).
      Later, if the qemu design is enhanced, we can relax our code.
      
      The change to qemudDomainDefine looks a bit odd for undoing an
      assignment, rather than probing up front to avoid the assignment,
      but this is because of how virDomainAssignDef combines both a
      lookup and assignment into a single function call.
      
      * src/conf/domain_conf.h (virDomainHasDiskMirror): New prototype.
      * src/conf/domain_conf.c (virDomainHasDiskMirror): New function.
      * src/libvirt_private.syms (domain_conf.h): Export it.
      * src/qemu/qemu_driver.c (qemuDomainSaveInternal)
      (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot)
      (qemuDomainBlockJobImpl, qemudDomainDefine): Prevent dangerous
      actions while block copy is already in action.
      * src/qemu/qemu_hotplug.c (qemuDomainDetachDiskDevice): Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationIsAllowed): Likewise.
      b3822ed0
    • L
      qemu: fix attach/detach of netdevs with matching mac addrs · def31e4c
      Laine Stump 提交于
      This resolves:
      
         https://bugzilla.redhat.com/show_bug.cgi?id=862515
      
      which describes inconsistencies in dealing with duplicate mac
      addresses on network devices in a domain.
      
      (at any rate, it resolves *almost* everything, and prints out an
      informative error message for the one problem that isn't solved, but
      has a workaround.)
      
      A synopsis of the problems:
      
      1) you can't do a persistent attach-interface of a device with a mac
      address that matches an existing device.
      
      2) you *can* do a live attach-interface of such a device.
      
      3) you *can* directly edit a domain and put in two devices with
      matching mac addresses.
      
      4) When running virsh detach-device (live or config), only MAC address
      is checked when matching the device to remove, so the first device
      with the desired mac address will be removed. This isn't always the
      one that's wanted.
      
      5) when running virsh detach-interface (live or config), the only two
      items that can be specified to match against are mac address and model
      type (virtio, etc) - if multiple netdevs match both of those
      attributes, it again just finds the first one added and assumes that
      is the only match.
      
      Since it is completely valid to have multiple network devices with the
      same MAC address (although it can cause problems in many cases, there
      *are* valid use cases), what is needed is:
      
      1) remove the restriction that prohibits doing a persistent add of a
      netdev with a duplicate mac address.
      
      2) enhance the backend of virDomainDetachDeviceFlags to check for
      something that *is* guaranteed unique (but still work with just mac
      address, as long as it yields only a single results.
      
      This patch does three things:
      
      1) removes the check for duplicate mac address during a persistent
      netdev attach.
      
      2) unifies the searching for both live and config detach of netdevices
      in the subordinate functions of qemuDomainModifyDeviceFlags() to use the
      new function virDomainNetFindIdx (which matches mac address and PCI
      address if available, checking for duplicates if only mac address was
      specified). This function returns -2 if multiple matches are found,
      allowing the callers to print out an appropriate message.
      
      Steps 1 & 2 are enough to fully fix the problem when using virsh
      attach-device and detach-device (which require an XML description of
      the device rather than a bunch of commandline args)
      
      3) modifies the virsh detach-interface command to check for multiple
      matches of mac address and show an error message suggesting use of the
      detach-device command in cases where there are multiple matching mac
      addresses.
      
      Later we should decide how we want to input a PCI address on the virsh
      commandline, and enhance detach-interface to take a --address option,
      eliminating the need to use detach-device
      
      * src/conf/domain_conf.c
      * src/conf/domain_conf.h
      * src/libvirt_private.syms
        * added new virDomainNetFindIdx function
        * removed now unused virDomainNetIndexByMac and
          virDomainNetRemoveByMac
      
      * src/qemu/qemu_driver.c
        * remove check for duplicate max from qemuDomainAttachDeviceConfig
        * use virDomainNetFindIdx/virDomainNetRemove instead
          of virDomainNetRemoveByMac in qemuDomainDetachDeviceConfig
        * use virDomainNetFindIdx instead of virDomainIndexByMac
          in qemuDomainUpdateDeviceConfig
      
      * src/qemu/qemu_hotplug.c
        * use virDomainNetFindIdx instead of a homespun loop in
          qemuDomainDetachNetDevice.
      
      * tools/virsh-domain.c: modified detach-interface command as described
          above
      def31e4c
  3. 20 10月, 2012 2 次提交
    • E
      blockjob: remove unused parameters after previous patch · 67aea3fb
      Eric Blake 提交于
      Minor cleanup made possible by previous simplifications.
      
      * src/qemu/qemu_cgroup.h (qemuSetupDiskCgroup)
      (qemuTeardownDiskCgroup): Alter signature.
      * src/qemu/qemu_cgroup.c (qemuSetupDiskCgroup)
      (qemuTeardownDiskCgroup, qemuSetupCgroup): Update all uses.
      * src/qemu/qemu_hotplug.c (qemuDomainDetachPciDiskDevice)
      (qemuDomainDetachDiskDevice): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainAttachDeviceDiskLive)
      (qemuDomainChangeDiskMediaLive)
      (qemuDomainSnapshotCreateSingleDiskActive)
      (qemuDomainSnapshotUndoSingleDiskActive): Likewise.
      67aea3fb
    • E
      storage: use enum for disk driver type · e5e8d5d0
      Eric Blake 提交于
      Actually use the enum in the domain conf structure.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Store enum rather
      than string for disk type.
      * src/conf/domain_conf.c (virDomainDiskDefFree)
      (virDomainDiskDefParseXML, virDomainDiskDefFormat)
      (virDomainDiskDefForeachPath): Adjust users.
      * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenFormatSxprDisk):
      Likewise.
      * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk): Likewise.
      * src/vbox/vbox_tmpl.c (vboxAttachDrives): Likewise.
      * src/libxl/libxl_conf.c (libxlMakeDisk): Likewise.
      e5e8d5d0
  4. 15 10月, 2012 1 次提交
    • L
      qemu: reorganize qemuDomainChangeNet and qemuDomainChangeNetBridge · 6bde0a1a
      Laine Stump 提交于
      This patch resolves:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=805071
      
      to the extent that it can be resolved with current qemu functionality.
      It attempts to detect as many situations as possible when the simple
      operation of disconnecting an existing tap device from one bridge and
      attaching it to another will satisfy the change requested in
      virDomainUpdateDeviceFlags() for a network device. Before this patch,
      that situation could only be detected if the pre-change interface
      *and* the post-change interface definition were both "type='bridge'".
      After this patch, it can also be detected if the before or after
      interfaces are any combination of type='bridge' and type='network'
      (the networks can be <forward mode='nat|route|bridge'>, as long as
      they use a Linux host bridge and not macvtap connections).
      
      This extra effort is especially useful since the recent discovery that
      a netdev_del+netdev_add combo (to reconnect the network device with
      completely different hostside configuration) doesn't work properly
      with current qemu (1.2) unless it is accompanied by the matching
      device_del+device_add - see this mailing list message for details:
      
        http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg02355.html
      
      (A slight modification of the patch referenced there has been prepared
      to apply on top of this patch, but won't be pushed until qemu can be
      made to work with it.)
      
      * qemuDomainChangeNet needs access to the virDomainDeviceDef that
      holds the new netdef (so that it can clear out the virDomainDeviceDef
      if it ends up using the NetDef to replace the original), so the
      virDomainNetDefPtr arg is replaced with a virDomainDeviceDefPtr.
      
      * qemuDomainChangeNet previously checked for *some* changes to the
      interface config, but this check was by no means complete. It was also
      a bit disorganized.
      
      This refactoring of the code is (I believe) complete in its check of
      all NetDef attributes that might be changed, and either returns a
      failure (for changes that are simply impossible), or sets one of three
      flags:
      
        needLinkStateChange - if the device link state needs to go up/down
        needBridgeChange    - if everything else is the same, but it needs
                              to be connected to a difference linux host
                              bridge
        needReconnect       - if the entire host side of the device needs
                              to be torn down and reconstructed (currently
                              non-working, as mentioned above)
      
      Note that this function will refuse to make any change that requires
      the *guest* side of the device to be detached (e.g. changing the PCI
      address or mac address). Those would be disruptive enough to the guest
      that it's reasonable to require an explicit detach/attach sequence
      from the management application.
      
      * As mentioned above, qemuDomainChangeNet also does its best to
      understand when a simple change in attached bridge for the existing
      tap device will work vs. the need to completely tear down/reconstruct
      the host side of the device (including tap device).
      
      This patch *does not* implement the "reconnect" code anyway - there is
      a placeholder that turns that into an error. Rather, the purpose of
      this patch is to replicate existing behavior with code that is ready
      to have that functionality plugged in in a later patch.
      
      * The expanded uses for qemuDomainChangeNetBridge meant that it needed
      to be enhanced as well - it no longer replaces the original brname
      string in olddev with the new brname; instead, it relies on the
      caller to replace the *entire* olddev with newdev (since we've gone
      to great lengths to assure they are functionally identical other
      than the name of the bridge, this is now not only safe, but more
      correct). Additionally, qemuDomainNetChangeBridge can now set the
      bridge for type='network' interfaces as well as plain type='bridge'
      interfaces. (Note that I had to make this change simultaneous to the
      reorganization of qemuDomainChangeNet because the two are too
      closely intertwined to separate).
      6bde0a1a
  5. 11 10月, 2012 3 次提交
  6. 27 9月, 2012 1 次提交
  7. 21 9月, 2012 2 次提交
  8. 13 9月, 2012 3 次提交
    • 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
    • G
      qemu: build USB redirection filter qemu command line · 2d46f88d
      Guannan Ren 提交于
      Input XML snip:
      <redirdev bus='usb' type='spicevmc'>
         <address type='usb' bus='0' port='4'/>
       </redirdev>
      <redirfilter>
        <usbdev class='0x08' vendor='0x1234' product='0xbeef' \
                version='2.00' allow='yes'/>
        <usbdev class='-1' vendor='-1' product='-1' version='-1' allow='no'/>
      </redirfilter>
      
      will be converted to:
      -device usb-redir,chardev=charredir0,id=redir0,\
      filter=0x08:0x1234:0xBEEF:0x2000:1|-1:-1:-1:-1:0,bus=usb.0,port=4
      2d46f88d
    • E
      maint: fix missing spaces in message · 2387aa26
      Eric Blake 提交于
      I got an off-list report about a bad diagnostic:
      Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8
      
      True to form, I've added a syntax check rule to prevent it
      from recurring, and found several other offenders.
      
      * cfg.mk (sc_require_whitespace_in_translation): New rule.
      * src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add
      space.
      * src/esx/esx_util.c (esxUtil_ParseUri): Likewise.
      * src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSetMetadata)
      (qemuDomainGetMetadata): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise.
      * src/rpc/virnettlscontext.c
      (virNetTLSContextCheckCertDNWhitelist): Likewise.
      * src/vmware/vmware_driver.c (vmwareDomainResume): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives):
      Avoid false negatives.
      * tools/virsh-domain.c (info_save_image_dumpxml): Reword.
      Based on a report by Luwen Su.
      2387aa26
  9. 03 9月, 2012 1 次提交
  10. 18 8月, 2012 1 次提交
  11. 15 8月, 2012 1 次提交
    • L
      conf: move virtPortProfile out of unions in virDomainNetDef · 1d174428
      Laine Stump 提交于
      virtPortProfile is now used by 4 different types of network devices
      (NETWORK, BRIDGE, DIRECT, and HOSTDEV), and it's getting cumbersome to
      replicate so much code in 4 different places just because each type
      has the virtPortProfile in a slightly different place. This patch puts
      a single virtPortProfile in a common place (outside the type-specific
      union) in both virDomainNetDef and virDomainActualNetDef, and adjusts
      the parse and format code (and the few other places where it is used)
      accordingly.
      
      Note that when a <virtualport> element is found, the parse functions
      verify that the interface is of a type that supports one, otherwise an
      error is generated (CONFIG_UNSUPPORTED in the case of <interface>, and
      INTERNAL in the case of <actual>, since the contents of <actual> are
      always generated by libvirt itself).
      1d174428
  12. 06 8月, 2012 1 次提交
  13. 03 8月, 2012 1 次提交
    • O
      qemu: Allow to attach/detach controller device persistently · ed1e711b
      Osier Yang 提交于
      * src/conf/domain_conf.c:
        - Add virDomainControllerFind to find controller device by type
          and index.
        - Add virDomainControllerRemove to remove the controller device
          from maintained controler list.
      
      * src/conf/domain_conf.h:
        - Declare the two new helpers.
      
      * src/libvirt_private.syms:
        - Expose private symbols for the two new helpers.
      
      * src/qemu/qemu_driver.c:
        - Support attach/detach controller device persistently
      
      * src/qemu/qemu_hotplug.c:
        - Use the two helpers to simplify the codes.
      ed1e711b
  14. 01 8月, 2012 1 次提交
  15. 31 7月, 2012 1 次提交
    • E
      qemu: fix use after free · 665c8cde
      Eric Blake 提交于
      Detected by Coverity.
      
      * src/qemu/qemu_hotplug.c (qemuDomainAttachHostDevice): Avoid
      double free of usb on failure.
      665c8cde
  16. 27 7月, 2012 1 次提交
    • E
      maint: don't permit format strings without % · 768007ae
      Eric Blake 提交于
      Any time we have a string with no % passed through gettext, a
      translator can inject a % to cause a stack overread.  When there
      is nothing to format, it's easier to ask for a string that cannot
      be used as a formatter, by using a trivial "%s" format instead.
      
      In the past, we have used --disable-nls to catch some of the
      offenders, but that doesn't get run very often, and many more
      uses have crept in.  Syntax check to the rescue!
      
      The syntax check can catch uses such as
      virReportError(code,
                     _("split "
                       "string"));
      by using a sed script to fold context lines into one pattern
      space before checking for a string without %.
      
      This patch is just mechanical insertion of %s; there are probably
      several messages touched by this patch where we would be better
      off giving the user more information than a fixed string.
      
      * cfg.mk (sc_prohibit_diagnostic_without_format): New rule.
      * src/datatypes.c (virUnrefConnect, virGetDomain)
      (virUnrefDomain, virGetNetwork, virUnrefNetwork, virGetInterface)
      (virUnrefInterface, virGetStoragePool, virUnrefStoragePool)
      (virGetStorageVol, virUnrefStorageVol, virGetNodeDevice)
      (virGetSecret, virUnrefSecret, virGetNWFilter, virUnrefNWFilter)
      (virGetDomainSnapshot, virUnrefDomainSnapshot): Add %s wrapper.
      * src/lxc/lxc_driver.c (lxcDomainSetBlkioParameters)
      (lxcDomainGetBlkioParameters): Likewise.
      * src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML)
      (virDomainDiskDefParseXML, virDomainGraphicsDefParseXML):
      Likewise.
      * src/conf/network_conf.c (virNetworkDNSHostsDefParseXML)
      (virNetworkDefParseXML): Likewise.
      * src/conf/nwfilter_conf.c (virNWFilterIsValidChainName):
      Likewise.
      * src/conf/nwfilter_params.c (virNWFilterVarValueCreateSimple)
      (virNWFilterVarAccessParse): Likewise.
      * src/libvirt.c (virDomainSave, virDomainSaveFlags)
      (virDomainRestore, virDomainRestoreFlags)
      (virDomainSaveImageGetXMLDesc, virDomainSaveImageDefineXML)
      (virDomainCoreDump, virDomainGetXMLDesc)
      (virDomainMigrateVersion1, virDomainMigrateVersion2)
      (virDomainMigrateVersion3, virDomainMigrate, virDomainMigrate2)
      (virStreamSendAll, virStreamRecvAll)
      (virDomainSnapshotGetXMLDesc): Likewise.
      * src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqLeaseDel)
      (virNWFilterDHCPSnoopReq): Likewise.
      * src/openvz/openvz_driver.c (openvzUpdateDevice): Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Likewise.
      * src/qemu/qemu_command.c (qemuBuildHubDevStr, qemuBuildChrChardevStr)
      (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/rpc/virnetsaslcontext.c (virNetSASLSessionGetIdentity):
      Likewise.
      * src/rpc/virnetsocket.c (virNetSocketNewConnectUNIX)
      (virNetSocketSendFD, virNetSocketRecvFD): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskBuildPool): Likewise.
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemProbe)
      (virStorageBackendFileSystemBuild): Likewise.
      * src/storage/storage_backend_rbd.c
      (virStorageBackendRBDOpenRADOSConn): Likewise.
      * src/storage/storage_driver.c (storageVolumeResize): Likewise.
      * src/test/test_driver.c (testInterfaceChangeBegin)
      (testInterfaceChangeCommit, testInterfaceChangeRollback):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxListAllDomains): Likewise.
      * src/xenxs/xen_sxpr.c (xenFormatSxprDisk, xenFormatSxpr):
      Likewise.
      * src/xenxs/xen_xm.c (xenXMConfigGetUUID, xenFormatXMDisk)
      (xenFormatXM): Likewise.
      768007ae
  17. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  18. 19 7月, 2012 3 次提交
  19. 17 7月, 2012 1 次提交
    • S
      Convert 'raw MAC address' usages to use virMacAddr · 387117ad
      Stefan Berger 提交于
      Introduce new members in the virMacAddr 'class'
      - virMacAddrSet: set virMacAddr from a virMacAddr
      - virMacAddrSetRaw: setting virMacAddr from raw 6 byte MAC address buffer
      - virMacAddrGetRaw: writing virMacAddr into raw 6 byte MAC address buffer
      - virMacAddrCmp: comparing two virMacAddr
      - virMacAddrCmpRaw: comparing a virMacAddr with a raw 6 byte MAC address buffer
      
      then replace raw MAC addresses by replacing
      
      - 'unsigned char *' with virMacAddrPtr
      - 'unsigned char ... [VIR_MAC_BUFLEN]' with virMacAddr
      
      and introduce usage of above functions where necessary.
      387117ad
  20. 14 6月, 2012 1 次提交
    • P
      qemu: Enable disconnecting SPICE clients without changing password · e0f0131d
      Peter Krempa 提交于
      Libvirt updates the configuration of SPICE server only when something
      changes. This is unfortunate when the user wants to disconnect a
      existing spice session when the connected attribute is already
      "disconnect".
      
      This patch modifies the conditions for calling the password updater to
      be called when nothing changes, but the connected attribute is already
      "disconnect".
      e0f0131d
  21. 23 5月, 2012 1 次提交
    • P
      qemu_hotplug: Don't free the PCI device structure after hot-unplug · db19417f
      Peter Krempa 提交于
      The pciDevice structure corresponding to the device being hot-unplugged
      was freed after it was "stolen" from activeList. The pointer was still
      used for eg-inactive list. This patch removes the free of the structure
      and frees it only if reset fails on the device.
      db19417f
  22. 17 5月, 2012 1 次提交
    • M
      qemu: Don't delete USB device on failed qemuPrepareHostdevUSBDevices · 9c484e3d
      Michal Privoznik 提交于
      If qemuPrepareHostdevUSBDevices fail it will roll back devices added
      to the driver list of used devices. However, if it may fail because
      the device is being used already. But then again - with roll back.
      Therefore don't try to remove a usb device manually if the function
      fail. Although, we want to remove the device if any operation
      performed afterwards fail.
      9c484e3d
  23. 11 5月, 2012 1 次提交
    • G
      usb: fix crash when failing to attach a second usb device · ab5fb8f3
      Guannan Ren 提交于
      when failing to attach another usb device to a domain for some reason
      which has one use device attached before, the libvirtd crashed.
      The crash is caused by null-pointer dereference error in invoking
      usbDeviceListSteal passed in NULL value usb variable.
      commit 05abd150 introduces the bug.
      ab5fb8f3
  24. 07 5月, 2012 2 次提交
    • G
      qemu: call usb search function for hostdev initialization and hotplug · 05abd150
      Guannan Ren 提交于
      src/qemu/qemu_hostdev.c:
      refactor qemuPrepareHostdevUSBDevices function, make it focus on
      adding usb device to activeUsbHostdevs after check. After that,
      the usb hotplug function qemuDomainAttachHostDevice also could use
      it.
      expand qemuPrepareHostUSBDevices to perform the usb search,
      rollback on failure.
      
      src/qemu/qemu_hotplug.c:
      If there are multiple usb devices available with same vendorID and productID,
      but with different value of "bus, device", we give an error to let user
      use <address> to specify the desired one.
      05abd150
    • G
      usb: create functions to search usb device accurately · 9914477e
      Guannan Ren 提交于
      usbFindDevice():get usb device according to
                      idVendor, idProduct, bus, device
                      it is the exact match of the four parameters
      
      usbFindDeviceByBus():get usb device according to bus, device
                        it returns only one usb device same as usbFindDevice
      
      usbFindDeviceByVendor():get usb device according to idVendor,idProduct
                           it probably returns multiple usb devices.
      
      usbDeviceSearch(): a helper function to do the actual search
      9914477e
  25. 18 4月, 2012 1 次提交
    • E
      qemu: use consistent error when qemu binary is too old · 6fb8a64d
      Eric Blake 提交于
      Most of our errors complaining about an inability to support a
      particular action due to qemu limitations used CONFIG_UNSUPPORTED,
      but we had a few outliers.  Reported by Jiri Denemark.
      
      * src/qemu/qemu_command.c (qemuBuildDriveDevStr): Prefer
      CONFIG_UNSUPPORTED.
      * src/qemu/qemu_driver.c (qemuDomainReboot)
      (qemuDomainBlockJobImpl): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachPciControllerDevice):
      Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorTransaction)
      (qemuMonitorBlockJob, qemuMonitorSystemWakeup): Likewise.
      6fb8a64d
  26. 03 4月, 2012 1 次提交
    • J
      qemu: Start nested job in qemuDomainCheckEjectableMedia · 66cab01a
      Jiri Denemark 提交于
      Originally, qemuDomainCheckEjectableMedia was entering monitor with qemu
      driver lock. Commit 2067e31b, which I
      made to fix that, revealed another issue we had (but didn't notice it
      since the driver was locked): we didn't set nested job when
      qemuDomainCheckEjectableMedia is called during migration. Thus the
      original fix I made was wrong.
      66cab01a
  27. 31 3月, 2012 1 次提交
  28. 30 3月, 2012 1 次提交
  29. 27 3月, 2012 1 次提交
    • J
      qemu: Avoid entering monitor with locked driver · 2067e31b
      Jiri Denemark 提交于
      This avoids possible deadlock of the qemu driver in case a domain is
      begin migrated (in Begin phase) and unrelated connection to qemu driver
      is closed at the right time.
      
      I checked all callers of qemuDomainCheckEjectableMedia() and they are
      calling this function with qemu driver locked.
      2067e31b
  30. 16 3月, 2012 1 次提交