Re: [PATCH v2 RESEND 08/12] conf: Allocate/release 'uid' and 'fid' in PCI address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





在 2018/7/24 下午10:58, Andrea Bolognani 写道:
@@ -1385,7 +1403,12 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
           * parent, and will have its address collected during the scan
           * of the parent's device type.
          */
-        return 0;
+        if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI ||
+            info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
+            return virDomainPCIAddressExtensionReserveAddr(addrs, addr,
+                                                           info->pciAddressExtFlags);
+        else
+            return 0;
This doesn't look right: the comment specifically states that the
PCI address will be handled by the parent device in this case,
why wouldn't the zPCI address not be handled in the same way?
Thanks for other comments! I cutted off them.
For this comment, we have to collect zPCI address in case that zPCI address is specified
but PCI address is not. I think I shall split two checks. Original code is:
if (!virDeviceInfoPCIAddressPresent(info) ||
    ((device->type == VIR_DOMAIN_DEVICE_HOSTDEV) &&
      (device->data.hostdev->parent.type != VIR_DOMAIN_DEVICE_NONE)))
Separate them and only add the new code for !virDeviceInfoPCIAddressPresent(info) case.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux