[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230615123959.12298-1-jgross@suse.com>
Date: Thu, 15 Jun 2023 14:39:59 +0200
From: Juergen Gross <jgross@...e.com>
To: linux-kernel@...r.kernel.org, x86@...nel.org
Cc: Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, xen-devel@...ts.xenproject.org
Subject: [PATCH] x86/xen: set default memory type for pv guests to WB
When running as an unprivileged PV-guest under Xen (not dom0), the
default MTRR memory type should be write-back.
Signed-off-by: Juergen Gross <jgross@...e.com>
---
Based on tip x86/mtrr branch
---
arch/x86/xen/enlighten_pv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index 8732b85d5650..93b658248d01 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -187,6 +187,8 @@ static void __init xen_pv_init_platform(void)
if (xen_initial_domain())
xen_set_mtrr_data();
+ else
+ mtrr_overwrite_state(NULL, 0, MTRR_TYPE_WRBACK);
}
static void __init xen_pv_guest_late_init(void)
--
2.35.3
Powered by blists - more mailing lists