From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852725; cv=none; d=zohomail.com; s=zohoarc; b=NAcD2xbs3LC1N+SNnDDNqmudqnIX+qSbVaW/abPEIyMfug0a9QDbEMPGwaqeLUNJzZZ5ROmmris+zxmSuf5p8GZcCvApZuuwaCiqfmCZ8o6y+sRD0OVdRSo7dJGTnYNJqwKDCYNnZ8Cnfu+OJBYF8XLfc/OdpLl5kfP4/4xXJCs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852725; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=53CNedcl2LpaLrX+og6xiNzpDo61T+Xa5G/+nq0djig=; b=d1ngVBTmzpwAB1cStZmCcZ99FFwaxViSFbstowmLw7oFBXK6a4LBRBrdHxPHVq58HPru90E0rjbEaqZhoFuykdoXNJ7urJZ2InHkMT6UK4ca1e6TfJUzlnLmzukrasd9Km52EXToum8g1bes6icrq7yCD0oCzPL+ncwuFgpovD8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 167385272544285.35849670145683; Sun, 15 Jan 2023 23:05:25 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478335.741455 (Exim 4.92) (envelope-from ) id 1pHJY9-00077n-F4; Mon, 16 Jan 2023 07:04:57 +0000 Received: by outflank-mailman (output) from mailman id 478335.741455; Mon, 16 Jan 2023 07:04:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJY9-00077g-Bg; Mon, 16 Jan 2023 07:04:57 +0000 Received: by outflank-mailman (input) for mailman id 478335; Mon, 16 Jan 2023 07:04:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJY8-0006sD-22 for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:04:56 +0000 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [2a00:1450:4864:20::62b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 13e88359-956c-11ed-b8d0-410ff93cb8f0; Mon, 16 Jan 2023 08:04:54 +0100 (CET) Received: by mail-ej1-x62b.google.com with SMTP id bk15so8323180ejb.9 for ; Sun, 15 Jan 2023 23:04:54 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:04:53 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 13e88359-956c-11ed-b8d0-410ff93cb8f0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=53CNedcl2LpaLrX+og6xiNzpDo61T+Xa5G/+nq0djig=; b=MNH32xpmk7O4JRawfjj/7+WeXgb4/eJew9BrD/cd8foYWnF0gDYh8WQ8C3uRq5AYtk Qfav2j+zCsIOEpVnwniTyBOWWr74Z7+9OtWaUIeq2RjbV7hX9nD5ICoQ75YPwkLu3pJi xJMrTMjPQqBVU/6rloVRHTMKx7nCFUaOl+8h7GJF1dRxLHZ1RHdLZ/HVBcw1AS6+CDKN 63cT+jWdAg6jwsdTUL2Yu8RVUOUWauvqPWf/3u9JA6VXHf2Bluryq49fGSuQcYCLwAuM kBdlSya9+z6pR81KUkAWbI3oQjVVv/D+7t/PiNyY4UsB1YsXH24zJbKNtsJmqO4Ffxs4 UGog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=53CNedcl2LpaLrX+og6xiNzpDo61T+Xa5G/+nq0djig=; b=CGyeaM5168WHWwKH1TiKizHBZNfUKN0RQhChrj4A+riRwW94QLx76B/F+iuREbR4b5 rZ+Dd3xcF7Om9NoE036Eo/1M0MachzeTx5q7JAzWlB45Fk9XYJ3iQmo2ey0uIIbK1tyS nTES96qETAXFPTvZArgbRsYoe6Bq/9xShM41ZSKgYQUKzxM3vy4nF1vvZI1f2IxX7emo 7wV3hSVPstuqNSHC2JJh9TKIRgcWt5g27D85xqbN3F2CjgODo9Wb+S5Yelb8MWkIE1re w39WpXmiisrg3Wp4pjBDm4rGxV7i0XLYVofO/sgucStPR6US50GEM9J9VFtVlZqTgbvV 6XKQ== X-Gm-Message-State: AFqh2kpw5YsWbDRNMFbCB1iArIvHfGKXlf0/A6a4VoUKHOSRHRlCLxIs CLuYwoMaKx1bUPmNT6oJ1qwOyzvzM7I= X-Google-Smtp-Source: AMrXdXvYHQUxlrIBRDsIC5Fy1aNpHLbbszebpSlbeaCjwNkQKFFzRNI23dtm/XQgoBdr9Tuia50AsA== X-Received: by 2002:a17:907:1316:b0:863:e08e:2ac3 with SMTP id vj22-20020a170907131600b00863e08e2ac3mr10398478ejb.63.1673852693562; Sun, 15 Jan 2023 23:04:53 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 1/8] x86/iommu: amd_iommu_perdev_intremap is AMD-Vi specific Date: Mon, 16 Jan 2023 09:04:24 +0200 Message-Id: <20230116070431.905594-2-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852726061100002 Content-Type: text/plain; charset="utf-8" Move its definition to the AMD-Vi driver and use CONFIG_AMD_IOMMU to guard its usage in common code. Take the opportunity to replace bool_t with bool and 1 with true. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - the second arg of no_config_param() should have been the parameter name, i.e "iommu", and not the boolean suboption "amd-iommu-perdev-intremap" xen/drivers/passthrough/amd/iommu_init.c | 2 ++ xen/drivers/passthrough/iommu.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthr= ough/amd/iommu_init.c index 1f14aaf49e..9773ccfcb4 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -36,6 +36,8 @@ static struct radix_tree_root ivrs_maps; LIST_HEAD_READ_MOSTLY(amd_iommu_head); bool_t iommuv2_enabled; =20 +bool __ro_after_init amd_iommu_perdev_intremap =3D true; + static bool iommu_has_ht_flag(struct amd_iommu *iommu, u8 mask) { return iommu->ht_flags & mask; diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iomm= u.c index 5e2a720d29..9d95fb27d0 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -58,7 +58,6 @@ bool __read_mostly iommu_hap_pt_share =3D true; #endif =20 bool_t __read_mostly iommu_debug; -bool_t __read_mostly amd_iommu_perdev_intremap =3D 1; =20 DEFINE_PER_CPU(bool_t, iommu_dont_flush_iotlb); =20 @@ -116,7 +115,11 @@ static int __init cf_check parse_iommu_param(const cha= r *s) iommu_verbose =3D 1; } else if ( (val =3D parse_boolean("amd-iommu-perdev-intremap", s, s= s)) >=3D 0 ) +#ifdef CONFIG_AMD_IOMMU amd_iommu_perdev_intremap =3D val; +#else + no_config_param("AMD_IOMMU", "iommu", s, ss); +#endif else if ( (val =3D parse_boolean("dom0-passthrough", s, ss)) >=3D = 0 ) iommu_hwdom_passthrough =3D val; else if ( (val =3D parse_boolean("dom0-strict", s, ss)) >=3D 0 ) --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852725; cv=none; d=zohomail.com; s=zohoarc; b=bsWJfAh0l6OAIhNtjE3jDacRwV5iScYwfGcRzDk0QpyKYhxpidFGm1pvYCPZRB5HpgKK1mafreyAqR868eWTeTpfGgXe0i/SrERncF5PrE8gkMtST1UXuWixFjD53Lz9rDWN5W2NoEtAVjxZX8zJzt2iX9R8S8cyzfn3XNjMfQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852725; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U1neDOzq+0HPMCn8Gxw25YMbFizPFUqx82cwaRPbvKM=; b=bz/It3wZIDXYhvyv8KmJeAuiZqIWew6vUK04N4UdSXBZj/rrsEL20BRK9OeEjSngaTZ/cx+EpBX3zkcmoI7EjMn0QMOQwl2mtOX72HAuTGNVWNSMCvtKdfm5MqFpwSUEU/fJI6Trlto1EQAPmtmKaTGOzZA3do0nElWB8J/O+is= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1673852725554502.85449512279433; Sun, 15 Jan 2023 23:05:25 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478336.741464 (Exim 4.92) (envelope-from ) id 1pHJYB-0007Nn-Nk; Mon, 16 Jan 2023 07:04:59 +0000 Received: by outflank-mailman (output) from mailman id 478336.741464; Mon, 16 Jan 2023 07:04:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYB-0007Ng-Ka; Mon, 16 Jan 2023 07:04:59 +0000 Received: by outflank-mailman (input) for mailman id 478336; Mon, 16 Jan 2023 07:04:58 +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 1pHJY9-00077f-Su for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:04:58 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 154c79fc-956c-11ed-91b6-6bf2151ebd3b; Mon, 16 Jan 2023 08:04:56 +0100 (CET) Received: by mail-ed1-x535.google.com with SMTP id y19so5875906edc.2 for ; Sun, 15 Jan 2023 23:04:56 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:04:55 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 154c79fc-956c-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U1neDOzq+0HPMCn8Gxw25YMbFizPFUqx82cwaRPbvKM=; b=YOCIbQpk3MkERrpCOGsmLsudRonoBRC3lSPg7RQfcsd9xhfXCk/KBTc+DRSht/tUU6 4pBhqpOIL2L610GIkFzYARa64U0yDQzYqZLoih7RlffrZqM8q5vgK13RnpWMstTwdn2S Bl8uYGk3qQw4JwXGKcKrbTL0iBGVJGbje/wuZHVJWH2bKGdBWRwBpRtjrH1K+dI+YQ0i fc6ipaQ4lkdu/Jq6RYDwcv5yAbcamm1PHHWgUBPIcTN1ea5jWTsIXHssi3BIov31xugU ZsTvaPTvQQPtunNGSCXV6pfEPDmsbgBEZD1fDiY/sAyrIxnN5UUcMYp6Of6+qY/+rCP1 a4eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U1neDOzq+0HPMCn8Gxw25YMbFizPFUqx82cwaRPbvKM=; b=pJcmf0Kamzb+tSTGZm+tlZeP2P1XwzJepKmZVdN6K53Kle9vc6WjGZFy2qpv3c256d HeYElcArT5zU30p66XVsjhEgIlyPw9ntw7Bekdf4oSeZjHtaUo/84Gc8T1Zu9SPuYamL VyjwXQj5HD3DBkXpK6I0kPyryt+S9g7cuzvT1rtbDdrTUrOvN0ZJQ+oc8L+7p7giLM40 RFaWnQVPSPZmaR6GoIvs9KbgHyRCAHhbuehl8mdOUoLBH1Hc8ghUPSGDj4b4G3w0oEYf +Z1OwQwoiTLiIYns/p8lIl+GbGaF8W4oCvWKBeb7zzH+XGEIGkA6QPw8+bOrZ5hYtkk1 d0ww== X-Gm-Message-State: AFqh2ko3ipfIEnCSWv3u4BYu7HtLC/7hUswzJ+b2ZYqULA2z1k7ooyzz qWK/X43s2x0RTR3hHcP8PxiZyfBhFWo= X-Google-Smtp-Source: AMrXdXs4zO27qoHXCunCPvFvXsJ+dOF/tfY+KglxUAtIxkhOZZxJK9V4h89mHXIwXNl/jGdEx7nhpQ== X-Received: by 2002:a50:ed91:0:b0:48e:c073:9453 with SMTP id h17-20020a50ed91000000b0048ec0739453mr10559134edr.15.1673852695898; Sun, 15 Jan 2023 23:04:55 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 2/8] x86/iommu: iommu_igfx and iommu_qinval are Intel VT-d specific Date: Mon, 16 Jan 2023 09:04:25 +0200 Message-Id: <20230116070431.905594-3-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852728138100006 Content-Type: text/plain; charset="utf-8" Use CONFIG_INTEL_IOMMU to guard the usage of iommu_igfx and iommu_qinval in common code. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - handle iommu_snoop case in a different patch and update commit msg - use no_config_param() to print a warning when the user sets an INTEL_IO= MMU specific string in the iommu boot parameter and INTEL_IOMMU is disabled xen/drivers/passthrough/iommu.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iomm= u.c index 9d95fb27d0..b4dfa95dfd 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -82,11 +82,19 @@ static int __init cf_check parse_iommu_param(const char= *s) else if ( ss =3D=3D s + 23 && !strncmp(s, "quarantine=3Dscratch-pa= ge", 23) ) iommu_quarantine =3D IOMMU_quarantine_scratch_page; #endif -#ifdef CONFIG_X86 else if ( (val =3D parse_boolean("igfx", s, ss)) >=3D 0 ) +#ifdef CONFIG_INTEL_IOMMU iommu_igfx =3D val; +#else + no_config_param("INTEL_IOMMU", "iommu", s, ss); +#endif else if ( (val =3D parse_boolean("qinval", s, ss)) >=3D 0 ) +#ifdef CONFIG_INTEL_IOMMU iommu_qinval =3D val; +#else + no_config_param("INTEL_IOMMU", "iommu", s, ss); +#endif +#ifdef CONFIG_X86 else if ( (val =3D parse_boolean("superpages", s, ss)) >=3D 0 ) iommu_superpages =3D val; #endif --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852725; cv=none; d=zohomail.com; s=zohoarc; b=SErUqXdpr8OtFhxWJC69WCPGlXN9toFjppNf039Dzg3iIVbjTdT3+j2wsVBQEvODzl92KWHM9Dxo3WzoHW/lLIqrENSc7uM6SENMG4asUlIh9hNjqjI/LWK8W7H6Ae/DgHKCtOKGyuP/YlG/W2Mdew+H0yvUcGyopPA2zU5juaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852725; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+O7AGGT5LTOYunZyjJAtUCNbg1rumh26m/rUSOWP+V8=; b=WC9FpTDl7l1wPIM9ZyoZz0ZZWjwnYwDMYC0ScgbvsrZ/5ouFJvLNyh3Yg3icLGZuJPvXXURFFAu7WkIQAZ0xFRBDjP9VCkPN8b7YV9lldFuS/fmh7qSWsFf4te6Qu2IwDvZo3Yh/NcD6Ux2+64mMbygWmeLTK9hGr/gJhBv52lA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 16738527256121014.172074993618; Sun, 15 Jan 2023 23:05:25 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478337.741475 (Exim 4.92) (envelope-from ) id 1pHJYD-0007eB-0a; Mon, 16 Jan 2023 07:05:01 +0000 Received: by outflank-mailman (output) from mailman id 478337.741475; Mon, 16 Jan 2023 07:05:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYC-0007e2-Sq; Mon, 16 Jan 2023 07:05:00 +0000 Received: by outflank-mailman (input) for mailman id 478337; Mon, 16 Jan 2023 07:04:59 +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 1pHJYB-00077f-JL for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:04:59 +0000 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [2a00:1450:4864:20::62d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 169c8c69-956c-11ed-91b6-6bf2151ebd3b; Mon, 16 Jan 2023 08:04:58 +0100 (CET) Received: by mail-ej1-x62d.google.com with SMTP id vw16so2677358ejc.12 for ; Sun, 15 Jan 2023 23:04:58 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:04:57 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 169c8c69-956c-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+O7AGGT5LTOYunZyjJAtUCNbg1rumh26m/rUSOWP+V8=; b=gnM2zjMwI7vjjXcR91Diixg4uJGE8qmSsFEfsKbwwi6+E2kDsroPHUbkT2WaxxsabD Tbidyx9PPeoClqRjDP27m/p8My0YU7dKan3BpKj2uQ9B4aJDM6q5yLWiYm7DG0MEphs4 SDROHxYu3s7hrjwGO2VQLG8H5VJEK0KGT437bcUPVmMrl8aj/2wRFWLiXCttsBHolqpD /Tdq0VuhCBrLgprdHm3/s/kjsT3/jaQHRGVVKQEEldb0BtJqf+xxdY9nFDoQRV/cdier AlkKUaFuHNBeFYwTeCbowm0DDoL5oP707cfJAPAFHl+mplYSpBDv7glfdXIyo1XadSiU RAsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+O7AGGT5LTOYunZyjJAtUCNbg1rumh26m/rUSOWP+V8=; b=7S6d+JPBO1QUHb4blDIlPswuH9l0JwpeR8LuH6K1Ww9jbbHFqr+GeWmLcNeX77QP4B ima42rQ1ECjTc8fmV4Hxwpqo/x+g4wUJgiuyV05wwNm7+SuYo6NC757lb9phl9+YnUtN oN2tR8D4oeOXbeatUahySggkIRV9w4xXfRfER0mI8oz/KicLR/e7LLF4Q0KqOJEbc5Hz Ft14um3KDVhH7iNE2XmTuwvt35zXG/uDmvZ1EV4rJk7BoTQ2EMgZNTtTOi4yUSGMS3MY GW/xcqyab9HynnP4md5YfztS2PJcu+bc7JDiwjzMAJjLI9XFizPJ0QZcZnE82YcR1wfn j0pA== X-Gm-Message-State: AFqh2kpb3R516uz3xJZ0A3KAKB8759y4Hcfd40d5JCwcky7GFG5zCauB vCKfPTtIxF2IW2ncqS4k220ikEx9e9o= X-Google-Smtp-Source: AMrXdXsY8LEvyZQR6oxAA9fjTrWKYEuTodFSVjB2DHBN0suWBigssqmyj0d1Y0tw44Rtk8L47jiHhQ== X-Received: by 2002:a17:906:bc44:b0:870:95b6:94a4 with SMTP id s4-20020a170906bc4400b0087095b694a4mr2595244ejv.48.1673852698028; Sun, 15 Jan 2023 23:04:58 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 3/8] x86/iommu: snoop control is allowed only by Intel VT-d Date: Mon, 16 Jan 2023 09:04:26 +0200 Message-Id: <20230116070431.905594-4-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852728129100005 Content-Type: text/plain; charset="utf-8" The AMD-Vi driver forces coherent accesses by hardwiring the FC bit to 1. Therefore, given that iommu_snoop is used only when the iommu is enabled, when Xen is configured with only the AMD iommu enabled, iommu_snoop can be reduced to a #define to true. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - new patch This patch depends on Jan's patch "x86/shadow: sanitize iommu_snoop usa= ge" to ensure that iommu_snoop is used only when the iommu is enabled xen/include/xen/iommu.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 4f22fc1bed..626731941b 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -74,7 +74,12 @@ extern enum __packed iommu_intremap { iommu_intremap_restricted, iommu_intremap_full, } iommu_intremap; -extern bool iommu_igfx, iommu_qinval, iommu_snoop; +extern bool iommu_igfx, iommu_qinval; +#ifdef CONFIG_INTEL_IOMMU +extern bool iommu_snoop; +#else +# define iommu_snoop true +#endif /* CONFIG_INTEL_IOMMU */ #else # define iommu_intremap false # define iommu_snoop false --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852731; cv=none; d=zohomail.com; s=zohoarc; b=K4v1Y2t4+41oyRQ673q4ERbgmGziOJ7n6Q68M2L91aRToLMfHY6g85nQN1jy4t/DMAGgE2zLCFx0kKIJN7gZSaEl/dbr4rg7FGJ+9tmDRJTHK1qN3Qf4JN3hF9M0LiAwaTBqo4Gm/stcSsaOYbd4oZyU3Dee0iK3XTSEyGnrWeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852731; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PpFKQyBz/d1EHnJYrbWB9uWY4J6FRm55N2ci72k9mak=; b=QKvc3iiJbcZhaMSf6thmWlQ+EFSm8hDxZdr0FxW+QBZ1HKoOQYy7j0siZB6Qz5tW8DRkvpDq9a9x1I/ZM6o0MibXW5VKPpkFi1MCEJCNpzM903NbFqgdm+QQESWubdiNF95DDOrt7BeIeX8ZBTvVBtnLI0nMrQr5r7sR5+f6bYY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1673852731047756.222490725018; Sun, 15 Jan 2023 23:05:31 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478338.741484 (Exim 4.92) (envelope-from ) id 1pHJYF-0007wz-91; Mon, 16 Jan 2023 07:05:03 +0000 Received: by outflank-mailman (output) from mailman id 478338.741484; Mon, 16 Jan 2023 07:05:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYF-0007wq-5v; Mon, 16 Jan 2023 07:05:03 +0000 Received: by outflank-mailman (input) for mailman id 478338; Mon, 16 Jan 2023 07:05:02 +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 1pHJYD-00077f-Vk for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:05:02 +0000 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [2a00:1450:4864:20::52c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 17fe312e-956c-11ed-91b6-6bf2151ebd3b; Mon, 16 Jan 2023 08:05:01 +0100 (CET) Received: by mail-ed1-x52c.google.com with SMTP id v30so39457275edb.9 for ; Sun, 15 Jan 2023 23:05:01 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:05:00 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 17fe312e-956c-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PpFKQyBz/d1EHnJYrbWB9uWY4J6FRm55N2ci72k9mak=; b=fstejPwJ4VDhCtYQDIAR7deIFG0CNd1qnz8sEUjV7iOuZNi9W+tIlxax5FWBDgQchi vl4Kncwjg+M40qUwzCErbWQcWY05Blp5f5b6wwuLPKzstAUfIEihspP86vQz0n05GEWC HSwxPkZwfOzTewVGX6qlB8adj6V3IRPesaTqtqM65B2efVWY1nu59l8Tbq3fVaG6pWhr G36ReBaRw25wXJ5/KGNQS9zmjFo8peHj6YBLHWdpY3zFHJfnX+h4WXoZd80jiyiWmE17 zreqbFNUT5Tq//YPa8x8uDHpN2EN3ui7tUdoL3VwAikkoLJ98U04zJXmTY0vRN+1rLkU NGcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PpFKQyBz/d1EHnJYrbWB9uWY4J6FRm55N2ci72k9mak=; b=oSJfZJ6vT0FHf3wzf+9MJM2J8MzncoXXPiv5N6FBlzwF15QJ1c11IHiUjgzdyUcb3/ ppCyysmfSo+9L6lCXwAIJHHpz8M074A6KTloOifsomayxTFWqm7FXbe7HBpzHjYI449S yucjDBONT3jlotKVsxqDRt0w7dxv2Rztv0/DTqr8WbEtS4SfQVKtjdqyU/BTlxJW8+bm 685z8Jz2u/WyZh6TKhxSUrbmwaa3p3zAyVg4NdUmZkxfBvCDVrrQ1rsWIpjSAJcW3YSe iqfLwLSTHFJN/x8vi6BuCaTqqCcYYrM+hUIatfNWQsNdrOcx5y99cNP5RaMsXythjGOQ GMuw== X-Gm-Message-State: AFqh2kpyktgq5fepoC71nP0yhbLndfjLS3sherXvZ8Erkdw1OnKWt87H dl/wgs1Z6kV9pBRcUHZlRr8utDb1JyU= X-Google-Smtp-Source: AMrXdXuf/XxEfoHGwGw1ENaSPe9IGLDSq5yqMvSGhWEq+9x088+3yFDlog7T3dGMjfvZh4IoOt02Yw== X-Received: by 2002:aa7:cb94:0:b0:496:6a20:6b61 with SMTP id r20-20020aa7cb94000000b004966a206b61mr29625347edt.22.1673852700440; Sun, 15 Jan 2023 23:05:00 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , George Dunlap , Julien Grall , Stefano Stabellini Subject: [PATCH v3 4/8] x86/acpi: separate AMD-Vi and VT-d specific functions Date: Mon, 16 Jan 2023 09:04:27 +0200 Message-Id: <20230116070431.905594-5-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852731866100001 Content-Type: text/plain; charset="utf-8" The functions acpi_dmar_init() and acpi_dmar_zap/reinstate() are VT-d specific while the function acpi_ivrs_init() is AMD-Vi specific. To eliminate dead code, they need to be guarded under CONFIG_INTEL_IOMMU and CONFIG_AMD_IOMMU, respectively. Instead of adding #ifdef guards around the function calls, implement them as empty static inline functions. Take the opportunity to move the declaration of acpi_dmar_init from the x86 arch-specific header to the common header, since Intel VT-d has been also used on IA-64 platforms. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - move the declarations of Intel VT-d functions to the common header, because Intel VT-d has been also used on IA-64 platforms, and update the commit log accordingly xen/arch/x86/include/asm/acpi.h | 6 +++++- xen/include/xen/acpi.h | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/acpi.h b/xen/arch/x86/include/asm/acp= i.h index c453450a74..6ce79ce465 100644 --- a/xen/arch/x86/include/asm/acpi.h +++ b/xen/arch/x86/include/asm/acpi.h @@ -140,8 +140,12 @@ extern u32 pmtmr_ioport; extern unsigned int pmtmr_width; =20 void acpi_iommu_init(void); -int acpi_dmar_init(void); + +#ifdef CONFIG_AMD_IOMMU int acpi_ivrs_init(void); +#else +static inline int acpi_ivrs_init(void) { return -ENODEV; } +#endif =20 void acpi_mmcfg_init(void); =20 diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h index 1b9c75e68f..352f27f6a7 100644 --- a/xen/include/xen/acpi.h +++ b/xen/include/xen/acpi.h @@ -206,8 +206,15 @@ static inline int acpi_get_pxm(acpi_handle handle) =20 void acpi_reboot(void); =20 +#ifdef CONFIG_INTEL_IOMMU +int acpi_dmar_init(void); void acpi_dmar_zap(void); void acpi_dmar_reinstate(void); +#else +static inline int acpi_dmar_init(void) { return -ENODEV; } +static inline void acpi_dmar_zap(void) {} +static inline void acpi_dmar_reinstate(void) {} +#endif =20 #endif /* __ASSEMBLY__ */ =20 --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852730; cv=none; d=zohomail.com; s=zohoarc; b=nys3TzY3isZfE0Xsg0PS/S0VFFFCT40GDOueNlzo1YcbeSY60eZGLaAlli8kmqOCqubuJB0EJaxtyUwbDADURIMjQbongl/qIn9+cq1QRYRybJCeAKeZGeitC2w8fYR6Bp8XNYrxZH6pujnCLFfAjYjn+6qRXElfFRNKqm7BRmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852730; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7dy2BgTNKVXOkcEoPRHI+Qc+RIk111AGiSJu7FgSGxM=; b=WqDs5hEc2NGD0cOEqp57pFebc+2w+oRBBawUzmJgEbpwQYR+euNS54fPDogjA+5ipFavdLCK0GlsdIWwvM+nv9MISZWJw/DqT6K5NRSi6dFcI+UBmtZxUDYfi+KsjVmImMsmJ6aUajkQB5If38xELf2dYk4+71H/foUp8vygJ3c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 167385273003643.946599751047074; Sun, 15 Jan 2023 23:05:30 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478339.741494 (Exim 4.92) (envelope-from ) id 1pHJYI-0008IF-Iq; Mon, 16 Jan 2023 07:05:06 +0000 Received: by outflank-mailman (output) from mailman id 478339.741494; Mon, 16 Jan 2023 07:05:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYI-0008I6-EW; Mon, 16 Jan 2023 07:05:06 +0000 Received: by outflank-mailman (input) for mailman id 478339; Mon, 16 Jan 2023 07:05:05 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYH-0006sD-G2 for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:05:05 +0000 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [2a00:1450:4864:20::52c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 19843c94-956c-11ed-b8d0-410ff93cb8f0; Mon, 16 Jan 2023 08:05:03 +0100 (CET) Received: by mail-ed1-x52c.google.com with SMTP id x10so36565834edd.10 for ; Sun, 15 Jan 2023 23:05:03 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:05:02 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 19843c94-956c-11ed-b8d0-410ff93cb8f0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7dy2BgTNKVXOkcEoPRHI+Qc+RIk111AGiSJu7FgSGxM=; b=JavYjN879rVFqWYTMfx5K7T7u+VhhAZtIXkySIIz3B+qj6EJzd+Nzv34MpCwey9i5M ZZ7w3kI9WnYByK1t1wC3JITstU/8mIyys9/jlHrXaUscW155uUIIQpSSc7eRcd3rnMBi Vu+YyQhjpdDMqB1OwDPuS/ycjiBxIoHu1aqoNPD4W7GjJLGNOzhRwy/54TStKoK6BTMb PLD9fAFgyU8x/jf6YUUPhx6xRw2wo0m/TUFMZNKsx9oHQsXdNUr/H45H2XnegiuzM4jB 2cg74rgunfLVgnjCMAyAHW67rYG3GGBvHWxh50h8xs5xnSI8cMTKoSLKFBxSWP2T37Pg AWXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7dy2BgTNKVXOkcEoPRHI+Qc+RIk111AGiSJu7FgSGxM=; b=i/AyL56Wt+aacBTWWt6s+MVQVJo7j8EOK6MQ4r4cKmVIyAXw1F0TkpCjzc3U/fzha9 vqgBkYC6lhyFT2HZgO9ypcJf9TZMcUl30kXTrobBzGsixofMEIyvO5u/1l3OzMuiTUHU FuF9PKLE3smDh6JpJCVv6Z6c/nWYcbPY+yd08zNsV68FMlopv0IAU5yvuEjUmreG0VoZ 1kVwnM5XRjmKCUCvumuBCBVuirnkADbmyZ9GiDo8YcNuOvxCiH7AY9zJAZ2Mrb6QKjzs vXVThq6ut6MD2T0wlBddGrmY8siYqKZ/oyY0J4C1LLgs2sPAk9oAMT2dkg+JmCOtoNL7 ZfwQ== X-Gm-Message-State: AFqh2kqFHhZv8xnHpebKtNSJGWV0DUlXvAfSWMGrm1f/bFWmOG5uOIDo C1Rmr/dc1U03bHJdFLOdK4h5rk/V2iY= X-Google-Smtp-Source: AMrXdXsD39gY8491njMzdZaxfuDf6M6qULTZ1eY93Aw31t7bwSMmoksTT7XyzW2FArG1yunOZoa3nQ== X-Received: by 2002:a05:6402:b55:b0:49d:d8ec:cbd3 with SMTP id bx21-20020a0564020b5500b0049dd8eccbd3mr6984361edb.16.1673852702961; Sun, 15 Jan 2023 23:05:02 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Kevin Tian , Jan Beulich , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 5/8] x86/iommu: make code addressing CVE-2011-1898 no VT-d specific Date: Mon, 16 Jan 2023 09:04:28 +0200 Message-Id: <20230116070431.905594-6-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852731870100003 Content-Type: text/plain; charset="utf-8" The variable untrusted_msi indicates whether the system is vulnerable to CVE-2011-1898 due to the absence of interrupt remapping support. AMD iommus with interrupt remapping disabled are also exposed. Therefore move the definition of the variable to the common x86 iommu code. Also, since the current implementation assumes that only PV guests are prone to this attack, take the opportunity to define untrusted_msi only when PV is enabled. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - change untrusted_msi from being VT-d specific to PV specific and update commit log accordingly - remove unnecessary #ifdef guard from its declaration xen/drivers/passthrough/vtd/iommu.c | 3 --- xen/drivers/passthrough/x86/iommu.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/= vtd/iommu.c index 62e143125d..dae2426cb9 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -54,9 +54,6 @@ ? dom_iommu(d)->arch.vtd.pgd_maddr \ : (pdev)->arch.vtd.pgd_maddr) =20 -/* Possible unfiltered LAPIC/MSI messages from untrusted sources? */ -bool __read_mostly untrusted_msi; - bool __read_mostly iommu_igfx =3D true; bool __read_mostly iommu_qinval =3D true; #ifndef iommu_snoop diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/= x86/iommu.c index f671b0f2bb..c5021ea023 100644 --- a/xen/drivers/passthrough/x86/iommu.c +++ b/xen/drivers/passthrough/x86/iommu.c @@ -36,6 +36,11 @@ bool __initdata iommu_superpages =3D true; =20 enum iommu_intremap __read_mostly iommu_intremap =3D iommu_intremap_full; =20 +#ifdef CONFIG_PV +/* Possible unfiltered LAPIC/MSI messages from untrusted sources? */ +bool __read_mostly untrusted_msi; +#endif + #ifndef iommu_intpost /* * In the current implementation of VT-d posted interrupts, in some extreme --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852729; cv=none; d=zohomail.com; s=zohoarc; b=cYUtqvvbV+fpzSwq4QbdCH5KiC4Sgwx5Cp1aHOSAE+Sb/QnTilLbbP/xWm4OR0Q8bUR49TThxMjz/p4qzcylbtxf0SzVJ39LIopBKDKkwYLWonq2QcvApFrNTgPXgGxSTEvRcf7MzzP4AzCJTccA3V9bvZYL7j/5zAszBI61oqY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852729; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5xQjSd77lIkGjcOqGsMIhqf/ThCEh+wIVWJkvdxosCY=; b=bmVgtb7k+w5O4lLQsIUGz8vRBj6nXFCDutXP2z0Tft3Cx4lzpbEE9T/5fNIZXYSyjhlP3FZGn6AH6GjFezgtiPR1B72WmUNqpdrvFmbs83+GCaSv012VFYoB9HT3gAOBJcA6iXUakyOudCCfGX9+GyAq7asShFOihl1I+qMhCGU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1673852729225237.17552497999577; Sun, 15 Jan 2023 23:05:29 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478340.741504 (Exim 4.92) (envelope-from ) id 1pHJYL-0000EA-Sy; Mon, 16 Jan 2023 07:05:09 +0000 Received: by outflank-mailman (output) from mailman id 478340.741504; Mon, 16 Jan 2023 07:05:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYL-0000Ds-PZ; Mon, 16 Jan 2023 07:05:09 +0000 Received: by outflank-mailman (input) for mailman id 478340; Mon, 16 Jan 2023 07:05:08 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYK-0006sD-40 for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:05:08 +0000 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [2a00:1450:4864:20::52c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 1b087e99-956c-11ed-b8d0-410ff93cb8f0; Mon, 16 Jan 2023 08:05:06 +0100 (CET) Received: by mail-ed1-x52c.google.com with SMTP id x10so36565942edd.10 for ; Sun, 15 Jan 2023 23:05:06 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:05:05 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1b087e99-956c-11ed-b8d0-410ff93cb8f0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5xQjSd77lIkGjcOqGsMIhqf/ThCEh+wIVWJkvdxosCY=; b=GZGC3XrcSwMB5M67O/4zd6fZu5sD6S/kwnQuEK7AavL3QHbLS845CkzH0/sfI63DmA tqMMt88aIK6SshHlWB90WGuvZeo0NOSXYn7KgqcDCuEJ7yWgCbX4Rz9VBG8n4LdeCCFw S0vOuFXJIX0cXvNDL2spIC3H/bZiz/3+0R8ANCLAgJPV1334l/ibYXECVnwmEhXQ4nMQ 7DJQLCcofqHgGKlbGKQgG1n3IF2tHF2m66eFgfgWgU50TeoVd2isuRuiQPjxY2VpZbIx A0HOwMo4PIrFyN9MSJb/YbDiIIFSFHPgQ/RFx+9BWHJT7tC64SHxbvTqUlsL5Uj0Lntc C41g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5xQjSd77lIkGjcOqGsMIhqf/ThCEh+wIVWJkvdxosCY=; b=y3hEE0A/QnpZ2R75DaDAK5Ob5Dvft85vayHVkjIQ53lHrWr737OYzFdXi7BdB9JfH7 ExrzkpDcLXdefVf3tQZMKgTd+plJE8mZFek5j4cNe2wiC1dOlJrxpe+DpP4JhB0jY3YS rQw40tBvDDOSKjTOL6k1dj7Pn9Ekz15J0r6wNsIn3uPIUyIR6FeeviB6mY5K+R4vpZdH m9WEgZKcJ0rorTnzr68Yw5xG3eUVHwv8L+H/4ZOpK6Cnu9hOCDT7s/kqulgC6wBlUdSv BPNNVU+GRJXfmw4cc6ghmONb7LsIwahSTmGoCQlAOWFG12wsSHW4mfpNzB1yexvnnjaf gc+A== X-Gm-Message-State: AFqh2kqIRVhj8T4xa2nrT/Eo+Ul3DOqsDAHXmUDFJ6P6/goBssM/ZXlo PtWYcZfChgeGs0D+BXQ+XarcMRZg+40= X-Google-Smtp-Source: AMrXdXuoO4AAYEqAhjXlKKR6+QSqoRZBbFqFzEdZfUMVTjxLLbRArYeoLMqNQE9/nB+xMfvoxv81jw== X-Received: by 2002:a05:6402:201:b0:497:4311:59c7 with SMTP id t1-20020a056402020100b00497431159c7mr8700190edv.18.1673852705406; Sun, 15 Jan 2023 23:05:05 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jun Nakajima , Kevin Tian , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Paul Durrant Subject: [PATCH v3 6/8] x86/iommu: call pi_update_irte through an hvm_function callback Date: Mon, 16 Jan 2023 09:04:29 +0200 Message-Id: <20230116070431.905594-7-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852729770100009 Content-Type: text/plain; charset="utf-8" Posted interrupt support in Xen is currently implemented only for the Intel platforms. Instead of calling directly pi_update_irte() from the common hvm code, add a pi_update_irte callback to the hvm_function_table. Then, create a wrapper function hvm_pi_update_irte() to be used by the common hvm code. In the pi_update_irte callback prototype, pass the vcpu as first parameter instead of the posted-interrupt descriptor that is platform specific, and remove the const qualifier from the parameter gvec since it is not needed and because it does not compile with the alternative code patching in use. Since the posted interrupt descriptor is Intel VT-x specific while msi_msg_write_remap_rte is iommu specific, open code pi_update_irte() inside vmx_pi_update_irte() but replace msi_msg_write_remap_rte() with generic iommu_update_ire_from_msi(). That way vmx_pi_update_irte() is not bound to Intel VT-d anymore. Remove the now unused pi_update_irte() implementation. No functional change intended. Signed-off-by: Xenia Ragiadakou --- Changes in v3: - open code pi_update_irte() in vmx_pi_update_irte() but instead of using the VT-d specific function msi_msg_write_remap_rte() use the generic iommu_update_ire_from_msi() - delete pi_update_irte() from vtd/intremap.c - move the initialization of vmx pi_update_irte stub to start_vmx() and perform it only if iommu_intpost is enabled. - move pi_update_irte right after handle_eoi xen/arch/x86/hvm/vmx/vmx.c | 41 ++++++++++++++++++++++++++ xen/arch/x86/include/asm/hvm/hvm.h | 10 +++++++ xen/arch/x86/include/asm/iommu.h | 3 -- xen/drivers/passthrough/vtd/intremap.c | 36 ---------------------- xen/drivers/passthrough/x86/hvm.c | 5 ++-- 5 files changed, 53 insertions(+), 42 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 15a07933ee..a5355dbac2 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -396,6 +396,43 @@ void vmx_pi_hooks_deassign(struct domain *d) domain_unpause(d); } =20 +/* + * This function is used to update the IRTE for posted-interrupt + * when guest changes MSI/MSI-X information. + */ +static int cf_check vmx_pi_update_irte(const struct vcpu *v, + const struct pirq *pirq, uint8_t gv= ec) +{ + const struct pi_desc *pi_desc =3D v ? &v->arch.hvm.vmx.pi_desc : NULL; + struct irq_desc *desc; + struct msi_desc *msi_desc; + int rc; + + desc =3D pirq_spin_lock_irq_desc(pirq, NULL); + if ( !desc ) + return -EINVAL; + + msi_desc =3D desc->msi_desc; + if ( !msi_desc ) + { + rc =3D -ENODEV; + goto unlock_out; + } + msi_desc->pi_desc =3D pi_desc; + msi_desc->gvec =3D gvec; + + spin_unlock_irq(&desc->lock); + + ASSERT(pcidevs_locked()); + + return iommu_update_ire_from_msi(msi_desc, &msi_desc->msg); + + unlock_out: + spin_unlock_irq(&desc->lock); + + return rc; +} + static const struct lbr_info { u32 base, count; } p4_lbr[] =3D { @@ -2969,8 +3006,12 @@ const struct hvm_function_table * __init start_vmx(v= oid) { alloc_direct_apic_vector(&posted_intr_vector, pi_notification_inte= rrupt); if ( iommu_intpost ) + { alloc_direct_apic_vector(&pi_wakeup_vector, pi_wakeup_interrup= t); =20 + vmx_function_table.pi_update_irte =3D vmx_pi_update_irte; + } + vmx_function_table.deliver_posted_intr =3D vmx_deliver_posted_intr; vmx_function_table.sync_pir_to_irr =3D vmx_sync_pir_to_irr; vmx_function_table.test_pir =3D vmx_test_pir; diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/= hvm/hvm.h index 93254651f2..b1990a047c 100644 --- a/xen/arch/x86/include/asm/hvm/hvm.h +++ b/xen/arch/x86/include/asm/hvm/hvm.h @@ -28,6 +28,8 @@ #include #include =20 +struct pirq; /* needed by pi_update_irte */ + #ifdef CONFIG_HVM_FEP /* Permit use of the Forced Emulation Prefix in HVM guests */ extern bool_t opt_hvm_fep; @@ -213,6 +215,8 @@ struct hvm_function_table { void (*sync_pir_to_irr)(struct vcpu *v); bool (*test_pir)(const struct vcpu *v, uint8_t vector); void (*handle_eoi)(uint8_t vector, int isr); + int (*pi_update_irte)(const struct vcpu *v, const struct pirq *pirq, + uint8_t gvec); =20 /*Walk nested p2m */ int (*nhvm_hap_walk_L1_p2m)(struct vcpu *v, paddr_t L2_gpa, @@ -774,6 +778,12 @@ static inline void hvm_set_nonreg_state(struct vcpu *v, alternative_vcall(hvm_funcs.set_nonreg_state, v, nrs); } =20 +static inline int hvm_pi_update_irte(const struct vcpu *v, + const struct pirq *pirq, uint8_t gvec) +{ + return alternative_call(hvm_funcs.pi_update_irte, v, pirq, gvec); +} + #else /* CONFIG_HVM */ =20 #define hvm_enabled false diff --git a/xen/arch/x86/include/asm/iommu.h b/xen/arch/x86/include/asm/io= mmu.h index fc0afe35bf..4794e72cf1 100644 --- a/xen/arch/x86/include/asm/iommu.h +++ b/xen/arch/x86/include/asm/iommu.h @@ -129,9 +129,6 @@ void iommu_identity_map_teardown(struct domain *d); =20 extern bool untrusted_msi; =20 -int pi_update_irte(const struct pi_desc *pi_desc, const struct pirq *pirq, - const uint8_t gvec); - extern bool iommu_non_coherent, iommu_superpages; =20 static inline void iommu_sync_cache(const void *addr, unsigned int size) diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrou= gh/vtd/intremap.c index 1512e4866b..b39bc83282 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -866,39 +866,3 @@ void cf_check intel_iommu_disable_eim(void) for_each_drhd_unit ( drhd ) disable_qinval(drhd->iommu); } - -/* - * This function is used to update the IRTE for posted-interrupt - * when guest changes MSI/MSI-X information. - */ -int pi_update_irte(const struct pi_desc *pi_desc, const struct pirq *pirq, - const uint8_t gvec) -{ - struct irq_desc *desc; - struct msi_desc *msi_desc; - int rc; - - desc =3D pirq_spin_lock_irq_desc(pirq, NULL); - if ( !desc ) - return -EINVAL; - - msi_desc =3D desc->msi_desc; - if ( !msi_desc ) - { - rc =3D -ENODEV; - goto unlock_out; - } - msi_desc->pi_desc =3D pi_desc; - msi_desc->gvec =3D gvec; - - spin_unlock_irq(&desc->lock); - - ASSERT(pcidevs_locked()); - - return msi_msg_write_remap_rte(msi_desc, &msi_desc->msg); - - unlock_out: - spin_unlock_irq(&desc->lock); - - return rc; -} diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x8= 6/hvm.c index a16e0e5344..e720461a14 100644 --- a/xen/drivers/passthrough/x86/hvm.c +++ b/xen/drivers/passthrough/x86/hvm.c @@ -381,8 +381,7 @@ int pt_irq_create_bind( =20 /* Use interrupt posting if it is supported. */ if ( iommu_intpost ) - pi_update_irte(vcpu ? &vcpu->arch.hvm.vmx.pi_desc : NULL, - info, pirq_dpci->gmsi.gvec); + hvm_pi_update_irte(vcpu, info, pirq_dpci->gmsi.gvec); =20 if ( pt_irq_bind->u.msi.gflags & XEN_DOMCTL_VMSI_X86_UNMASKED ) { @@ -672,7 +671,7 @@ int pt_irq_destroy_bind( what =3D "bogus"; } else if ( pirq_dpci && pirq_dpci->gmsi.posted ) - pi_update_irte(NULL, pirq, 0); + hvm_pi_update_irte(NULL, pirq, 0); =20 if ( pirq_dpci && (pirq_dpci->flags & HVM_IRQ_DPCI_MAPPED) && list_empty(&pirq_dpci->digl_list) ) --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852730; cv=none; d=zohomail.com; s=zohoarc; b=U7cLR2YggHw0klZL3/ZTQMSqSXiyhamUe7qo4gtxqIqcwZbAFmEDsjji19Q+u8DuLgbqt2GQB42RR0dAVgCaUwXu60lk1vI59xhhMeHMcJcuThhDrsrSDY+T2T1+ZJM44X5He2XIqOzTghBhAces5dmU+twyQT+3cLan2hN1mFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852730; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FGOhxxftnqS09dviAWeYBv4kGOGjyoGhBUYO7YzYbYs=; b=iWKC9biABVJbZ3R4hmqBk4Z9l7+3QcvUISfBjo6s22eUpdtHn7/y4Md3DwRKksWCJkC/3u6/NptI7pApRSwDtSn1dv+y5gw95LJ9RYBy11hqF7EtPbp8IapXDhEWlQebiQvYaJ1V/q2mtHZrk0cBBMqG9oW6dK0djpL6Nyatb3g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1673852730773715.1300384324365; Sun, 15 Jan 2023 23:05:30 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478342.741514 (Exim 4.92) (envelope-from ) id 1pHJYN-0000ZO-8T; Mon, 16 Jan 2023 07:05:11 +0000 Received: by outflank-mailman (output) from mailman id 478342.741514; Mon, 16 Jan 2023 07:05:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYN-0000Yr-3r; Mon, 16 Jan 2023 07:05:11 +0000 Received: by outflank-mailman (input) for mailman id 478342; Mon, 16 Jan 2023 07:05:10 +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 1pHJYL-00077f-Sj for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:05:10 +0000 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [2a00:1450:4864:20::52d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1c6aa1c2-956c-11ed-91b6-6bf2151ebd3b; Mon, 16 Jan 2023 08:05:08 +0100 (CET) Received: by mail-ed1-x52d.google.com with SMTP id v13so5336401eda.11 for ; Sun, 15 Jan 2023 23:05:08 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:05:07 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1c6aa1c2-956c-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FGOhxxftnqS09dviAWeYBv4kGOGjyoGhBUYO7YzYbYs=; b=OZ6V5vdKz7FFRoISBZXF7APZzMyRs4Dekxlt/ZX8BMBYrEh9WNRKmjL+QRljNKO3YV IaT96mDVLeZW/4wHYy7Qx7XBIiEI4KM+5YpmCWLF12pEMxZnWVjQVH1uj0FO7OIh6KTF rj4L8ACmVVW3qs7SvlizAVUqOIdk4UrGpoNy8DpoesdH7WcU4mvpCOYSA4PXXQ9AuI3D anOIST4FrAyPAi2WGg1Xk7da7jc4tiYWrEnkQZTE7Grqzju18zj614RSq1/tbe0ymxw2 gvK3YlSxyoHoozQI1p3PNQIlmvTCswMYIpAdI4PFgWutfntmKHNBgzFcE9f6054bip0A IKXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FGOhxxftnqS09dviAWeYBv4kGOGjyoGhBUYO7YzYbYs=; b=47CVnAnDJ0ud8fpXuaJ9XIrnLTOhdta/EU2mJAqg8Wj52m4qjYKId3mny5Kkp+yoIS Sq9S6lQ8auooEhOA0f1hIWTeFQLGRI6kN0LSE+lBwm0AgVb4+nwj1D00CpxcE0C4JjU3 NcTOT71BvwriiRuv2fiPllnshyEhZMjve8KS/iTxrBTwdWCjS6Kb+0ZshmPcPXG+Px0K IWYJtNeaT7fydUmQmTgx/7wl9NnZ6JFDVoae6EYyJ7CcvyLYOUZuBknEpEOmjxTMgzv0 4fgCvK/e2N9FQNOS9Z5Bgx+ghDO20AOBMFBYd1gkhBVW3TDc51NHPvI0kiEWnSfTn+NP hRgQ== X-Gm-Message-State: AFqh2krxDxJdWwi/9eM/hzhU2oyKCZIjFBkLhInfgO3NIzvADJzAHtns jhQi34lfh3WozIWZ678NaBOKipKqbUA= X-Google-Smtp-Source: AMrXdXsvE+JsU2LZw6kyJBg/vfrH3k7HKGQmR4l10D1ovSVMoTnbGcwDyIItl91Muq+VqxxBPZzpmw== X-Received: by 2002:a05:6402:b02:b0:499:e564:a1c with SMTP id bm2-20020a0564020b0200b00499e5640a1cmr7513207edb.11.1673852707760; Sun, 15 Jan 2023 23:05:07 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Kevin Tian , Jan Beulich , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 7/8] x86/dpci: move hvm_dpci_isairq_eoi() to generic HVM code Date: Mon, 16 Jan 2023 09:04:30 +0200 Message-Id: <20230116070431.905594-8-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852731866100002 Content-Type: text/plain; charset="utf-8" The function hvm_dpci_isairq_eoi() has no dependencies on VT-d driver code and can be moved from xen/drivers/passthrough/vtd/x86/hvm.c to xen/drivers/passthrough/x86/hvm.c, along with the corresponding copyrights. Remove the now empty xen/drivers/passthrough/vtd/x86/hvm.c. Since the function is used only in this file, declare it static. No functional change intended. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- Changes in v3: - in _hvm_dpci_isairq_eoi(), make hvm_irq pointer to const - in hvm_dpci_isairq_eoi(), make dpci pointer to const, add a blank line after ASSERT(isairq < NR_ISAIRQS), add a blank line before write_unlock= () - fix typo in commit log, s/funcion/function/ - add Jan's Reviewed-by tag xen/drivers/passthrough/vtd/x86/Makefile | 1 - xen/drivers/passthrough/vtd/x86/hvm.c | 64 ------------------------ xen/drivers/passthrough/x86/hvm.c | 45 +++++++++++++++++ xen/include/xen/iommu.h | 1 - 4 files changed, 45 insertions(+), 66 deletions(-) delete mode 100644 xen/drivers/passthrough/vtd/x86/hvm.c diff --git a/xen/drivers/passthrough/vtd/x86/Makefile b/xen/drivers/passthr= ough/vtd/x86/Makefile index 4ef00a4c5b..fe20a0b019 100644 --- a/xen/drivers/passthrough/vtd/x86/Makefile +++ b/xen/drivers/passthrough/vtd/x86/Makefile @@ -1,3 +1,2 @@ obj-y +=3D ats.o -obj-$(CONFIG_HVM) +=3D hvm.o obj-y +=3D vtd.o diff --git a/xen/drivers/passthrough/vtd/x86/hvm.c b/xen/drivers/passthroug= h/vtd/x86/hvm.c deleted file mode 100644 index bc776cf7da..0000000000 --- a/xen/drivers/passthrough/vtd/x86/hvm.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2008, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License f= or - * more details. - * - * You should have received a copy of the GNU General Public License along= with - * this program; If not, see . - * - * Copyright (C) Allen Kay - * Copyright (C) Weidong Han - */ - -#include -#include -#include - -static int cf_check _hvm_dpci_isairq_eoi( - struct domain *d, struct hvm_pirq_dpci *pirq_dpci, void *arg) -{ - struct hvm_irq *hvm_irq =3D hvm_domain_irq(d); - unsigned int isairq =3D (long)arg; - const struct dev_intx_gsi_link *digl; - - list_for_each_entry ( digl, &pirq_dpci->digl_list, list ) - { - unsigned int link =3D hvm_pci_intx_link(digl->device, digl->intx); - - if ( hvm_irq->pci_link.route[link] =3D=3D isairq ) - { - hvm_pci_intx_deassert(d, digl->device, digl->intx); - if ( --pirq_dpci->pending =3D=3D 0 ) - pirq_guest_eoi(dpci_pirq(pirq_dpci)); - } - } - - return 0; -} - -void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq) -{ - struct hvm_irq_dpci *dpci =3D NULL; - - ASSERT(isairq < NR_ISAIRQS); - if ( !is_iommu_enabled(d) ) - return; - - write_lock(&d->event_lock); - - dpci =3D domain_get_irq_dpci(d); - - if ( dpci && test_bit(isairq, dpci->isairq_map) ) - { - /* Multiple mirq may be mapped to one isa irq */ - pt_pirq_iterate(d, _hvm_dpci_isairq_eoi, (void *)(long)isairq); - } - write_unlock(&d->event_lock); -} diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x8= 6/hvm.c index e720461a14..6bbd04bf3d 100644 --- a/xen/drivers/passthrough/x86/hvm.c +++ b/xen/drivers/passthrough/x86/hvm.c @@ -14,6 +14,7 @@ * this program; If not, see . * * Copyright (C) Allen Kay + * Copyright (C) Weidong Han * Copyright (C) Xiaohui Xin */ =20 @@ -924,6 +925,50 @@ static void hvm_gsi_eoi(struct domain *d, unsigned int= gsi) hvm_pirq_eoi(pirq); } =20 +static int cf_check _hvm_dpci_isairq_eoi( + struct domain *d, struct hvm_pirq_dpci *pirq_dpci, void *arg) +{ + const struct hvm_irq *hvm_irq =3D hvm_domain_irq(d); + unsigned int isairq =3D (long)arg; + const struct dev_intx_gsi_link *digl; + + list_for_each_entry ( digl, &pirq_dpci->digl_list, list ) + { + unsigned int link =3D hvm_pci_intx_link(digl->device, digl->intx); + + if ( hvm_irq->pci_link.route[link] =3D=3D isairq ) + { + hvm_pci_intx_deassert(d, digl->device, digl->intx); + if ( --pirq_dpci->pending =3D=3D 0 ) + pirq_guest_eoi(dpci_pirq(pirq_dpci)); + } + } + + return 0; +} + +static void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq) +{ + const struct hvm_irq_dpci *dpci =3D NULL; + + ASSERT(isairq < NR_ISAIRQS); + + if ( !is_iommu_enabled(d) ) + return; + + write_lock(&d->event_lock); + + dpci =3D domain_get_irq_dpci(d); + + if ( dpci && test_bit(isairq, dpci->isairq_map) ) + { + /* Multiple mirq may be mapped to one isa irq */ + pt_pirq_iterate(d, _hvm_dpci_isairq_eoi, (void *)(long)isairq); + } + + write_unlock(&d->event_lock); +} + void hvm_dpci_eoi(struct domain *d, unsigned int guest_gsi) { const struct hvm_irq_dpci *hvm_irq_dpci; diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 626731941b..405db59971 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -201,7 +201,6 @@ int hvm_do_IRQ_dpci(struct domain *, struct pirq *); int pt_irq_create_bind(struct domain *, const struct xen_domctl_bind_pt_ir= q *); int pt_irq_destroy_bind(struct domain *, const struct xen_domctl_bind_pt_i= rq *); =20 -void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq); struct hvm_irq_dpci *domain_get_irq_dpci(const struct domain *); void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci); =20 --=20 2.37.2 From nobody Sat May 4 15:03:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673852732; cv=none; d=zohomail.com; s=zohoarc; b=IjxSu+KhvoQn0yvOyi5IdG5i86xmb1hQFiTyTH07Z4o/v9xRivngvwefqsmWYzVRb2zGawsYn7SKL+PFB9kLDAhXxmXIoKvYZm8qIHOguodm4fO+xsYfh44QgiNcoYDnlvLcOWxcj5S/z1CXy6nP419QGoEw7e9d3+HtAauOLEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673852732; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iFtAIFWagelWwYtF1JcxxpIotxhdCnsB0YtD2VA9RRo=; b=fV2/mEXFOKOmMHjSoOi/tvKN97wS4lyU6Q+eno0Kt0jbXWfQlcWNecRGXnIp1b6oAEGK9sFAs1zl9TAN5jmy0n5dZQFBnk2pdA6N0JyRX9SyYpS0oi2eSUBGTm7sBLwnvjSDLtXsG599Y1HStAFzaTob5hKRi7dAInk/UpHnUbk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1673852732682998.4740265731981; Sun, 15 Jan 2023 23:05:32 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.478344.741525 (Exim 4.92) (envelope-from ) id 1pHJYP-00015Z-Me; Mon, 16 Jan 2023 07:05:13 +0000 Received: by outflank-mailman (output) from mailman id 478344.741525; Mon, 16 Jan 2023 07:05:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pHJYP-000155-HQ; Mon, 16 Jan 2023 07:05:13 +0000 Received: by outflank-mailman (input) for mailman id 478344; Mon, 16 Jan 2023 07:05:11 +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 1pHJYN-00077f-Nx for xen-devel@lists.xenproject.org; Mon, 16 Jan 2023 07:05:11 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 1dcc2f81-956c-11ed-91b6-6bf2151ebd3b; Mon, 16 Jan 2023 08:05:10 +0100 (CET) Received: by mail-ed1-x535.google.com with SMTP id w14so22136567edi.5 for ; Sun, 15 Jan 2023 23:05:10 -0800 (PST) Received: from uni.router.wind (adsl-67.109.242.224.tellas.gr. [109.242.224.67]) by smtp.googlemail.com with ESMTPSA id v15-20020a056402184f00b0046c5baa1f58sm10990824edy.97.2023.01.15.23.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 23:05:09 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 1dcc2f81-956c-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iFtAIFWagelWwYtF1JcxxpIotxhdCnsB0YtD2VA9RRo=; b=RT//jZDLvmix66SORRWgKClrn5/Rfa9SfWfdd01NqS2+KeNxcbUjgD3ynhoeDOC9FN 8cH7b0b0SImNbTWC/H4xsCDsBPMVp8kXunVuILoXAhGyRBUlYaGXpvsSOUeWOWGJWgLh v5VkLHYur8nQMtheKKXu5/v9FkBWpwDUshk6X12qLiGKgU+JICuO+8dSoYH/GySQQ5RL HsbRWRphVQcSKP7y3m6RbWVXV5sRa0/v54n6BVf/+i0UrZRHT5jYnfmO0sfZxnR1teaY w+BL6m1tHsR2Wnl6Jh+nRkR5OI2OpVJ6DRGi456WAbapgq/Vo+gcREbkB+bv3mCZIX6T JMwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iFtAIFWagelWwYtF1JcxxpIotxhdCnsB0YtD2VA9RRo=; b=E6ngn+JYNwQLOVfKCgPLIjqieR8j3XFFtQam0Zc4mwe6RP2zjUmHku6XEiiZq4oTFi XGX7V9xhONDYSaKn1Y5tivg13ZHj09V5DQRPCVFoJzzWX+epp/N/Ek1+XQKqRFM9LTMS 9EICp8nDSWqTbhVgiljXfZJMplmg9cMPmRWZQ9h8jkg046v9CFJV6X5mkFlkKq12d3sj ECJmNBICsEcYQsJV0NmUSyA8cUw6Tv4cu2yDW69fiFgyK9vfR90rKavtlU+gUh+rrMXl Iwm7JD8hy8F6hoByhFIYtQK4EGWelDsAkR7AHejQCFDnZSKbzn5Ov2Te1z/eu3gR9IR0 8dPQ== X-Gm-Message-State: AFqh2kogGiOtgvq8pym3I49bUEwfvUbBzSr+HDP61VE36wVEZ9d1IG9f EEzA20RYSb6Ab+P7toO1AtukoEGktW4= X-Google-Smtp-Source: AMrXdXt1cCRLvVR7hwmgT7ueBnmamvx7LubZMuPwhQ4tixWhuyn7PeJawKU0VJYORkt4+PIMEiOKkA== X-Received: by 2002:aa7:c946:0:b0:496:4d2f:1b4b with SMTP id h6-20020aa7c946000000b004964d2f1b4bmr9099920edt.7.1673852710095; Sun, 15 Jan 2023 23:05:10 -0800 (PST) From: Xenia Ragiadakou To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Paul Durrant , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 8/8] x86/iommu: make AMD-Vi and Intel VT-d support configurable Date: Mon, 16 Jan 2023 09:04:31 +0200 Message-Id: <20230116070431.905594-9-burzalodowa@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116070431.905594-1-burzalodowa@gmail.com> References: <20230116070431.905594-1-burzalodowa@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673852733770100007 Content-Type: text/plain; charset="utf-8" Provide the user with configuration control over the IOMMU support by making AMD_IOMMU and INTEL_IOMMU options user selectable and able to be turned off. However, there are cases where the IOMMU support is required, for instance = for a system with more than 254 CPUs. In order to prevent users from unknowingly disabling it and ending up with a broken hypervisor, make the support user selectable only if EXPERT is enabled. To preserve the current default configuration of an x86 system, both options depend on X86 and default to Y. Signed-off-by: Xenia Ragiadakou Acked-by: Jan Beulich --- Changes in v3: - add Jan's Acked-by tag xen/drivers/passthrough/Kconfig | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kcon= fig index 5c65567744..864fcf3b0c 100644 --- a/xen/drivers/passthrough/Kconfig +++ b/xen/drivers/passthrough/Kconfig @@ -38,10 +38,28 @@ config IPMMU_VMSA endif =20 config AMD_IOMMU - def_bool y if X86 + bool "AMD IOMMU" if EXPERT + depends on X86 + default y + help + Enables I/O virtualization on platforms that implement the + AMD I/O Virtualization Technology (IOMMU). + + If your system includes an IOMMU implementing AMD-Vi, say Y. + This is required if your system has more than 254 CPUs. + If in doubt, say Y. =20 config INTEL_IOMMU - def_bool y if X86 + bool "Intel VT-d" if EXPERT + depends on X86 + default y + help + Enables I/O virtualization on platforms that implement the + Intel Virtualization Technology for Directed I/O (Intel VT-d). + + If your system includes an IOMMU implementing Intel VT-d, say Y. + This is required if your system has more than 254 CPUs. + If in doubt, say Y. =20 config IOMMU_FORCE_PT_SHARE bool --=20 2.37.2