Re: [PATCH V7 3/6] x86/entry: Move PUSH_AND_CLEAR_REGS out of error_entry()

From: Juergen Gross
Date: Tue May 03 2022 - 03:23:39 EST


On 03.05.22 05:21, Lai Jiangshan wrote:
From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>

The macro idtentry calls error_entry() unconditionally even on XENPV.
But the code XENPV needs in error_entry() is PUSH_AND_CLEAR_REGS only.

And PUSH_AND_CLEAR_REGS in error_entry() makes the stack not return to
its original place when the function returns, which means it is not
possible to convert it to a C function.

Move PUSH_AND_CLEAR_REGS out of error_entry(), add a function to wrap
PUSH_AND_CLEAR_REGS and call it before error_entry().

It will allow for error_entry() to be not called on XENPV and for
error_entry() to be converted to C code.

Cc: Juergen Gross <jgross@xxxxxxxx>
Signed-off-by: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>

Reviewed-by: Juergen Gross <jgross@xxxxxxxx>


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature