Revert "x86/kvm: Override default caching mode for SEV-SNP and TDX"
This reverts commit 8e690b817e38769dc2fa0e7473e5a5dc1fc25795.
BUG=b/434773125
TEST=presubmit, validation test
RELEASE_NOTE=None
Change-Id: I7b570c7948490c9601eeb693d1d1f06763da11c4
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/108300
Reviewed-by: Kevin Berry <kpberry@google.com>
Reviewed-by: Jiankun Lu <jiankun@google.com>
Reviewed-by: Shuo Yang <gshuoy@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 21e9e48..263f8ae 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -37,7 +37,6 @@
#include <asm/apic.h>
#include <asm/apicdef.h>
#include <asm/hypervisor.h>
-#include <asm/mtrr.h>
#include <asm/tlb.h>
#include <asm/cpuidle_haltpoll.h>
#include <asm/ptrace.h>
@@ -981,9 +980,6 @@ static void __init kvm_init_platform(void)
}
kvmclock_init();
x86_platform.apic_post_init = kvm_apic_init;
-
- /* Set WB as the default cache mode for SEV-SNP and TDX */
- mtrr_overwrite_state(NULL, 0, MTRR_TYPE_WRBACK);
}
#if defined(CONFIG_AMD_MEM_ENCRYPT)