1. 21 5月, 2016 2 次提交
    • L
      conf: new functions to check if PCI address is wanted/present · 9a81a363
      Laine Stump 提交于
      In order to allow <address type='pci'/> with no other attributes to
      mean "I want a PCI address, but any PCI address will do" (just as
      having no <address> at all usually indicates), we will need to change
      several places in the code from a simple "info->type == (or !=)
      VIR_DOMAIN_DEVICE_ADDRESS_TYPE_(PCI|NONE)" into something slightly
      more complex, this patch adds to new functions that take a
      virDomainDeviceInfoPtr and return true/false depending on 1) whether
      the current state of the info indicates that we "want" a PCI address
      for this device (virDeviceInfoPCIAddressWanted()) and 2) whether this
      device already has a valid PCI address
      (virDeviceInfoPCIAddressPresent()).
      
      Both of these functions required the simpler check for whether a pci
      address is "empty" (i.e. all of its attributes are 0, which can never
      happen in a real PCI address, since slot 0 of bus 0 of domain 0 is
      always reserved), so that function is also added.
      9a81a363
    • L
      conf: move virDomainDeviceInfo definition from domain_conf.h to device_conf.h · ff89e9b9
      Laine Stump 提交于
      Also moves all the subordinate structs. This is necessary due to a new
      inline function that will be defined in device_conf.h, and also makes
      sense, because it is the *device* info that's in the struct. (Actually
      a lot more stuff from domain_conf.h could move to this newer file, but
      I didn't want to disturb any more than necessary).
      ff89e9b9
  2. 20 5月, 2016 38 次提交