From 4980b95d73f832e7afa77eda64d127a511e40f2d Mon Sep 17 00:00:00 2001 From: Fei Jiang Date: Thu, 12 Apr 2018 21:51:13 +0800 Subject: [PATCH] [acrn-dev] [PATCH] VMX: change PAT register default value This is workaround patch to resolve Disti performance issue. In kernel 4.14, PAT is skipped to initialize if MTRR is not enabled, while graphics driver need set WC to GGTT memory to accelerate memcpy, if PAT is not initialized, default PAT register will treat UC- as uncacheable, which will impact gfx performance. Change PAT default register value to treat UC- as WC to workaroud this problem. Revert me when PAT/MTRR strong correlation is removed in kernel. Signed-off-by: Fei Jiang --- arch/x86/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/vmx.c b/arch/x86/vmx.c index 1baf8d86b..b26a31462 100644 --- a/arch/x86/vmx.c +++ b/arch/x86/vmx.c @@ -40,7 +40,7 @@ extern struct efi_ctx* efi_ctx; #define PAT_POWER_ON_VALUE (PAT_MEM_TYPE_WB + \ ((uint64_t)PAT_MEM_TYPE_WT << 8) + \ - ((uint64_t)PAT_MEM_TYPE_UCM << 16) + \ + ((uint64_t)PAT_MEM_TYPE_WC << 16) + \ ((uint64_t)PAT_MEM_TYPE_UC << 24) + \ ((uint64_t)PAT_MEM_TYPE_WB << 32) + \ ((uint64_t)PAT_MEM_TYPE_WT << 40) + \