Skip to content

Commit

Permalink
KVM: Set cr0.et when the guest writes cr0
Browse files Browse the repository at this point in the history
Follow the hardware.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity authored and Marcelo Tosatti committed Mar 1, 2010
1 parent edcafe3 commit f9a48e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ static bool pdptrs_changed(struct kvm_vcpu *vcpu)

void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{
cr0 |= X86_CR0_ET;

if (cr0 & CR0_RESERVED_BITS) {
printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n",
cr0, kvm_read_cr0(vcpu));
Expand Down

0 comments on commit f9a48e6

Please sign in to comment.