From: Nadav Amit Date: Mon, 19 May 2014 06:50:50 +0000 (+0300) Subject: KVM: vmx: DR7 masking on task switch emulation is wrong X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1f854112553a1d65363ab27d4ee3dfb4b27075fb;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a267108403f5..248287cefa7a 100644 --- a/arch/x86/kvm/vmx.c +++ b/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?