diff options
author | Mao, Junjie <junjie.mao@intel.com> | 2012-07-02 03:18:48 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-07-12 12:07:34 +0200 |
commit | ad756a1603c5fac207758faaac7f01c34c9d0b7b (patch) | |
tree | 0b01513f1e3434362ab9faf8394cbd158b31386d /arch/x86/kvm/svm.c | |
parent | KVM: Add x86_hyper_kvm to complete detect_hypervisor_platform check (diff) | |
download | linux-ad756a1603c5fac207758faaac7f01c34c9d0b7b.tar.xz linux-ad756a1603c5fac207758faaac7f01c34c9d0b7b.zip |
KVM: VMX: Implement PCID/INVPCID for guests with EPT
This patch handles PCID/INVPCID for guests.
Process-context identifiers (PCIDs) are a facility by which a logical processor
may cache information for multiple linear-address spaces so that the processor
may retain cached information when software switches to a different linear
address space. Refer to section 4.10.1 in IA32 Intel Software Developer's Manual
Volume 3A for details.
For guests with EPT, the PCID feature is enabled and INVPCID behaves as running
natively.
For guests without EPT, the PCID feature is disabled and INVPCID triggers #UD.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 7a418783259d..baead950d6c8 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -4044,6 +4044,11 @@ static bool svm_rdtscp_supported(void) return false; } +static bool svm_invpcid_supported(void) +{ + return false; +} + static bool svm_has_wbinvd_exit(void) { return true; @@ -4312,6 +4317,7 @@ static struct kvm_x86_ops svm_x86_ops = { .cpuid_update = svm_cpuid_update, .rdtscp_supported = svm_rdtscp_supported, + .invpcid_supported = svm_invpcid_supported, .set_supported_cpuid = svm_set_supported_cpuid, |