From patchwork Mon Jun 3 16:11:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 165676 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4669740ili; Mon, 3 Jun 2019 09:12:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp+B5ij8z0S7ypyzSRSSTQVVHJRukGORhFmZs+P0QxN3EI7T2kV1jKGKRt5+jpyysxzoRr X-Received: by 2002:a24:9982:: with SMTP id a124mr7833840ite.51.1559578355667; Mon, 03 Jun 2019 09:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559578355; cv=none; d=google.com; s=arc-20160816; b=q8MmK37d1PjXk73wyuaNhzQNhQcgXiNBFwBSTngz7cAvP4YhrgnO+fm6E/epuHqISC 3FF/pLrnDgX5KIOxv7D3B1WMAxEm9DYVanloPbO15s4qB9rZK/mDIQEmuigDcLOlvRYK Jfd92BdIw7dduZZuOmPk+tAjHGEWSMtWztnGuL9HMUL9HVALRzEjaUPYjXmqexGRLTCP clNHmkE51+K3P1wSRK5mkDwHGBLOL+Yk1ZTsAWV68W9lIAZIpwNFv28P4KXNRPefho/Q 6npbWuLMhGG62V5fho8Y1GmylyuJIM37m1dnywvcjPlbQDzuqB3uF7NeUHXM2CgdpxhF W4Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:message-id:date:to:from; bh=mb+CU8/P5xImg9mDVoK/4aWf9y+54jqOH6R08bWGhBg=; b=JkvhZWor7vlo4d83gBXVBPb3XXKj0Wt9u5uN6Z57WNbAswDpYaGbGJqNmlcteH2SLC DzoxLugoO5NlUgP/hFLxbUqGXp44ahtfePLFSYeUC7VPdCTPVwwmKNGpyJBhz1aiDQtJ 05iGYsmTWoccU8EarZBPmsTFczUVrKmNF66hJlIdl1hNjnJV6v9zdqri0O+zACWRwkYb 2UDrVVtH1vgx9yuJ+g1fiZTe9DomcbHT+ebTaSJWe/j+Zih/i58yrScFFsxBNxMl+nLc 23nq5EELn9LNb6SjA19KSTuI9rbp8/Ix4xDMpfkLbNoxflE0TsAd6jSQerVE8Oue67Sb hwNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id b13si9568926iti.3.2019.06.03.09.12.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 09:12:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hXpYL-0004Bi-RY; Mon, 03 Jun 2019 16:11:17 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hXpYK-0004BU-3v for xen-devel@lists.xenproject.org; Mon, 03 Jun 2019 16:11:16 +0000 X-Inumbo-ID: 3619cde8-861a-11e9-a38d-d38d57da0bfd Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 3619cde8-861a-11e9-a38d-d38d57da0bfd; Mon, 03 Jun 2019 16:11:15 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69C8780D; Mon, 3 Jun 2019 09:11:14 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 127C63F5AF; Mon, 3 Jun 2019 09:11:12 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 3 Jun 2019 17:11:08 +0100 Message-Id: <20190603161108.864-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH v2] xen/public: arch-arm: Restrict the visibility of struct vcpu_guest_core_regs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , wl@xen.org, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, Julien Grall , jbeulich@suse.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Currently, the structure vcpu_guest_core_regs is part of the public API. This implies that any change in the structure should be backward compatible. However, the structure is only needed by the tools and Xen. It is also not expected to be ever used outside of that context. So we could save us some headache by only declaring the structure for Xen and tools. Suggested-by: Andrew Cooper Signed-off-by: Julien Grall --- This is a follow-up of the discussion [1]. As this is now Xen and tools only, I am wondering whether the check on GNU_C is still necessary. I am happy to send a follow-up patch (or fold in this one) if it can be removed. [1] <3c245c5b-51c6-1d0e-ad6c-42414573166f@arm.com> --- xen/include/public/arch-arm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index eb424e8286..e9a86d8eb8 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -197,6 +197,7 @@ } while ( 0 ) #define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val) +#if defined(__XEN__) || defined(__XEN_TOOLS__) #if defined(__GNUC__) && !defined(__STRICT_ANSI__) /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */ # define __DECL_REG(n64, n32) union { \ @@ -272,6 +273,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_core_regs_t); #undef __DECL_REG +#endif + typedef uint64_t xen_pfn_t; #define PRI_xen_pfn PRIx64 #define PRIu_xen_pfn PRIu64