Selaa lähdekoodia

KVM: Set cr0.et when the guest writes cr0

Follow the hardware.

Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity 15 vuotta sitten
vanhempi
commit
f9a48e6a18
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      arch/x86/kvm/x86.c

+ 2 - 0
arch/x86/kvm/x86.c

@@ -428,6 +428,8 @@ out:
 
 
 void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
 void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
 {
 {
+	cr0 |= X86_CR0_ET;
+
 	if (cr0 & CR0_RESERVED_BITS) {
 	if (cr0 & CR0_RESERVED_BITS) {
 		printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n",
 		printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n",
 		       cr0, kvm_read_cr0(vcpu));
 		       cr0, kvm_read_cr0(vcpu));