lkml.org 
[lkml]   [2023]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC kvmtool 28/31] arm64: realm: Enforce virtio F_ACCESS_PLATFORM flag
Date
For realms, force the F_ACCESS_PLATFORM flag to ensure DMA-APIs
are triggered for virtio in Linux

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
arm/aarch64/kvm.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arm/aarch64/kvm.c b/arm/aarch64/kvm.c
index a4664237..1f3a0def 100644
--- a/arm/aarch64/kvm.c
+++ b/arm/aarch64/kvm.c
@@ -5,6 +5,7 @@
#include <linux/byteorder.h>
#include <linux/cpumask.h>
#include <linux/sizes.h>
+#include <linux/virtio_config.h>

#include <kvm/util.h>

@@ -237,5 +238,10 @@ void kvm__arch_enable_mte(struct kvm *kvm)

u64 kvm__arch_get_virtio_host_features(struct kvm *kvm)
{
- return 0;
+ u64 features = 0;
+
+ /* Enforce F_ACCESS_PLATFORM for Realms */
+ if (kvm->cfg.arch.is_realm)
+ features |= (1ULL << VIRTIO_F_ACCESS_PLATFORM);
+ return features;
}
--
2.34.1
\
 
 \ /
  Last update: 2023-03-26 23:58    [W:1.503 / U:3.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site