[PATCH libvirt v2 2/5] conf: fix zPCI address auto-generation on s390

Shalini Chellathurai Saroja shalini at linux.ibm.com
Fri Jun 26 12:51:29 UTC 2020


On 6/25/20 7:43 PM, Andrea Bolognani wrote:
> First of all, this is much closer to what I had in mind. Good job!

Hi Andrea,

Thank you:-)

>
> We're not quite there yet, though: as you can see from the hunks
> above, there are still many scenarios in which we're either
> manipulating id->value and id->isSet separately, or we needlessly
> duplicate checks and don't take advantage of the fact that we now
> have the virZPCIDeviceAddressID struct.
>
> I have attached a patch that fixes these issues: as you can see,
> it's pretty simple, because you've laid all the groundwork:)  so it
> just needs to polish things up a bit. It also solves the situation
> where calling virDomainZPCIAddressRelease{U,F}id() would not set
> id->isSet back to false.
>
> Speaking of polish, while functionally this doesn't make any
> difference it would be IMHO better to rename the current
> virDomainZPCIAddressReserveAddr() to
> virDomainZPCIAddressEnsureAddr(), since in terms of semantics it
> more closely matches those of the PCI address function of the same
> name. This will hopefully help reduce confusion. I've attached a
> patch that performs this change as well.
>
> Everything else looks good. Please let me know what you think of
> the changes in the attached patches!

As Boris has already mentioned, these patches provide a much better code,

thank you:-)




More information about the libvir-list mailing list