[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 9/9] xen/arm: Map ITS doorbell register to IOMMU page tables.
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Wed, 4 Oct 2023 10:55:53 -0400
- 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=DcZzxWC5M7L073e5FMa5m8xIIcBPGO6L/R79lySugSQ=; b=hUn7lEa6CYra7mimxTgVsbyJ91UdWM5Cu956p+G1GnwNkeRh3SiRbXXOfL6oAsrOSsSUF776MJWM1CMTrYy0tfNEKwXpVhhOV4TWTRGboLZ84IdgaCzLaGPAbzx0wC7zwas9Yvj9cX7kQxe62cGegEqoFQmCP4pGCV1AMhuFExiy2fBxRY7evjZLJaeKLl3hfnMDia4DDuIxLVQQYnhxq5EeGPBmVTr3fBgI3P2md4G/KWPDofHz3svnLWS2kavuYUDX8DsbqqcPwkH8EIN4+DhM8Zl21e130fne3DYqcaM2O5t3rYYxdB0TAXKIym8WtKMT8UdhsFoLd/3DjDFW6A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBTETkYOEh5TZwLSRJDrb3o4dzDYrGzMWdGO3Fbr7lVZPnOmUnCoSwC4xe4VGX23G2M7BwF+b11P0ebRNhF66uDiY8nS77KDwOwp42Lu11B6V9ni3JJOQ3SomoC7f84JcFJMEBU2yy4+NTEazfRP1RuilBcI3gPex9kV91o+GfT+elzgJZFDAx2FyBeL9vfFHbzF84TfTPuP/LQ5vk/czUn7i6wB9VanIJhc0uw5Kc/CGDVrxAui2UmtGfLqcDu1Tn6FUeZjDgO/tIK6/5RiiCuYA7vXtOTSLit58E5lVZ2crDzkF1cmWdIOhlLSmrJoAGbmK7aPNNirG08g+tRb+w==
- Cc: Rahul Singh <rahul.singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Wed, 04 Oct 2023 15:14:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Rahul Singh <rahul.singh@xxxxxxx>
Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
---
v4->v5:
* new patch
---
xen/arch/arm/vgic-v3-its.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c
index 05429030b539..df8f045198a3 100644
--- a/xen/arch/arm/vgic-v3-its.c
+++ b/xen/arch/arm/vgic-v3-its.c
@@ -682,6 +682,18 @@ static int its_handle_mapd(struct virt_its *its, uint64_t
*cmdptr)
BIT(size, UL), valid);
if ( ret && valid )
return ret;
+
+ if ( is_iommu_enabled(its->d) ) {
+ ret = map_mmio_regions(its->d, gaddr_to_gfn(its->doorbell_address),
+ PFN_UP(ITS_DOORBELL_OFFSET),
+ maddr_to_mfn(its->doorbell_address));
+ if ( ret < 0 )
+ {
+ printk(XENLOG_ERR "GICv3: Map ITS translation register d%d
failed.\n",
+ its->d->domain_id);
+ return ret;
+ }
+ }
}
spin_lock(&its->its_lock);
--
2.42.0
|