diff options
author | Juergen Gross <jgross@suse.com> | 2022-06-22 08:38:36 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2022-08-01 07:42:49 +0200 |
commit | a603002eea8213eec5211be5a85db8340aea06d0 (patch) | |
tree | 5154e240ad4f487a866e74a055671d66b8b12b6d /drivers/virtio/Kconfig | |
parent | xen: Fix spelling mistake (diff) | |
download | linux-a603002eea8213eec5211be5a85db8340aea06d0.tar.xz linux-a603002eea8213eec5211be5a85db8340aea06d0.zip |
virtio: replace restricted mem access flag with callback
Instead of having a global flag to require restricted memory access
for all virtio devices, introduce a callback which can select that
requirement on a per-device basis.
For convenience add a common function returning always true, which can
be used for use cases like SEV.
Per default use a callback always returning false.
As the callback needs to be set in early init code already, add a
virtio anchor which is builtin in case virtio is enabled.
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> # Arm64 guest using Xen
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20220622063838.8854-2-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/virtio/Kconfig')
-rw-r--r-- | drivers/virtio/Kconfig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index e1556d2a355a..56c77f63cd22 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -1,6 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only +config VIRTIO_ANCHOR + bool + config VIRTIO tristate + select VIRTIO_ANCHOR help This option is selected by any driver which implements the virtio bus, such as CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_RPMSG |