From nobody Fri Dec 19 13:24:54 2025 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=1689147764; cv=none; d=zohomail.com; s=zohoarc; b=d+VE+AcfH6mPJQOY7ncm5VGROU3xLKpyZpwJLD4xTHi5iCQLkR3dkNLZtHImHpvNYhcFi1+yIwsHf4vYFye8E2ylgLQ6HhXee9u7mkPm4vnXAhkIYSSvasxaNWKll/nqZpahoi2dEh8bdpHi1mzkYr8F+wp0qEOQ70coYTACFEU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689147764; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GuLvOUqNaRap5GFu/K6barfEkDixW12/ciQFwGoZv9g=; b=Qp968mg0CBgrXekUnlE7whzej4nAUSUeK9328/5Oa6rDanopqxtB+Ac9adRFlnoNr8UpBmDoxGbVR319SWKaYQ44z8p/ED+vYViC7OxBj6yf2GSBi7qsFNoGSkktKmv3yiKSQCTnBpy4A8k+CN3DVn0XUIOV0rXJlV/FD7xAUEI= 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 16891477641361016.5381156964937; Wed, 12 Jul 2023 00:42:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJUSV-0005wo-TF; Wed, 12 Jul 2023 03:40: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 1qJUSS-0005pG-7u for qemu-devel@nongnu.org; Wed, 12 Jul 2023 03:40:20 -0400 Received: from mga07.intel.com ([134.134.136.100]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJUSQ-0006qz-Aj for qemu-devel@nongnu.org; Wed, 12 Jul 2023 03:40:19 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 00:40:00 -0700 Received: from duan-server-s2600bt.bj.intel.com ([10.240.192.147]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 00:39:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689147618; x=1720683618; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FBtZ8ACzu/dBiE2/SA3mLrKx9OnUjSy4x2hRLEP3fIU=; b=Rx9yrR98J344/6OfJWBeDOMPqtRYAXbrO9Dwkv58Bz/b6ZWYoKElYCen hA5X4o0gzW1tFtlkKDY9n0ekM41sOyPPaet1eJxPSIfnLTRK6xDPbg8Cr 1Y7xKEGRBRnwsh7DAQPk7BH9CCSyfL9zS2F3QenJalDtshv7IV/k/sye/ mG9VcFCVn4GQYRg5/SQD7GqzJvq1avVADXyQP3AYGo6nFM5UEDyAy4twr r0tpcrqJ9ucDsOU9lnvnHewMf1+xf1nmcKdhC0VwmUG/NwRWl+voZbvGe owD4WRojy36ifzXQQwgHjreo5qvg4QzUOPMZAl1bFlqhqnfY1GpPfwXLi A==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="430953794" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="430953794" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="835024095" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="835024095" From: Zhenzhong Duan To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com, clg@redhat.com, jgg@nvidia.com, nicolinc@nvidia.com, eric.auger@redhat.com, peterx@redhat.com, jasonwang@redhat.com, kevin.tian@intel.com, yi.l.liu@intel.com, yi.y.sun@intel.com, chao.p.peng@intel.com, Zhenzhong Duan , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH v4 17/24] Add iommufd configure option Date: Wed, 12 Jul 2023 15:25:21 +0800 Message-Id: <20230712072528.275577-18-zhenzhong.duan@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230712072528.275577-1-zhenzhong.duan@intel.com> References: <20230712072528.275577-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=134.134.136.100; envelope-from=zhenzhong.duan@intel.com; helo=mga07.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1689147765403100006 Content-Type: text/plain; charset="utf-8" This adds "--enable-iommufd/--disable-iommufd" to enable or disable iommufd support, enabled by default. Signed-off-by: Zhenzhong Duan --- meson.build | 6 ++++++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 11 insertions(+) diff --git a/meson.build b/meson.build index 5fcdb37a71..941f02ae8d 100644 --- a/meson.build +++ b/meson.build @@ -574,6 +574,10 @@ have_tpm =3D get_option('tpm') \ .require(targetos !=3D 'windows', error_message: 'TPM emulation only ava= ilable on POSIX systems') \ .allowed() =20 +have_iommufd =3D get_option('iommufd') \ + .require(targetos =3D=3D 'linux', error_message: 'iommufd is supported o= nly on Linux') \ + .allowed() + # vhost have_vhost_user =3D get_option('vhost_user') \ .disable_auto_if(targetos !=3D 'linux') \ @@ -2129,6 +2133,7 @@ endif config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_TPM', have_tpm) config_host_data.set('CONFIG_TSAN', get_option('tsan')) +config_host_data.set('CONFIG_IOMMUFD', have_iommufd) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) config_host_data.set('CONFIG_VDE', vde.found()) config_host_data.set('CONFIG_VHOST_NET', have_vhost_net) @@ -4051,6 +4056,7 @@ summary_info +=3D {'vhost-user-crypto support': have_= vhost_user_crypto} summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} summary_info +=3D {'vhost-vdpa support': have_vhost_vdpa} summary_info +=3D {'build guest agent': have_ga} +summary_info +=3D {'iommufd support': have_iommufd} summary(summary_info, bool_yn: true, section: 'Configurable features') =20 # Compilation information diff --git a/meson_options.txt b/meson_options.txt index bbb5c7e886..43b79bdbf7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -105,6 +105,8 @@ option('dbus_display', type: 'feature', value: 'auto', description: '-display dbus support') option('tpm', type : 'feature', value : 'auto', description: 'TPM support') +option('iommufd', type : 'feature', value : 'auto', + description: 'iommufd support') =20 # Do not enable it by default even for Mingw32, because it doesn't # work on Wine. diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 7dd5709ef4..780b8f483a 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -113,6 +113,7 @@ meson_options_help() { printf "%s\n" ' hax HAX acceleration support' printf "%s\n" ' hvf HVF acceleration support' printf "%s\n" ' iconv Font glyph conversion support' + printf "%s\n" ' iommufd iommufd support' printf "%s\n" ' jack JACK sound support' printf "%s\n" ' keyring Linux keyring support' printf "%s\n" ' kvm KVM acceleration support' @@ -325,6 +326,8 @@ _meson_option_parse() { --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; --interp-prefix=3D*) quote_sh "-Dinterp_prefix=3D$2" ;; + --enable-iommufd) printf "%s" -Diommufd=3Denabled ;; + --disable-iommufd) printf "%s" -Diommufd=3Ddisabled ;; --enable-jack) printf "%s" -Djack=3Denabled ;; --disable-jack) printf "%s" -Djack=3Ddisabled ;; --enable-keyring) printf "%s" -Dkeyring=3Denabled ;; --=20 2.34.1