xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	stefan@agner.ch, Masahiro Yamada <yamada.masahiro@socionext.com>,
	Will Deacon <will@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sasha Levin <sashal@kernel.org>,
	sstabellini@kernel.org, James Morris <jmorris@namei.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	xen-devel@lists.xenproject.org,
	Vladimir Murzin <vladimir.murzin@arm.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	alexios.zavras@intel.com, boris.ostrovsky@oracle.com,
	allison@lohutok.net, jgross@suse.com, steve.capper@arm.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	James Morse <james.morse@arm.com>,
	info@metux.net
Subject: Re: [Xen-devel] [PATCH 1/3] arm/arm64/xen: use C inlines for privcmd_call
Date: Fri, 22 Nov 2019 00:53:12 +0000	[thread overview]
Message-ID: <20191122005311.GI25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <CA+CK2bAm0r8zLMz_gdq30zF8io5RzVnbXFSV9NkyT_uUxKJwLA@mail.gmail.com>

On Thu, Nov 21, 2019 at 07:39:22PM -0500, Pavel Tatashin wrote:
> > > That may be, but be very careful that you only use them in ARMv7-only
> > > code.  Using them elsewhere is unsafe as the domain register is used
> > > for other purposes, and merely blatting over it (as your
> > > uaccess_enable and uaccess_disable functions do) is unsafe.
> >
> > In fact, I'll turn that into a bit more than a suggestion.  I'll make
> > it a NAK on adding them to 32-bit ARM.
> >
> 
> That's fine, and I also did not want to change ARM 32-bit. But, do you
> have a suggestion how differentiate between arm64 and arm in
> include/xen/arm/hypercall.h without ugly ifdefs?

Sorry, I don't.

I'm surprised ARM64 doesn't have anything like that, but I suspect
that's because they don't need to do a save/restore type operation.
Whereas, 32-bit ARM does very much need the save/restore behaviour
(although not in this path.)

The problem is, turning uaccess_enable/disable into C code means
that it's open to being used elsewhere in the kernel (ooh, a couple
of useful looking functions that work on both architectures!  I can
use that too!) and then we end up with stuff breaking subtly.  It's
the potential for subtle breakage that is making me NAK the idea of
adding the inline C functions.

Given the two have diverged, the only answer is ifdefs, sorry.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

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

  reply	other threads:[~2019-11-22  0:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 18:48 [Xen-devel] [PATCH 0/3] Use C inlines for uaccess Pavel Tatashin
2019-11-21 18:48 ` [Xen-devel] [PATCH 1/3] arm/arm64/xen: use C inlines for privcmd_call Pavel Tatashin
2019-11-22  0:22   ` Russell King - ARM Linux admin
2019-11-22  0:30     ` Pavel Tatashin
2019-11-22  0:34       ` Russell King - ARM Linux admin
2019-11-22  0:35         ` Russell King - ARM Linux admin
2019-11-22  0:39           ` Pavel Tatashin
2019-11-22  0:53             ` Russell King - ARM Linux admin [this message]
2019-11-21 18:48 ` [Xen-devel] [PATCH 2/3] arm64: remove uaccess_ttbr0 asm macros from cache functions Pavel Tatashin
2019-11-21 18:48 ` [Xen-devel] [PATCH 3/3] arm64: remove the rest of asm-uaccess.h Pavel Tatashin
2019-11-22  1:26   ` Max Filippov
2019-11-22  2:20     ` Pavel Tatashin
2019-11-27 18:44 [Xen-devel] [PATCH 0/3] Use C inlines for uaccess Pavel Tatashin
2019-11-27 18:44 ` [Xen-devel] [PATCH 1/3] arm/arm64/xen: use C inlines for privcmd_call Pavel Tatashin
2019-11-29 15:05   ` Julien Grall
2019-11-29 15:09     ` Andrew Cooper
2019-12-04 17:55       ` Pavel Tatashin
2019-12-04 17:58     ` Pavel Tatashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122005311.GI25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=boris.ostrovsky@oracle.com \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=info@metux.net \
    --cc=james.morse@arm.com \
    --cc=jgross@suse.com \
    --cc=jmorris@namei.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=sashal@kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=stefan@agner.ch \
    --cc=steve.capper@arm.com \
    --cc=tglx@linutronix.de \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).