On 02/03/18 12:03, Wei Liu wrote:
> On Fri, Mar 02, 2018 at 09:14:01AM +0100, Juergen Gross wrote:
>> Instead of flushing the TLB from global pages when switching address
>> spaces with XPTI being active just disable global pages via %cr4
>> completely when a domain subject to XPTI is active. This avoids the
>> need for extra TLB flushes as loading %cr3 will remove all TLB
>> entries.
>> Signed-off-by: Juergen Gross <jgr...@suse.com>
> I think you patch tries to disable PGE wholesale for Xen, but I don't
> think this patch catches all of them.

I do it only while a domain subject to XPTI is active on the cpu.

> XEN_MINIMAL_CR4 still has PGE in it. EFI path and the stack resyncing
> asm in __start_xen are missing.

That's on purpose. Without XPTI (e.g. on AMD cpus) PGE is still good
for performance of 64-bit pv domains (but that's the only case AFAIK).

> You also missed fixing the comment of setting MTRR. It is not a big deal
> though.

I'm not sure this comment wants to be modified as normally PGE is still
on, e.g. when booting. The only case I could think of where MTRR would
be modified with PGE off should be a dom0 hypercall, e.g.

> I have in fact written a small series to make CR4.PGE configurable but
> haven't got around to send the patches yet because I didn't think it is
> very useful in its own.

Depends on whether re-using global TLB entry saves more than flushing
the TLB from global pages does cost.


Xen-devel mailing list

Reply via email to