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

RE: [PATCH 6/7] xen/arm: mm: Add missing ISB in xen_pt_update()


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 20 Jun 2023 03:07:11 +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=o1ky7RN88ulN/YDII4sVGZ/ZjtuxO9vC7qI2HibHfu0=; b=P/BFgtzaA8P+5et0r8w6izizJiAXrtK35KwraTkuexo3NVRs5e/OpqZnZzQBoHbMO1UcVOxV6md0GRNPMMiEb1Sb0Qj/Iw/x6uzOjJZuNdFQKu5Ne/1a98InNH7Mx5rDCaSoIXgzjDolMQ+aIaJBquDGWh/9ZkKUe6fXymdgt3VMBA3CjwRMD2eZImA6gG3nFQXLtNKBz4SPvubN3JkEUlRlwrYR2D4vG2jEyqcoYxuIx8sVOY918nH+KdAEFgNi+VEp1sZn1I/D/fw109KELgu4LvjUqsqPu/5KzLRGJOl4pQzRQN6G3CD5eibGnf/rP8DlSM1bKAMSOqnpzbfbAA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I3x8xphxigJC/I+6HqlUHERXOCS8/Af+/65D1lTi22h9quj8fA1kyHV7+ES5jLX0fqC8rVnJr+8zGWJAAB+Fc8ALyQ2Sn9uthtq9Q6wcO69fGacf+zmrOq+E1Q/JVX2iG8JbEunVItkojrOVQoPUmbwY0w6R1cnFsKEckLvj/adbzOWlNC2Y5sZ6yemh9/NNyRsXWCd6X8DQkKNA6EKngZjOkXdNddS9ux7x3SghQOtLOejN6RuUDiIDCH/U148tbdh3PKzJuQ+/KSCW8LhL8MDRd/7SsWXOHtvxPF6yJIHcLN+vXbEAF3GcrLS2X2Sqn2ro8SODaTp5/7GAWsTigg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 20 Jun 2023 03:07:57 +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+2CRVN/3/A6kOyIoDn1Cdi6q+S15lw
  • Thread-topic: [PATCH 6/7] xen/arm: mm: Add missing ISB in xen_pt_update()

Hi Julien,

> -----Original Message-----
> Subject: [PATCH 6/7] xen/arm: mm: Add missing ISB in xen_pt_update()
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> Per the Arm Arm, (Armv7 DDI406C.d A3.8.3 and Armv8 DDI 0487J.a B2.3.12):
> 
> "The DMB and DSB memory barriers affect reads and writes to the memory
> system generated by load/store instructions and data or unified cache
> maintenance operations being executed by the processor. Instruction
> fetches or accesses caused by a hardware translation table access are
> not explicit accesses."
> 
> Note that second sentence is not part of the newer Armv8 spec. But the
> interpretation is not much different.
> 
> The updated entry will not be used until xen_pt_update() completes.
> So rather than adding the ISB after write_pte() in create_xen_table()
> and xen_pt-update_entry(), add it in xen_pt_update().
> 
> Also document the reasoning of the deferral after each write_pte() calls.
> 
> Fixes: 07d11f63d03e ("xen/arm: mm: Avoid flushing the TLBs when mapping
> are inserted")
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>

I've also tested this patch on top of today's staging by our internal CI, and 
this
patch looks good, so:

Tested-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry



 


Rackspace

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