From 77269c15c548243f5174c8a83ad523f45590d3a5 Mon Sep 17 00:00:00 2001 From: Qian Wang Date: Tue, 27 Oct 2020 15:16:48 +0800 Subject: [PATCH] hv: vcr: remove wbinvd for CR0.CD emulation According 11.5.1 Cache Control Registers and Bits, Intel SDM Vol 3, change CR0.CD will not flush cache to insure memory coherency. So it's not needed to call wbinvd to flush cache in ACRN Hypervisor. That's what the guest should do. Tracked-On: #5330 Signed-off-by: Qian Wang Acked-by: Eddie Dong --- hypervisor/arch/x86/guest/virtual_cr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hypervisor/arch/x86/guest/virtual_cr.c b/hypervisor/arch/x86/guest/virtual_cr.c index 9c4a5fd5b..91a7f8d20 100644 --- a/hypervisor/arch/x86/guest/virtual_cr.c +++ b/hypervisor/arch/x86/guest/virtual_cr.c @@ -215,7 +215,6 @@ static void vmx_write_cr0(struct acrn_vcpu *vcpu, uint64_t cr0) * disabled behavior */ exec_vmwrite64(VMX_GUEST_IA32_PAT_FULL, PAT_ALL_UC_VALUE); - cache_flush_invalidate_all(); } else { /* Restore IA32_PAT to enable cache again */ exec_vmwrite64(VMX_GUEST_IA32_PAT_FULL,