Re: [PATCH v4 06/10] vpci: Hide extended capability when it fails to initialize

2025-05-19 Thread Jan Beulich
On 19.05.2025 09:41, Chen, Jiqian wrote:
> On 2025/5/18 22:47, Jan Beulich wrote:
>> On 09.05.2025 11:05, Jiqian Chen wrote:
>>> --- a/xen/include/xen/pci_regs.h
>>> +++ b/xen/include/xen/pci_regs.h
>>> @@ -448,7 +448,10 @@
>>>  /* Extended Capabilities (PCI-X 2.0 and Express) */
>>>  #define PCI_EXT_CAP_ID(header) ((header) & 0x)
>>>  #define PCI_EXT_CAP_VER(header)(((header) >> 16) & 0xf)
>>> -#define PCI_EXT_CAP_NEXT(header)   (((header) >> 20) & 0xffc)
>>> +#define PCI_EXT_CAP_NEXT_MASK  0xFFF0U
>>> +/* Bottom two bits of next capability position are reserved. */
>>> +#define PCI_EXT_CAP_NEXT(header) \
>>> +(MASK_EXTR(header, PCI_EXT_CAP_NEXT_MASK) & 0xFFCU)
>>
>> Please can the hex digits all be / remain to be lower case, with just
>> the U suffixes be upper case?
> Including "0xFFF0U" or just "0xFFCU" ?

Both. See also patch context here.

Jan



Re: [PATCH v4 06/10] vpci: Hide extended capability when it fails to initialize

2025-05-19 Thread Chen, Jiqian
On 2025/5/18 22:47, Jan Beulich wrote:
> On 09.05.2025 11:05, Jiqian Chen wrote:
>> --- a/xen/include/xen/pci_regs.h
>> +++ b/xen/include/xen/pci_regs.h
>> @@ -448,7 +448,10 @@
>>  /* Extended Capabilities (PCI-X 2.0 and Express) */
>>  #define PCI_EXT_CAP_ID(header)  ((header) & 0x)
>>  #define PCI_EXT_CAP_VER(header) (((header) >> 16) & 0xf)
>> -#define PCI_EXT_CAP_NEXT(header)(((header) >> 20) & 0xffc)
>> +#define PCI_EXT_CAP_NEXT_MASK   0xFFF0U
>> +/* Bottom two bits of next capability position are reserved. */
>> +#define PCI_EXT_CAP_NEXT(header) \
>> +(MASK_EXTR(header, PCI_EXT_CAP_NEXT_MASK) & 0xFFCU)
> 
> Please can the hex digits all be / remain to be lower case, with just
> the U suffixes be upper case?
Including "0xFFF0U" or just "0xFFCU" ?

> 
> Jan

-- 
Best regards,
Jiqian Chen.


Re: [PATCH v4 06/10] vpci: Hide extended capability when it fails to initialize

2025-05-18 Thread Jan Beulich
On 09.05.2025 11:05, Jiqian Chen wrote:
> --- a/xen/include/xen/pci_regs.h
> +++ b/xen/include/xen/pci_regs.h
> @@ -448,7 +448,10 @@
>  /* Extended Capabilities (PCI-X 2.0 and Express) */
>  #define PCI_EXT_CAP_ID(header)   ((header) & 0x)
>  #define PCI_EXT_CAP_VER(header)  (((header) >> 16) & 0xf)
> -#define PCI_EXT_CAP_NEXT(header) (((header) >> 20) & 0xffc)
> +#define PCI_EXT_CAP_NEXT_MASK0xFFF0U
> +/* Bottom two bits of next capability position are reserved. */
> +#define PCI_EXT_CAP_NEXT(header) \
> +(MASK_EXTR(header, PCI_EXT_CAP_NEXT_MASK) & 0xFFCU)

Please can the hex digits all be / remain to be lower case, with just
the U suffixes be upper case?

Jan