On Thu, Jan 29, 2026 at 11:08:22AM +0100, Jan Beulich wrote:
> On 29.01.2026 10:19, Roger Pau Monné wrote:
> > On Mon, Jan 19, 2026 at 03:48:01PM +0100, Jan Beulich wrote:
> >> --- a/xen/drivers/vpci/header.c
> >> +++ b/xen/drivers/vpci/header.c
> >> @@ -830,9 +830,14 @@ static int vpci_init_ext_capability_list
> >>      unsigned int pos = PCI_CFG_SPACE_SIZE;
> >>  
> >>      if ( !is_hardware_domain(pdev->domain) )
> >> +    {
> >> +        if ( !pdev->ext_cfg )
> >> +            return 0;
> > 
> > Don't you want to possibly put this as a top-level check, so if
> > there's no extended config space we avoid doing the PCI_CFG_SPACE_SIZE
> > read for dom0 also?
> 
> Hmm, yes, didn't think about that. That'll mean dropping the
> "if ( pos != PCI_CFG_SPACE_SIZE )" from the body of the
> "if ( header == 0xffffffffU )" then, i.e. the printk() there becoming
> unconditional. It may also mean dropping "DomU" from the subject.

I've also wondered whether we want to short-circuit vpci_{read,write}
accesses if the device doesn't have extended cfg, for domUs to be on
the safe side.

Thanks, Roger.

Reply via email to