在 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