mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/i386: kvm: Use symbolic constant for #DB/#BP exception constants
Reviewed-by: Nikita Leshenko <nikita.leshchenko@oracle.com> Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com> Signed-off-by: Liran Alon <liran.alon@oracle.com> Message-Id: <20190619162140.133674-4-liran.alon@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b1115c9991
commit
37936ac70f
1 changed files with 4 additions and 4 deletions
|
@ -3345,9 +3345,9 @@ static int kvm_guest_debug_workarounds(X86CPU *cpu)
|
||||||
unsigned long reinject_trap = 0;
|
unsigned long reinject_trap = 0;
|
||||||
|
|
||||||
if (!kvm_has_vcpu_events()) {
|
if (!kvm_has_vcpu_events()) {
|
||||||
if (env->exception_injected == 1) {
|
if (env->exception_injected == EXCP01_DB) {
|
||||||
reinject_trap = KVM_GUESTDBG_INJECT_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;
|
reinject_trap = KVM_GUESTDBG_INJECT_BP;
|
||||||
}
|
}
|
||||||
env->exception_injected = -1;
|
env->exception_injected = -1;
|
||||||
|
@ -3859,8 +3859,8 @@ static int kvm_handle_debug(X86CPU *cpu,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (arch_info->exception == 1) {
|
if (arch_info->exception == EXCP01_DB) {
|
||||||
if (arch_info->dr6 & (1 << 14)) {
|
if (arch_info->dr6 & DR6_BS) {
|
||||||
if (cs->singlestep_enabled) {
|
if (cs->singlestep_enabled) {
|
||||||
ret = EXCP_DEBUG;
|
ret = EXCP_DEBUG;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue