From patchwork Wed Jan 8 13:09:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mykyta Poturai X-Patchwork-Id: 13930897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30051E77199 for ; Wed, 8 Jan 2025 13:09:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.867266.1278728 (Exim 4.92) (envelope-from ) id 1tVVoO-00008o-2r; Wed, 08 Jan 2025 13:09:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 867266.1278728; Wed, 08 Jan 2025 13:09:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tVVoN-00008h-Vc; Wed, 08 Jan 2025 13:09:27 +0000 Received: by outflank-mailman (input) for mailman id 867266; Wed, 08 Jan 2025 13:09:27 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tVVoM-0008Lh-TV for xen-devel@lists.xenproject.org; Wed, 08 Jan 2025 13:09:27 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060d.outbound.protection.outlook.com [2a01:111:f403:2612::60d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c92022da-cdc1-11ef-a0df-8be0dac302b0; Wed, 08 Jan 2025 14:09:26 +0100 (CET) Received: from PAVPR03MB10102.eurprd03.prod.outlook.com (2603:10a6:102:30d::12) by PA4PR03MB6895.eurprd03.prod.outlook.com (2603:10a6:102:e7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.11; Wed, 8 Jan 2025 13:09:24 +0000 Received: from PAVPR03MB10102.eurprd03.prod.outlook.com ([fe80::35ac:8893:c31c:b971]) by PAVPR03MB10102.eurprd03.prod.outlook.com ([fe80::35ac:8893:c31c:b971%5]) with mapi id 15.20.8314.015; Wed, 8 Jan 2025 13:09:24 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c92022da-cdc1-11ef-a0df-8be0dac302b0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d0YYQay5z/DPHnPNEADwXZ6RbmZXxR/RuMgGA7P1ohZRaqzwb5Nj1uuE0uuAvZF1qOZH734rIRNg3fupBX3SJoiHV/beMfcFzIEfoP8q/DmGfNzKKr5yd07Qvt+GLziTt7jDHBAnVxIsl3kLAEr6f84zv4F1mbU+4JLybc/E1yXiANSMaCj3h2Xaq1jqGzMObIAbP9Z6fwlu0+dKMifrwQJ9RlSlZcN25ckHXCsMuNjWpqzyIVGA9qXAazMEQGLo3nPg3acP/UkdrHZKJa19ojJIeRYpJqyTQPZm8GBCRxFqHL6actnAF6YrYS/zHoO1txlAb+HyCZuueYV6bSMhaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=vP881uQqwZ/UAQQCQM0enfTzMRcqn2M5xLVb0hyth3o=; b=Db/ZKuMDfGH7X7So+8CHB3zMwnGWrASlT6HMg7K8y65iMyMii0OdJCarOK8u3ATTnZ/Pn9YQjDCVZvj/ffbPGhSPBnX2X7KkNh3Ha1iWdXUKR7A4RQw+hu32bfFlK+zG97NeSkXj+njPZ10BGzlEz1ypXbQMv4JIUrvY5PDUnM2PNAgKsPLdS0+tBXbkeUoX6CzJ6efxtE7yMGP10X88Chq6zHJL8T9JQn5c1g0YhhGb7XucZdaMvtWFSEabmmF7JPfd3MDX4VFQbzOKKQWCJPeIjMHFomCjB73Ariw+O5PPLLoPyxU2inz53cxUfZQPBGNtzqtAg+BHsp81kBMzCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vP881uQqwZ/UAQQCQM0enfTzMRcqn2M5xLVb0hyth3o=; b=F/0uSs9co2TrbsLywcSypK3wwPJ9A7g6KTa03SKEou8RC5ySWfTmvJ6NrQxK5tV1SzQfKlgVUbTCdP6zqQoU2kObjRAlXT0zJyHH9NXdBqRBUC8tlVt14v4uX6/RI5ZmHrb0umdmIKVVXxuDrPFrzzZYQmWn/FzSMemoAwyuzf1+Y3YGTKn9SdXFpzXnQ233u796vT1iGsRBuycJvGzDL8+9R54NCl9/R5MzKNdH0CoY3+v2R2G7PHgIlEuIIN5+NzeILKVVcE2cPFRqW8nH26sfVFsvIZnBKWkgVRmnIrX9aM3XiHN81Ry6uoLMQ+9uN9SpZLbH1vw6U313KfVCKw== From: Mykyta Poturai To: "xen-devel@lists.xenproject.org" CC: Oleksandr Andrushchenko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Mykyta Poturai Subject: [PATCH v2 1/2] ARM: ITS: implement quirks and add support for Renesas Gen4 ITS Thread-Topic: [PATCH v2 1/2] ARM: ITS: implement quirks and add support for Renesas Gen4 ITS Thread-Index: AQHbYc6JDAhmZxCQ3Eu7Expf0AOQsA== Date: Wed, 8 Jan 2025 13:09:24 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAVPR03MB10102:EE_|PA4PR03MB6895:EE_ x-ms-office365-filtering-correlation-id: 0cb64274-bdd5-4fff-6812-08dd2fe5ac7f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?rMECNaYCVnEg/QhE1eIqZK9Gbs?= =?iso-8859-1?q?zB/mcF4LVugNAkZL+71EjzFmRjGgVPJ5IittsrVI55Zs4w4duSjPlQretvqe?= =?iso-8859-1?q?Xxvxqmsl/M4A06DGK7lUb+cl7WDaH7lLCkqcxOoWSlSs8i0wzFLn2FjCkhjP?= =?iso-8859-1?q?r9WaXMC394wTSL1quzYstO84QoPmqz0Ij2x3nTbRHZvcFGt1aDIKqfm/Jkj/?= =?iso-8859-1?q?RRycL/gIQRpyOzv6huEDlVOvAuhluufcslDcVVNJp39CV86/syAhGsbDqQ+k?= =?iso-8859-1?q?f689ReB93PmUKX15BOcMwWK1EfPn1ewr7p+N+J+iSES7/+49w+1P2W9sv59w?= =?iso-8859-1?q?OaRuu/W3LxYDERGELnmHJ9UjdWR6wc0VcYknerc2u3DzWHRIGuBCeZnCjgl0?= =?iso-8859-1?q?N87QgpO2XoZmek6IKy6bPUtxLAPBFFajGiVqN7FM5UThNs+csHnbXpsfYruK?= =?iso-8859-1?q?ek5U9gpfyzJXtWP+WF7q7LewqhKSU8LkZr6tIgG6WKVfGE9cNvEArTQrUYwQ?= =?iso-8859-1?q?iHDR67mQJQC1JSM1sKk94f3uzTCg64112aE4Q612sBF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ZV5IL?= =?iso-8859-1?q?so?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAVPR03MB10102.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?nxropJGPTXJL8H7DjWi2mMt?= =?iso-8859-1?q?L+vCPbvi4qSCDSxRC7QUMwCUsUAqW+hN7tyDfFw/2ghBb6IXnR53PpwtPiId?= =?iso-8859-1?q?SwuXA1s6hTbLXpf9vEvkfpIdxYc+RM85Fcm+S9olSKAPkHcidMQUGHYB4C7R?= =?iso-8859-1?q?dGkcc4lfezADSq7iCBk9vmAnCLj5HLxW809beJS/btl1Y1KVhg6qE5Dz10U5?= =?iso-8859-1?q?vlheZ7DQxBmFAlfvNvnq7aSbMc5zmwqzBSApDl4IXMgx5DuryYif+jrkoX3O?= =?iso-8859-1?q?pAJl0GUR4nC2ZZ6+Gr/yxyWrOj++0et47WTwekuKtjOyWtH91irci503QG7i?= =?iso-8859-1?q?zNn4fOBJ++FDIZsfqTVqa9LQOBLV1Pl6vDSs1GoLK/QyJDeEu2JlmqcoCA/4?= =?iso-8859-1?q?NZHvDi7or2HIE27GozhCcEo10WbiokGnMdQMFazkjg18bytK1U1KwAPLMnci?= =?iso-8859-1?q?9LK2qp95shVvP5VpDHvCFv13wdkbCJqVLWy3yseTcpfPalYWKK9U86PFt3g0?= =?iso-8859-1?q?xGyEhOpN1wnK/amULndxNu/FOsk+uRERt4veJKs1bYksguz6aZp1EfOD/hQh?= =?iso-8859-1?q?cqqPpMjBXdS64Knfwz8SuMYnSFHH3lBq1FgzHKiLH4BdxBeUPH6hfIt/IsTX?= =?iso-8859-1?q?vw+h+yaf+lTq9LM3wBDmubAzmaOTyhOYImLHUKUt0Ua/b31L3l+WtPewCVwA?=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weOm4LUVt8yo5GdOUXnHYdYE49AFhcgncVGhPGvLcfl36lBUxVSlXKu?= =?iso-8859-1?q?0qjh3xst3f38/kwQhzs9N0xZPwRWhHqgKL9Klgg=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAVPR03MB10102.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cb64274-bdd5-4fff-6812-08dd2fe5ac7f X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2025 13:09:24.3894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aX6U3Uf4kNyoJNIpbbg7WeSZ7nFEZUA22xKOU+4VIbviSNFIVNiD5gaDb2bu/uMOmmFnwDi1mf3H5b/SHQdW9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB6895 From: Oleksandr Andrushchenko There are number of ITS implementations exist which are different from the base one which have number of functionalities defined as is "IMPLEMENTATION DEFINED", e.g. there may exist differences in cacheability, shareability and memory requirements and others. This requires appropriate handling of such HW requirements which are implemented as ITS quirks: GITS_IIDR (ITS Implementer Identification Register) is used to differentiate the ITS implementations and select appropriate set of quirks if any. As an example of such ITSes add quirk implementation for Renesas Gen4 ITS: - add possibility to override default cacheability and shareability settings used for ITS memory allocations; - change relevant memory allocations to alloc_xenheap_pages which allows to specify memory access flags, free_xenheap_pages is used to free; - add quirks validation to ensure that all ITSes share the same quirks in case of multiple ITSes are present in the system; The Gen4 ITS memory requirements are not covered in any errata as of yet, but observed behavior suggests that they are indeed required. The idea of the quirk implementation is inspired by the Linux kernel ITS quirk implementation [1]. Changelog: v1 -> v2: - switched to using alloc_xenheap_pages/free_xenheap_pages for ITS memory allocations; - updated declaration of its_quirk_flags; - added quirks validation to ensure that all ITSes share the same quirks; - removed unnecessary vITS changes; Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Mykyta Poturai [1] https://elixir.bootlin.com/linux/v5.16.1/source/drivers/irqchip/irq-gic-v3-its.c --- xen/arch/arm/gic-v3-its.c | 141 +++++++++++++++++++++++--- xen/arch/arm/gic-v3-lpi.c | 20 ++-- xen/arch/arm/include/asm/gic_v3_its.h | 8 ++ 3 files changed, 150 insertions(+), 19 deletions(-) diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c index 5fd83af25a..8849ac6c4b 100644 --- a/xen/arch/arm/gic-v3-its.c +++ b/xen/arch/arm/gic-v3-its.c @@ -42,6 +42,7 @@ struct its_device { struct rb_node rbnode; struct host_its *hw_its; void *itt_addr; + unsigned int itt_order; paddr_t guest_doorbell; /* Identifies the virtual ITS */ uint32_t host_devid; uint32_t guest_devid; @@ -50,6 +51,104 @@ struct its_device { struct pending_irq *pend_irqs; /* One struct per event */ }; +/* + * It is unlikely that a platform implements ITSes with different quirks, + * so assume they all share the same. + */ +struct its_quirk { + const char *desc; + bool (*init)(struct host_its *hw_its); + uint32_t iidr; + uint32_t mask; +}; + +static uint32_t __ro_after_init its_quirk_flags; + +static bool gicv3_its_enable_quirk_gen4(struct host_its *hw_its) +{ + its_quirk_flags |= HOST_ITS_WORKAROUND_NC_NS | + HOST_ITS_WORKAROUND_32BIT_ADDR; + + return true; +} + +static const struct its_quirk its_quirks[] = { + { + .desc = "R-Car Gen4", + .iidr = 0x0201743b, + .mask = 0xffffffff, + .init = gicv3_its_enable_quirk_gen4, + }, + { + /* Sentinel. */ + } +}; + +static struct its_quirk* gicv3_its_find_quirk(uint32_t iidr) +{ + const struct its_quirk *quirks = its_quirks; + + for ( ; quirks->desc; quirks++ ) + { + if ( quirks->iidr == (quirks->mask & iidr) ) + return (struct its_quirk *)quirks; + } + + return NULL; +} + +static void gicv3_its_enable_quirks(struct host_its *hw_its) +{ + uint32_t iidr = readl_relaxed(hw_its->its_base + GITS_IIDR); + const struct its_quirk *quirk = gicv3_its_find_quirk(iidr); + + if ( quirk && quirk->init(hw_its) ) + printk("GICv3: enabling workaround for ITS: %s\n", quirk->desc); +} + +static void gicv3_its_validate_quirks(void) +{ + const struct its_quirk *quirk = NULL, *prev = NULL; + const struct host_its *hw_its; + + if ( list_empty(&host_its_list) ) + return; + + hw_its = list_first_entry(&host_its_list, struct host_its, entry); + prev = gicv3_its_find_quirk(readl_relaxed(hw_its->its_base + GITS_IIDR)); + + list_for_each_entry(hw_its, &host_its_list, entry) + { + quirk = gicv3_its_find_quirk(readl_relaxed(hw_its->its_base + GITS_IIDR)); + BUG_ON(quirk != prev); + prev = quirk; + } +} + +uint64_t gicv3_its_get_cacheability(void) +{ + if ( its_quirk_flags & HOST_ITS_WORKAROUND_NC_NS ) + return GIC_BASER_CACHE_nC; + + return GIC_BASER_CACHE_RaWaWb; +} + +uint64_t gicv3_its_get_shareability(void) +{ + if ( its_quirk_flags & HOST_ITS_WORKAROUND_NC_NS ) + return GIC_BASER_NonShareable; + + return GIC_BASER_InnerShareable; +} + +unsigned int gicv3_its_get_memflags(void) +{ + if ( its_quirk_flags & HOST_ITS_WORKAROUND_32BIT_ADDR ) + return MEMF_bits(32); + + return 0; +} + bool gicv3_its_host_has_its(void) { return !list_empty(&host_its_list); @@ -289,19 +388,23 @@ static void *its_map_cbaser(struct host_its *its) { void __iomem *cbasereg = its->its_base + GITS_CBASER; uint64_t reg; + unsigned int order; void *buffer; - reg = GIC_BASER_InnerShareable << GITS_BASER_SHAREABILITY_SHIFT; + reg = gicv3_its_get_shareability() << GITS_BASER_SHAREABILITY_SHIFT; reg |= GIC_BASER_CACHE_SameAsInner << GITS_BASER_OUTER_CACHEABILITY_SHIFT; - reg |= GIC_BASER_CACHE_RaWaWb << GITS_BASER_INNER_CACHEABILITY_SHIFT; + reg |= gicv3_its_get_cacheability() << GITS_BASER_INNER_CACHEABILITY_SHIFT; - buffer = _xzalloc(ITS_CMD_QUEUE_SZ, SZ_64K); + order = get_order_from_bytes(max(ITS_CMD_QUEUE_SZ, SZ_64K)); + buffer = alloc_xenheap_pages(order, gicv3_its_get_memflags()); if ( !buffer ) return NULL; + memset(buffer, 0, PAGE_SIZE << order); + if ( virt_to_maddr(buffer) & ~GENMASK(51, 12) ) { - xfree(buffer); + free_xenheap_pages(buffer, order); return NULL; } @@ -340,11 +443,12 @@ static int its_map_baser(void __iomem *basereg, uint64_t regc, unsigned int entry_size = GITS_BASER_ENTRY_SIZE(regc); unsigned int pagesz = 2; /* try 64K pages first, then go down. */ unsigned int table_size; + unsigned int order; void *buffer; - attr = GIC_BASER_InnerShareable << GITS_BASER_SHAREABILITY_SHIFT; + attr = gicv3_its_get_shareability() << GITS_BASER_SHAREABILITY_SHIFT; attr |= GIC_BASER_CACHE_SameAsInner << GITS_BASER_OUTER_CACHEABILITY_SHIFT; - attr |= GIC_BASER_CACHE_RaWaWb << GITS_BASER_INNER_CACHEABILITY_SHIFT; + attr |= gicv3_its_get_cacheability() << GITS_BASER_INNER_CACHEABILITY_SHIFT; /* * Setup the BASE register with the attributes that we like. Then read @@ -357,13 +461,16 @@ retry: /* The BASE registers support at most 256 pages. */ table_size = min(table_size, 256U << BASER_PAGE_BITS(pagesz)); - buffer = _xzalloc(table_size, BIT(BASER_PAGE_BITS(pagesz), UL)); + order = get_order_from_bytes(max(table_size, BIT(BASER_PAGE_BITS(pagesz), U))); + buffer = alloc_xenheap_pages(order, gicv3_its_get_memflags()); if ( !buffer ) return -ENOMEM; + memset(buffer, 0, PAGE_SIZE << order); + if ( !check_baser_phys_addr(buffer, BASER_PAGE_BITS(pagesz)) ) { - xfree(buffer); + free_xenheap_pages(buffer, order); return -ERANGE; } @@ -396,7 +503,7 @@ retry: if ( ((regc >> GITS_BASER_PAGE_SIZE_SHIFT) & 0x3UL) == pagesz ) return 0; - xfree(buffer); + free_xenheap_pages(buffer, order); if ( pagesz-- > 0 ) goto retry; @@ -453,6 +560,8 @@ static int gicv3_its_init_single_its(struct host_its *hw_its) if ( ret ) return ret; + gicv3_its_enable_quirks(hw_its); + reg = readq_relaxed(hw_its->its_base + GITS_TYPER); hw_its->devid_bits = GITS_TYPER_DEVICE_ID_BITS(reg); hw_its->evid_bits = GITS_TYPER_EVENT_ID_BITS(reg); @@ -530,7 +639,7 @@ static int remove_mapped_guest_device(struct its_device *dev) printk(XENLOG_WARNING "Can't unmap host ITS device 0x%x\n", dev->host_devid); - xfree(dev->itt_addr); + free_xenheap_pages(dev->itt_addr, dev->itt_order); xfree(dev->pend_irqs); xfree(dev->host_lpi_blocks); xfree(dev); @@ -619,6 +728,7 @@ int gicv3_its_map_guest_device(struct domain *d, struct its_device *dev = NULL; struct rb_node **new = &d->arch.vgic.its_devices.rb_node, *parent = NULL; int i, ret = -ENOENT; /* "i" must be signed to check for >= 0 below. */ + unsigned int order; hw_its = gicv3_its_find_by_doorbell(host_doorbell); if ( !hw_its ) @@ -681,10 +791,13 @@ int gicv3_its_map_guest_device(struct domain *d, ret = -ENOMEM; /* An Interrupt Translation Table needs to be 256-byte aligned. */ - itt_addr = _xzalloc(nr_events * hw_its->itte_size, 256); + order = get_order_from_bytes(max(nr_events * hw_its->itte_size, (unsigned long)256)); + itt_addr = alloc_xenheap_pages(order, gicv3_its_get_memflags()); if ( !itt_addr ) goto out_unlock; + memset(itt_addr, 0, PAGE_SIZE << order); + clean_and_invalidate_dcache_va_range(itt_addr, nr_events * hw_its->itte_size); @@ -718,6 +831,7 @@ int gicv3_its_map_guest_device(struct domain *d, goto out_unlock; dev->itt_addr = itt_addr; + dev->itt_order = order; dev->hw_its = hw_its; dev->guest_doorbell = guest_doorbell; dev->guest_devid = guest_devid; @@ -775,7 +889,8 @@ out: xfree(dev->pend_irqs); xfree(dev->host_lpi_blocks); } - xfree(itt_addr); + if ( itt_addr ) + free_xenheap_pages(itt_addr, order); xfree(dev); return ret; @@ -1089,6 +1204,8 @@ int gicv3_its_init(void) return ret; } + gicv3_its_validate_quirks(); + return 0; } diff --git a/xen/arch/arm/gic-v3-lpi.c b/xen/arch/arm/gic-v3-lpi.c index de4b0eb4a4..a8783e7d95 100644 --- a/xen/arch/arm/gic-v3-lpi.c +++ b/xen/arch/arm/gic-v3-lpi.c @@ -227,6 +227,7 @@ void gicv3_lpi_update_host_entry(uint32_t host_lpi, int domain_id, static int gicv3_lpi_allocate_pendtable(unsigned int cpu) { void *pendtable; + unsigned int order; if ( per_cpu(lpi_redist, cpu).pending_table ) return -EBUSY; @@ -237,7 +238,8 @@ static int gicv3_lpi_allocate_pendtable(unsigned int cpu) * The GICv3 imposes a 64KB alignment requirement, also requires * physically contiguous memory. */ - pendtable = _xzalloc(lpi_data.max_host_lpi_ids / 8, SZ_64K); + order = get_order_from_bytes(max(lpi_data.max_host_lpi_ids / 8, (unsigned long)SZ_64K)); + pendtable = alloc_xenheap_pages(order, gicv3_its_get_memflags()); if ( !pendtable ) return -ENOMEM; @@ -272,9 +274,9 @@ static int gicv3_lpi_set_pendtable(void __iomem *rdist_base) ASSERT(!(virt_to_maddr(pendtable) & ~GENMASK(51, 16))); - val = GIC_BASER_CACHE_RaWaWb << GICR_PENDBASER_INNER_CACHEABILITY_SHIFT; + val = gicv3_its_get_cacheability() << GICR_PENDBASER_INNER_CACHEABILITY_SHIFT; val |= GIC_BASER_CACHE_SameAsInner << GICR_PENDBASER_OUTER_CACHEABILITY_SHIFT; - val |= GIC_BASER_InnerShareable << GICR_PENDBASER_SHAREABILITY_SHIFT; + val |= gicv3_its_get_shareability() << GICR_PENDBASER_SHAREABILITY_SHIFT; val |= GICR_PENDBASER_PTZ; val |= virt_to_maddr(pendtable); @@ -300,10 +302,11 @@ static int gicv3_lpi_set_pendtable(void __iomem *rdist_base) static int gicv3_lpi_set_proptable(void __iomem * rdist_base) { uint64_t reg; + unsigned int order; - reg = GIC_BASER_CACHE_RaWaWb << GICR_PROPBASER_INNER_CACHEABILITY_SHIFT; + reg = gicv3_its_get_cacheability() << GICR_PROPBASER_INNER_CACHEABILITY_SHIFT; reg |= GIC_BASER_CACHE_SameAsInner << GICR_PROPBASER_OUTER_CACHEABILITY_SHIFT; - reg |= GIC_BASER_InnerShareable << GICR_PROPBASER_SHAREABILITY_SHIFT; + reg |= gicv3_its_get_shareability() << GICR_PROPBASER_SHAREABILITY_SHIFT; /* * The property table is shared across all redistributors, so allocate @@ -312,7 +315,10 @@ static int gicv3_lpi_set_proptable(void __iomem * rdist_base) if ( !lpi_data.lpi_property ) { /* The property table holds one byte per LPI. */ - void *table = _xmalloc(lpi_data.max_host_lpi_ids, SZ_4K); + void *table; + + order = get_order_from_bytes(max(lpi_data.max_host_lpi_ids, (unsigned long)SZ_4K)); + table = alloc_xenheap_pages(order, gicv3_its_get_memflags()); if ( !table ) return -ENOMEM; @@ -320,7 +326,7 @@ static int gicv3_lpi_set_proptable(void __iomem * rdist_base) /* Make sure the physical address can be encoded in the register. */ if ( (virt_to_maddr(table) & ~GENMASK(51, 12)) ) { - xfree(table); + free_xenheap_pages(table, order); return -ERANGE; } memset(table, GIC_PRI_IRQ | LPI_PROP_RES1, MAX_NR_HOST_LPIS); diff --git a/xen/arch/arm/include/asm/gic_v3_its.h b/xen/arch/arm/include/asm/gic_v3_its.h index c24d4752d0..0737e67aa6 100644 --- a/xen/arch/arm/include/asm/gic_v3_its.h +++ b/xen/arch/arm/include/asm/gic_v3_its.h @@ -110,6 +110,9 @@ #define HOST_ITS_FLUSH_CMD_QUEUE (1U << 0) #define HOST_ITS_USES_PTA (1U << 1) +#define HOST_ITS_WORKAROUND_NC_NS (1U << 0) +#define HOST_ITS_WORKAROUND_32BIT_ADDR (1U << 1) + /* We allocate LPIs on the hosts in chunks of 32 to reduce handling overhead. */ #define LPI_BLOCK 32U @@ -197,6 +200,11 @@ struct pending_irq *gicv3_assign_guest_event(struct domain *d, void gicv3_lpi_update_host_entry(uint32_t host_lpi, int domain_id, uint32_t virt_lpi); +/* ITS quirks handling. */ +uint64_t gicv3_its_get_cacheability(void); +uint64_t gicv3_its_get_shareability(void); +unsigned int gicv3_its_get_memflags(void); + #else #ifdef CONFIG_ACPI From patchwork Wed Jan 8 13:09:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mykyta Poturai X-Patchwork-Id: 13930896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F697E77188 for ; Wed, 8 Jan 2025 13:09:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.867267.1278732 (Exim 4.92) (envelope-from ) id 1tVVoO-0000CL-Bl; Wed, 08 Jan 2025 13:09:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 867267.1278732; Wed, 08 Jan 2025 13:09:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tVVoO-0000BY-6s; Wed, 08 Jan 2025 13:09:28 +0000 Received: by outflank-mailman (input) for mailman id 867267; Wed, 08 Jan 2025 13:09:27 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tVVoN-0008Lh-94 for xen-devel@lists.xenproject.org; Wed, 08 Jan 2025 13:09:27 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060d.outbound.protection.outlook.com [2a01:111:f403:2612::60d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c9b0dffe-cdc1-11ef-a0df-8be0dac302b0; Wed, 08 Jan 2025 14:09:26 +0100 (CET) Received: from PAVPR03MB10102.eurprd03.prod.outlook.com (2603:10a6:102:30d::12) by PA4PR03MB6895.eurprd03.prod.outlook.com (2603:10a6:102:e7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.11; Wed, 8 Jan 2025 13:09:25 +0000 Received: from PAVPR03MB10102.eurprd03.prod.outlook.com ([fe80::35ac:8893:c31c:b971]) by PAVPR03MB10102.eurprd03.prod.outlook.com ([fe80::35ac:8893:c31c:b971%5]) with mapi id 15.20.8314.015; Wed, 8 Jan 2025 13:09:25 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c9b0dffe-cdc1-11ef-a0df-8be0dac302b0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nDa8fpuF750d+R2PqjCk+SPcZEZ6GaIsClzcOgI8Wx3CRQFReClUxwbliKSPxwVBduc3OCqSssVTz6sdwWmTBrrMuuSf5NSuioWZWzgxDh9AzuSjwNuJBIgoopZ7BTVwZiaLm7cYGBBbgmBV9z7VLyEj5LIyGe8xb4MjyNr5j9Mgqefy5CMc2mMs5zrUvmzcAxElIBY7t0ueyiB8OjRKziZl5vXac+EMfNg4KZ+MI+d+Pr3LxxTQOJDapHVO5UNy09DAgJt8pWYFpTRgHedmos3UVPOTTaVMzpkZ+G+8Ur95ZJttvOg6JGgesTJMLvADYvsbM3BRhtbd92nK8JsvGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=eFrATFgoRJ6d7ziVWdmSYdnPpEDIZasMI6cQcXBIx4o=; b=IlhVs1NF0I6Bj9+UBSA0DV2/UW2SnwvnYInwmVzOuKQX3G5Uh2fTxmsbvdTZZ9fOVFM3CMtrg8Il988X3NouY9rr9qNVGO0EjMmwC5+1XPU01RKDi0NeqDYwLTmJRTp7v2CWrQplipd1T7WswS0A5Tl3hd6Ue2q05HBYq9IND69NYslIW7qSYWb3vyL5C8oYS52+SOAY/wWC1/OVV1KaP0G2g9oaJyI5679QFAyrstizo1v4barypI5lYWa2/r13rbCOmJWGJJ6CoL7IqGVTPO3AWKPuFpm41bHHhuCVUFDuPySSjPN8muoJeRwE/ncZ+Pn2CWIooS1h10Szsxyzsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eFrATFgoRJ6d7ziVWdmSYdnPpEDIZasMI6cQcXBIx4o=; b=p1tsTNoTm/pUZ7KTRGgfzfnEoaOYG/4EcSUpyQ+lj8TqOkOLHDndX/iUkQ96WE1Ed1LN0RbWuud7scCbGYYjPrTyv+qUBWegQXIR2ojf4cuk3jKxx/hC5MpN/hU3Y98XrjL7JtdePz910sSq1rAJdKfeH9ozEi4b7UCMeL5rcNzNLZfPhjPStxJcBY5JPc3fyFR+d2R3h5ASZGXO3ymbSVg9G7ceKRMMjyLVHsfVih9WnW0TLwq32qqa2t/25xw8NW8KsaIpW26nl28N7eeM9X9wBEqhGmbwv2V/WxZX38IKUsvl5XUKIUFoHy6xhwmPh2DQy/eO9P3+3PZQ585v1A== From: Mykyta Poturai To: "xen-devel@lists.xenproject.org" CC: Oleksandr Andrushchenko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Volodymyr Babchuk , Mykyta Poturai Subject: [PATCH v2 2/2] xen/arm: platform: Add support for R-Car Gen4 Thread-Topic: [PATCH v2 2/2] xen/arm: platform: Add support for R-Car Gen4 Thread-Index: AQHbYc6Keb5mCkHZQkahUE8AT5r5CQ== Date: Wed, 8 Jan 2025 13:09:25 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAVPR03MB10102:EE_|PA4PR03MB6895:EE_ x-ms-office365-filtering-correlation-id: 73188ba9-c1c9-4c35-2bd6-08dd2fe5ad3e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?OoTds1l33loJRaNcCcz739klB9?= =?iso-8859-1?q?3hkHl8+4TAAiDvi5hQ0Xwsnb4b8518GqHKoSB2mP/R3ZO0el557G1pTSFrc0?= =?iso-8859-1?q?mnd6KVLQfvlsYyLzt5VTUPTsIT5S0jSqIeaMIY60DQRiWaqfijyyjFAi+/of?= =?iso-8859-1?q?onX+Xd8Hp2X/2QtgQttSsTiGJ9CoDve9x4V38DghguL5e3aupJPUablow8dn?= =?iso-8859-1?q?rXdBubCm1YVhICr4NaBLTy9fCaSDPB6wT9xs1/Byymr9zHajfrw/Rmxi7x2J?= =?iso-8859-1?q?4YfZPI0EdZZuoOiJiBGSTuvChhhVnlM+pA6X/8dASvj0o4g/0No/Def7eV65?= =?iso-8859-1?q?y66Z1k+R2EyFjv/EAqh9m68TMdh5xppTOz4te47QUhsy1WidY4A8PY4r6M2P?= =?iso-8859-1?q?PnGpPWXGeWqkdDWLphOqk3sBZfffbiONTIErRz6JPpXlxvVyOp4aZDUKKPMy?= =?iso-8859-1?q?rDRE93g/Vioy5LLmEw4gL80L+xFf8otT8GWZOAlF2Hl3tA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-1?q?wBGsHThPElhwcPOqn+Nl38379eIwXJFE3KsPln+vv1aBULEIAsPlS2Q9NAEg?= =?iso-8859-1?q?6/IEXwXsNDmxsVRIbAvU8trHYOY5H2sF7NkhXcMhZmiKlyOli5mpB54LnUwd?= =?iso-8859-1?q?PbRMjX?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAVPR03MB10102.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?I1OaPJLBRT17+gf6lrss7wq?= =?iso-8859-1?q?B1sdy3/MwN/oTa2hlSLTvo5vtVfPqCZmceAJIZu4mlRKVQS/QtSYdseM7u6Z?= =?iso-8859-1?q?rsfs9mFH63reTaGMKzC3QPSPU+g/xtyvDB2+FDxgPuTG8Qy3ZDR4jWa2nQUZ?= =?iso-8859-1?q?pmZ411J9K9fwaXFRuG0nqzwHCTTJVzZZyPFX5vZG7dhKZqrQYMbzwJR2o2Jn?= =?iso-8859-1?q?IjNrYe39A+kLiXwzevl53M2mwvAk8CJU9e2VMk8Ql8GjIdeIcuEfRye0akIz?= =?iso-8859-1?q?lMPOeXg0jqD6XnicdgZJ/WrYxlaUv9cJmMLVqe3mwhjGbQEiZ1mX9ZBb2gtl?= =?iso-8859-1?q?ik7iS0aKgB5Xgxmc4Njh7ivIPXz3oEieF13vS4u+8bPpeIWWZVM7PGXhbdQz?= =?iso-8859-1?q?4SWMf1yJw6me10Orq06/EUGT1pS/hFp6y5Kacxf+9J47qoxS8jZZWoL67UgE?= =?iso-8859-1?q?ZDQnPAr01ZjukFBWHoLlnvvZ+gnSpkIZP0efn1NVYzE5Vfm6Miw9Bu8zaj0/?= =?iso-8859-1?q?lMdqv6ACeduEu/hg8ARHMVMd2r5HTcYL4t6F0UJvpx+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?iso-8859-1?q?Vjs5sZg6VmUYpI3WSw3R+6MAEBjoud5iAmZVxFz9glrjD1EZzFKpTVbg3lJE?= =?iso-8859-1?q?+duuh0P1HxnWYGvDX2bZxCbVSejgLSC/bh40e3MKWcPdp/yO9ZX01h6aBRTX?= =?iso-8859-1?q?Un8jsen070/S0rsJlDQJbec39N+FL7GCQnizXcohVVV4QICDxRNtGdDy8kdK?= =?iso-8859-1?q?F7QgrvQ+hOTHVtCOSKxZ9O5uY9zYFzClxeP6Juw=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAVPR03MB10102.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73188ba9-c1c9-4c35-2bd6-08dd2fe5ad3e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2025 13:09:25.6471 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xm6cvzJuICWEUqhm3SNXiVnAt3c4q3Rs24IazJdjXtmcMvMWWzKfAUjJxklZEybIwL3jgOLzT9erVU4CRtTjhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR03MB6895 From: Oleksandr Andrushchenko Add Rcar Gen4 platform choice to Kconfig to select all required drivers automatically. Changelog: v1 -> v2: - Added RB from Stefano Stabellini Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Volodymyr Babchuk Signed-off-by: Mykyta Poturai Reviewed-by: Stefano Stabellini --- xen/arch/arm/platforms/Kconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig index 02322c259c..8785c168bd 100644 --- a/xen/arch/arm/platforms/Kconfig +++ b/xen/arch/arm/platforms/Kconfig @@ -29,6 +29,15 @@ config RCAR3 help Enable all the required drivers for Renesas RCar3 +config RCAR4 + bool "Renesas RCar4 support" + depends on ARM_64 + select HAS_SCIF + select HAS_ITS + select IPMMU_VMSA + help + Enable all the required drivers for Renesas RCar4 + config MPSOC bool "Xilinx Ultrascale+ MPSoC support" depends on ARM_64 @@ -55,4 +64,3 @@ config ALL32_PLAT config MPSOC_PLATFORM bool default (ALL64_PLAT || MPSOC) -