aboutsummaryrefslogtreecommitdiff
path: root/include/linux/platform-feature.h
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2022-06-22 08:38:36 +0200
committerJuergen Gross <jgross@suse.com>2022-08-01 07:42:49 +0200
commita603002eea8213eec5211be5a85db8340aea06d0 (patch)
tree5154e240ad4f487a866e74a055671d66b8b12b6d /include/linux/platform-feature.h
parent8441dac05e7f346abc4f63a15d4af0adeabfaa9b (diff)
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 'include/linux/platform-feature.h')
-rw-r--r--include/linux/platform-feature.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/platform-feature.h b/include/linux/platform-feature.h
index b2f48be999fa..6ed859928b97 100644
--- a/include/linux/platform-feature.h
+++ b/include/linux/platform-feature.h
@@ -6,11 +6,7 @@
#include <asm/platform-feature.h>
/* The platform features are starting with the architecture specific ones. */
-
-/* Used to enable platform specific DMA handling for virtio devices. */
-#define PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS (0 + PLATFORM_ARCH_FEAT_N)
-
-#define PLATFORM_FEAT_N (1 + PLATFORM_ARCH_FEAT_N)
+#define PLATFORM_FEAT_N (0 + PLATFORM_ARCH_FEAT_N)
void platform_set(unsigned int feature);
void platform_clear(unsigned int feature);