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

Re: [PATCH v4 06/13] xen/arm64: Move setup_fixmap() to create_page_tables()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Thu, 10 Aug 2023 08:05:27 +0000
  • Accept-language: zh-CN, 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=JZD7CLFAqUvED8V61Les8HdNJWRfoQwW8H68dSyjoIw=; b=Y0IGfigGOvu88rI1+5BZvD9LL5jNA1WXND1BoAwQFAa8gcMeOW7pah/wr3dlfpGUgoSZNNr2Jvaesw2AY+dRArVZ+TrqgJbWRlw9W9drgPb8gdAkynwNi5T+0nyiy6rc2ATT/Zcy9yVDWdoReAI7UfGMRE28vr6JGc3ZdJLStKyUvY9nfigSM9uw5Y4ls/Vpq1YceJB8QK7U1NjFK3vW/vTAX1L/STvxFc5iNi2FG9UXGK9zeTlyXCZCtJdE3o3CneLyA2W4rQ2La8OEOEyrRrZGooECs4F+3GXsZ0jMKP7KCC0c7YmNV/UHKmV0AQIZVHWJsjtsGrAx9Kcsis45Rw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4vga6U14VwxOaE2uXhK3hPiWiLBY9bB95HI86X1jntBJXFAYhmo8lYq4LFlEQSbhLE+TecV2xkzg7n3H4rnhr/3wH49mmR+5C/nJf6Qix86xieqcySQ74Fr4ItooWLNZJCzdzmQSZTtDxfhB1ct+/BA8g83aw7woFO3lCQJDXya98y8CrMPVDhPUNqziMsiS+yHngnKtgHfT9RFzMJYQJ4hph/YlVniNO+UpYyBSsZI/kUXCqef3Pmg2/0tYN2k85vZvvMsJQwh1YCqp5dk+7NU5KB5aDXasv4EbyMX+fTigf33gcrkS4coYl9zW8FgS106ufqmyf1nISM1x5Gihg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 10 Aug 2023 08:05:45 +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: AQHZxCqVen/+EDcaZkm/mD7lV8P3ta/h8aoAgAFIywA=
  • Thread-topic: [PATCH v4 06/13] xen/arm64: Move setup_fixmap() to create_page_tables()

Hi Julien,

> On Aug 9, 2023, at 20:28, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Henry,
> 
> Title: NIT: It is more a fold rather than move.

You are correct, using “fold” here is more appropriate.

> 
> On 01/08/2023 04:44, Henry Wang wrote:
>> For the
>> future MPU support work, the early UART mapping could then be moved
>> in prepare_early_mappings().
> 
> I would drop this sentence as this is more related to the future 
> implementation of MPU rather than this patch itself.

Sure, v5 will drop this.

> 
>> No functional change intended.
>> [1] 
>> https://lore.kernel.org/xen-devel/78862bb8-fd7f-5a51-a7ae-3c5b5998ed80@xxxxxxx/
>> Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
>> ---
>> v4:
>> - Rework "[v3,12/52] xen/mmu: extract early uart mapping from setup_fixmap"
>> ---
>>  xen/arch/arm/arm64/head.S     |  1 -
>>  xen/arch/arm/arm64/mmu/head.S | 50 ++++++++++++-----------------------
>>  2 files changed, 17 insertions(+), 34 deletions(-)
>> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
>> index e4f579a48e..56f68a8e37 100644
>> --- a/xen/arch/arm/arm64/head.S
>> +++ b/xen/arch/arm/arm64/head.S
>> @@ -275,7 +275,6 @@ real_start_efi:
>>          b     enable_boot_cpu_mm
>>    primary_switched:
>> -        bl    setup_fixmap
>>  #ifdef CONFIG_EARLY_PRINTK
>>          /* Use a virtual address to access the UART. */
>>          ldr   x23, =EARLY_UART_VIRTUAL_ADDRESS
>> diff --git a/xen/arch/arm/arm64/mmu/head.S b/xen/arch/arm/arm64/mmu/head.S
>> index b7c3dd423a..6bd94c3a45 100644
>> --- a/xen/arch/arm/arm64/mmu/head.S
>> +++ b/xen/arch/arm/arm64/mmu/head.S
> 
> The second paragraph in create_page_tables() now needs to be dropped.

Thanks for finding this! Yes this should be dropped.

> 
>> @@ -231,6 +231,23 @@ link_from_second_id:
>>          create_table_entry boot_second_id, boot_third_id, x19, 2, x0, x1, x2
>>  link_from_third_id:
>>          create_mapping_entry boot_third_id, x19, x19, x0, x1, x2
>> +
>> +#ifdef CONFIG_EARLY_PRINTK
>> +        /* Add UART to the fixmap table */
>> +        ldr   x0, =EARLY_UART_VIRTUAL_ADDRESS
>> +        /* x23: Early UART base physical address */
>> +        create_mapping_entry xen_fixmap, x0, x23, x1, x2, x3, type=PT_DEV_L3
>> +#endif
>> +        /* Map fixmap into boot_second */
>> +        ldr   x0, =FIXMAP_ADDR(0)
>> +        create_table_entry boot_second, xen_fixmap, x0, 2, x1, x2, x3
>> +        /* Ensure any page table updates made above have occurred. */
>> +        dsb   nshst
>> +        /*
>> +         * The fixmap area will be used soon after. So ensure no hardware
>> +         * translation happens before the dsb completes.
>> +         */
>> +        isb
> 
> The DSB/ISB is not necessary anymore as you are not modifying live 
> page-tables. So I would prefer if this is removed.

Sure.

Kind regards,
Henry

> 
> Cheers,
> 
> -- 
> Julien Grall


 


Rackspace

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