On 24.07.2025 11:44, Mykyta Poturai wrote:
> On Arm without pci-passthrough=on Xen does not know anything about
> present PCI devices due to PHYSDEVOP_pci_device_add not executing. This
> causes PHYSDEVOP_pci_device_reset to fail when trying to find the device
> that is being reset and return ENODEV.
>
> Add explicit is_pci_passthrough_enabled check to return a more
> meaningful EOPNOTSUPP code.
I.e. just like PHYSDEVOP_pci_device_{add,remove} already have it. Which
also helps ...
> This change should not affect x86 behavior as pci-passthrough is always
> enabled there.
... proving the no-effect aspect for x86 here.
> Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
However, the subject prefix is entirely misleading. The change helps Arm,
but is in arch-neutral code. Without "physdev" or "physdevop" anywhere in
the subject, whether "pci_device_reset" refers to a function (and you
merely omitted the parentheses) or something else doesn't become clear.
Also, nit: "is_pci_passthrough_enabled()" or "pci-passthrough-enabled" in
the subject, both to correct spelling and to make clear that either you
explicitly mean an existing predicate, or you merely mean to describe that
verbally.
Jan