xen: fix stubdom PCI addr
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Wed, 27 Mar 2024 03:05:15 +0000 (04:05 +0100)
committerAnthony PERARD <anthony@xenproject.org>
Mon, 1 Jul 2024 12:57:18 +0000 (14:57 +0200)
commit196fb962baeff16342279111cc927a153415f85f
treeb8f9b32ea35a86fce2b6ab35fa0050bcfb43761d
parentb2bbadc63c5e907bbb7a19244929ef4c028f3d01
xen: fix stubdom PCI addr

When running in a stubdomain, the config space access via sysfs needs to
use BDF as seen inside stubdomain (connected via xen-pcifront), which is
different from the real BDF. For other purposes (hypercall parameters
etc), the real BDF needs to be used.
Get the in-stubdomain BDF by looking up relevant PV PCI xenstore
entries.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <35049e99da634a74578a1ff2cb3ae4cc436ede33.1711506237.git-series.marmarek@invisiblethingslab.com>
Signed-off-by: Anthony PERARD <anthony@xenproject.org>
hw/xen/xen-host-pci-device.c
hw/xen/xen-host-pci-device.h