From nobody Sun Oct 12 16:32:32 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=randomman.co.uk ARC-Seal: i=1; a=rsa-sha256; t=1749822161; cv=none; d=zohomail.com; s=zohoarc; b=nkMh+AGwhypHtAwx6kjSjQlE9h2thbL16DoR3RzAnnw0oY4/Qa6Ozo6av0Rw/9k9yQKGRRIJ/gWrXv6w5UgWB+7VoVuUrwRfbE0mflSNTer5XBRpLNAYVr8ANEZfHMzzO5V8kCr+KjLzFocPk/KLmRXyVEpMMGvC1oTVefSkwyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749822161; h=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=vgd/YRpkkNuHZnvBAYwXe918JhXbWCMlbXb89sQYDSg=; b=LYeNH4U5qNaV8q9FS4MIRn8dVgto6WO1p8hRb4JowuKMV+i6v7AuWrcj5XumqMaEgEq9lB5plhB5kQTsMN0tVLxIHoQK4w2yCJ1swZUfZo9p2OrqkeBTa5OX5+WPHi3lNIMH135PpAJiqanWk+7CZvROhG5IFAGY/ZtxEgsCH8g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1749822161441249.76417186840263; Fri, 13 Jun 2025 06:42:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uQ4fi-0001hK-LE; Fri, 13 Jun 2025 09:42:20 -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 1uQ4fL-0001bW-RB for qemu-devel@nongnu.org; Fri, 13 Jun 2025 09:42:03 -0400 Received: from smtp-out-60.livemail.co.uk ([213.171.216.60] helo=dkim.livemail.co.uk) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uQ4fJ-0006CX-Q2 for qemu-devel@nongnu.org; Fri, 13 Jun 2025 09:41:55 -0400 Received: from smtp.livemail.co.uk (unknown [10.44.132.81]) by dkim.livemail.co.uk (Postfix) with ESMTPS id A5CB5401DA; Fri, 13 Jun 2025 14:41:49 +0100 (BST) Received: from localhost.localdomain (unknown [145.40.191.116]) (Authenticated sender: roy.hopkins@randomman.co.uk) by smtp.livemail.co.uk (Postfix) with ESMTPSA id 1E325400DC; Fri, 13 Jun 2025 14:41:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=randomman.co.uk; s=livemail2; t=1749822109; bh=ab+3xdR1UyLAFwZmY/oF9kz1Xi2vy1PNKbZA5izqDbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZtL55F4o2c5l+u83HJ4LaUcKyRzWTMMJj6tAd4TWV2DuvrFtQoyveMRHUfFRMDbZS NgpbrCDixQf1aw5j7dt/7lfjamTlJoVj2LVcXDFA6v8aJR/LhUC4cQP/wpUlEnLYd+ v9AVx9T3dzX0R8lqTwKG8U19whEx0TZ1QUNStmh0= From: Roy Hopkins To: qemu-devel@nongnu.org Cc: Roy Hopkins , Paolo Bonzini , "Daniel P . Berrange" , Stefano Garzarella , Marcelo Tosatti , "Michael S . Tsirkin" , Cornelia Huck , Marcel Apfelbaum , Sergio Lopez , Eduardo Habkost , Alistair Francis , Peter Xu , David Hildenbrand , Igor Mammedov , Tom Lendacky , Michael Roth , Ani Sinha , Gerd Hoffman , Pankaj Gupta , Joerg Roedel Subject: [PATCH v8 01/16] meson: Add optional dependency on IGVM library Date: Fri, 13 Jun 2025 14:41:17 +0100 Message-ID: <18ca3c22494971f9bbd892592e97d2be8b31dd03.1749820158.git.roy.hopkins@randomman.co.uk> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=213.171.216.60; envelope-from=roy.hopkins@randomman.co.uk; helo=dkim.livemail.co.uk 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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 @randomman.co.uk) X-ZM-MESSAGEID: 1749822163438116600 The IGVM library allows Independent Guest Virtual Machine files to be parsed and processed. IGVM files are used to configure guest memory layout, initial processor state and other configuration pertaining to secure virtual machines. This adds the --enable-igvm configure option, enabled by default, which attempts to locate and link against the IGVM library via pkgconfig and sets CONFIG_IGVM if found. The library is added to the system_ss target in backends/meson.build where the IGVM parsing will be performed by the ConfidentialGuestSupport object. Signed-off-by: Roy Hopkins Acked-by: Michael S. Tsirkin Acked-by: Gerd Hoffman Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Stefano Garzarella --- backends/meson.build | 3 +++ meson.build | 8 ++++++++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 16 insertions(+) diff --git a/backends/meson.build b/backends/meson.build index 9b88d22685..ac0fac7845 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -34,6 +34,9 @@ if have_vhost_user_crypto endif system_ss.add(when: gio, if_true: files('dbus-vmstate.c')) system_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c')) +if igvm.found() + system_ss.add(igvm) +endif =20 system_ss.add(when: 'CONFIG_SPDM_SOCKET', if_true: files('spdm-socket.c')) =20 diff --git a/meson.build b/meson.build index 34729c2a3d..c4b620be42 100644 --- a/meson.build +++ b/meson.build @@ -1427,6 +1427,12 @@ if host_os =3D=3D 'linux' and (have_system or have_t= ools) method: 'pkg-config', required: get_option('libudev')) endif +igvm =3D not_found +if not get_option('igvm').auto() or have_system + igvm =3D dependency('igvm', version: '>=3D 0.3.0', + method: 'pkg-config', + required: get_option('igvm')) +endif =20 mpathlibs =3D [libudev] mpathpersist =3D not_found @@ -2604,6 +2610,7 @@ config_host_data.set('CONFIG_CFI', get_option('cfi')) config_host_data.set('CONFIG_SELINUX', selinux.found()) config_host_data.set('CONFIG_XEN_BACKEND', xen.found()) config_host_data.set('CONFIG_LIBDW', libdw.found()) +config_host_data.set('CONFIG_IGVM', igvm.found()) if xen.found() # protect from xen.version() having less than three components xen_version =3D xen.version().split('.') + ['0', '0'] @@ -5004,6 +5011,7 @@ summary_info +=3D {'seccomp support': seccomp} summary_info +=3D {'GlusterFS support': glusterfs} summary_info +=3D {'hv-balloon support': hv_balloon} summary_info +=3D {'TPM support': have_tpm} +summary_info +=3D {'IGVM support': igvm} summary_info +=3D {'libssh support': libssh} summary_info +=3D {'lzo support': lzo} summary_info +=3D {'snappy support': snappy} diff --git a/meson_options.txt b/meson_options.txt index a442be2995..1e429311a2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -117,6 +117,8 @@ option('tpm', type : 'feature', value : 'auto', description: 'TPM support') option('valgrind', type : 'feature', value: 'auto', description: 'valgrind debug support for coroutine stacks') +option('igvm', type: 'feature', value: 'auto', + description: 'Independent Guest Virtual Machine (IGVM) file 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 73e0770f42..7851540445 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -130,6 +130,7 @@ meson_options_help() { printf "%s\n" ' hv-balloon hv-balloon driver (requires Glib 2.68+ = GTree API)' printf "%s\n" ' hvf HVF acceleration support' printf "%s\n" ' iconv Font glyph conversion support' + printf "%s\n" ' igvm IGVM file support' printf "%s\n" ' jack JACK sound support' printf "%s\n" ' keyring Linux keyring support' printf "%s\n" ' kvm KVM acceleration support' @@ -346,6 +347,8 @@ _meson_option_parse() { --iasl=3D*) quote_sh "-Diasl=3D$2" ;; --enable-iconv) printf "%s" -Diconv=3Denabled ;; --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; + --enable-igvm) printf "%s" -Digvm=3Denabled ;; + --disable-igvm) printf "%s" -Digvm=3Ddisabled ;; --includedir=3D*) quote_sh "-Dincludedir=3D$2" ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; --=20 2.43.0