Re: [PATCH v5 1/7] x86emul: support LKGS

2024-09-05 Thread Jan Beulich
On 04.09.2024 16:24, Andrew Cooper wrote: > On 04/09/2024 1:28 pm, Jan Beulich wrote: >> --- >> Instead of ->read_segment() we could of course also use ->read_msr() to >> fetch the original GS base. I don't think I can see a clear advantage of >> either approach; the way it's done it matches how we

Re: [PATCH v5 1/7] x86emul: support LKGS

2024-09-04 Thread Andrew Cooper
On 04/09/2024 1:28 pm, Jan Beulich wrote: > --- > Instead of ->read_segment() we could of course also use ->read_msr() to > fetch the original GS base. I don't think I can see a clear advantage of > either approach; the way it's done it matches how we handle SWAPGS. It turns out this is littered w

[PATCH v5 1/7] x86emul: support LKGS

2024-09-04 Thread Jan Beulich
Provide support for this insn, which is a prereq to FRED. CPUID-wise introduce both its and FRED's bit at this occasion, thus allowing to also express the dependency right away. While adding a testcase, also add a SWAPGS one. In order to not affect the behavior of pre-existing tests, install write