From f4292752b051b9eaaf3367ca9659abc142f6c6e2 Mon Sep 17 00:00:00 2001 From: Conghui Chen Date: Wed, 17 Jun 2020 17:39:42 +0000 Subject: [PATCH] hv: remove check for OSXSAVE in host We always assume the physical platform has XSAVE, and we always enable XSAVE at the beginning, so, no need to check the OXSAVE in host. Tracked-On: #4956 Signed-off-by: Conghui Chen --- hypervisor/arch/x86/guest/vcpuid.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hypervisor/arch/x86/guest/vcpuid.c b/hypervisor/arch/x86/guest/vcpuid.c index f0f931e84..decacc8f9 100644 --- a/hypervisor/arch/x86/guest/vcpuid.c +++ b/hypervisor/arch/x86/guest/vcpuid.c @@ -433,11 +433,6 @@ static void guest_cpuid_01h(struct acrn_vcpu *vcpu, uint32_t *eax, uint32_t *ebx *ecx &= ~CPUID_ECX_MONITOR; } - /*no xsave support for guest if it is not enabled on host*/ - if ((*ecx & CPUID_ECX_OSXSAVE) == 0U) { - *ecx &= ~CPUID_ECX_XSAVE; - } - *ecx &= ~CPUID_ECX_OSXSAVE; if ((*ecx & CPUID_ECX_XSAVE) != 0U) { uint64_t cr4;