Re: [PATCH v6 09/13] conf: Allocate/release 'uid' and 'fid' in PCI address

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

 





在 2018/10/17 下午10:30, Andrea Bolognani 写道:
On Tue, 2018-10-16 at 11:28 +0800, Yi Min Zhao wrote:
在 2018/10/11 下午10:50, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
   # conf/device_conf.h
+virDeviceInfoPCIAddressExtensionIsPresent;
+virDeviceInfoPCIAddressExtensionIsWanted;
   virDeviceInfoPCIAddressIsPresent;
   virDeviceInfoPCIAddressIsWanted;
   virDomainDeviceAddressIsValid;
@@ -119,6 +121,9 @@ virDomainCCWAddressSetFree;
   virDomainPCIAddressBusIsFullyReserved;
   virDomainPCIAddressBusSetModel;
   virDomainPCIAddressEnsureAddr;
+virDomainPCIAddressExtensionReleaseAddr;
+virDomainPCIAddressExtensionReserveAddr;
+virDomainPCIAddressExtensionReserveNextAddr;
I'm not quite quire we need to export these functions.

With the recent changes, we've gotten to the point that we're not
even passing a virZPCIDeviceAddress to them, but rather they have
the very same signature as the regular virPCIDeviceAddress...

So it should be possible to just make them static and only call
them from the virDomainPCIAddressReserveAddr() and friends, right?
Which is where I was hoping we could eventually get. Or did I
miss something?
I think this would make things complex. If either PCI address or
zPCI address exists, we have to do more checks for calling
virDomainPCIAddressReserveAddr(). And there are amounts of
code calling ***IsWanted() to call ***ReserveNext***(). I think
keeping them separately is better.
Again, I might be missing something because I haven't actually tried
implementing any of this, but at least from the theoretical point of
view I don't see how keeping them separate would make things simpler:
if anything, it seems to me like it would make them more complicated
for the calling code because now you have to worry about the PCI
address extensions *in addition* to the PCI address itself.

For example, during collection stage, checking both PCI address and extension address is requried, and still need to separately do some additional checks for PCI address if it is present, at last in reserving addr function we still check if PCI normal address or extension address exists to separately reserve present one. So that we have to do the check on the same condition repetively. If you don't have strong opposition, I want to
send the new version ASAP.

--
Yi Min

--
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