From patchwork Wed Jun 7 07:20:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Dyasli X-Patchwork-Id: 9770731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AC7960350 for ; Wed, 7 Jun 2017 07:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5484D205AB for ; Wed, 7 Jun 2017 07:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 466292850D; Wed, 7 Jun 2017 07:22:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CE874205AB for ; Wed, 7 Jun 2017 07:22:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIVGP-0002Rv-9k; Wed, 07 Jun 2017 07:20:21 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIVGN-0002Rm-Tp for xen-devel@lists.xenproject.org; Wed, 07 Jun 2017 07:20:20 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id 65/CB-02181-339A7395; Wed, 07 Jun 2017 07:20:19 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrNLMWRWlGSWpSXmKPExsXitHRDpK7RSvN Ig0OrNSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxjj/kKDgpUtB3YxdLAuIivi5GTQ0LAX+J2 w2E2EJtNQE9i4+xXTCC2iICLRP+2M0BxLg5mgVdMEvuvN7KDJIQFLCU2/zgIZHNwsAioSCz56 gcS5hWwlfi8/AMrxEx5iV1tF8FsIQFVidcvdrFA1AhKnJz5BMxmFpCQOPjiBfMERu5ZSFKzkK QWMDKtYlQvTi0qSy3SNdVLKspMzyjJTczM0TU0MNXLTS0uTkxPzUlMKtZLzs/dxAgMBAYg2MH 4pd/5EKMkB5OSKG9aunmkEF9SfkplRmJxRnxRaU5q8SFGGQ4OJQnel8uBcoJFqempFWmZOcCQ hElLcPAoifDeWQaU5i0uSMwtzkyHSJ1iVJQS570J0icAksgozYNrg8XBJUZZKWFeRqBDhHgKU otyM0tQ5V8xinMwKgnz6oBM4cnMK4Gb/gpoMRPQYr5LJiCLSxIRUlINjC1TLK7z7wkN4rok4X PXTcqj+ODvxJpLToqzvLpfSnNPK6+NuOtefPSpVOmTVZdsJz05vui0WTl/pv2JHbyM2fWH/3E mfn254Azf1QmRZ5OWWvRWF7VwzykNUbh32ZNbwLXsz5uA2mtLvXcs3Fl+/tfnBVp3GR2qdZr/ bM7xP5epE8OrETXpphJLcUaioRZzUXEiAPwcejh+AgAA X-Env-Sender: prvs=324613574=sergey.dyasli@citrix.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1496820016!86688830!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22418 invoked from network); 7 Jun 2017 07:20:18 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-13.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 7 Jun 2017 07:20:18 -0000 X-IronPort-AV: E=Sophos;i="5.39,310,1493683200"; d="scan'208";a="426854427" From: Sergey Dyasli To: , Date: Wed, 7 Jun 2017 08:20:12 +0100 Message-ID: <20170607072012.20397-1-sergey.dyasli@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Cc: Juergen Gross , Sergey Dyasli , Stefano Stabellini , Marc Zyngier , Andrew Cooper , Julien Grall , Paul Durrant , Jan Beulich , Boris Ostrovsky Subject: [Xen-devel] [PATCH v2] xen: fix HYPERVISOR_dm_op() prototype X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Change the third parameter to be the required struct xen_dm_op_buf * instead of a generic void * (which blindly accepts any pointer). Signed-off-by: Sergey Dyasli Reviewed-by: Juergen Gross Reviewed-by: Stefano Stabellini --- v1 --> v2: - Replaced "#include " with forward declaration of struct xen_dm_op_buf arch/x86/include/asm/xen/hypercall.h | 4 +++- include/xen/arm/hypercall.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index f6d20f6cca12..7a4db5fefd15 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h @@ -50,6 +50,8 @@ #include #include +struct xen_dm_op_buf; + /* * The hypercall asms have to meet several constraints: * - Work on 32- and 64-bit. @@ -474,7 +476,7 @@ HYPERVISOR_xenpmu_op(unsigned int op, void *arg) static inline int HYPERVISOR_dm_op( - domid_t dom, unsigned int nr_bufs, void *bufs) + domid_t dom, unsigned int nr_bufs, struct xen_dm_op_buf *bufs) { return _hypercall3(int, dm_op, dom, nr_bufs, bufs); } diff --git a/include/xen/arm/hypercall.h b/include/xen/arm/hypercall.h index 73db4b2eeb89..b40485e54d80 100644 --- a/include/xen/arm/hypercall.h +++ b/include/xen/arm/hypercall.h @@ -39,6 +39,8 @@ #include #include +struct xen_dm_op_buf; + long privcmd_call(unsigned call, unsigned long a1, unsigned long a2, unsigned long a3, unsigned long a4, unsigned long a5); @@ -53,7 +55,8 @@ int HYPERVISOR_physdev_op(int cmd, void *arg); int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); int HYPERVISOR_tmem_op(void *arg); int HYPERVISOR_vm_assist(unsigned int cmd, unsigned int type); -int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, void *bufs); +int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, + struct xen_dm_op_buf *bufs); int HYPERVISOR_platform_op_raw(void *arg); static inline int HYPERVISOR_platform_op(struct xen_platform_op *op) {