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 01/31] arm64: Disable MTE when CFI flash is emulated
Date
CFI Flash file image cannot be mapped into the memory of the
guest if MTE is enabled. Thus disable MTE if flash emulation
is requested.

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

diff --git a/arm/aarch64/kvm.c b/arm/aarch64/kvm.c
index 54200c9e..5a53badb 100644
--- a/arm/aarch64/kvm.c
+++ b/arm/aarch64/kvm.c
@@ -145,6 +145,12 @@ void kvm__arch_enable_mte(struct kvm *kvm)
return;
}

+ if (kvm->cfg.flash_filename) {
+ kvm->cfg.arch.mte_disabled = true;
+ pr_info("MTE is incompatible with CFI flash support, disabling");
+ return;
+ }
+
if (kvm->cfg.arch.mte_disabled) {
pr_debug("MTE disabled by user");
return;
--
2.34.1
\
 
 \ /
  Last update: 2023-03-26 23:58    [W:0.818 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site