|
|
b38b0f |
From 0168573b58d5e70a60c9fef319ba510aa9648f2d Mon Sep 17 00:00:00 2001
|
|
|
b38b0f |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b38b0f |
Date: Mon, 22 Jul 2019 18:22:09 +0100
|
|
|
b38b0f |
Subject: [PATCH 28/39] target/i386: kvm: Use symbolic constant for #DB/#BP
|
|
|
b38b0f |
exception constants
|
|
|
b38b0f |
|
|
|
b38b0f |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b38b0f |
Message-id: <20190722182220.19374-8-pbonzini@redhat.com>
|
|
|
b38b0f |
Patchwork-id: 89625
|
|
|
b38b0f |
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 07/18] target/i386: kvm: Use symbolic constant for #DB/#BP exception constants
|
|
|
b38b0f |
Bugzilla: 1689269
|
|
|
b38b0f |
RH-Acked-by: Peter Xu <zhexu@redhat.com>
|
|
|
b38b0f |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
b38b0f |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
From: Liran Alon <liran.alon@oracle.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com>
|
|
|
b38b0f |
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
|
|
|
b38b0f |
Signed-off-by: Liran Alon <liran.alon@oracle.com>
|
|
|
b38b0f |
Message-Id: <20190619162140.133674-4-liran.alon@oracle.com>
|
|
|
b38b0f |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b38b0f |
(cherry picked from commit 37936ac70f6c20aec6f537349eb797fb98f9a99d)
|
|
|
b38b0f |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
b38b0f |
---
|
|
|
b38b0f |
target/i386/kvm.c | 8 ++++----
|
|
|
b38b0f |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
b38b0f |
|
|
|
b38b0f |
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
|
|
|
b38b0f |
index 305809f..4138fe9 100644
|
|
|
b38b0f |
--- a/target/i386/kvm.c
|
|
|
b38b0f |
+++ b/target/i386/kvm.c
|
|
|
b38b0f |
@@ -2811,9 +2811,9 @@ static int kvm_guest_debug_workarounds(X86CPU *cpu)
|
|
|
b38b0f |
unsigned long reinject_trap = 0;
|
|
|
b38b0f |
|
|
|
b38b0f |
if (!kvm_has_vcpu_events()) {
|
|
|
b38b0f |
- if (env->exception_injected == 1) {
|
|
|
b38b0f |
+ if (env->exception_injected == EXCP01_DB) {
|
|
|
b38b0f |
reinject_trap = KVM_GUESTDBG_INJECT_DB;
|
|
|
b38b0f |
- } else if (env->exception_injected == 3) {
|
|
|
b38b0f |
+ } else if (env->exception_injected == EXCP03_INT3) {
|
|
|
b38b0f |
reinject_trap = KVM_GUESTDBG_INJECT_BP;
|
|
|
b38b0f |
}
|
|
|
b38b0f |
env->exception_injected = -1;
|
|
|
b38b0f |
@@ -3325,8 +3325,8 @@ static int kvm_handle_debug(X86CPU *cpu,
|
|
|
b38b0f |
int ret = 0;
|
|
|
b38b0f |
int n;
|
|
|
b38b0f |
|
|
|
b38b0f |
- if (arch_info->exception == 1) {
|
|
|
b38b0f |
- if (arch_info->dr6 & (1 << 14)) {
|
|
|
b38b0f |
+ if (arch_info->exception == EXCP01_DB) {
|
|
|
b38b0f |
+ if (arch_info->dr6 & DR6_BS) {
|
|
|
b38b0f |
if (cs->singlestep_enabled) {
|
|
|
b38b0f |
ret = EXCP_DEBUG;
|
|
|
b38b0f |
}
|
|
|
b38b0f |
--
|
|
|
b38b0f |
1.8.3.1
|
|
|
b38b0f |
|