summaryrefslogtreecommitdiff
path: root/drivers/xen/Kconfig
diff options
context:
space:
mode:
authorJiqian Chen <Jiqian.Chen@amd.com>2024-09-24 14:14:37 +0800
committerJuergen Gross <jgross@suse.com>2024-09-25 09:54:55 +0200
commit2fae6bb7be320270801b3c3b040189bd7daa8056 (patch)
tree764fe8161bd288ffe4855e98e878f78944e0a4cc /drivers/xen/Kconfig
parentb166b8ab4189743a717cb93f50d6fcca3a46770d (diff)
downloadlwn-2fae6bb7be320270801b3c3b040189bd7daa8056.tar.gz
lwn-2fae6bb7be320270801b3c3b040189bd7daa8056.zip
xen/privcmd: Add new syscall to get gsi from dev
On PVH dom0, when passthrough a device to domU, QEMU and xl tools want to use gsi number to do pirq mapping, see QEMU code xen_pt_realize->xc_physdev_map_pirq, and xl code pci_add_dm_done->xc_physdev_map_pirq, but in current codes, the gsi number is got from file /sys/bus/pci/devices/<sbdf>/irq, that is wrong, because irq is not equal with gsi, they are in different spaces, so pirq mapping fails. And in current linux codes, there is no method to get gsi for userspace. For above purpose, record gsi of pcistub devices when init pcistub and add a new syscall into privcmd to let userspace can get gsi when they have a need. Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Message-ID: <20240924061437.2636766-4-Jiqian.Chen@amd.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/Kconfig')
-rw-r--r--drivers/xen/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index d5989871dd5d..fd83d51df2f4 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -261,6 +261,7 @@ config XEN_SCSI_BACKEND
config XEN_PRIVCMD
tristate "Xen hypercall passthrough driver"
depends on XEN
+ imply CONFIG_XEN_PCIDEV_BACKEND
default m
help
The hypercall passthrough driver allows privileged user programs to