Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 14:19, Jan Beulich wrote: On 26.03.18 at 14:04, wrote: >> On 26/03/18 12:43, Jan Beulich wrote: >> On 26.03.18 at 12:29, wrote: On 26/03/18 12:13, Jan Beulich wrote: On 26.03.18 at 10:55, wrote: >> I can

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Jan Beulich
>>> On 26.03.18 at 14:04, wrote: > On 26/03/18 12:43, Jan Beulich wrote: > On 26.03.18 at 12:29, wrote: >>> On 26/03/18 12:13, Jan Beulich wrote: >>> On 26.03.18 at 10:55, wrote: > I can change the scheme to use different values for

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 12:43, Jan Beulich wrote: On 26.03.18 at 12:29, wrote: >> On 26/03/18 12:13, Jan Beulich wrote: >> On 26.03.18 at 10:55, wrote: I can change the scheme to use different values for guest PCIDs with XPTI on, of course. Are you fine

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Jan Beulich
>>> On 26.03.18 at 12:29, wrote: > On 26/03/18 12:13, Jan Beulich wrote: > On 26.03.18 at 10:55, wrote: >>> I can change the scheme to use different values for guest PCIDs >>> with XPTI on, of course. Are you fine with: >>> >>> - XPTI off: PCID 0 = kernel,

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 12:13, Jan Beulich wrote: On 26.03.18 at 10:55, wrote: >> On 26/03/18 10:28, Jan Beulich wrote: >> On 26.03.18 at 08:49, wrote: On 23/03/18 16:58, Jan Beulich wrote: On 23.03.18 at 15:11, wrote: >> On

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Jan Beulich
>>> On 26.03.18 at 10:55, wrote: > On 26/03/18 10:28, Jan Beulich wrote: > On 26.03.18 at 08:49, wrote: >>> On 23/03/18 16:58, Jan Beulich wrote: >>> On 23.03.18 at 15:11, wrote: > On 23/03/18 14:46, Jan Beulich wrote: >> So in

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 10:28, Jan Beulich wrote: On 26.03.18 at 08:49, wrote: >> On 23/03/18 16:58, Jan Beulich wrote: >> On 23.03.18 at 15:11, wrote: On 23/03/18 14:46, Jan Beulich wrote: > So in the end the question is: Why not use just two PCIDs, and

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Jan Beulich
>>> On 26.03.18 at 08:49, wrote: > On 23/03/18 16:58, Jan Beulich wrote: > On 23.03.18 at 15:11, wrote: >>> On 23/03/18 14:46, Jan Beulich wrote: So in the end the question is: Why not use just two PCIDs, and allow global pages just like we do now,

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 23/03/18 16:58, Jan Beulich wrote: On 23.03.18 at 15:11, wrote: >> On 23/03/18 14:46, Jan Beulich wrote: >>> Valid point. Looking at all present uses of ->arch.cr3, it's probably >>> indeed better the way you have it. However, I'm now wondering >>> about something else:

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-23 Thread Jan Beulich
>>> On 23.03.18 at 15:11, wrote: > On 23/03/18 14:46, Jan Beulich wrote: >> Valid point. Looking at all present uses of ->arch.cr3, it's probably >> indeed better the way you have it. However, I'm now wondering >> about something else: make_cr3() leaves PCID as zero for HVM >>

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-23 Thread Juergen Gross
On 23/03/18 14:46, Jan Beulich wrote: On 23.03.18 at 12:29, wrote: >> On 23/03/18 11:51, Jan Beulich wrote: >> On 21.03.18 at 13:51, wrote: Avoid flushing the complete TLB when switching %cr3 for mitigation of Meltdown by using the PCID

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-23 Thread Jan Beulich
>>> On 23.03.18 at 12:29, wrote: > On 23/03/18 11:51, Jan Beulich wrote: > On 21.03.18 at 13:51, wrote: >>> Avoid flushing the complete TLB when switching %cr3 for mitigation of >>> Meltdown by using the PCID feature if available. >>> >>> We are using 4 PCID

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-23 Thread Juergen Gross
On 23/03/18 11:51, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> Avoid flushing the complete TLB when switching %cr3 for mitigation of >> Meltdown by using the PCID feature if available. >> >> We are using 4 PCID values for a 64 bit pv domain subject to XPTI and >> 2

[Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-21 Thread Juergen Gross
Avoid flushing the complete TLB when switching %cr3 for mitigation of Meltdown by using the PCID feature if available. We are using 4 PCID values for a 64 bit pv domain subject to XPTI and 2 values for the non-XPTI case: - guest active and in kernel mode - guest active and in user mode -