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

Re: [PATCH 3/7] xen/arm64: head: Add missing isb in setup_fixmap()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 4 Jul 2023 14:48:28 +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=yLnOFhqSItkLt5xxwjGEwhD+ES50PHx4ePZo0o7xazo=; b=fuc5xgZQMjkwiB6rEakDKUDPxW5XB8Sz9Y5zXJZ7HR5i4Akr36D8O1/GTJqEh14DRyNL+E4t0jXpnoIGS1LvJoN+PHJdEjD4K/zJ3N+1GM+pYa8rrcJF2anuCcp7pbCjOmDLr/LJH0qLzfaNn7sEdD4eqHssX++H8zham/yKrn6OtoO8IVeU2PsQJ/sP3Cz1PU3YhVWRLOmTFYpyfFZkJLZw97H0okDm+ZDR3G5yf+NpeOi9jYaihCth+e1FgyuBMeKYb7wpovOpqBKDW/a8cUFAzF/Xx2Uki4ZpewLuJ8Pq+UBoGNsOcIxmO/6pxCuC+eBbZ/9/HYAep7BPaUGmdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahAEHsXj0wZ2ShNu2SvMcoaTb9+edd2GpMVjn7NtdHmPmzHqD8oNMzA0s38MLXaCTxKPZmUNPZvoVNES9FN9fiYP1JOfV+r5KAozLnkPr8fJ36qaoNlb2NQqQI4COUU8anMr1HcYn/i6tsmELaG1z+gpB2ptujQ1CZHB27VNKG8yICLzOq8nBac0d4rhjE27ea6zmJhY0M7tOWfNs6/7e8ILvKXa8wKQc5gBTbSwRUW9XDzlO+auYMTAQC4BJkFizIUvo0CfYuZ6muQeId7DqFo5GrKN6WwuZ1mPkMiS3zMibDROePeySWjID/aCYn4K5fXkwBnc+mexy4U1m4QbEA==
  • 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>, Luca Fancellu <Luca.Fancellu@xxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 04 Jul 2023 14:49:03 +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: AQHZos+3AfbUxPj7/Uqgb3LGizDPV6+px4QA
  • Thread-topic: [PATCH 3/7] xen/arm64: head: Add missing isb in setup_fixmap()

Hi Julien,

> On 19 Jun 2023, at 19:01, Julien Grall <julien@xxxxxxx> wrote:
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> On older version of the Arm Arm (ARM DDI 0487E.a, B2-125) there were
> the following paragraph:
> 
> "DMB and DSB instructions affect reads and writes to the memory system
> generated by Load/Store instructions and data or unified cache
> maintenance instructions being executed by the PE. Instruction fetches
> or accesses caused by a hardware translation table access are not
> explicit accesses."
> 
> Newer revision (e.g. ARM DDI 0487J.a) doesn't have the second sentence
> (it might be somewhere else in the Arm Arm). But the interpretation is
> not much different.
> 
> In setup_fixmap(), we write the fixmap area and may be used soon after,
> for instance, to write to the UART. IOW, there could be hardware
> translation table access. So we need to ensure the 'dsb' has completed
> before continuing. Therefore add an 'isb'.
> 
> Fixes: 2b11c3646105 ("xen/arm64: head: Remove 1:1 mapping as soon as it is 
> not used")
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> xen/arch/arm/arm64/head.S | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index f37133cf7ccd..4ea64e70997b 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -769,6 +769,11 @@ setup_fixmap:
>         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
> 
>         ret
> ENDPROC(setup_fixmap)
> -- 
> 2.40.1
> 




 


Rackspace

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