Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-09 Thread Andrew Cooper
On 09/01/15 15:33, Jan Beulich wrote: On 09.01.15 at 16:09, wrote: >> On 09/01/15 11:20, Jan Beulich wrote: >> On 08.01.15 at 19:49, wrote: I think hvm_efer_valid() also needs the current EFER and CR0 to work out what the current LMA should be, and reject any attempt to change

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-09 Thread Jan Beulich
>>> On 09.01.15 at 16:09, wrote: > On 09/01/15 11:20, Jan Beulich wrote: > On 08.01.15 at 19:49, wrote: >>> I think hvm_efer_valid() also needs the current EFER and CR0 to work out >>> what the current LMA should be, and reject any attempt to change it. >> I.e. this would be needed only for t

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-09 Thread Andrew Cooper
On 09/01/15 11:20, Jan Beulich wrote: On 08.01.15 at 19:49, wrote: >> On 08/01/15 15:23, Jan Beulich wrote: >>> Following the earlier similar change validating CR4 modifications. >>> >>> Signed-off-by: Jan Beulich >>> >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-09 Thread Jan Beulich
>>> On 08.01.15 at 19:49, wrote: > On 08/01/15 15:23, Jan Beulich wrote: >> Following the earlier similar change validating CR4 modifications. >> >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -1672,20 +1672,53 @@ static int hvm_save_cpu_ctx

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-08 Thread Andrew Cooper
On 08/01/15 16:04, Jan Beulich wrote: On 08.01.15 at 16:56, wrote: >> At 15:23 + on 08 Jan (1420727005), Jan Beulich wrote: >>> +if ( (value & EFER_LMSLE) && !cpu_has_lmsl ) >>> +return 0; >> I see this bit has no CPUID flag, and the docs don't seem to suggest >> that it would

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-08 Thread Andrew Cooper
On 08/01/15 15:23, Jan Beulich wrote: > Following the earlier similar change validating CR4 modifications. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -1672,20 +1672,53 @@ static int hvm_save_cpu_ctxt(struct doma > return 0; > } > > -

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-08 Thread Jan Beulich
>>> On 08.01.15 at 16:56, wrote: > At 15:23 + on 08 Jan (1420727005), Jan Beulich wrote: >> +if ( (value & EFER_LMSLE) && !cpu_has_lmsl ) >> +return 0; > > I see this bit has no CPUID flag, and the docs don't seem to suggest > that it would ever not be valid. Are there real CPUs

Re: [Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-08 Thread Tim Deegan
At 15:23 + on 08 Jan (1420727005), Jan Beulich wrote: > +if ( (value & EFER_LMSLE) && !cpu_has_lmsl ) > +return 0; I see this bit has no CPUID flag, and the docs don't seem to suggest that it would ever not be valid. Are there real CPUs where it can't be set? My reviewed-by: stan

[Xen-devel] [PATCH 3/3] x86/HVM: make hvm_efer_valid() honor guest features

2015-01-08 Thread Jan Beulich
Following the earlier similar change validating CR4 modifications. Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1672,20 +1672,53 @@ static int hvm_save_cpu_ctxt(struct doma return 0; } -static bool_t hvm_efer_valid(struct domain *d, -