Skip to content

Commit 3a3aeac

Browse files
feijiang1jren1
authored andcommitted
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 <fei.jiang@intel.com>
1 parent 52c020c commit 3a3aeac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hypervisor/arch/x86/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern struct efi_ctx* efi_ctx;
4040

4141
#define PAT_POWER_ON_VALUE (PAT_MEM_TYPE_WB + \
4242
((uint64_t)PAT_MEM_TYPE_WT << 8) + \
43-
((uint64_t)PAT_MEM_TYPE_UCM << 16) + \
43+
((uint64_t)PAT_MEM_TYPE_WC << 16) + \
4444
((uint64_t)PAT_MEM_TYPE_UC << 24) + \
4545
((uint64_t)PAT_MEM_TYPE_WB << 32) + \
4646
((uint64_t)PAT_MEM_TYPE_WT << 40) + \

0 commit comments

Comments
 (0)