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

Re: [PATCH 1/2] xen/arm32: head: Rework how the fixmap and early UART mapping are prepared


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 2 Nov 2023 10:29:06 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.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=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=MS+ZVx6KoUhnHsv/Qo3wg0qJct/Np/glM2nB+lQejBU=; b=PvlfifSah/qT8MC7sZdDD2afOJuMk7coXBF++lYfBB2FDfkcnrVCTLZPX9M/qPQ54i5OC8G9KX2Mvd8jnvp8Yo3iKsSYikR+1S2nJ2xQQAmqy2rqd3+C/2egqqjhtfm0R4uEBNh7BR4kkN2FZCnIpXmrVRiSRxNCYOsm40oD6cu0bwkf3ipD26YBrFA5DU6eRlSV2E6cL+tqqtCoHPvD5rSa5sTmweHiViN5eAcb9FQuJlKNNCnVHsiaiuByPQJsDIevkzh6+PzKFHwRdVB+Xf1HBu2rSH4qWA+YPiZNhdftPzyNwA7zdA6QN/bbQpyDQ68eSFKzsv34dlF3IWIlSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DFGvTJUJdaW3AEnSipJzBXBhgWeFKVdAwbb9qkF/XWow2zSGrM4+OCSMEm2xy68aP3T0jZQQ+YbbzwCYuS4yQwWorDaf9kA2LFi+/uOz9lBZjRettXkbjzCALtQmVV1ybUzwqURm7h0LTPXqk0BYBH1SWfGBvZNXFjd4tVN5BBwYs5vC5s0HiegXyjKS6lFju0I0eoegsGOxCkxaAAd0OI6E1cl9+2Z+AA7cIgPWx/sLPsnKwRD5Mx5ZPiZyYmQ3jwJflX+8O0un1HzHylKuQndsPR1v3cKEs45rcpSDT6J3mFtxsbfCSmE8MuW9AeirgyPbmiHI9hsYAfRIxNms2A==
  • Cc: <Henry.Wang@xxxxxxx>, <ayan.kumar.halder@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 02 Nov 2023 09:29:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 02/11/2023 00:30, Julien Grall wrote:
> 
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> Since commit 5e213f0f4d2c ("xen/arm32: head: Widen the use of the
> temporary mapping"), boot_second (used to cover regions like Xen and
> the fixmap) will not be mapped if the identity mapping overlap.
> 
> So it is ok to prepare the fixmap table and link it in boot_second
> earlier. With that, the fixmap can also be used earlier via the
> temporary mapping.
> 
> Therefore split setup_fixmap() in two:
>     * The table is now linked in create_page_tables() because
>       the boot page tables needs to be recreated for every CPU.
>     * The early UART mapping is only added for the boot CPU0 as the
>       fixmap table is not cleared when secondary CPUs boot.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> ---
>  xen/arch/arm/arm32/head.S | 48 ++++++++-------------------------------
>  1 file changed, 9 insertions(+), 39 deletions(-)
> 
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index 33b038e7e0ca..fec2433e568f 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -183,12 +183,16 @@ past_zImage:
>          bl    check_cpu_mode
>          bl    cpu_init
>          bl    create_page_tables
> +        /* Add the UART mapping if requested */
> +#ifdef CONFIG_EARLY_PRINTK
> +        mov_w r0, EARLY_UART_VIRTUAL_ADDRESS
> +        create_mapping_entry xen_fixmap, r0, r11, type=PT_DEV_L3
When building this patch, I'm getting a "Bad instruction" build error.
Quick look shows that you are trying to use the macro create_mapping_entry 
before macro definition.
Unless, I'm using a different baseline (latest staging) than you, this needs to 
be fixed.

Apart from that:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal



 


Rackspace

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