[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53CD866A.9020704@gmail.com>
Date: Tue, 22 Jul 2014 00:30:18 +0300
From: Nadav Amit <nadav.amit@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
Nadav Amit <namit@...technion.ac.il>
CC: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, gleb@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] KVM: x86: Function for determining exception type
Few comments to see we are on the same page:
On 7/21/14, 3:18 PM, Paolo Bonzini wrote:
> Il 21/07/2014 13:37, Nadav Amit ha scritto:
>> +int kvm_exception_type(unsigned int nr)
>
> The manual calls this the exception class.
Yes, but it also calls it exception "type" (see table 6-1
"Protected-Mode Exceptions and Interrupts" on the SDM).
I called it exception type, since there is a function exception_class
that is used to handle nested exceptions.
>> + case VE_VECTOR:
>> + return EXCPT_FAULT;
>> + case DB_VECTOR:
>> + return EXCPT_FAULT_OR_TRAP;
>
> It is only a fault for instruction fetch breakpoints. You can modify
> kvm_vcpu_check_breakpoint to set RF, add a comment here that fault
> handling is done elsewhere, and return EXCPT_TRAP.
Unless I am mistaken, kvm_vcpu_check_breakpoint checks only for
instruction breakpoint. Since instruction breakpoint should not cause RF
to be set, this function should not be changed.
Anyhow, I would return EXCPT_TRAP on DB_VECTOR.
Nadav
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists