Re: [PATCH v2 6/8] x86/hvm: Enable guest access to MSR_PKRS

2023-01-12 Thread Jan Beulich
On 12.01.2023 15:16, Andrew Cooper wrote: > On 12/01/2023 1:26 pm, Jan Beulich wrote: >> The other thing I'd like to understand (and having an answer to this >> would have been better before re-applying my R-b to this re-based >> logic) is towards the lack of feature checks here. hvm_get_reg() >> c

Re: [PATCH v2 6/8] x86/hvm: Enable guest access to MSR_PKRS

2023-01-12 Thread Andrew Cooper
On 12/01/2023 1:26 pm, Jan Beulich wrote: > On 10.01.2023 18:18, Andrew Cooper wrote: >> @@ -2471,6 +2477,9 @@ static uint64_t cf_check vmx_get_reg(struct vcpu *v, >> unsigned int reg) >> } >> return val; >> >> +case MSR_PKRS: >> +return (v == curr) ? rdpkrs() : msr

Re: [PATCH v2 6/8] x86/hvm: Enable guest access to MSR_PKRS

2023-01-12 Thread Jan Beulich
On 10.01.2023 18:18, Andrew Cooper wrote: > @@ -2471,6 +2477,9 @@ static uint64_t cf_check vmx_get_reg(struct vcpu *v, > unsigned int reg) > } > return val; > > +case MSR_PKRS: > +return (v == curr) ? rdpkrs() : msrs->pkrs; Nothing here or ... > @@ -2514,6 +2525,1

Re: [PATCH v2 6/8] x86/hvm: Enable guest access to MSR_PKRS

2023-01-10 Thread Andrew Cooper
On 10/01/2023 5:18 pm, Andrew Cooper wrote: > Have guest_{rd,wr}msr(), via hvm_{get,set}_reg(), access either the live > register, or stashed state, depending on context. Include MSR_PKRS for > migration, and let the guest have full access. > > Signed-off-by: Andrew Cooper > Reviewed-by: Jan Beul

[PATCH v2 6/8] x86/hvm: Enable guest access to MSR_PKRS

2023-01-10 Thread Andrew Cooper
Have guest_{rd,wr}msr(), via hvm_{get,set}_reg(), access either the live register, or stashed state, depending on context. Include MSR_PKRS for migration, and let the guest have full access. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei