[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] xen: arm: Enclose access to EL2 MMU specific registers under CONFIG_MMU
- To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, <sstabellini@xxxxxxxxxx>, <bertrand.marquis@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <julien@xxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Fri, 9 Aug 2024 14:15:33 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HMnzhUbJraVztlOJr23Y1yGnGFvQt5n8gb0g57KqkrI=; b=Jzjzl2ulJNpVn2I9U29d+fuTJ3JYyvkkBd1cXpGrVs1TuSu/g2TiBMg4UcuXMKhMaQc5jaHGlEfIF3FuKlo5DGqVB4zbSylApWtI7jpDgiWbcxPR7uNa+yz4aWPGfPDthxfnuq0c6iImly+NyLHLa7J7CseT9MWo8n+0dzj5g0P+4o1xKcQoa4j9lCE2iLa2BmJw9t7qjqRCNOXO1qCF+rc3cOsQ3S0wFxXNQEAv0AjlgzMWymD6OkmYKWnmL7UMQ95YNEKj8ib/f52CRyOLla8htCpyVvnKjmjbnYV7FTUTPrLVTqiXXH41l+EssshARsvbVf2uEaqZDUDtDYhQbg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mM77nuaZTZ6wurRMc2LakgTL8EZI1yuTsKKVz/5LTY5id69QlMrJroIQUL/pOYWc3jjJYUQvOGN89tm8VlbYS9dcLsLu4McBfCgCSugB+f93Vv+Y5aj+drJ0SDHgC9QtVUVsIyKrNySa0sdyDXfktSwSVOUd+rjpYbexGnBpGbD1MI/uLZO658JJYWk4SGV/SBJcilSkCK/blrHCvmqh63Rr4bBdLLl9/WAWd2GB+ri1+f4o2ODrOPXW5pJFO+E+qIRU+LBupUHxF3n6ulPWWEeByJtuUVTh7Z4e9o/58UNKI/GLxIXnsdr5L3v0bPhW0knNFyhyG964cbWevPQypQ==
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 09 Aug 2024 12:15:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Ayan,
On 08/08/2024 14:09, Ayan Kumar Halder wrote:
> All the EL2 MMU specific registers are enclosed within CONFIG_MMU.
>
> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
> ---
> Changes from v1 :-
> 1. 'vttbr_el2' field is enclosed with ifdef.
> 2. No movement of code.
>
> xen/arch/arm/traps.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index aac6c599f8..f51e1424cb 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -720,8 +720,10 @@ struct reg_ctxt {
> uint32_t ifsr32_el2;
> #endif
>
> +#ifdef CONFIG_MMU
> /* Hypervisor-side state */
> uint64_t vttbr_el2;
Given that you protected the field here, why did you leave assignments in
show_registers()
and vcpu_show_registers() unguarded?
~Michal
|