From d330879ce5483a8066b7d59ffd187f839697a5bc Mon Sep 17 00:00:00 2001 From: Binbin Wu Date: Mon, 23 Dec 2019 13:35:39 +0800 Subject: [PATCH] hv: cpuid: expose PCID related capabilities to VMs Pass-through PCID related capabilities to VMs: - The support of PCID (CPUID.01H.ECX[17]) - The support of instruction INVPCID (CPUID.07H.EBX[10]) Tracked-On: #4296 Signed-off-by: Binbin Wu Acked-by: Eddie Dong --- hypervisor/arch/x86/guest/vcpuid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hypervisor/arch/x86/guest/vcpuid.c b/hypervisor/arch/x86/guest/vcpuid.c index 0fbce948f..93705e15e 100644 --- a/hypervisor/arch/x86/guest/vcpuid.c +++ b/hypervisor/arch/x86/guest/vcpuid.c @@ -116,8 +116,8 @@ static void init_vcpuid_entry(uint32_t leaf, uint32_t subleaf, case 0x07U: if (subleaf == 0U) { cpuid_subleaf(leaf, subleaf, &entry->eax, &entry->ebx, &entry->ecx, &entry->edx); - /* mask invpcid */ - entry->ebx &= ~(CPUID_EBX_INVPCID | CPUID_EBX_PQM | CPUID_EBX_PQE); + + entry->ebx &= ~(CPUID_EBX_PQM | CPUID_EBX_PQE); /* mask SGX and SGX_LC */ entry->ebx &= ~CPUID_EBX_SGX; @@ -422,9 +422,6 @@ static void guest_cpuid_01h(struct acrn_vcpu *vcpu, uint32_t *eax, uint32_t *ebx /* mask SDBG for silicon debug */ *ecx &= ~CPUID_ECX_SDBG; - /* mask pcid */ - *ecx &= ~CPUID_ECX_PCID; - /*mask vmx to guest os */ *ecx &= ~CPUID_ECX_VMX;