[PATCH] x86/xen: set default memory type for pv guests to WB

Juergen Gross posted 1 patch 10 months, 2 weeks ago
Failed in applying to current master (apply log)
There is a newer version of this series
arch/x86/xen/enlighten_pv.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] x86/xen: set default memory type for pv guests to WB
Posted by Juergen Gross 10 months, 2 weeks ago
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@suse.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
Re: [PATCH] x86/xen: set default memory type for pv guests to WB
Posted by Boris Ostrovsky 10 months, 2 weeks ago

On 6/15/23 8:39 AM, Juergen Gross wrote:
> 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@suse.com>

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>