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

Re: [PATCH v6 03/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 15 Sep 2023 23:20:06 +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=zrmbX+fTfgljkhq5vaDFhzvA5WYzGtNvjEu0InxWOho=; b=ef+SFEvvXjyPGZ8a0F595GlV6gRJYT1giSG6h5sYVFz+oSM8k7e+obcAR4Z5uVJ6jVAhPka5rLe0aVEPNyjfzVo1d+o05fGDpRZ83MQURjOw6ALV8f2AHCd4INM4XAdIp+OXYIHFlvvYsnS7ZT1fcKt7IIE+fOV9meK+Pm9CP/rSIUISc0ieqF5GO6H+R2Vlm8mSDS4K51F3vs8+2f9t2XRKyJoTCzDhCd1MZWMYwViHGQiY4dvz0RXJj6uXHBk57AvCYjT7G6VzaVJIxNN1i2/jlG3bhLUtH0wN9/HwVrO7faz2HdGU0MZHkdtheiiLYM5xmlluN/JC2nKASBQTIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OBsL66fv3NZf6soeUF+lHKu/dJOQTxfQr7IYGbHbFc6Qizxvt0R97uOt89kd26YRNn7VrAc//bWTh+oBTZfDibCZuHUnuhUpPnRCgUu/AvzfMBDc6ES4//RKVigDjWRqjLzTZKWJKHYcdbMzG7NoU2gak6U0d7DD7TJAG0rQpXBm+Jl6Q1BNCLq7PKY4TAGGFW5+pq96gyee4+i7NmG8f8wzbNaweEPgmndpjmuPyXQEekxw6Uv56qELyScnugIGiGPQNel9HvijHJ5ygLU1wvs72+gvzIq16/iI8mf9HQSPD1GuR8e3HDqbi7KFHy8TN+cJ0MzrHhEdF7+s7Sqnrg==
  • 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>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Fri, 15 Sep 2023 23:20:47 +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: AQHZ2U+UcSThZeMoaki/TjWLz78rArAciCOAgAAapgCAAADeAA==
  • Thread-topic: [PATCH v6 03/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S

Hi,

> On Sep 16, 2023, at 07:17, Henry Wang <Henry.Wang@xxxxxxx> wrote:
> 
> Hi Julien,
> 
>> On Sep 16, 2023, at 05:41, Julien Grall <julien@xxxxxxx> wrote:
>> 
>> Hi Henry,
>> 
>> I realize that this was already committed. But something went wrong during 
>> the code movement.
>> 
>> On 28/08/2023 02:32, Henry Wang wrote:
>>> +/*
>>> + * Enable mm (turn on the data cache and the MMU) for the boot CPU.
>>> + * The function will return to the virtual address provided in LR (e.g. the
>>> + * runtime mapping).
>>> + *
>>> + * Inputs:
>>> + *   lr : Virtual address to return to.
>>> + *
>>> + * Clobbers x0 - x5
>>> + */
>>> +ENTRY(enable_boot_cpu_mm)
>>> +        mov   x5, lr
>>> +
>>> +        bl    create_page_tables
>>> +        load_paddr x0, boot_pgtable
>>> +
>>> +        bl    enable_mmu
>>> +        mov   lr, x5
>>> +
>>> +        /*
>>> +         * The MMU is turned on and we are in the 1:1 mapping. Switch
>>> +         * to the runtime mapping.
>>> +         */
>>> +        ldr   x0, =1f
>>> +        br    x0
>>> +1:
>>> +        /*
>>> +         * The 1:1 map may clash with other parts of the Xen virtual memory
>>> +         * layout. As it is not used anymore, remove it completely to
>>> +         * avoid having to worry about replacing existing mapping
>>> +         * afterwards. Function will return to primary_switched.
>>> +         */
>>> +        b     remove_identity_mapping
>>> +
>>> +        /*
>>> +         * Below is supposed to be unreachable code, as "ret" in
>>> +         * remove_identity_mapping will use the return address in LR in 
>>> advance.
>>> +         */
>>> +        b     fail
>> 
>> The "b     fail" didn't exist in head.S. I guess this was due to a wrong 
>> rebase? Can you check if there is something else that went missing?
> 
> Please correct me if I am wrong but I think the “b fail” of 
> enable_boot_cpu_mm() is
> in the mmu head.S, see line 348 [1].
> 
> [1] 
> https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/arm/arm64/mmu/head.S;h=d71fdc69a531780501387fc5c717b4c41bb1b66a;hb=6734327d76be38d20f280ecc96392e385fbc1d8b#l348

Oh I realized we agreed to remove this line as it is unreachable, I will send a 
patch.
Sorry about it.

Kind regards,
Henry


> 
> 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®.