OSDN Git Service

KVM: x86: hyper-v: Cache guest CPUID leaves determining features availability
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 21 May 2021 09:51:37 +0000 (11:51 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:38 +0000 (13:09 -0400)
commit10d7bf1e46dc19d964f0f67d2a6d20df907742d1
tree206e1f232352ee6aff49bdb5e72c4a4e52342cb5
parent644f706719f0297bc5f65c8891de1c32f042eae5
KVM: x86: hyper-v: Cache guest CPUID leaves determining features availability

Limiting exposed Hyper-V features requires a fast way to check if the
particular feature is exposed in guest visible CPUIDs or not. To aboid
looping through all CPUID entries on every hypercall/MSR access cache
the required leaves on CPUID update.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210521095204.2161214-4-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/hyperv.c