[libvirt] [PATCH v6 03/13] conf: Introduce a new PCI address extension flag

Yi Min Zhao zyimin at linux.ibm.com
Thu Oct 11 09:46:12 UTC 2018



在 2018/10/11 下午4:49, Andrea Bolognani 写道:
> On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
> [...]
>> @@ -166,6 +166,10 @@ struct _virDomainDeviceInfo {
>>        * assignment, never saved and never reported.
>>        */
>>       int pciConnectFlags; /* enum virDomainPCIConnectFlags */
>> +    /* pciAddrExtFlags is only used interanlly to calculate PCI
>> +     * address extension flag before address assignment.
>> +     */
> s/interanlly/internally/
> s/flag before/flags during/
>
> [...]
>> +typedef enum {
>> +    VIR_PCI_ADDRESS_EXTENSION_NONE = 0, /* no extension */
>> +    VIR_PCI_ADDRESS_EXTENSION_ZPCI = 1 << 0, /* zpci support */
> s/zpci/zPCI/
>
> [...]
thanks.
>> +static bool
>> +qemuDomainDeviceSupportZPCI(virDomainDeviceDefPtr device)
>> +{
>> +    switch ((virDomainDeviceType) device->type) {
> No space after the cast, please.
>
> This would ideally have been caught by 'make syntax-check' but
> currently that's not the case (see [1]).
Got it.
>
> [...]
>> +static void
>> +qemuDomainFillDevicePCIExtensionFlags(virDomainDeviceDefPtr dev,
>> +                                      virQEMUCapsPtr qemuCaps)
>> +{
>> +    info->pciAddrExtFlags =
>> +        qemuDomainDeviceCalculatePCIAddressExtensionFlags(qemuCaps, dev);
> This will not build because 'info' is not defined: you need to
> either pass it to the function or obtain it from 'dev' using
> virDomainDeviceGetInfo().
>
> qemuDomainFillDevicePCIConnectFlags() is doing the latter, but you
> seem to be going for the former since...
>
> [...]
>> @@ -2989,6 +3121,8 @@ qemuDomainEnsurePCIAddress(virDomainObjPtr obj,
>>   
>>       qemuDomainFillDevicePCIConnectFlags(obj->def, dev, priv->qemuCaps, driver);
>>   
>> +    qemuDomainFillDevicePCIExtensionFlags(dev, info, priv->qemuCaps);
> ... you're passing it to the function here, which again the compiler
> very understandably complains about.
There might be something I do wrong. Have been updated.
Thanks for your comments.
>
>
> With the above addressed,
>
>    Reviewed-by: Andrea Bolognani <abologna at redhat.com>
Thanks!
>
>
> [1] https://www.redhat.com/archives/libvir-list/2018-October/msg00641.html

-- 
Yi Min




More information about the libvir-list mailing list