[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v13 1/6] xen/pci: Add hypercall to support reset of pcidev



On Tue, 2024-08-20 at 09:01 +0200, Jan Beulich wrote:
> I further question the related part of [2]: Why did the stub need
> moving?
The following stub could be return to Arm's asm/pci.h:
```
static inline bool is_pci_passthrough_enabled(void)
{
    return false;
}
```
As at the moment it used only by common code in physdev.c which is
enabled only in case when CONFIG_HAS_PCI=y so
is_pci_passthrough_enabled() will be anyway defined in arch specific
files when CONFIG_HAS_PCI=y.

The reason why this stub here is that when  CONFIG_HAS_PCI=n then my
understanding is that is_pci_passthrough_enabled can't return any value
except false and not to generate the same stub for each newly
introduced architecture but there are architecture which are using this
stub. As for example, in Arm this stub is used even if CONFIG_HAS_PCI=n
and it will start to fail compilation as <asm/pci.h> is not included by
xen/pci.h anymore.

> I'm not even sure that part of the change fell under the Suggested-
> by:
> there, but I also can't exclude it (I didn't bother trying to find
> where
> the suggestion was made).
IIRC and it is really matters now then Suggested-by: was added because
it was suggested by you to use just ifdef-ing asm/pci.h instead of
arch-specific header or a header in asm-generic.

~ Oleksii




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.