summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorYang, Sheng2007-07-31 13:23:01 +0200
committerAvi Kivity2007-10-13 10:18:22 +0200
commit002c7f7c32a6123f0894d7d579ffae8e98911830 (patch)
tree91d46dd1d6f04f25e4f658eb8620fe69c1557c17 /drivers/kvm/svm.c
parentKVM: kvm_vm_ioctl_get_dirty_log restore "nothing dirty" optimization (diff)
downloadkernel-qcow2-linux-002c7f7c32a6123f0894d7d579ffae8e98911830.tar.gz
kernel-qcow2-linux-002c7f7c32a6123f0894d7d579ffae8e98911830.tar.xz
kernel-qcow2-linux-002c7f7c32a6123f0894d7d579ffae8e98911830.zip
KVM: VMX: Add cpu consistency check
All the physical CPUs on the board should support the same VMX feature set. Add check_processor_compatibility to kvm_arch_ops for the consistency check. Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 5277084f3a35..827bc2774e73 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1798,11 +1798,17 @@ svm_patch_hypercall(struct kvm_vcpu *vcpu, unsigned char *hypercall)
hypercall[3] = 0xc3;
}
+static void svm_check_processor_compat(void *rtn)
+{
+ *(int *)rtn = 0;
+}
+
static struct kvm_arch_ops svm_arch_ops = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
.hardware_setup = svm_hardware_setup,
.hardware_unsetup = svm_hardware_unsetup,
+ .check_processor_compatibility = svm_check_processor_compat,
.hardware_enable = svm_hardware_enable,
.hardware_disable = svm_hardware_disable,