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