[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1fbb0c1a-998f-4424-82aa-12483fafb197@zytor.com>
Date: Mon, 15 Apr 2024 09:21:00 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: "Xin Li (Intel)" <xin@...or.com>, linux-kernel@...r.kernel.org
Cc: luto@...nel.org, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org
Subject: Re: [PATCH v1 1/1] x86/fred: Fix int80 emulation for FRED
On 4/12/24 16:40, Xin Li (Intel) wrote:
> Commit 55617fb991df added a bunch of tests to the int $0x80 path, however
> they are unnecessary and event wrong in fact under FRED.
>
> First FRED distinguishes external interrupts from software interrupts,
> thus int80_emulation() should NEVER be called for handling an external
> interrupt, and then int80_is_external() should be skipped under FRED.
>
> Second, the FRED kernel entry handler NEVER dispatches INTx, which is
> of event type EVENT_TYPE_SWINT, so the user mode checking in
> do_int80_emulation() is redundant, and should be skipped.
>
> It might be even better to strip down do_int80_emulation() to a lean
> fred_int80_emulation(), not to mention int80_emulation() does a
> CLEAR_BRANCH_HISTORY.
>
> Suggested-by: H. Peter Anvin (Intel) <hpa@...or.com>
> Signed-off-by: Xin Li (Intel) <xin@...or.com>
> ---
> arch/x86/entry/common.c | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
Note: this is the minimal bug fix versions and belongs in x86/urgent.
-hpa
Powered by blists - more mailing lists