[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95dbd972-fe78-d0ca-f7b4-1a6bdd418eab@arm.com>
Date: Sat, 7 Sep 2019 11:05:45 +0100
From: Julien Grall <julien.grall@....com>
To: Andrew Cooper <andrew.cooper3@...rix.com>,
Arnd Bergmann <arnd@...db.de>
Cc: Stefano Stabellini <sstabellini@...nel.org>,
Emil Velikov <emil.l.velikov@...il.com>,
Russell King <linux@...linux.org.uk>,
Denis Efremov <efremov@...ux.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
xen-devel <xen-devel@...ts.xenproject.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op
function
Hi Andrew,
On 9/6/19 6:20 PM, Andrew Cooper wrote:
> On 06/09/2019 17:00, Arnd Bergmann wrote:
>> On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper <andrew.cooper3@...rix.com> wrote:
>>> On 06/09/2019 16:39, Arnd Bergmann wrote:
>>>> HYPERVISOR_platform_op() is an inline function and should not
>>>> be exported. Since commit 15bfc2348d54 ("modpost: check for
>>>> static EXPORT_SYMBOL* functions"), this causes a warning:
>>>>
>>>> WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMBOL_GPL
>>>>
>>>> Remove the extraneous export.
>>>>
>>>> Fixes: 15bfc2348d54 ("modpost: check for static EXPORT_SYMBOL* functions")
>>>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>>> Something is wonky. That symbol is (/ really ought to be) in the
>>> hypercall page and most definitely not inline.
>>>
>>> Which tree is that changeset from? I can't find the SHA.
>> This is from linux-next, I think from the kbuild tree.
>
> Thanks.
>
> Julien/Stefano: Why are any of these hypercalls out-of-line? ARM
> doesn't use the hypercall page, and there is no argument translation
> (not even in arm32 as there are no 5-argument hypercalls declared).
I am not sure how the hypercall page makes things different. You still
have to store the arguments in the correct register so...
>
> They'd surely be easier to implement with a few static inlines and some
> common code, than to try and replicate the x86 side hypercall_page
> interface ?
... I don't think they will be easier to implement with a few static
inlines. The implementation will likely end up to be similar to
arch/x86/asm/xen/hypercall.h.
Furthermore, one of the downside of per-arch static inline is it is more
difficult to ensure the prototype match for all the architectures.
Although, it might be possible to make them common by only requesting
per-arch to implement HYPERCALL_N(...).
So I think the code is better as it is.
While looking at the code, I also realized that the implementation of
HYPERCALL_dm_op might be incorrect for Arm32. Similarly do privcmd call,
I think dm_op call should enable user access as they will be used by
userspace.
We don't use dm_op on Arm so far, hence why I think this was unnoticed.
I will see if I can reproduce it and send a patch.
Cheers,
--
Julien Grall
Powered by blists - more mailing lists