Explorar o código

KVM: vmx: DR7 masking on task switch emulation is wrong

The DR7 masking which is done on task switch emulation should be in hex format
(clearing the local breakpoints enable bits 0,2,4 and 6).

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Nadav Amit %!s(int64=11) %!d(string=hai) anos
pai
achega
1f85411255
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/x86/kvm/vmx.c

+ 1 - 1
arch/x86/kvm/vmx.c

@@ -5401,7 +5401,7 @@ static int handle_task_switch(struct kvm_vcpu *vcpu)
 	}
 
 	/* clear all local breakpoint enable flags */
-	vmcs_writel(GUEST_DR7, vmcs_readl(GUEST_DR7) & ~55);
+	vmcs_writel(GUEST_DR7, vmcs_readl(GUEST_DR7) & ~0x55);
 
 	/*
 	 * TODO: What about debug traps on tss switch?