1. 25 1月, 2018 6 次提交
  2. 24 1月, 2018 9 次提交
  3. 23 1月, 2018 1 次提交
  4. 22 1月, 2018 5 次提交
  5. 21 1月, 2018 1 次提交
    • L
      qemu: assign correct type of PCI address for vhost-scsi when using pcie-root · 18c24bc6
      Laine Stump 提交于
      Commit 10c73bf1 fixed a bug that I had introduced back in commit
      70249927 - if a vhost-scsi device had no manually assigned PCI
      address, one wouldn't be assigned automatically. There was a slight
      problem with the logic of the fix though - in the case of domains with
      pcie-root (e.g. those with a q35 machinetype),
      qemuDomainDeviceCalculatePCIConnectFlags() will attempt to determine
      if the host-side PCI device is Express or legacy by examining sysfs
      based on the host-side PCI address stored in
      hostdev->source.subsys.u.pci.addr, but that part of the union is only
      valid for PCI hostdevs, *not* for SCSI hostdevs. So we end up trying
      to read sysfs for some probably-non-existent device, which fails, and
      the function virPCIDeviceIsPCIExpress() returns failure (-1).
      
      By coincidence, the return value is being examined as a boolean, and
      since -1 is true, we still end up assigning the vhost-scsi device to
      an Express slot, but that is just by chance (and could fail in the
      case that the gibberish in the "hostside PCI address" was the address
      of a real device that happened to be legacy PCI).
      
      Since (according to Paolo Bonzini) vhost-scsi devices appear just like
      virtio-scsi devices in the guest, they should follow the same rules as
      virtio devices when deciding whether they should be placed in an
      Express or a legacy slot. That's accomplished in this patch by
      returning early with virtioFlags, rather than erroneously using
      hostdev->source.subsys.u.pci.addr. It also adds a test case for PCIe
      to assure it doesn't get broken in the future.
      18c24bc6
  6. 20 1月, 2018 1 次提交
    • J
      nodedev: Fix failing to parse PCI address for non-PCI network devices · 71d56a39
      Jim Fehlig 提交于
      Commit 8708ca01 added virNetDevSwitchdevFeature() to check if a network
      device has Switchdev capabilities. virNetDevSwitchdevFeature() attempts
      to retrieve the PCI device associated with the network device, ignoring
      non-PCI devices. It does so via the following call chain
      
        virNetDevSwitchdevFeature()->virNetDevGetPCIDevice()->
        virPCIGetDeviceAddressFromSysfsLink()
      
      For non-PCI network devices (qeth, Xen vif, etc),
      virPCIGetDeviceAddressFromSysfsLink() will report an error when
      virPCIDeviceAddressParse() fails. virPCIDeviceAddressParse() also
      logs an error. After commit 8708ca01 there are now two errors reported
      for each non-PCI network device even though the errors are harmless.
      
      To avoid the errors, introduce virNetDevIsPCIDevice() and use it in
      virNetDevGetPCIDevice() before attempting to retrieve the associated
      PCI device. virNetDevIsPCIDevice() uses the 'subsystem' property of the
      device to determine if it is PCI. See the sysfs rules in kernel
      documentation for more details
      
      https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
      71d56a39
  7. 19 1月, 2018 4 次提交
  8. 18 1月, 2018 13 次提交