From patchwork Tue Jul 6 13:20:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 12360583 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7490AC07E96 for ; Tue, 6 Jul 2021 13:20:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 316A661983 for ; Tue, 6 Jul 2021 13:20:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 316A661983 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.151296.279631 (Exim 4.92) (envelope-from ) id 1m0kzd-0006oI-UL; Tue, 06 Jul 2021 13:20:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 151296.279631; Tue, 06 Jul 2021 13:20:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0kzd-0006o7-Pd; Tue, 06 Jul 2021 13:20:05 +0000 Received: by outflank-mailman (input) for mailman id 151296; Tue, 06 Jul 2021 13:20:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0kzc-0006fZ-P4 for xen-devel@lists.xenproject.org; Tue, 06 Jul 2021 13:20:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0kzb-0001YF-Jb; Tue, 06 Jul 2021 13:20:03 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0kzb-0001op-AK; Tue, 06 Jul 2021 13:20:03 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Message-Id:Date:Subject:Cc:To:From; bh=AHt4qoHq1+UuC5E67ZQf2Rgi5gaP0PaL/CVC6PtQZl0=; b=s0YSsil34iKrVHTsH6zelac4yq L+e2RKSA8Rt1eRnzaNZLsC7/EjMb/zjN9QQphg9yL8rUl0qRM8PgibbLyRZa2U84aYQHjdFIY5lhy 1jMPirC9ERSrYKKAheNcPYhvrT0p0JYnlK1UynOEdZqfeGx/gB5Dp7EnlT827lGWVfV4=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: julien@xen.org, Julien Grall , Ian Jackson , Wei Liu , michal.orzel@arm.com, olaf@aepfle.de Subject: [PATCH] tools/xen-foreign: Update the size for vcpu_guest_{core_regs, context} Date: Tue, 6 Jul 2021 14:20:00 +0100 Message-Id: <20210706132000.29892-1-julien@xen.org> X-Mailer: git-send-email 2.17.1 From: Julien Grall Commit 918b8842a852 ("arm64: Change type of hsr, cpsr, spsr_el1 to uint64_t") updated the size of the structure vcpu_guest_core_regs and indirectly vcpu_guest_context. On Arm, the two structures are only accessible to the tools and the hypervisor (and therefore stable). However, they are still checked by the scripts in tools/include/xen-foreign are not able to understand that. Ideally we should rework the scripts so we don't have to update the size for non-stable structure. But I don't have limited time to spend on the issue. So chose the simple solution and update the size accordingly. Note that we need to keep vcpu_guest_core_regs around because the structure is used by vcpu_guest_context and therefore the scripts expects the generated header to contain it. Fixes: 918b8842a852 ("arm64: Change type of hsr, cpsr, spsr_el1 to uint64_t") Reported-by: Andrew Cooper Signed-off-by: Julien Grall Reviewed-by: Bertrand Marquis Reviewed-by: Michal Orzel Tested-by: Michal Orzel --- Cc: michal.orzel@arm.com Cc: olaf@aepfle.de --- tools/include/xen-foreign/reference.size | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/include/xen-foreign/reference.size b/tools/include/xen-foreign/reference.size index a0409db5c458..11a06a7a432c 100644 --- a/tools/include/xen-foreign/reference.size +++ b/tools/include/xen-foreign/reference.size @@ -4,8 +4,8 @@ structs | arm32 arm64 x86_32 x86_64 start_info | - - 1112 1168 trap_info | - - 8 16 cpu_user_regs | - - 68 200 -vcpu_guest_core_regs | 304 304 - - -vcpu_guest_context | 344 344 2800 5168 +vcpu_guest_core_regs | 312 312 - - +vcpu_guest_context | 352 352 2800 5168 arch_vcpu_info | 0 0 24 16 vcpu_time_info | 32 32 32 32 vcpu_info | 48 48 64 64