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

Re: [XEN v1] xen/Arm: Enforce alignment check for atomic read/write


  • To: Ayan Kumar Halder <ayankuma@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 3 Nov 2022 13:23:37 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.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
  • 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=F878IsiQbjU+ZsSiPuBtZniEpdcnFqckNkKCyzx5iYc=; b=C10xl/iqHYm9FA6XywYKWnHLrKoMxdrXoxjxoJDgDT+K09s45IuXP+pof5RO30SosFg+jjJX0MLPO8dM6EX40DgmNLTaV9nMLUyXhJ1pAgdJY6mPx0YradsCZcE4Dv8uuBqJaa0++XuisNAeopGHinSgNQ6MXTwzWu6ngnJcaSLeneS91YUZG0ghclLepxtD9fG3Xa5tB1fP0vMqaBZS8hVGZcwV1FuDEvs5hpL4oY6l5ahVeJcDWH0tnp1BxhEkD2Hq6+VbxkFWT6tHETevfc3hugkDo7nMLZS7UcOzo9Y7aSRzURkd6Hov0GHuymg8341VGEKEg2CWUs89X4aEiA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqJCyvksQLWIaeefeFVhFsG2q2zOko56ttuNVLaLqh23EKf1kn+uJI0KWZ5zd8bRY+xt4r+vq4n4N5+mga+muMvQ5uB3AINlRpmy3pLb24004FEte+i0Vn8E0RW5KNVfHjAQKDkmt33GhCWrisVA7MnocCEWSN8SlODgc4jEoeQow4Er4hZV91g9KZiGGu3qdUZOgQp08Lus+NQ655pFNjtxt+hDFZ7NwrjXUARvDSsbmBEyLJMc8t+CH3HPnOoKZdEskT/7LYQCHp4LV3xdPx8iiu/tgREpGCG1xLMQ1zWClJ29S4z4l5d73loXBWs7DhW7sb3kAmtGL0BpDCeLQg==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefanos@xxxxxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <andre.przywara@xxxxxxx>
  • Delivery-date: Thu, 03 Nov 2022 12:23:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Ayan,


On 30/10/2022 00:48, Ayan Kumar Halder wrote:
> 
> 
> Refer ARM DDI 0487G.b ID072021, B2.2.1
Please refer to the latest spec.
Apart from that...

> "Requirements for single-copy atomicity
> 
> - A read that is generated by a load instruction that loads a single
> general-purpose register and is aligned to the size of the read in the
> instruction is single-copy atomic.
> 
> -A write that is generated by a store instruction that stores a single
> general-purpose register and is aligned to the size of the write in the
> instruction is single-copy atomic"
> 
> On AArch32, the alignment check is enabled at boot time by setting HSCTLR.A 
> bit.
> ("HSCTLR, Hyp System Control Register").
> However in AArch64, alignment check is not enabled at boot time.
> 
> Thus, one needs to check for alignment when performing atomic operations.
> 
> Signed-off-by: Ayan Kumar Halder <ayankuma@xxxxxxx>
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®.