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 <qian1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Qian Wang 2020-10-27 15:16:48 +08:00 committed by wenlingz
parent a8fe9b906a
commit 77269c15c5

View File

@ -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,