Messages in this thread | | | Date | Tue, 4 Apr 2023 02:09:46 +0800 | Subject | Re: [RFC PATCH V3 12/16] x86/sev: Add a #HV exception handler | From | Tianyu Lan <> |
| |
On 3/31/2023 11:57 PM, Borislav Petkov wrote: >> + * >> + * If entered from kernel-mode the return stack is validated first, and if it is >> + * not safe to use (e.g. because it points to the entry stack) the #HV handler >> + * will switch to a fall-back stack (HV2) and call a special handler function. >> + * >> + * The macro is only used for one vector, but it is planned to be extended in >> + * the future for the #HV exception. >> + */ >> +.macro idtentry_hv vector asmsym cfunc >> +SYM_CODE_START(\asmsym) > ... > > why is this so much duplicated code instead of sharing it with > idtentry_vc and all the facilities it does? >
Hi Boris: #VC and #HV use different stack. I try reusing vc code path for #HV doesn't work. I will continue to work on this direction and report back later. In the RFC v4, I still keep the old version and other patches may be reviewed in the parellel.
Thanks.
| |