From nobody Mon Nov 25 09:53:27 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=1716297172; cv=pass; d=zohomail.com; s=zohoarc; b=Ozbz2bQ6CqGkED3P/bt4louk5eHDPnga65cJKlpYEAZTbxNvPvzLiwBIP217hYqfP9EVgblcmfFMSAr6842tFhtUV1o/kpmbO9ep1TqZH541FmqznNDBJgr4dO2LoN22eQ5cK6aQFYLQ8BW9eagOvwG764uN7ZoQN4Eu1EkhTlA= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716297172; 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=CKam7zb8e546M/TrGYyCxbXf0VqOaiRtn7XcC+gjZ+8=; b=X0jK8RUTVED1XbS0c3+WFtJm03DG8KZecrRQiKmEG/8mTP9Fq5HZs6jy/pfweBGPPwUfbxVVnjjDrXr1Bm1Bg+BLZp90UbNl3PFBL03Hcqge9NfGWmr0hUnWoYqxI7XDU8z58weRkf9WatAjQCrv2ZIac8Eceyqn4Mok6dXHOu4= 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 1716297172163880.7003260023224; Tue, 21 May 2024 06:12:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9PI0-0008A2-D7; Tue, 21 May 2024 09:12:25 -0400 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 1s9PHU-0007iC-Rm for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:55 -0400 Received: from smarthost2.eviden.com ([80.78.11.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9PHP-0001a9-MQ for qemu-devel@nongnu.org; Tue, 21 May 2024 09:11:52 -0400 Received: from mail-am6eur05lp2104.outbound.protection.outlook.com (HELO EUR05-AM6-obe.outbound.protection.outlook.com) ([104.47.18.104]) by smarthost2.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 15:11:44 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by AM8PR07MB8148.eurprd07.prod.outlook.com (2603:10a6:20b:323::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Tue, 21 May 2024 13:11:43 +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.7587.035; Tue, 21 May 2024 13:11:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1716297107; x=1747833107; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=CKam7zb8e546M/TrGYyCxbXf0VqOaiRtn7XcC+gjZ+8=; b=EzrNN85aeRGupVcuLLnKfvyeaj0oQLeU70WJ5cnuUzD7chRfnwQRFrA4 ywSGWpiiIM5nvp2dKsKPR+F3hzjQFND70u1o8GxVViST4XW19ynpBCpOB Cc4jYO9/XGv9poxBZxYdDNHDiaSFO4fameqewJAWGycq0fboJboTSc2E3 aALhp3vaAkUmI4I40s6iCJ4O+9Oltu4JaGSnHj1hWjsNWEAfiJxdzvemM mNCTGat9uTTpoRcBfvujhDbqLLokX/Hnk0mq0v4wDM75RzcTw7srRyHvv BT6C/vbjk/VRFbTFGgS37HLnY82SCi4nVG9D50pOdCe/HddKpc2I9BvMd g==; X-IronPort-AV: E=Sophos;i="6.08,177,1712613600"; d="scan'208";a="13011524" X-MGA-submission: =?us-ascii?q?MDELFSXt+lGXbIMvEN48Gstb8L213TGh6Coiko?= =?us-ascii?q?J5zmPAbRet9PT+6o23E+sIy9Q1/zmYQrksGWHw8/CzOkMsSEaATDNskn?= =?us-ascii?q?m2wpE8IxsUKnAZlgHZ/JU2gzLAjT2Z/iMHNgF+Uu7xoaBZEFTmGE0BgF?= =?us-ascii?q?35XnxV6NUnwYuTkiPcaX7FDQ=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GDGyB2jmbBR0ouRLgSESkwTx5HXL04ZtS1xfrGLmZM4hXSLOdSSXaVnasQ+5d2hMzrzVph71eiCkZJfJwJ37Kfv4vUV9OYPeNiyvPfccoify2cjqvj4x0/Q8jgdEat48BxXN4u/63A0lSJwN7Q6QQiY8rcc9leXJCPbKqjB/7uWgI0eUaNQZtXjA0WOaima9GdSzfM4Tb1KP+FXYAffCyAtDGgerLWnwZCOa57YDdoDguPxBwHhzxbPgNi/1eCHFGrSX6Cb0ZQ9sddvStheuuglFsrXKq4NUrAaLgHdKemmiENupRItY2NzUH0idgWOvwz1V1shWw61vHbDnybJzpg== 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=CKam7zb8e546M/TrGYyCxbXf0VqOaiRtn7XcC+gjZ+8=; b=noXeSnSmDI4zd8ymeN07HdRPFqbLhdaXC6sbgB9PxHGz/89PdBr7hDQpyKWsFNUAgEbKzaHxEWS0FsFS0f1DUhuWMxN3OUGeCZfdLj//wzObikui6MdRQdcSJ6Nf3z4iD8eAI2xFfnsG29WB+epFc5GbE1nFF/7PUY4+FUTLQXlc4SueyHuCRzj4FJ66jswni8YyONiHOynChTA6ASkpcnoLnc6bJoZ0mINhMi+MWtQf28pImQ/Bj5uGalZE0EekKSCZ9He4pHBUJ8/SCfOYIsvbxcXfYlqNYwNE0DXEPO+KqqHjZDU4IMiIBKuhHiJpGKhkEWmHsQhY0Qk5/gKw+w== 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 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" , CLEMENT MATHIEU--DRIF Subject: [PATCH ats_vtd 09/22] pci: cache the bus mastering status in the device Thread-Topic: [PATCH ats_vtd 09/22] pci: cache the bus mastering status in the device Thread-Index: AQHaq4BtCDCpPNoyckSYkgx7CPioGA== Date: Tue, 21 May 2024 13:11:43 +0000 Message-ID: <20240521130946.117849-10-clement.mathieu--drif@eviden.com> References: <20240521130946.117849-1-clement.mathieu--drif@eviden.com> In-Reply-To: <20240521130946.117849-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_|AM8PR07MB8148:EE_ x-ms-office365-filtering-correlation-id: e15cc6da-fcda-428e-acfb-08dc79978fa4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|366007|1800799015|376005|38070700009; x-microsoft-antispam-message-info: =?utf-8?B?Nm1EQW1WNlZmVWRRVys1NnF2TVBON29PSnZvdlZTdFJwK0NZY0gva2xycnRR?= =?utf-8?B?emlIc2IxQk1OQnU5TFVRZGZMd0tsVyt1L3EvTTk4Q0NVY2s1QTdFNUVUb3dy?= =?utf-8?B?ZTBJL3lsVVRqSjhpZFZtdk9vQm1KYVNBNkN4d1BpN20wNzdqbElEQS90MHFY?= =?utf-8?B?eE1naERjL3dxZU1GYm5Zb0w3TGpWdSs2enIvaXVobFRCM3JCOC81cS9BTVZm?= =?utf-8?B?SjhUSW4xaGxCdmhhNGtaTlhvOTlkTGU4ckF3WmtFUEJZZlY2YjdXRFk0KzVi?= =?utf-8?B?NnErbVJWZzBLclF2dXNUaEk2bS9kWUZ5aU5yTG5Va2YxVFM2N0NwZjBZZ3Zz?= =?utf-8?B?QlJ2QXdtMUY2VlJmSkNWV1NUSmxCN2ZYVW5hT1Jnd0VuajZVSFdZazdVbzlH?= =?utf-8?B?QTlidnAwMTZOeFhKUHA5L2xyZHJFQlNNQ1hXdWFOWnFnWjhNSjBRMkFET1o5?= =?utf-8?B?T3JBT1N4K2JZL2dQcTRrbm1Lck9FZjFqSnA1dzRsYmxUVGNBQXhwUng1YTgw?= =?utf-8?B?L2EyUUJIczE2MG4ySEpUSHJuUndwcTFHbDV4dzZOZm9NYkNvSkJVcGlVcW5l?= =?utf-8?B?c0d5UTAwVmszMTJjTDMyRnBRL2tKZURwZ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1N2FlMUpiQmVUOThoWEFCRHpya3JuQ0h3Z3hoclNyUmFzLzBVVlhkSjZt?= =?utf-8?B?c2QzdFFjUkp0MzlDUVU3RC9DcVdKT0R1anNPS092TkxUdElhYk1lUm1Eem5p?= =?utf-8?B?ZFVlOHpER1pHYWdtZjJzSk5abTVydFBtaS9VSXdZdEt5OVRuR0FuU0FpaXJh?= =?utf-8?B?eWRUaEM5ZjU4WWc1OGpRV1ROWjloYWpNYjAxWGs1WVhlRE1OREJobE5WaXYx?= =?utf-8?B?SlNoTGtQMXhSUnQ1eXJFZ21sbHdJWWF4TGxtQUpWQzBXTDIxWmNUZ1BlUTdp?= =?utf-8?B?SGxoaGxTc2dZMzdNQ1lMZz09?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB7602.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?WEJRUE5rbDV4cHE0VDhzMnpQNkx1SjF1TjRJY0hsWjlDTnVUZkhQQTVWYWVh?= =?utf-8?B?aXNDK3Qwd3RKMStkYjYvQ3QxemFKV3pvL3JwRUJ5dUlsYS84RExoVE9pbTNQ?= =?utf-8?B?U0xQQ0t5N0svdmFHZnBFbXhteWl4UnBkeDVFdTZ2cXZkLzVZMzhiN2NzUm9O?= =?utf-8?B?SHBreDgxWmtEOGtNaE50aFdCak1oc1RMV0h6NDIxdXNVQjluTWVZVDdzY0hZ?= =?utf-8?B?d05mbHN1ZWZrZ2NSNGRhK3Y2dXQxSnRkem9yV2VpQVNzdUs3QVc4MVRqN3lK?= =?utf-8?B?aGtGNHE1TkVLdXdLNURXaDFQYjR0c2RnVU8ybDN4QzVsYWM0WkRmTWdQaXlt?= =?utf-8?B?Vnk3VGl3RTFXQ0hNc29TWUFH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A44USs1G7gn6c=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <7561F19B2814E945AC1BC4EE055D1EA6@eurprd07.prod.outlook.com> 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: e15cc6da-fcda-428e-acfb-08dc79978fa4 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2024 13:11:43.6658 (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: pa5f9pQXLZzOmnYmtjZ1hHolt0tGDHz303oxSHNYbeQcEG+OqW+aJRsgU2cTp9Jwds008HYqbUSQxvfPUMkjov0OXX9s4pWANMtVq2qV00DFckNRlMftMAXLA0y/GIRj X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR07MB8148 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.83; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost2.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, 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: 1716297172744100001 Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/pci/pci.c | 24 ++++++++++++++---------- include/hw/pci/pci_device.h | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index c8a8aab306..51feede3cf 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -116,6 +116,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); @@ -123,7 +129,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); } @@ -657,9 +663,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_MAS= TER); =20 g_free(config); return 0; @@ -1611,9 +1616,9 @@ 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); @@ -2888,9 +2893,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 d3dd0f64b2..7fa501569a 100644 --- a/include/hw/pci/pci_device.h +++ b/include/hw/pci/pci_device.h @@ -87,6 +87,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.44.0