From mboxrd@z Thu Jan 1 00:00:00 1970 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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 50638C433B4 for ; Wed, 5 May 2021 08:00:22 +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 E53CA613C5 for ; Wed, 5 May 2021 08:00:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E53CA613C5 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com 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.122883.231818 (Exim 4.92) (envelope-from ) id 1leCS2-0005DF-5U; Wed, 05 May 2021 08:00:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 122883.231818; Wed, 05 May 2021 08:00:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1leCS2-0005D8-1y; Wed, 05 May 2021 08:00:10 +0000 Received: by outflank-mailman (input) for mailman id 122883; Wed, 05 May 2021 08:00:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1leCS1-0005D2-EK for xen-devel@lists.xenproject.org; Wed, 05 May 2021 08:00:09 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f0757c91-ea72-4346-987f-2d75b82459c9; Wed, 05 May 2021 08:00:08 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B362BB07B; Wed, 5 May 2021 08:00:07 +0000 (UTC) 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" X-Inumbo-ID: f0757c91-ea72-4346-987f-2d75b82459c9 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1620201607; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8MLrzM8DJ5vvj2ns/MlzkH9tsXQ2lFuGE80d21MMdhI=; b=Z870sb4ltm4o5ZE+uI8VsSzDlpJJSnHgR8W3/h8oZ50Ii1lNthKwP6DenSQ52YRQCHqm/J dyVir7RW9Mr/rXMtr+y3cgsk+SYK0cQWEWB4kWeBLYsnfSnxzhGVc7jzGY6wgZg1KMCRv6 N0VtO/pANlUkJ3zAudfx2VASVzA0sL0= Subject: Re: [PATCH v3 10/10] arm64: Change type of hsr, cpsr, spsr_el1 to uint64_t To: Michal Orzel Cc: Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Ian Jackson , Wei Liu , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , bertrand.marquis@arm.com, wei.chen@arm.com, xen-devel@lists.xenproject.org References: <20210505074308.11016-1-michal.orzel@arm.com> <20210505074308.11016-11-michal.orzel@arm.com> From: Jan Beulich Message-ID: Date: Wed, 5 May 2021 10:00:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210505074308.11016-11-michal.orzel@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05.05.2021 09:43, Michal Orzel wrote: > --- a/xen/include/public/arch-arm.h > +++ b/xen/include/public/arch-arm.h > @@ -267,10 +267,10 @@ struct vcpu_guest_core_regs > > /* Return address and mode */ > __DECL_REG(pc64, pc32); /* ELR_EL2 */ > - uint32_t cpsr; /* SPSR_EL2 */ > + uint64_t cpsr; /* SPSR_EL2 */ > > union { > - uint32_t spsr_el1; /* AArch64 */ > + uint64_t spsr_el1; /* AArch64 */ > uint32_t spsr_svc; /* AArch32 */ > }; This change affects, besides domctl, also default_initialise_vcpu(), which Arm's arch_initialise_vcpu() calls. I realize do_arm_vcpu_op() only allows two unrelated VCPUOP_* to pass, but then I don't understand why arch_initialise_vcpu() doesn't simply return e.g. -EOPNOTSUPP. Hence I suspect I'm missing something. > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -38,7 +38,7 @@ > #include "hvm/save.h" > #include "memory.h" > > -#define XEN_DOMCTL_INTERFACE_VERSION 0x00000013 > +#define XEN_DOMCTL_INTERFACE_VERSION 0x00000014 So this is to cover for the struct vcpu_guest_core_regs change. > --- a/xen/include/public/vm_event.h > +++ b/xen/include/public/vm_event.h > @@ -266,8 +266,7 @@ struct vm_event_regs_arm { > uint64_t ttbr1; > uint64_t ttbcr; > uint64_t pc; > - uint32_t cpsr; > - uint32_t _pad; > + uint64_t cpsr; > }; Then I wonder why this isn't accompanied by a similar bump of VM_EVENT_INTERFACE_VERSION. I don't see you drop any checking / filling of the _pad field, so existing callers may pass garbage there, and new callers need to be prevented from looking at the upper half when running on an older hypervisor. Jan