[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+CK2bDtADA2eVwJAUEPhpic8vXWegh8yLjo6Q6WmXZDxAfJpA@mail.gmail.com>
Date: Thu, 21 Nov 2019 19:30:41 -0500
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc: James Morris <jmorris@...ei.org>, Sasha Levin <sashal@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, steve.capper@....com,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Marc Zyngier <marc.zyngier@....com>,
James Morse <james.morse@....com>,
Vladimir Murzin <vladimir.murzin@....com>,
Mark Rutland <mark.rutland@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
allison@...utok.net, info@...ux.net, alexios.zavras@...el.com,
sstabellini@...nel.org, boris.ostrovsky@...cle.com,
jgross@...e.com, stefan@...er.ch,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
xen-devel@...ts.xenproject.org
Subject: Re: [PATCH 1/3] arm/arm64/xen: use C inlines for privcmd_call
> > +#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
Powered by blists - more mailing lists