From nobody Fri Apr 26 10:54:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1592920408; cv=none; d=zohomail.com; s=zohoarc; b=H3m6aLv/Bv1Y7iRLidke00NnAKVWRBOz90dCUjg8LMHY3u6mGGFiQ+IdaDnRXrRlrgAHYlzHfxWdGeRrSfQfBuewAZ/ZfnhSWtcbotBO0Uf/SLX8Hkq4GKutKaA4PuZ78BqXFuN4ngC9Cf3cp3wv6hQl4s3fQLdpZHQZBh094fo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592920408; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=GozwpQ0Iv3MeC4dw1+dXEx2BeKbpjjvJYw6+yWSmYl4=; b=F7IEVd9wfhSGqZYVhQdAN7j/90ESnaTLjvWowr350Qp5gKdrisetnUEfL0TSxscX584gEXdW1dpH9XgmevHSMrp44p9KFlmTC+rvnjEM26D4QcsUHjTfAkKszPLx7EnRRqxia60iUP+Ivs33q68EmS5SKbcrub0LtfPhUHzSC70= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1592920408501575.3041398316268; Tue, 23 Jun 2020 06:53:28 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jnjMF-0005yb-03; Tue, 23 Jun 2020 13:53:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jnjME-0005yW-2Z for xen-devel@lists.xenproject.org; Tue, 23 Jun 2020 13:53:02 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d9ab4310-b558-11ea-bb8b-bc764e2007e4; Tue, 23 Jun 2020 13:53:00 +0000 (UTC) X-Inumbo-ID: d9ab4310-b558-11ea-bb8b-bc764e2007e4 Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: cBI9K2iVkwAOJvtSEJkLc9vejSk4/GsGP1TPn9bvwCwuIWGAdwOJKhxKZd0ngnmSSA4RDETZ+I hI4RqxGleDqRGJ8gACnqEyXvvK5be1QUNAu/StJc0xq9UT7Y41L6DDOJrZjjyLjgZ46fSl1LBC U3wWMIusL9/Jareoxnu3/HGJbvec6QM8iAfAz4MTm8KKtALE3GcpbyrgoSsYPaqH5LsMtoP5Dj ck1DzT2FM3dXsuLWEolY6ve+Vov1WEN8LMlUGOVgYbMDiABG9PXWRbAwLwN9BWsBKtZBqdNchW pkA= X-SBRS: 2.7 X-MesageID: 20718358 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,271,1589256000"; d="scan'208";a="20718358" From: Roger Pau Monne To: Subject: [PATCH for-4.14] mm: fix public declaration of struct xen_mem_acquire_resource Date: Tue, 23 Jun 2020 15:52:46 +0200 Message-ID: <20200623135246.66170-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , paul@xen.org, Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" XENMEM_acquire_resource and it's related structure is currently inside a __XEN__ or __XEN_TOOLS__ guarded section to limit it's scope to the hypervisor or the toolstack only. This is wrong as the hypercall is already being used by the Linux kernel at least, and as such needs to be public. Also switch the usage of uint64_aligned_t to plain uint64_t, as uint64_aligned_t is only to be used by the toolstack. Note that the layout of the structure will be the same, as the field is already naturally aligned to a 8 byte boundary. No functional change expected. Fixes: 3f8f12281dd20 ('x86/mm: add HYPERVISOR_memory_op to acquire guest re= sources') Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Julien Grall Reviewed-by: Paul Durrant --- Would be good to get this fixed before the release in order to avoid shipping bogus headers. Should also be backported. --- xen/include/public/memory.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h index dbd35305df..1767d7d5f5 100644 --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -607,6 +607,8 @@ struct xen_reserved_device_memory_map { typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_m= ap_t; DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t); =20 +#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */ + /* * Get the pages for a particular guest resource, so that they can be * mapped directly by a tools domain. @@ -645,7 +647,7 @@ struct xen_mem_acquire_resource { * IN - the index of the initial frame to be mapped. This parameter * is ignored if nr_frames is 0. */ - uint64_aligned_t frame; + uint64_t frame; =20 #define XENMEM_resource_ioreq_server_frame_bufioreq 0 #define XENMEM_resource_ioreq_server_frame_ioreq(n) (1 + (n)) @@ -666,8 +668,6 @@ struct xen_mem_acquire_resource { typedef struct xen_mem_acquire_resource xen_mem_acquire_resource_t; DEFINE_XEN_GUEST_HANDLE(xen_mem_acquire_resource_t); =20 -#endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */ - /* * XENMEM_get_vnumainfo used by guest to get * vNUMA topology from hypervisor. --=20 2.26.2