[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [QEMU PATCH v4 03/10] target/i386: kvm: Use symbolic consta
From: |
Liran Alon |
Subject: |
[Qemu-devel] [QEMU PATCH v4 03/10] target/i386: kvm: Use symbolic constant for #DB/#BP exception constants |
Date: |
Wed, 19 Jun 2019 19:21:33 +0300 |
Reviewed-by: Nikita Leshenko <address@hidden>
Reviewed-by: Krish Sadhukhan <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
---
target/i386/kvm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index efbecfc9d7f0..7b3b80833fdd 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -3009,9 +3009,9 @@ static int kvm_guest_debug_workarounds(X86CPU *cpu)
unsigned long reinject_trap = 0;
if (!kvm_has_vcpu_events()) {
- if (env->exception_injected == 1) {
+ if (env->exception_injected == EXCP01_DB) {
reinject_trap = KVM_GUESTDBG_INJECT_DB;
- } else if (env->exception_injected == 3) {
+ } else if (env->exception_injected == EXCP03_INT3) {
reinject_trap = KVM_GUESTDBG_INJECT_BP;
}
env->exception_injected = -1;
@@ -3523,8 +3523,8 @@ static int kvm_handle_debug(X86CPU *cpu,
int ret = 0;
int n;
- if (arch_info->exception == 1) {
- if (arch_info->dr6 & (1 << 14)) {
+ if (arch_info->exception == EXCP01_DB) {
+ if (arch_info->dr6 & DR6_BS) {
if (cs->singlestep_enabled) {
ret = EXCP_DEBUG;
}
--
2.20.1
- [Qemu-devel] [QEMU PATCH v4 0/10]: target/i386: kvm: Add support for save and restore of nested state, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 07/10] vmstate: Add support for kernel integer types, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 03/10] target/i386: kvm: Use symbolic constant for #DB/#BP exception constants,
Liran Alon <=
- [Qemu-devel] [QEMU PATCH v4 06/10] linux-headers: i386: Modify struct kvm_nested_state to have explicit fields for data, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 04/10] target/i386: kvm: Re-inject #DB to guest with updated DR6, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 05/10] target/i386: kvm: Block migration for vCPUs exposed with nested virtualization, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 08/10] target/i386: kvm: Add support for save and restore nested state, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 02/10] KVM: Introduce kvm_arch_destroy_vcpu(), Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 10/10] target/i386: kvm: Add nested migration blocker only when kernel lacks required capabilities, Liran Alon, 2019/06/19
- [Qemu-devel] [QEMU PATCH v4 09/10] target/i386: kvm: Add support for KVM_CAP_EXCEPTION_PAYLOAD, Liran Alon, 2019/06/19
- Re: [Qemu-devel] [QEMU PATCH v4 0/10]: target/i386: kvm: Add support for save and restore of nested state, Paolo Bonzini, 2019/06/20