Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Wei Liu
On Fri, Nov 11, 2016 at 09:21:00AM -0700, Jan Beulich wrote: > >>> On 11.11.16 at 14:54, wrote: > > On Thu, Nov 10, 2016 at 05:30:25AM -0700, Jan Beulich wrote: > >> With us incremementally adding proper CPUID checks to x86_emulate() > >> (see commit de05bd965a ["x86emul: correct {,F}CMOV and F{,U

Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Jan Beulich
>>> On 11.11.16 at 14:54, wrote: > On Thu, Nov 10, 2016 at 05:30:25AM -0700, Jan Beulich wrote: >> With us incremementally adding proper CPUID checks to x86_emulate() >> (see commit de05bd965a ["x86emul: correct {,F}CMOV and F{,U}COMI{,P} >> emulation"]) it is no longer appropriate to invoke the f

Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Andrew Cooper
On 11/11/16 14:58, Jan Beulich wrote: On 11.11.16 at 15:16, wrote: >> On 10/11/16 12:30, Jan Beulich wrote: >>> --- a/xen/arch/x86/traps.c >>> +++ b/xen/arch/x86/traps.c >>> @@ -2755,6 +2755,24 @@ static int priv_op_write_msr(unsigned in >>> return X86EMUL_UNHANDLEABLE; >>> } >>> >>>

Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Jan Beulich
>>> On 11.11.16 at 15:16, wrote: > On 10/11/16 12:30, Jan Beulich wrote: >> --- a/xen/arch/x86/traps.c >> +++ b/xen/arch/x86/traps.c >> @@ -2755,6 +2755,24 @@ static int priv_op_write_msr(unsigned in >> return X86EMUL_UNHANDLEABLE; >> } >> >> +int pv_emul_cpuid(unsigned int *eax, unsigned

Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Andrew Cooper
On 10/11/16 12:30, Jan Beulich wrote: > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -2755,6 +2755,24 @@ static int priv_op_write_msr(unsigned in > return X86EMUL_UNHANDLEABLE; > } > > +int pv_emul_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, > +

Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 10 November 2016 12:30 > To: xen-devel > Cc: Andrew Cooper ; Paul Durrant > ; Wei Liu ; Tim (Xen.org) > > Subject: [PATCH] x86: always supply .cpuid() handler to x86_emulate() > > With us incremementally adding p

Re: [Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-11 Thread Wei Liu
On Thu, Nov 10, 2016 at 05:30:25AM -0700, Jan Beulich wrote: > With us incremementally adding proper CPUID checks to x86_emulate() > (see commit de05bd965a ["x86emul: correct {,F}CMOV and F{,U}COMI{,P} > emulation"]) it is no longer appropriate to invoke the function with > that hook being NULL, as

[Xen-devel] [PATCH] x86: always supply .cpuid() handler to x86_emulate()

2016-11-10 Thread Jan Beulich
With us incremementally adding proper CPUID checks to x86_emulate() (see commit de05bd965a ["x86emul: correct {,F}CMOV and F{,U}COMI{,P} emulation"]) it is no longer appropriate to invoke the function with that hook being NULL, as long as respective instructions may get used in that case. Signed-o