[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tools/xen-foreign: Update the size for vcpu_guest_{core_regs, context}


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 6 Jul 2021 13:37:23 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ByzAYF9Hgbj+GfgAXiW0e6h+IPSJGdCZi+t1r6SSpH4=; b=KrTcZFaGCAtF4cs67uF90LlxJI69C1TgT8vFyRznFlyBpSVuo3Tp3do+OxdWTbQLRshR9M8MlBGhoK6hwN6lU0F1GXXl9fuPu+ugau8Kyy3tQRbH9/OIYV5oFFnc+AUPt5/tvHTL/jMFzQY5P2VWtn3zI0w/ljoO5A9VkgyBqB6gP0yL5cBgBbhpytj79m3w0ckM7m+Nw2TQ1IcTQgB58l5MxjONUwlIyOk9Ec43AJpBwmx9xmKLq4jnSTycNLPOa8CgkmKtimKqfXSnr9esoGFtv6spc813nWglmsgrng10ghsfxtl4c4QTGp6GlwT/uEU3edEZLwj2Su/R/RPT0A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XNH64i51YcLuJgW1kZWiWsOg5CtynDupEnKf54VJsJLWwEfi9IoXl+HS+LjnYEf0WYG00EPROFBKiHGjRLQLAAc+hVU5sevzMR1UknKhl94KGIAcSpCfnaUE4HGFWyFk1dOLG+LKzd9LjH4xI5LcAUt+8kbBgDDkrHQrScaBbl+XVY2tg9x+Ncim8dEGo0myo6K7/dk6WpZujFGmvMmEwSQVyiqQn3X/2iqDy/ULM3pK0i0lm+08iFqG6w2nb/XuzSt/Z0XFcerRIvwvfKgiS3Siy6MhU4S2NC9JKBoz2yDuhRQDvNO79OnKEMHhkgnYkd4iZKqo4pOXCqziSaDYCw==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>, "olaf@xxxxxxxxx" <olaf@xxxxxxxxx>
  • Delivery-date: Tue, 06 Jul 2021 13:38:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXcmnBkkOFPux/UUWwb2d+hr5YRqs180IA
  • Thread-topic: [PATCH] tools/xen-foreign: Update the size for vcpu_guest_{core_regs, context}

Hi Julien,

> On 6 Jul 2021, at 14:20, Julien Grall <julien@xxxxxxx> wrote:
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> 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 <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

But I have other issues now:
xg_dom_arm.c:143:15: error: format '%x' expects argument of type 'unsigned 
int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} 
[-Werror=format=]
  143 |     DOMPRINTF("Initial state CPSR %#"PRIx32" PC %#"PRIx32,
      |               ^~~~~~~~~~~~~~~~~~~~~~~
  144 |            ctxt->user_regs.cpsr, ctxt->user_regs.pc32);
      |            ~~~~~~~~~~~~~~~~~~~~
      |                           |
      |                           uint64_t {aka long long unsigned int}

We will work on a patch to fix those.

Cheers
Bertrand

> 
> ---
> 
> Cc: michal.orzel@xxxxxxx
> Cc: olaf@xxxxxxxxx
> ---
> 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
> -- 
> 2.17.1
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.