Re: [PATCH for-4.17 1/4] amd/virt_ssbd: set SSBD at vCPU context switch

2022-10-13 Thread Roger Pau Monné
On Wed, Oct 12, 2022 at 10:26:19AM +0200, Jan Beulich wrote: > On 11.10.2022 18:02, Roger Pau Monne wrote: > > @@ -140,6 +135,7 @@ __UNLIKELY_END(nsvm_hap) > > */ > > stgi > > GLOBAL(svm_stgi_label) > > + > > mov %rsp,%rdi > > call svm_vmexit_handler > >

Re: [PATCH for-4.17 1/4] amd/virt_ssbd: set SSBD at vCPU context switch

2022-10-12 Thread Jan Beulich
On 11.10.2022 18:02, Roger Pau Monne wrote: > @@ -140,6 +135,7 @@ __UNLIKELY_END(nsvm_hap) > */ > stgi > GLOBAL(svm_stgi_label) > + > mov %rsp,%rdi > call svm_vmexit_handler > jmp .Lsvm_do_resume Seemingly stray change? > ---

[PATCH for-4.17 1/4] amd/virt_ssbd: set SSBD at vCPU context switch

2022-10-11 Thread Roger Pau Monne
The current logic for AMD SSBD context switches it on every vm{entry,exit} if the Xen and guest selections don't match. This is expensive when not using SPEC_CTRL, and hence should be avoided as much as possible. When SSBD is not being set from SPEC_CTRL on AMD don't context switch at