From nobody Wed Nov 27 19:39:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.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; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1697446176; cv=none; d=zohomail.com; s=zohoarc; b=GjRrMNqtCzbqi83lNofpke6+Cumb21yGoLRLmAmtNJ9uA67CkzO4WYoetSiWnloJwYL81O6SA9V3PxwyqDFEnGR3IFttW/mGf51XkHon2AIHVbGQEq62C0MKa3jaODnqM9YNFrAjk444tT9362YNiYaOvMF6HnAo4h8qy9wgViQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697446176; h=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=1Tg2ocFPLaaA80MQT2t8mpG1PlDHJR+1qhqzBtD/occ=; b=ELVffVGVXmQqaH7fQVb5q3UyVvKoWGDdHl/u0MClR6n7iUW3iovTWqvSN+aM2SX6XJDRMZ2cER+2aaoF+DLCjmDruG1IlT3we3UvS3i+LOF+d/w9JM3dPMjajdGn0hmoTRzNVavyHgjyCYVZSyMJHBzqTDC7pKp8+ozNGWnUDlg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697446176779861.0762895671246; Mon, 16 Oct 2023 01:49:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsJHl-0003BM-LC; Mon, 16 Oct 2023 04:49:13 -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 1qsJHZ-0002va-7D for qemu-devel@nongnu.org; Mon, 16 Oct 2023 04:49:02 -0400 Received: from mgamail.intel.com ([192.55.52.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsJHW-0001LN-9g for qemu-devel@nongnu.org; Mon, 16 Oct 2023 04:49:00 -0400 Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 01:48:45 -0700 Received: from duan-server-s2600bt.bj.intel.com ([10.240.192.147]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2023 01:48:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697446138; x=1728982138; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pRR4PipXHtJ9LbhLVu38kzyRCPbzt3WZeY50EyJlqBE=; b=eQ7zgheTgon8Sga36ylJQCPkiJd49rrKi48bO37obr3tAVLAW4ss+Kbk Yn/O68y73E90ncgWGugDSTYluuKbSmJv4FKfQ2BmkPKdV3FjzUokPuDDe uHhX+Lq2c0JRdJFXJ/FcYHWcyggWeW0/5n02G1Ct+kmR/dU6wdVKSeLi9 vOSnuy6FHmLJPwlSd1fjD8pAD0bDhzhFY72IGqqo6tZe3vp2Ceb3LD915 D99aH+zYIrZVfRjJmDMsaKaVMm+gXELNnnOE1ogOPHSb/owGwu6oqFo6o e3YKLTx+Lg2INLZMznd+603Gl5VLPmGatTZjYffZmam4e9CXbjT5gaYfQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="365737696" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="365737696" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10863"; a="749223022" X-IronPort-AV: E=Sophos;i="6.03,229,1694761200"; d="scan'208";a="749223022" From: Zhenzhong Duan To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, clg@redhat.com, jgg@nvidia.com, nicolinc@nvidia.com, joao.m.martins@oracle.com, eric.auger@redhat.com, peterx@redhat.com, jasowang@redhat.com, kevin.tian@intel.com, yi.l.liu@intel.com, yi.y.sun@intel.com, chao.p.peng@intel.com, Zhenzhong Duan Subject: [PATCH v2 20/27] vfio/container: Bypass EEH if iommufd backend Date: Mon, 16 Oct 2023 16:32:16 +0800 Message-Id: <20231016083223.1519410-21-zhenzhong.duan@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016083223.1519410-1-zhenzhong.duan@intel.com> References: <20231016083223.1519410-1-zhenzhong.duan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=192.55.52.151; envelope-from=zhenzhong.duan@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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 @intel.com) X-ZM-MESSAGEID: 1697446177245100003 Content-Type: text/plain; charset="utf-8" IBM EEH is only supported by legacy backend currently, bypass it for IOMMUFD backend. Signed-off-by: Zhenzhong Duan --- hw/vfio/container.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/vfio/container.c b/hw/vfio/container.c index c86accdb38..dd9534afab 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -1047,6 +1047,8 @@ static VFIOLegacyContainer *vfio_eeh_as_container(Add= ressSpace *as) { VFIOAddressSpace *space =3D vfio_get_address_space(as); VFIOContainer *bcontainer =3D NULL; + const VFIOIOMMUBackendOpsClass *ops =3D VFIO_IOMMU_BACKEND_OPS_CLASS( + object_class_by_name(TYPE_VFIO_IOMMU_BACKEND_LEGACY_= OPS)); =20 if (QLIST_EMPTY(&space->containers)) { /* No containers to act on */ @@ -1055,7 +1057,7 @@ static VFIOLegacyContainer *vfio_eeh_as_container(Add= ressSpace *as) =20 bcontainer =3D QLIST_FIRST(&space->containers); =20 - if (QLIST_NEXT(bcontainer, next)) { + if (QLIST_NEXT(bcontainer, next) || bcontainer->ops !=3D ops) { /* * We don't yet have logic to synchronize EEH state across * multiple containers --=20 2.34.1