[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/35] kvm: x86: Prevent sign extension of DR7 in gu
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 11/35] kvm: x86: Prevent sign extension of DR7 in guest debugging mode |
Date: |
Thu, 6 Jan 2011 15:56:17 -0200 |
From: Jan Kiszka <address@hidden>
This unbreaks guest debugging when the 4th hardware breakpoint used for
guest debugging is a watchpoint of 4 or 8 byte lenght. The 31st bit of
DR7 is set in that case and used to cause a sign extension to the high
word which was breaking the guest state (vm entry failure).
Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Avi Kivity <address@hidden>
---
target-i386/kvm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 7e5982b..85edacc 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -1686,7 +1686,7 @@ void kvm_arch_update_guest_debug(CPUState *env, struct
kvm_guest_debug *dbg)
dbg->arch.debugreg[n] = hw_breakpoint[n].addr;
dbg->arch.debugreg[7] |= (2 << (n * 2)) |
(type_code[hw_breakpoint[n].type] << (16 + n*4)) |
- (len_code[hw_breakpoint[n].len] << (18 + n*4));
+ ((uint32_t)len_code[hw_breakpoint[n].len] << (18 + n*4));
}
}
/* Legal xcr0 for loading */
--
1.7.2.3
- [Qemu-devel] [PATCH 00/35] [PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 19/35] kvm: x86: Prepare kvm_get_mp_state for in-kernel irqchip, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 29/35] kvm: Drop smp_cpus argument from init functions, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 08/35] kvm: introduce kvm_inject_x86_mce_on, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 01/35] kvm: Enable user space NMI injection for kvm guest, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 30/35] kvm: Consolidate must-have capability checks, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 09/35] kvm: x86: Fix DPL write back of segment registers, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 34/35] kvm: x86: Implicitly clear nmi_injected/pending on reset, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 11/35] kvm: x86: Prevent sign extension of DR7 in guest debugging mode,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 23/35] kvm: x86: Reset paravirtual MSRs, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 32/35] kvm: Flush coalesced mmio buffer on IO window exits, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 22/35] kvm: x86: Refactor msr_star/hsave_pa setup and checks, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 02/35] kvm: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension(), Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 27/35] kvm: x86: Fix !CONFIG_KVM_PARA build, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 20/35] kvm: x86: Remove redundant mp_state initialization, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 13/35] kvm: Fix coding style violations, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 35/35] kvm: x86: Only read/write MSR_KVM_ASYNC_PF_EN if supported, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 24/35] Synchronize VCPU states before reset, Marcelo Tosatti, 2011/01/06
- [Qemu-devel] [PATCH 10/35] kvm: x86: Remove obsolete SS.RPL/DPL aligment, Marcelo Tosatti, 2011/01/06