From nobody Mon Nov 25 09:24:18 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=1716297225; cv=pass; d=zohomail.com; s=zohoarc; b=JBpCXWtWzUTEw+eN3BFAYHefQfEkBFVE5BM1qq5DNl1d2A5KsRVSTaJIPgMsbk5MqQ3FT/BZA6dRZe/v/khgVRF+f9A952nCvkIQQe5K6pDfxda2sUF2kmlbz1pnGeAquDQFdbfS5micpf/ARVDtDo+Oo3aSh6qIh4f/7mHJNYI= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716297225; 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=gOL1Z/9VTnohgeJlr7Aoab7lzDrd5FOG5MHKFkUZjKc=; b=cS7javZ7XvNbFAc0XC7XwfiefG/49XzP0RUkBgIflgtn+X6fKSCjqQcquV0cTUyM7OH5gZyyC0KckwX08C5C8GmWUasB3WF5z9iTCKMtCNc0/tiIlUb+XE8huothn29u3R3mEzVyrIj/I3mhOZXeHts6WPZPxtEI4vpzCeK2Jms= 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 1716297225802438.5759839371394; Tue, 21 May 2024 06:13:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9PIC-0000MF-UQ; Tue, 21 May 2024 09:12:36 -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 1s9PHd-0007mg-2c for qemu-devel@nongnu.org; Tue, 21 May 2024 09:12:02 -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 1s9PHa-0001co-6l for qemu-devel@nongnu.org; Tue, 21 May 2024 09:12:00 -0400 Received: from mail-dbaeur03lp2169.outbound.protection.outlook.com (HELO EUR03-DBA-obe.outbound.protection.outlook.com) ([104.47.51.169]) by smarthost2.eviden.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 15:11:56 +0200 Received: from AM8PR07MB7602.eurprd07.prod.outlook.com (2603:10a6:20b:24b::7) by DB8PR07MB6249.eurprd07.prod.outlook.com (2603:10a6:10:140::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Tue, 21 May 2024 13:11:54 +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:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1716297118; x=1747833118; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=gOL1Z/9VTnohgeJlr7Aoab7lzDrd5FOG5MHKFkUZjKc=; b=pnx5gT3TGQ5rNEtDhJxQ3MveUljbp2owHSV17EuPNIoFZHCFieJ2/g9G QB2qgKV2pAeb8AsmRZY+PnsuZys1gXoik+bB+kw4Oc49yEgdhyRAO40OF kb0Q1uiRtiqg4b6jEexy8yKWjcHdKvFnUGSaWxe+EAKq0gq40UFgpr+vq z3vU1HnYugWsYNZVEfIoRHQVr75StqBZtyy8s8oGL6OTBbiQfyX0YrUCs aScS1qUyR0moSNX6zqAVtylxJgrOU6l7IkoUKHSsVnsj8seMhFjogx++5 tuPxRBQfHN1Gep5yJnZ9xKoFr8L/Iqmsdxlp4NJt9quOrHFOy/m4bF4fO Q==; X-IronPort-AV: E=Sophos;i="6.08,177,1712613600"; d="scan'208";a="13011546" X-MGA-submission: =?us-ascii?q?MDEsXXfpqCkV6Bs636Xm3BSa0iLQrFgKudtVVn?= =?us-ascii?q?UfKmt3yrCKOSuXqOL4fa4YSeILtk1b7H4Te6GDRHr9MxNTVFEkkjSJmc?= =?us-ascii?q?d4opj+R0FbzcikEeMXeE157qJe5H2KWk+pz+isu02a0OEMIFKsRYjsWq?= =?us-ascii?q?+CF67joztEkYYMtaH1pq1Znw=3D=3D?= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QO0bfDfYq/kNQWZwbLqOdDWEyAls5gC+6c0fRJUOMo6aP6EgjCWABEebBWQ30UVTWEfhqIZS9MzaoT9RnDaUF3MbonH1iVDqjDuSC6Xyavn/i5rzWdKsutkSEnOZ0wHbZahtTiD2BUuo38jc4QxETaIMou5Ap3utbo8V288yhqPdggqaBa6+ZMu+PLTlpbA8LCZxXiHPTxVSkhLXWhxHJ7O79ouk4RPvmM2OT9x6up6VuU1aUzWbRwzJqq8KkATyXngfVFwS6DTfCexzn869wwumKt4wPknjyDbNsO5cxYR0s2BwbX1d9FFHqvu8+KU9XXbz/Ru79r1dZwVBplu5ow== 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=gOL1Z/9VTnohgeJlr7Aoab7lzDrd5FOG5MHKFkUZjKc=; b=lhufddWhhXhq/6q8OIDbXtH8NvLt2Y8un8fRmiYtLXMkfg6xpaeijGt3A0iQwyHvcMNjWGRgNqkPrKWDpjVSYEBCFNOzNhFE77SVSgLHISHjGkkS7N60UXroaYUUcPiPlOl9vPN72OIjV8AsrMHw8dQMVc9OhDTOV+ZhNeTtWbQAeQZbDXCYEvpSVN77k2tgRgxNRw9Xj5/kyld0yeGU3WdrAsCGKMZo3IYHcF86sojX4zuynvmOt8nFFxlCGOoPxPzeBcszfEGk6cyXS2O589YL5v9QP9ZGOuajXknHi0/KOzAPOK+Y7y0Z97g4BZNE2A3Ezs8QRc9FmYqeao+dKA== 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 22/22] intel_iommu: add support for ATS Thread-Topic: [PATCH ats_vtd 22/22] intel_iommu: add support for ATS Thread-Index: AQHaq4Bzxu50+1LF9ECmS9tKvgO8/A== Date: Tue, 21 May 2024 13:11:54 +0000 Message-ID: <20240521130946.117849-23-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_|DB8PR07MB6249:EE_ x-ms-office365-filtering-correlation-id: fa369c92-c842-41dd-5263-08dc7997960f 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?WTUxREQySTFWdlpoZjNJN2kxSUhoNEVlM3E5bTFvQ3JkOFBnTm1LRTVwRWZC?= =?utf-8?B?VnRxaStLZk8vVnJHTWZhbzJkNzI3bzVaN0l6VHdVOFh1V29IZWdmeFhWUXVJ?= =?utf-8?B?QWhQSnU4dWJFNncxdThwd0NBajQ2Z1pneW5Gb2dSMFlTbklPNEx3QllYSCtH?= =?utf-8?B?bzdHTkliOEFkTk5zNzdyVTgwbkN2YjJvZEIvbVRvRkk0ZW1pYTcxa3FsNDY5?= =?utf-8?B?dUVRTWU3RHQwbU4vVTlxK1pBVExvNW1yU0N0eTNkWTFtR1VBc3NFY2tYWjJy?= =?utf-8?B?M3VacXluVjNITkFGc0JpRkJLL25aQVovVE1IL3oya2dHVXVJOTZnQTZ0TkdL?= =?utf-8?B?MlhMcjNXRzA2ZzNEYThEeTlUVG9yRDNVTTN2UE1IdlNDWFdLVlpvZDZmSlpQ?= =?utf-8?B?VDlRNmFYNHQ4b1hiYzdUL3hodWFETkRTZ0trS3QvYkJKdzRKWElmYUJTNktx?= =?utf-8?B?SzZkNGZSWjdWZGFoc08rWkFPQ0plM3RkNzBjcXlzQVF5UDJCaXFIc1ovOGVE?= =?utf-8?B?eWI5UlA1d3AzZVYrTjh4WWIvbG1ERW5LQ0llYzN4ckIxd05tZ0RyYWNpWG1y?= =?utf-8?B?VHBtZndPeWV3TkhOcGZMaDRDelMvSnhMT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ZhM0ZjbGxnaHlObHJUSFdQeS9GYm9penRuOWV2MGpE?= =?utf-8?B?cW9LVmJkaDhSckpPMXNmMHFFR2lwbTNQNGJ4L0E3M3NQblA2cWtGYS9VZmJG?= =?utf-8?B?YmM0TVU2NTFuSUtUdnFBVE82WTZPcWptd09Ua09USUhKMHh3SDU0ZkQyRmUy?= =?utf-8?B?bUcvZk5IeGxHayttcUNTcVJUbElKbjJnbFBaekpsbDV3bzM5K2x6K0syWDIy?= =?utf-8?B?WXNhZ2Y0RXNwTlJJU2RBZDFpR2NZcmxnQ1AzUWp0TlNmK0hLMnFnbVoyaWw4?= =?utf-8?B?WHIzWE1RdkVXSzNwaG1pUT09?= 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?bVNmcHdQUmVjRGMxSTZXNzZ5QW1mdDZZcGU0bVF1aDIrd3dSdFg2emx1KzV0?= =?utf-8?B?d1l6UWtpVDVkbkVadzRtcGl5U1pRMlZtU2N4RTZyb29GWXpDRTM1TTBKd0Vr?= =?utf-8?B?UFl5c1JaeTI5MkErK1cvZnlXdENjTlNiWGpLaFJNQnNrdDRCakYzY1F4OXJT?= =?utf-8?B?aHJMVk84SWZHNkc4SHg4czA5akQvM2xMTzF2WW1sQlNtNXg4SlhPV2Jpc21j?= =?utf-8?B?MjR6RWptcVlDKzZNQWtIMGtoSlBDdHFxdmQ4dXozSm5VWUhGR1pXV2tKaC80?= =?utf-8?B?a0w2djRJYkkwZURVR0JUYzhweE9TZDVFNkFiTFo1VnduVlFwcGhpbHFXdGJR?= =?utf-8?B?Y1NuUE1WUzdXZ3FTWWdERWlBY2ZJTUxUblJQYjdJUGpmZTQzMH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weBbA1jrCmtp8s2Y=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: fa369c92-c842-41dd-5263-08dc7997960f X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2024 13:11:54.4017 (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: 92L/N0jEPxcPOEqzBWr9FusqqwsU2CuQPYdzjpwb6IRnJ6+XcXtoz2UxJe0u6EZg1U66nJldLqHXUjkanUxLbok/uwby85mMmJ9CGKoK1FwMzONAJwSiSjW0R/TH6zTa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR07MB6249 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: 1716297226677100001 Signed-off-by: Cl=C3=A9ment Mathieu--Drif --- hw/i386/intel_iommu.c | 75 ++++++++++++++++++++++++++++++++-- hw/i386/intel_iommu_internal.h | 1 + 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 496bed9447..2e78ebe6d2 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -5381,12 +5381,10 @@ static void vtd_report_ir_illegal_access(VTDAddress= Space *vtd_as, bool is_fpd_set =3D false; VTDContextEntry ce; =20 - assert(vtd_as->pasid !=3D PCI_NO_PASID); - /* Try out best to fetch FPD, we can't do anything more */ if (vtd_dev_to_context_entry(s, bus_n, vtd_as->devfn, &ce) =3D=3D 0) { is_fpd_set =3D ce.lo & VTD_CONTEXT_ENTRY_FPD; - if (!is_fpd_set && s->root_scalable) { + if (!is_fpd_set && s->root_scalable && vtd_as->pasid !=3D PCI_NO_P= ASID) { vtd_ce_get_pasid_fpd(s, &ce, &is_fpd_set, vtd_as->pasid); } } @@ -6004,6 +6002,75 @@ static IOMMUMemoryRegion *vtd_get_memory_region_pasi= d(PCIBus *bus, return &vtd_as->iommu; } =20 +static IOMMUTLBEntry vtd_iommu_ats_do_translate(IOMMUMemoryRegion *iommu, + hwaddr addr, + IOMMUAccessFlags flags, + int iommu_idx) +{ + IOMMUTLBEntry entry; + VTDAddressSpace *vtd_as =3D container_of(iommu, VTDAddressSpace, iommu= ); + + if (vtd_is_interrupt_addr(addr)) { + vtd_report_ir_illegal_access(vtd_as, addr, flags & IOMMU_WO); + entry.iova =3D 0; + entry.translated_addr =3D 0; + entry.addr_mask =3D ~VTD_PAGE_MASK_4K; + entry.perm =3D IOMMU_NONE; + entry.pasid =3D PCI_NO_PASID; + } else { + entry =3D vtd_iommu_translate(iommu, addr, flags, iommu_idx); + } + return entry; +} + +static ssize_t vtd_iommu_ats_request_translation(IOMMUMemoryRegion *iommu, + bool priv_req, bool exec_= req, + hwaddr addr, size_t lengt= h, + bool no_write, + IOMMUTLBEntry *result, + size_t result_length, + uint32_t *err_count) +{ + IOMMUAccessFlags flags =3D IOMMU_ACCESS_FLAG_FULL(true, !no_write, exe= c_req, + priv_req, false, false= ); + ssize_t res_index =3D 0; + hwaddr target_address =3D addr + length; + IOMMUTLBEntry entry; + + *err_count =3D 0; + + while ((addr < target_address) && (res_index < result_length)) { + entry =3D vtd_iommu_ats_do_translate(iommu, addr, flags, 0); + if (!IOMMU_TLB_ENTRY_TRANSLATION_ERROR(&entry)) { /* Translation d= one */ + if (no_write) { + /* The device should not use this entry for a write access= */ + entry.perm &=3D ~IOMMU_WO; + } + /* + * 4.1.2 : Global Mapping (G) : Remapping hardware provides a = value + * of 0 in this field + */ + entry.perm &=3D ~IOMMU_GLOBAL; + } else { + *err_count +=3D 1; + } + result[res_index] =3D entry; + res_index +=3D 1; + addr =3D (addr & (~entry.addr_mask)) + (entry.addr_mask + 1); + } + + /* Buffer too small */ + if (addr < target_address) { + return -ENOMEM; + } + return res_index; +} + +static uint64_t vtd_get_min_page_size(IOMMUMemoryRegion *iommu) +{ + return VTD_PAGE_SIZE; +} + static PCIIOMMUOps vtd_iommu_ops =3D { .get_address_space =3D vtd_host_dma_iommu, .get_address_space_pasid =3D vtd_host_dma_iommu_pasid, @@ -6210,6 +6277,8 @@ static void vtd_iommu_memory_region_class_init(Object= Class *klass, imrc->translate =3D vtd_iommu_translate; imrc->notify_flag_changed =3D vtd_iommu_notify_flag_changed; imrc->replay =3D vtd_iommu_replay; + imrc->iommu_ats_request_translation =3D vtd_iommu_ats_request_translat= ion; + imrc->get_min_page_size =3D vtd_get_min_page_size; } =20 static const TypeInfo vtd_iommu_memory_region_info =3D { diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index 1b0d8958ad..461158f588 100644 --- a/hw/i386/intel_iommu_internal.h +++ b/hw/i386/intel_iommu_internal.h @@ -194,6 +194,7 @@ #define VTD_ECAP_MHMV (15ULL << 20) #define VTD_ECAP_NEST (1ULL << 26) #define VTD_ECAP_SRS (1ULL << 31) +#define VTD_ECAP_NWFS (1ULL << 33) #define VTD_ECAP_PSS (19ULL << 35) #define VTD_ECAP_PASID (1ULL << 40) #define VTD_ECAP_SMTS (1ULL << 43) --=20 2.44.0