lkml.org 
[lkml]   [2023]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH V3 12/16] x86/sev: Add a #HV exception handler
From
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.

\
 
 \ /
  Last update: 2023-04-03 20:11    [W:1.933 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site