From nobody Fri Dec 27 07:21:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=eviden.com); dmarc=pass(p=reject dis=none) header.from=eviden.com ARC-Seal: i=2; a=rsa-sha256; t=1732866518; cv=pass; d=zohomail.com; s=zohoarc; b=I1TrL4irjL92L1CNRVTRlfgv3hzprDALDTrrdJ2pZ16uNuTVApy2j9WkDAKYI7WmHwIdbjWMXby3TAeTZpSrSo/YKeGI/nsj9jZe0ABV4mMH5zD3bjYb1ppPbxY4FCv2iU9tBiMZDwKDeA493XGdgQ8/yGEzcVLWX024t1D2axg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732866518; h=Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SgZ/NdieoWyyUYJq31zTUmPy3l7qes7ujZUCB5UJYUw=; b=YQTaV1GLkig9EzMuTPGwYmwSBZm10B8AGgJR9Rzy+AZOaZRWvv1dDQG8N3Is2kWKhqqmc8Zxc21w4NYHjRo2pHoFEEwWwn5jGnG63p9/T/sqiFJD6Q8r/yh7/GrvTfs5sDZUARpeEmc2pqYe53a7VIDVeny1OIjtoNDJGnShJJM= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=eviden.com); dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732866518595140.35083104926582; Thu, 28 Nov 2024 23:48:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvfl-00083N-BO; Fri, 29 Nov 2024 02:44:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGvfb-0007zA-G3 for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:09 -0500 Received: from smarthost1.eviden.com ([80.78.11.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGvfU-0002e4-9i for qemu-devel@nongnu.org; Fri, 29 Nov 2024 02:44:01 -0500 Received: from mail-am6eur05lp2109.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.109]) by smarthost1.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2024 08:43:57 +0100 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AS8PR07MB7847.eurprd07.prod.outlook.com (2603:10a6:20b:39e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 07:43:56 +0000 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d]) by AM8PR07MB7602.eurprd07.prod.outlook.com ([fe80::fbd7:ca71:b636:6f9d%5]) with mapi id 15.20.8207.014; Fri, 29 Nov 2024 07:43:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1732866240; x=1764402240; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=SgZ/NdieoWyyUYJq31zTUmPy3l7qes7ujZUCB5UJYUw=; b=GGCQRfYD0NQLrQYMv87e3lfAgJRiwCpipyOZa7XfpGoCfYgk37r6VMiS oB7fD0/OGPG9O7IibWXVpsWW+5rt5CGKnY8sEOSu0+fz98keZm36qyqIq 6aHCQkOHJ5VMnNqd6QcmQhYKWdvSn+qkBVd8+iDxkKYBJUIRPyWfEH7KS pvzzCZmf7EXqsovii/Hvu6BwSvyA5ylihh5mw3dV7o0mNLmJ3vhmw3Xh6 POCqI0TK5r7E9iKdjaXg+z1hOT1xUxd70YUEzItEIHfmc9DdVA6TnGcL8 GILShHxl3MEJa6esNr1ACe6o3TLAMztQwwyfrsnZYnywoDRwE+nSftzub g==; X-IronPort-AV: E=Sophos;i="6.12,194,1728943200"; d="scan'208";a="25664404" X-MGA-submission: =?us-ascii?q?MDFIMZM8J5+PI8S/UsUuFt+ekDXmTEttc6dhj1?= =?us-ascii?q?SNFbhvBlzVIMe27S9Nu4cvZbml3hSPCYsVx8xxk8AtMYHdj3zoVUeFNk?= =?us-ascii?q?iDH9t+ymmhxWIF/BhqdnXaOQPLwUwimfU3G5jYrBDaHT0smczfawrjJ2?= =?us-ascii?q?+4nborwyIHgetaQvmZBqRmtg=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=otDriJfUgLl+whCAijuGnbDawrrmQ18YKQA+L5fK2YVtWjqFNsaaKf/bYU6mZMR2mJG8uyI0+8UFyyp34FsGZdqOvOJ1eTp20Iyt96RUvLMl9RT0RKdtqxdfeJLx2giFOoNpqxqWgpDgvCDnhRbFmgdj/Q137YEK1+YIJaO5QqZkuNSdARWPIlfNjbIRMqTzaPXYTtohGqCkw9DsfCJgUejZEzTxml5qgOWNg3RIMz+vmEA1mDnQlDXHT6RWFVpOYUBs6Nvt7QrwbmfcuM8F1pjvQgWDygDINwx2p3NXQ2moq6XFHOAIGav8+Wnq6cEyIYfzqMmAvFX5BKb5E98T5g== 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=SgZ/NdieoWyyUYJq31zTUmPy3l7qes7ujZUCB5UJYUw=; b=bYW4myQNDhHGjMG4nss1+P4mvlxxN31ys0riWilGtksER4Xii6gb9HHjUOnK/+ln7E3FHkAAoXgK5K/dnl49AkXS6crPimId7RPwDu7CJFhtOZT2OtauByg7g2tk2r5JyXc9LM3divMxIidLLW0hEzBCO2Ijr1J2XI++iJUDT6WHjwLYAOLdAi9vbXBK3NlcFnqhZLU7NfLoac2dPeldQU7kI7hsW1SrFfPzq8szbxwcwS4GYtGD9h6faC3tj4ZhC7zVHXPCcBnI5O6Q+GFnmXKwgxGBVSpbfODiq4SIzZT6XqWbAnAJRB7000so0WN1V80n1szO3Tetf1RoTP6Sdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eviden.com; dmarc=pass action=none header.from=eviden.com; dkim=pass header.d=eviden.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Eviden.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SgZ/NdieoWyyUYJq31zTUmPy3l7qes7ujZUCB5UJYUw=; b=WQlNKHgyxmIN6TxyYsCCr7dNIqHgylBrFGLdSebouAH7nQDlx2G+lYRkO4UtyHQV0T1KUklc+G9ZrzM5m2Ru+MiD4JYTPBTIB0U5ebSGrC04CluUSgSpa3qT2tONvm5GxaejCrhIpj20c+XXKS8ARQLvxwcyVYE1v0VNebgOzVdLCCVynKgdjZKiUeHNcwUQlIWPj9C60g7ceTi45EXFZizNLeltyUAYWNm9IRDBb1+wx91xvFaQWRbcFCx0T0SfBM4At99honZ0ZK55cQJhRVfGc4h54hZoONExCiLYsWJYYW6Wc6O2lN47jN3rV/9aWiaGEdlQVLm4E5p37ybZ4A== From: CLEMENT MATHIEU--DRIF To: "qemu-devel@nongnu.org" CC: "jasowang@redhat.com" , "zhenzhong.duan@intel.com" , "kevin.tian@intel.com" , "yi.l.liu@intel.com" , "joao.m.martins@oracle.com" , "peterx@redhat.com" , "mst@redhat.com" , "tjeznach@rivosinc.com" , "minwoo.im@samsung.com" , CLEMENT MATHIEU--DRIF Subject: [PATCH v1 08/19] pci: Cache the bus mastering status in the device Thread-Topic: [PATCH v1 08/19] pci: Cache the bus mastering status in the device Thread-Index: AQHbQjJwwtKQ1xqBiESCRkJz4hVdrg== Date: Fri, 29 Nov 2024 07:43:54 +0000 Message-ID: <20241129074332.87535-9-clement.mathieu--drif@eviden.com> References: <20241129074332.87535-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20241129074332.87535-1-clement.mathieu--drif@eviden.com> Accept-Language: en-GB, fr-FR, 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=eviden.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM8PR07MB7602:EE_|AS8PR07MB7847:EE_ x-ms-office365-filtering-correlation-id: cd734155-2d13-4014-8e76-08dd10499427 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|7416014|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?RmJDcGwxWDFQNmVFV1MvU2ZiamhuNlplVUZQZG1QeXBhY3RWaXA1bmw2c2JB?= =?utf-8?B?dzJJQUVzbkd6MS9WT2liWWt5azRvalVsdUtkTzBGTko0VTQ0eXI4YVREb05Y?= =?utf-8?B?NjU4ZGRjVE96T3I0czg4cEd2S0daU1dzMGppeVZzOTl5Nm9iNEROd002ME1J?= =?utf-8?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; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7602.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(7416014)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?MWhxRVc2eEQ3SkJYTFpJbHY0THNaSXY1K2JQVHdzUnVYMWdyWFkxelRtK2Mx?= =?utf-8?B?ZUNOZEU1dHI3ZEY0SFhTQ2NRWkJGclJxK0w3NnQ0T2t4c0N3YU5DSmI5UDhp?= =?utf-8?B?QkYwaDRsaXFkM2JZSVdVNWd0bU9LUXdpMFpGTWx6VGNHb2xVZHlXQjgwdXlH?= =?utf-8?B?eDRYQ291ZFl2ZzB6ZmtCaDc1OVpmNnB5YXRiQy9FaFdSOGNSR2JRdXlqSGwz?= =?utf-8?B?VGFncWJaYUpHSEtvL2Z4ZUh3UC9VdHFiVUppalB2RFRubWUzb1Ara2lsL21t?= =?utf-8?B?OFZyZzNDU3VyRy83b3VxRDQwK0kzR3NNOERxTjZycnlkNVM0WEdyalYwUE4v?= =?utf-8?B?bU1KK0JEODZrdVlFN2ZWa01ZeE1zWURSb0JEUW16QzVCQldZOUlEZE1hY2F2?= =?utf-8?B?cVRJVEhYdHBmSkhnNEh2Q3FCOFRrL1g3L2NVZFF4Q1lMUUxhWllETDVFd1lI?= =?utf-8?B?R01qckNRMUE3amFnajJnS1Z5bXpKdmFya0FaZWVhUThEaEZ6WXY1cWs1bjk4?= =?utf-8?B?cENXRVA5S0cxZ0wxdUN6a1pjVnphUXRpUWo0M3ZhZllabm1UMklicXZmaXMv?= =?utf-8?B?ekZDOUVoMHlISG9YVVBaUTVoV3hCbDlxdFhxN0doSmFFa0w4R2pnaUxGYzBG?= =?utf-8?B?S09Yc09MMk5ISXEwUGJ2emg5SzJpakJLV1duUHV0Y1N2V2o2YXdwS1o4bUJp?= =?utf-8?B?UFE1YkI5VWpSek8wRmVya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XJoMmlmNjZSZmtVOUhwenBDUXRkLzVoZUVRc28vRzZqZk9K?= =?utf-8?B?b0dsZ0MxZG1jS0xmN3hjNXRIdHd2QjEzRVNIMUR4RjRkRkoxWGM4SVNhUjdP?= =?utf-8?B?SG0yUnB6WXdJdlN3TXRlU0NRbWh4TFgrQ3pUR0NtWFdQSnkrNXFOdVdCOEtR?= =?utf-8?B?bjc1OFdEL0x4WW54ZEloZi9wUkkrSGcrRE1naVYwemcrSUJsd3ZaYzdHL2tG?= =?utf-8?B?b2M0ZjRkclk2ajFpU1EwL0Fnai9TV096SHJscDBiK2JwZjM2ekpQUCtocTN6?= =?utf-8?B?NXhrbnBKc2pOaDMrTzFGR205L2tZSFlHWnI2M2dKdlVXTWhtSjI0QjUvQWFT?= =?utf-8?B?Z0NONGIxZ0o3cGUvMWNuRzArdFVaV3IwTDRSeThodDBZN1pwTTBPVHh5dG1W?= =?utf-8?B?VnFaRGs4US9OZDRicWZyWlRRT2tKaHJOV05OaE9zSTdYZ0lRc3NadTRNVC9q?= =?utf-8?B?NDJUK0piSGY5UW9zZlVlc3lwSWtTTWNuK2JLOFdMQllxL2dYOGgwWklUeVhW?= =?utf-8?Q?LaOgC/VQrcKCLPlg3wjwHhk=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: eviden.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM8PR07MB7602.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd734155-2d13-4014-8e76-08dd10499427 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2024 07:43:54.8071 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7d1c7785-2d8a-437d-b842-1ed5d8fbe00a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Q+dUZ+XaSu9H2rCgHharpwAmSYdU+Mjr0dk/LzopfzfG8ebUaSbagrDe+5Phw1asvGowcgxgafLFzDivAmN7JqFmTDD3G268hXtQWdH+LpqfL8BgHgiHP6NmtpmsxEm2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7847 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=80.78.11.82; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost1.eviden.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @eviden.com) X-ZM-MESSAGEID: 1732866520590019100 From: Cl=C3=A9ment Mathieu--Drif The cached is_master value is necessary to know if a device is allowed to issue ATS requests or not. This behavior is implemented in an upcoming patch. Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/pci/pci.c | 25 +++++++++++++++---------- include/hw/pci/pci_device.h | 1 + 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 1416ae202c..bd36c5227b 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -134,6 +134,12 @@ static GSequence *pci_acpi_index_list(void) return used_acpi_index_list; } =20 +static void pci_set_master(PCIDevice *d, bool enable) +{ + memory_region_set_enabled(&d->bus_master_enable_region, enable); + d->is_master =3D enable; /* cache the status */ +} + static void pci_init_bus_master(PCIDevice *pci_dev) { AddressSpace *dma_as =3D pci_device_iommu_address_space(pci_dev); @@ -141,7 +147,7 @@ static void pci_init_bus_master(PCIDevice *pci_dev) memory_region_init_alias(&pci_dev->bus_master_enable_region, OBJECT(pci_dev), "bus master", dma_as->root, 0, memory_region_size(dma_as->r= oot)); - memory_region_set_enabled(&pci_dev->bus_master_enable_region, false); + pci_set_master(pci_dev, false); memory_region_add_subregion(&pci_dev->bus_master_container_region, 0, &pci_dev->bus_master_enable_region); } @@ -675,9 +681,8 @@ static int get_pci_config_device(QEMUFile *f, void *pv,= size_t size, pci_bridge_update_mappings(PCI_BRIDGE(s)); } =20 - memory_region_set_enabled(&s->bus_master_enable_region, - pci_get_word(s->config + PCI_COMMAND) - & PCI_COMMAND_MASTER); + pci_set_master(s, pci_get_word(s->config + PCI_COMMAND) + & PCI_COMMAND_MASTER); =20 g_free(config); return 0; @@ -1632,9 +1637,10 @@ void pci_default_write_config(PCIDevice *d, uint32_t= addr, uint32_t val_in, int =20 if (ranges_overlap(addr, l, PCI_COMMAND, 2)) { pci_update_irq_disabled(d, was_irq_disabled); - memory_region_set_enabled(&d->bus_master_enable_region, - (pci_get_word(d->config + PCI_COMMAND) - & PCI_COMMAND_MASTER) && d->has_power); + pci_set_master(d, + (pci_get_word(d->config + PCI_COMMAND) & + PCI_COMMAND_MASTER) && + d->has_power); } =20 msi_write_config(d, addr, val_in, l); @@ -2917,9 +2923,8 @@ void pci_set_power(PCIDevice *d, bool state) =20 d->has_power =3D state; pci_update_mappings(d); - memory_region_set_enabled(&d->bus_master_enable_region, - (pci_get_word(d->config + PCI_COMMAND) - & PCI_COMMAND_MASTER) && d->has_power); + pci_set_master(d, (pci_get_word(d->config + PCI_COMMAND) + & PCI_COMMAND_MASTER) && d->has_power); if (!d->has_power) { pci_device_reset(d); } diff --git a/include/hw/pci/pci_device.h b/include/hw/pci/pci_device.h index 8eaf0d58bb..de53a44ae9 100644 --- a/include/hw/pci/pci_device.h +++ b/include/hw/pci/pci_device.h @@ -88,6 +88,7 @@ struct PCIDevice { char name[64]; PCIIORegion io_regions[PCI_NUM_REGIONS]; AddressSpace bus_master_as; + bool is_master; MemoryRegion bus_master_container_region; MemoryRegion bus_master_enable_region; =20 --=20 2.47.0