Re: [PATCH v2 2/7] x86/boot: Delay sev_verify_cbit() a bit

2023-01-20 Thread Jörg Rödel
On Thu, Jan 19, 2023 at 02:18:47PM +0100, Borislav Petkov wrote: > So, can we do that C-bit verification once on the BSP, *in C* which would be a > lot easier, and be done with it? > > Once it is verified there, the bit is the same on all APs so all good. Yes, I think this is safe to do. The page

Re: [PATCH v2 2/7] x86/boot: Delay sev_verify_cbit() a bit

2023-01-19 Thread Borislav Petkov
On Mon, Jan 16, 2023 at 03:25:35PM +0100, Peter Zijlstra wrote: > Per the comment it is important to call sev_verify_cbit() before the > first RET instruction, this means we can delay calling this until more Make that "... this means that this can be delayed until... " And I believe this is not a

[PATCH v2 2/7] x86/boot: Delay sev_verify_cbit() a bit

2023-01-16 Thread Peter Zijlstra
Per the comment it is important to call sev_verify_cbit() before the first RET instruction, this means we can delay calling this until more of the CPU state is set up, specifically delay this until GS is 'sane' such that per-cpu variables work. Fixes: e81dc127ef69 ("x86/callthunks: Add call patchi