On 16.07.2025 09:43, Mykyta Poturai wrote: > --- a/xen/arch/x86/include/asm/pci.h > +++ b/xen/arch/x86/include/asm/pci.h > @@ -64,4 +64,10 @@ bool pci_check_bar(const struct pci_dev *pdev, mfn_t > start, mfn_t end); > struct rangeset; > int pci_sanitize_bar_memory(struct rangeset *r); > > +/* PCI passthrough is always enabled on x86 so no special handling is needed > */ > +static inline bool arch_pci_device_physdevop(void) > +{ > + return false; > +}
The comment is somewhat odd, as it talks about pass-through when the function is all about physdevop. A connection wants making imo. Plus isn't it benign right now whether the function returned false or true? From an abstract perspective, it returning true would perhaps make more sense (as opposed to the generic stub in include/xen/pci.h). IOW I think the return value wants changing _and_ the comment wants to clarify that either value could be used with the present call sites (thus helping people finding themselves in need of altering the return value, in order to use the function elsewhere). I also think this would better go directly below is_pci_passthrough_enabled(). Jan