lkml.org 
[lkml]   [2023]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH V2 15/18] x86/sev: Add a #HV exception handler
From

>>> + * To make this work the #HV entry code tries its best to pretend it
>>> doesn't use
>>> + * an IST stack by switching to the task stack if coming from
>>> user-space (which
>>> + * includes early SYSCALL entry path) or back to the stack in the
>>> IRET frame if
>>> + * entered from kernel-mode.
>>> + *
>>> + * 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.
>>
>> Noticed same comment line in the #VC exception handling section (macro
>> idtentry_vc). Just wondering we need to remove this line as the patch
>> being proposed for the #HV exception handling? unless this is planned
>> to be extended in some other way.
>
> Nice catch! Will remove this in the next version.

Thanks. Just a note: the referred 'idtentry_vc' macro has some
instructions added/moved (e.g CLD is moved at start of IDT entry, ENDBR
added) plus some additional comments added later. Don't know what all of
them are required to be replicated in 'idtentry_hv', just want to share
my observation.

Thanks,
Pankaj

\
 
 \ /
  Last update: 2023-03-26 23:37    [W:0.071 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site