> > +#ifdef CONFIG_CPU_SW_DOMAIN_PAN > > +static __always_inline void uaccess_enable(void) > > +{ > > + unsigned long val = DACR_UACCESS_ENABLE; > > + > > + asm volatile("mcr p15, 0, %0, c3, c0, 0" : : "r" (val)); > > + isb(); > > +} > > + > > +static __always_inline void uaccess_disable(void) > > +{ > > + unsigned long val = DACR_UACCESS_ENABLE;
Oops, should be DACR_UACCESS_DISABLE. > > + > > + asm volatile("mcr p15, 0, %0, c3, c0, 0" : : "r" (val)); > > + isb(); > > +} > > Rather than inventing these, why not use uaccess_save_and_enable().. > uaccess_restore() around the Xen call? Thank you for suggestion: uaccess_enable() and uaccess_disable() are common calls with arm64, so I will need them, but I think I can use set_domain() with DACR_UACCESS_DISABLE /DACR_UACCESS_ENABLE inside these inlines. Pasha _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel