diff options
author | Ryan Harper <ryanh@us.ibm.com> | 2007-09-18 14:05:16 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-09-23 14:56:00 +0200 |
commit | 62d1ea7fdcdb905072198e4cec8f724c8ad33092 (patch) | |
tree | 5f4cdeabac9442f384691a7e1fa274f74fc32ef5 | |
parent | 4acc535e64696fb09da6d2f41a5a8b8f60739c03 (diff) |
KVM: MMU: Ignore reserved bits in cr3 in non-pae modekvm-44
This patch removes the fault injected when the guest attempts to set reserved
bits in cr3. X86 hardware doesn't generate a fault when setting reserved bits.
The result of this patch is that vmware-server, running within a kvm guest,
boots and runs memtest from an iso.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r-- | drivers/kvm/kvm_main.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index bcb04c174089..cecdb1b178f8 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -574,14 +574,11 @@ void set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) inject_gp(vcpu); return; } - } else { - if (cr3 & CR3_NONPAE_RESERVED_BITS) { - printk(KERN_DEBUG - "set_cr3: #GP, reserved bits\n"); - inject_gp(vcpu); - return; - } } + /* + * We don't check reserved bits in nonpae mode, because + * this isn't enforced, and VMware depends on this. + */ } mutex_lock(&vcpu->kvm->lock); |