On 29.01.2026 16:40, Roger Pau Monné wrote:
> On Thu, Jan 29, 2026 at 02:10:34PM +0100, Jan Beulich wrote:
>> --- a/xen/drivers/vpci/header.c
>> +++ b/xen/drivers/vpci/header.c
>> @@ -869,6 +869,18 @@ static int vpci_init_ext_capability_list
>>      return 0;
>>  }
>>  
>> +int vpci_reinit_ext_capability_list(const struct pci_dev *pdev)
>> +{
>> +    if ( !pdev->vpci )
>> +        return 0;
>> +
>> +    if ( vpci_remove_registers(pdev->vpci, PCI_CFG_SPACE_SIZE,
>> +                               PCI_CFG_SPACE_EXP_SIZE - PCI_CFG_SPACE_SIZE) 
>> )
>> +        ASSERT_UNREACHABLE();
>> +
>> +    return vpci_init_ext_capability_list(pdev);
> 
> Isn't this missing the possible addition or removal of managed
> extended capabilities?  IOW: on removal of access to the extended
> space the vPCI managed capabilties that have is_ext == true should
> call their ->cleanup() hooks, and on discovery of MMCFG access we
> should call the ->init() hooks?

Now I know why this felt too easy. Yet I wonder: Why is this done in two
parts in the first place?

Jan

Reply via email to