On Wed, 2018-09-12 at 13:27 +0800, Yi Min Zhao wrote:
在 2018/9/11 下午4:37, Andrea Bolognani 写道:
> On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
> [...]
> > @@ -164,6 +164,7 @@ struct _virDomainDeviceInfo {
> > * assignment, never saved and never reported.
> > */
> > int pciConnectFlags; /* enum virDomainPCIConnectFlags */
> > + int pciAddressExtFlags; /* enum virDomainPCIAddressExtensionFlags */
>
> There's a comment right above this that explains how pciConnectFlags
> is only used during address assignment: you should amend it to
> mention pciAddressExtFlags too.
As your comment on the 1st patch, if we have virPCIDeviceAddress
include a extFlag, why not remove this one?
Sure, if you can get away with it that's perfect! :)
However, I'm not entirely convinced you can avoid duplicating the
information, because I believe there will be at least some parts
of the address allocation algorithm where you'll need to access
the flags but haven't figured out you're going to assign a PCI
address to the device yet, which makes accessing the flags in
virPCIDeviceAddress not feasible. I could very well be wrong,
though: I haven't actually looked into it in detail.
--
Andrea Bolognani / Red Hat / Virtualization