[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22A5EA90-8B57-4376-BAE2-0FE982DF4E90@zytor.com>
Date: Wed, 27 Sep 2023 07:51:52 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Nikolay Borisov <nik.borisov@...e.com>, Xin Li <xin3.li@...el.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-edac@...r.kernel.org, linux-hyperv@...r.kernel.org,
kvm@...r.kernel.org, xen-devel@...ts.xenproject.org
CC: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, luto@...nel.org,
pbonzini@...hat.com, seanjc@...gle.com, peterz@...radead.org,
jgross@...e.com, ravi.v.shankar@...el.com, mhiramat@...nel.org,
andrew.cooper3@...rix.com, jiangshanlai@...il.com
Subject: Re: [PATCH v11 05/37] x86/trapnr: Add event type macros to <asm/trapnr.h>
On September 26, 2023 1:10:51 AM PDT, Nikolay Borisov <nik.borisov@...e.com> wrote:
>
>
>On 23.09.23 г. 12:41 ч., Xin Li wrote:
>> Intel VT-x classifies events into eight different types, which is
>> inherited by FRED for event identification. As such, event type
>> becomes a common x86 concept, and should be defined in a common x86
>> header.
>>
>> Add event type macros to <asm/trapnr.h>, and use it in <asm/vmx.h>.
>>
>> Suggested-by: H. Peter Anvin (Intel) <hpa@...or.com>
>> Tested-by: Shan Kang <shan.kang@...el.com>
>> Signed-off-by: Xin Li <xin3.li@...el.com>
>> ---
>>
>> Changes since v10:
>> * A few comment fixes and improvements (Andrew Cooper).
>> ---
>> arch/x86/include/asm/trapnr.h | 12 ++++++++++++
>> arch/x86/include/asm/vmx.h | 17 +++++++++--------
>> 2 files changed, 21 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/trapnr.h b/arch/x86/include/asm/trapnr.h
>> index f5d2325aa0b7..8d1154cdf787 100644
>> --- a/arch/x86/include/asm/trapnr.h
>> +++ b/arch/x86/include/asm/trapnr.h
>> @@ -2,6 +2,18 @@
>> #ifndef _ASM_X86_TRAPNR_H
>> #define _ASM_X86_TRAPNR_H
>> +/*
>> + * Event type codes used by FRED, Intel VT-x and AMD SVM
>> + */
>> +#define EVENT_TYPE_EXTINT 0 // External interrupt
>> +#define EVENT_TYPE_RESERVED 1
>> +#define EVENT_TYPE_NMI 2 // NMI
>> +#define EVENT_TYPE_HWEXC 3 // Hardware originated traps, exceptions
>> +#define EVENT_TYPE_SWINT 4 // INT n
>> +#define EVENT_TYPE_PRIV_SWEXC 5 // INT1
>> +#define EVENT_TYPE_SWEXC 6 // INTO, INT3
>
>nit: This turned into INTO (Oh) rather than INT0( zero) in v11
>
><nit>
INTO (letter) is correct.
Powered by blists - more mailing lists