diff options
author | Ryan Harper <ryanh@us.ibm.com> | 2007-09-18 15:05:16 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:48 -0500 |
commit | 217648638ccb62dfeea5ac5fe768539cdee61ed0 (patch) | |
tree | bb2ce51d75b95119f40e2385be7359a263bddd61 /drivers/kvm/kvm_main.c | |
parent | 12b7d28fc102b772eb70f98491587ec5ee717baf (diff) |
KVM: MMU: Ignore reserved bits in cr3 in non-pae mode
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>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-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 82cc7ae0fc83..2d55bab41634 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -554,14 +554,11 @@ void set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) | |||
554 | inject_gp(vcpu); | 554 | inject_gp(vcpu); |
555 | return; | 555 | return; |
556 | } | 556 | } |
557 | } else { | ||
558 | if (cr3 & CR3_NONPAE_RESERVED_BITS) { | ||
559 | printk(KERN_DEBUG | ||
560 | "set_cr3: #GP, reserved bits\n"); | ||
561 | inject_gp(vcpu); | ||
562 | return; | ||
563 | } | ||
564 | } | 557 | } |
558 | /* | ||
559 | * We don't check reserved bits in nonpae mode, because | ||
560 | * this isn't enforced, and VMware depends on this. | ||
561 | */ | ||
565 | } | 562 | } |
566 | 563 | ||
567 | mutex_lock(&vcpu->kvm->lock); | 564 | mutex_lock(&vcpu->kvm->lock); |