[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GICv3: Aarch32: Need guidance on the atomic access of "union host_lpi" or if ITS is supported on R52
- To: Andre Przywara <andre.przywara@xxxxxxx>, "stefanos@xxxxxxxxxx" <stefanos@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Tue, 25 Oct 2022 13:25:52 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=42aTLoPmUHQxgqfWtrsiFWxqbzPntR9zF8FGdEgh8tQ=; b=ZkKHW4FTTbJY8+8Z5ByF/eWiOCCsj4xQvSaCnngQ13jrv75gM/YKyNGUQP0H65MDgpYN9WLa3rJhpWtnI2zv+1Lr6xaA9M749eq2U+uJBqP/PqjEDvBHij2FMMn7YKYHuOJEtdToVZaMWf2MhxmWeObqZyL2EgOSGoP9qAuIVrg+oMGMMRzF5fTqP5t0/qW5yEFFHdl1VdJg8G7srGQ5VvRrOYzlk7mZxgpANVOsi6ZhNaIBsI9fADNcq6BpUFLVbshGAQvGHyYfZkNPRDpW6adZ/ZPwpSiPJkXdEewqwaxwqIpRGnP/wPn08O7ANrV3pbAD5OnC6UTUFGh6I4iSJA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AHzj1V/JiVtD41t8ghVGgCO9aS3XXwlWQh6AYJkBJRS5fm4NOW9yVqWMd362UINtcmqPlrHzbtMiOfQY5oGts6+G2fiiO3R5RHpZbY0QfTuk8o+ulR7bVIarunKqyHUseyy0uzLb0J7+wMXLxJ3DCc9/syzA855Ni2NIPso3p3bCOQUXBMIrS2No12pP3xM0xJlfBFT6yJOYX9awj1Uazhn5eKdUjHp5HRlhoqmKOoZTl5TfU2pWNnaFPSN/oZIXdOUitU8+qgVchpIMYHs71asXqcBrpGPt6uwmHIIYHLJcd2vL5nCZSa251gS4j62K69U5z7jfjeW86Awm7/Y3Tw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 25 Oct 2022 12:26:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Andre/All,
This came up while porting Xen on R52.
Refer "ARM DDI 0568A.cID110520", B1.3.1
"A Generic Interrupt Controller (GIC) implemented with an Armv8-R PE
must not implement LPI support. "
Does this mean ITS is not supported on R52 ? I am assuming yes, please
correct me if mistaken.
If the answer is no, then my next query is follows :-
diff --git a/xen/arch/arm/gic-v3-lpi.c b/xen/arch/arm/gic-v3-lpi.c
index 9ca74bc321..dea60aac0d 100644
--- a/xen/arch/arm/gic-v3-lpi.c
+++ b/xen/arch/arm/gic-v3-lpi.c
@@ -423,7 +423,7 @@ int gicv3_lpi_init_host_lpis(unsigned int host_lpi_bits)
int rc;
/* We rely on the data structure being atomically accessible. */
- BUILD_BUG_ON(sizeof(union host_lpi) > sizeof(unsigned long));
+ BUILD_BUG_ON(sizeof(union host_lpi) > sizeof(uint64_t));
"unsigned long" on Aarch32 is 32 bits. So this bug gets triggered.
Is it fine to change it as above ?
Reading"ARM DDI 0487G.bID07202", E2.2.1, "Requirements for single-copy
atomicity".
"LDRD and STRD accesses to 64-bit aligned locations are 64-bit
single-copy atomic as seen by translation table walks and accesses to
translation tables"
Does this imply that atomicity will be retained (with the above change)
? Os will this require ldrexd/strexd as R52 supports MPU (not MMU, so
translation tables are irrelevant).
Kind regards,
Ayan
|