aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/x86.h
diff options
context:
space:
mode:
authorDan Kenigsberg <danken@qumranet.com>2007-11-21 10:10:04 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:13 -0500
commit0771671749b59a507b6da4efb931c44d9691e248 (patch)
tree8d73e81194c7522ad9c0754201c5199b79e2bb98 /drivers/kvm/x86.h
parent6d4e4c4fca5be806b888d606894d914847e82d78 (diff)
KVM: Enhance guest cpuid management
The current cpuid management suffers from several problems, which inhibit passing through the host feature set to the guest: - No way to tell which features the host supports While some features can be supported with no changes to kvm, others need explicit support. That means kvm needs to vet the feature set before it is passed to the guest. - No support for indexed or stateful cpuid entries Some cpuid entries depend on ecx as well as on eax, or on internal state in the processor (running cpuid multiple times with the same input returns different output). The current cpuid machinery only supports keying on eax. - No support for save/restore/migrate The internal state above needs to be exposed to userspace so it can be saved or migrated. This patch adds extended cpuid support by means of three new ioctls: - KVM_GET_SUPPORTED_CPUID: get all cpuid entries the host (and kvm) supports - KVM_SET_CPUID2: sets the vcpu's cpuid table - KVM_GET_CPUID2: gets the vcpu's cpuid table, including hidden state [avi: fix original KVM_SET_CPUID not removing nx on non-nx hosts as it did before] Signed-off-by: Dan Kenigsberg <danken@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86.h')
-rw-r--r--drivers/kvm/x86.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h
index b1528c9f566f..78ab1e108d8b 100644
--- a/drivers/kvm/x86.h
+++ b/drivers/kvm/x86.h
@@ -149,7 +149,7 @@ struct kvm_vcpu {
149 int halt_request; /* real mode on Intel only */ 149 int halt_request; /* real mode on Intel only */
150 150
151 int cpuid_nent; 151 int cpuid_nent;
152 struct kvm_cpuid_entry cpuid_entries[KVM_MAX_CPUID_ENTRIES]; 152 struct kvm_cpuid_entry2 cpuid_entries[KVM_MAX_CPUID_ENTRIES];
153 153
154 /* emulate context */ 154 /* emulate context */
155 155