Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3242155ybe; Sun, 8 Sep 2019 09:58:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbnUjhMw+9wOEVidPs+MirQiYHDXZV17KiQQ23S86PPXnetcvgkzX9pXqYqy7ZZmgVjy4U X-Received: by 2002:a50:99d5:: with SMTP id n21mr20342741edb.50.1567961912181; Sun, 08 Sep 2019 09:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567961912; cv=none; d=google.com; s=arc-20160816; b=VpbFxy1z7/kKVjIaFLs7N+//b/xKz1+bnXvEYgV65Xg5PlgpMBujvmP7NVpcEiG3gn YjxOM+5r50bpgE42QaPNOXC3URcIvvMldWjXKyqewPaMjrnzN/647RxSkXcB2ZL1x+3r 9MKKXNkNWn0SqG3NGZU1nOIi4eY16d9IKH2cz9nwja986FMpGP07ntAJrwy+8MESDjju e/omfesIy7zId4m0Hw1WtjICwMn1O2rPF2FenEPqI+SJ74wy0X3rwPLIaW8bM3fIqjhu sDAutV4HEXRukDTsqS6GFPLPTWhECAokabMyJnXkTD33ykIEg0DcLRj611dakiYiAbVf 542w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=t19RIqvHD48i1QdSZ/TpTPbquDuJr1nxBCLKWKUiIb8=; b=m3oJS/VfmflYJIx+OdkPV1j2x7tXWQNyOZdY9gQGWjKmBQU1d/W7uW0dcAN6Ao3au4 r60XqM+bxMgteMwkHEIgCuZxpywoJTcQBSlU8uwziaSR2Jlbmog7W5bG3u4uO+6oml9v dhPZ+pPVetO15bWt7+ugkM+xLCCMy8nDf4zw0UeMlHREMp/EkbJs2Ze0s0VdPNP/VsSj 78I4X3tJNCjQRjLej6UWNdPMbwz4dfDCoU0hn+dyE9xM3bytxfhsLGkSsGqJA64McjXo 8r1HADT/A/tvqRh2uFCvOGfammaUbJ8h23mD+SQs3HC3gKBvEZqAZAMFdXISl4LZ53yd 0SFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d21si5144111edx.405.2019.09.08.09.58.08; Sun, 08 Sep 2019 09:58:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729859AbfIGKFu (ORCPT + 99 others); Sat, 7 Sep 2019 06:05:50 -0400 Received: from foss.arm.com ([217.140.110.172]:35908 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbfIGKFt (ORCPT ); Sat, 7 Sep 2019 06:05:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DA1641576; Sat, 7 Sep 2019 03:05:48 -0700 (PDT) Received: from [10.37.12.3] (unknown [10.37.12.3]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 85A3F3F59C; Sat, 7 Sep 2019 03:05:46 -0700 (PDT) Subject: Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function To: Andrew Cooper , Arnd Bergmann Cc: Stefano Stabellini , Emil Velikov , Russell King , Denis Efremov , "linux-kernel@vger.kernel.org" , Masahiro Yamada , xen-devel , Linux ARM References: <20190906153948.2160342-1-arnd@arndb.de> <7abad95e-ea47-c068-d91c-ba503f2530b9@citrix.com> From: Julien Grall Message-ID: <95dbd972-fe78-d0ca-f7b4-1a6bdd418eab@arm.com> Date: Sat, 7 Sep 2019 11:05:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 >>> 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