Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Wei Liu
On Tue, Feb 20, 2018 at 05:42:06PM +, Andrew Cooper wrote: > On 20/02/18 17:03, Wei Liu wrote: > > On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: > >> There are many problems with MSR_TSC_AUX handling. > >> > >> To being with, the RDPID instruction reads MSR_TSC_AUX, but it is

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Roger Pau Monné
On Tue, Feb 20, 2018 at 06:28:15PM +, Andrew Cooper wrote: > On 20/02/18 17:35, Roger Pau Monné wrote: > > On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: > >> There are many problems with MSR_TSC_AUX handling. > >> > >> To being with, the RDPID instruction reads MSR_TSC_AUX,

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-20 Thread Andrew Cooper
On 20/02/18 17:35, Roger Pau Monné wrote: > On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: >> There are many problems with MSR_TSC_AUX handling. >> >> To being with, the RDPID instruction reads MSR_TSC_AUX, but it is only the >> RDTSCP feature which enumerates the MSR. Therefore,

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-20 Thread Andrew Cooper
On 20/02/18 17:03, Wei Liu wrote: > On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: >> There are many problems with MSR_TSC_AUX handling. >> >> To being with, the RDPID instruction reads MSR_TSC_AUX, but it is only the > ^ > begin > >> RDTSCP feature which enumerates the

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-20 Thread Roger Pau Monné
On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: > There are many problems with MSR_TSC_AUX handling. > > To being with, the RDPID instruction reads MSR_TSC_AUX, but it is only the > RDTSCP feature which enumerates the MSR. Therefore, RDPID functionally > depends on RDTSCP. > >

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-20 Thread Wei Liu
On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: > There are many problems with MSR_TSC_AUX handling. > > To being with, the RDPID instruction reads MSR_TSC_AUX, but it is only the ^ begin > RDTSCP feature which enumerates the MSR. Therefore, RDPID functionally > depends

[Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-20 Thread Andrew Cooper
There are many problems with MSR_TSC_AUX handling. To being with, the RDPID instruction reads MSR_TSC_AUX, but it is only the RDTSCP feature which enumerates the MSR. Therefore, RDPID functionally depends on RDTSCP. For PV guests, we hide RDTSCP but advertise RDPID. We also silently drop