Re: [Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-22 Thread Jan Beulich
>>> On 22.03.18 at 16:26, wrote: > On 22/03/18 15:31, Jan Beulich wrote: > On 21.03.18 at 13:51, wrote: >>> void write_ptbase(struct vcpu *v) >>> { >>> +if ( this_cpu(root_pgt) && is_pv_vcpu(v) && !is_pv_32bit_vcpu(v) ) >>> +

Re: [Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-22 Thread Juergen Gross
On 22/03/18 15:31, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> --- a/xen/arch/x86/flushtlb.c >> +++ b/xen/arch/x86/flushtlb.c >> @@ -158,6 +158,9 @@ unsigned int flush_area_local(const void *va, unsigned >> int flags) >> } >> } >> >> +if ( flags &

Re: [Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-22 Thread Jan Beulich
>>> On 21.03.18 at 13:51, wrote: > --- a/xen/arch/x86/flushtlb.c > +++ b/xen/arch/x86/flushtlb.c > @@ -158,6 +158,9 @@ unsigned int flush_area_local(const void *va, unsigned > int flags) > } > } > > +if ( flags & FLUSH_ROOT_PGTBL ) > +

[Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-21 Thread Juergen Gross
For mitigation of Meltdown the current L4 page table is copied to the cpu local root page table each time a 64 bit pv guest is entered. Copying can be avoided in cases where the guest L4 page table hasn't been modified while running the hypervisor, e.g. when handling interrupts or any hypercall