[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/2] xen/arm: Add macro XEN_VM_MAPPING
- To: "leo.yan@xxxxxxxxxx" <leo.yan@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Mon, 4 Sep 2023 13:56:44 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AKEnHB9nC3h0nG0gTidwgT0CvFTAyAF25MIFKgqiqYo=; b=K+HJyUfgkDKvdr5aOxZYKiZQv1desOqSpTXhWA9vFLRp6E1jRe27GdhjTL3rP4ULTQ+KwmxIQwIsp3HeyNsXvEV7Mk0JAeuwjLRWpAZeSGfq5vQtk1Sp5RSCaA8wYV/+TiBLHVchwxNJGzKO8+lWgs0uugGJfPk8OEvJj4NqjWbr9jtvrWWXiwM9VwJFoz/baerRAVt8q+EBdvq/RqfXpkcCqz3MrnpnphaNNHSC89t8AiVv4KG+DU291THpJDrO7enmvc2pYaG/2OM1snbl/4tkbeG2ac2PKlrpfqOja+eHHWqhMXK/FxoHjNAFUd2ly3DmpB9oQKkq/wnMT4qvpw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLYo41M8SG+h6IZVOsqKb1KndyRqEdeLeyPzNb9MiRI/vTdlCZwYpin39sV3ivGvelVckQngv4ZVZsT8R4Lq2+FTE3NMYdKnJk8Cd7ICYahcLMK7kNq+z0ecRlM2h7kyIb7JRBAOEPuMTuWlUurEKBkr8UauL+V81NQEhFIoksaR74/lBB5tWJLpmYrOhU2gTNk4zXpDiIOyq9/xrQNMqX+WVjVjsDXYpJwUIxQAvxmRKAusntIE/F51BQdskn4atX0fJSnkVKz0sbXrzN2ca/YSh9hWVLxh/IJaiN3PyP7ghvKwfOVpywpgnTqYb/cWv7tDTdC0SgSNPPaFH/Z14A==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Alexey Klimov <alexey.klimov@xxxxxxxxxx>
- Delivery-date: Mon, 04 Sep 2023 13:57:01 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZ2/p+UpPxNbzQ2kazbqUwug846LAKt0SA
- Thread-topic: [PATCH v1 1/2] xen/arm: Add macro XEN_VM_MAPPING
Hi Leo,
> On 31 Aug 2023, at 13:01, Leo Yan <leo.yan@xxxxxxxxxx> wrote:
>
> Xen maps the virtual memory space starting from L0 slot 4, so it's open
> coded for macros with the offset '4'.
>
> For more readable, add a new macro XEN_VM_MAPPING which defines the
> start slot for Xen virtual memory mapping, and all virtual memory
> regions are defined based on it.
>
> Signed-off-by: Leo Yan <leo.yan@xxxxxxxxxx>
As said on patch 2, please check current staging code as it does not work
like this anymore.
Cheers
Bertrand
> ---
> xen/arch/arm/include/asm/config.h | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/arm/include/asm/config.h
> b/xen/arch/arm/include/asm/config.h
> index 83cbf6b0cb..21f4e68a40 100644
> --- a/xen/arch/arm/include/asm/config.h
> +++ b/xen/arch/arm/include/asm/config.h
> @@ -117,11 +117,14 @@
> #define XEN_VIRT_START _AT(vaddr_t, MB(2))
> #else
>
> +#define IDENTITY_MAPPING_AREA_NR_L0 4
> +#define XEN_VM_MAPPING SLOT0(IDENTITY_MAPPING_AREA_NR_L0)
> +
> #define SLOT0_ENTRY_BITS 39
> #define SLOT0(slot) (_AT(vaddr_t,slot) << SLOT0_ENTRY_BITS)
> #define SLOT0_ENTRY_SIZE SLOT0(1)
>
> -#define XEN_VIRT_START (SLOT0(4) + _AT(vaddr_t, MB(2)))
> +#define XEN_VIRT_START (XEN_VM_MAPPING + _AT(vaddr_t, MB(2)))
> #endif
>
> /*
> @@ -184,12 +187,10 @@
>
> #else /* ARM_64 */
>
> -#define IDENTITY_MAPPING_AREA_NR_L0 4
> -
> -#define VMAP_VIRT_START (SLOT0(4) + GB(1))
> +#define VMAP_VIRT_START (XEN_VM_MAPPING + GB(1))
> #define VMAP_VIRT_SIZE GB(1)
>
> -#define FRAMETABLE_VIRT_START (SLOT0(4) + GB(32))
> +#define FRAMETABLE_VIRT_START (XEN_VM_MAPPING + GB(32))
> #define FRAMETABLE_SIZE GB(32)
> #define FRAMETABLE_NR (FRAMETABLE_SIZE / sizeof(*frame_table))
>
> --
> 2.39.2
>
|