[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] L1TF, and future work



On Sat, Aug 25, 2018 at 1:21 AM Juergen Gross <jgross@xxxxxxxx> wrote:
>
> On 24/08/18 20:43, Jason Andryuk wrote:
> > On Wed, Aug 15, 2018 at 10:39 AM Juergen Gross <jgross@xxxxxxxx> wrote:
> >>
> >> On 15/08/18 16:10, Jan Beulich wrote:
> >>>>>> On 15.08.18 at 15:17, <andrew.cooper3@xxxxxxxxxx> wrote:
> >>>> 2) 32bit PV guests which use writeable pagetable support will
> >>>> automatically get shadowed when the clear the lower half.
> >>>
> >>> ... of a page table entry.
> >>>
> >>>>  Ideally, such
> >>>> guests should be modified to use hypercalls rather than the ptwr
> >>>> infrastructure (as its more efficient to begin with), but we can
> >>>> probably work around this in Xen by emulating the next few instructions
> >>>> until we have a complete PTE (same as the shadow code).
> >>>
> >>> Provided the intervening insns are simple enough. I've looked into
> >>> current Linux pv-ops code the other day, and afaict it's already
> >>> using mmu-op or cmpxchg8b, but not two separate mov-s. But
> >>> of course I've looked at the general routines only, not at things
> >>> perhaps hidden in special cases, or in init-only code.
> >>
> >> Look at xen_pte_clear(). Inside irq handling it will use (PAE case):
> >>
> >> static inline void native_pte_clear(struct mm_struct *mm, unsigned long
> >> addr,
> >>                                     pte_t *ptep)
> >> {
> >>         ptep->pte_low = 0;
> >>         smp_wmb();
> >>         ptep->pte_high = 0;
> >> }
> >
> > I've been testing out set_64bit for PTE operations on 32bit PAE.  I
> > haven't found all the spots, but shadowing is now enabled a few
> > seconds into boot instead of immediately.
> >
> > And yes, I think https://bugzilla.kernel.org/show_bug.cgi?id=198497 is
> > related as you presumed a while back.
>
> I have a patch series (two patches) avoiding shadowing completely:
>
> https://lists.xen.org/archives/html/xen-devel/2018-08/msg01785.html

Great!  Thank you.  I'm building now.

Looks like I missed native_ptep_get_and_clear which led to the delay
enabling shadowing.

Regards,
Jason

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.