From nobody Sat Jun 27 09:32:39 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1782374225; cv=none; d=zohomail.com; s=zohoarc; b=MQKXsxdS52FK2K2IfDblbhestzS/YK/QeOd/IgD/NjuoynJzmBSvqoCUI01YHw0s1eD6WOpYkhNSMwe/i846flWMJbSLc3yUIG3yX49xR8EvyAT36NAmClS2Xb2DutiI5uQ+sE54ZUxffzrMr79vvJvPEXZ7FgLfp+aS8w3qku0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1782374225; 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=dfgp9oF8S6taRG4f0QnXsq+g8DDTcG+ZqKS7UcXhPUs=; b=Ocql5SAyCoZ2YP63qXAyNHgeAdeXxYtQW4P5KeEkvT+5pt4t/0R/H9kHRYPmu7O9uacGg4hWOxtPVgtfSNGyelmcbsRfXlGLJUWHh1++BiMUIMBlt+ta97Yfx2aqGQq5r3r2ME+O6K1+kYWY4Mj+QPTt7a3HEpaoM8GMVQ1AFs4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1782374225532490.4626814070731; Thu, 25 Jun 2026 00:57:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wcewr-0005dt-8x; Thu, 25 Jun 2026 03:56:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wcewp-0005dW-Aw for qemu-devel@nongnu.org; Thu, 25 Jun 2026 03:56:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wcewn-0003pZ-O6 for qemu-devel@nongnu.org; Thu, 25 Jun 2026 03:56:31 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-kDDog2ujO12AVRrSH8IDdg-1; Thu, 25 Jun 2026 03:56:27 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4924725bec9so11847235e9.1 for ; Thu, 25 Jun 2026 00:56:26 -0700 (PDT) Received: from lleonard-thinkpadx1carbongen13.rmtit.csb ([151.29.41.106]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46de7effe5bsm1899390f8f.5.2026.06.25.00.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 00:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782374188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dfgp9oF8S6taRG4f0QnXsq+g8DDTcG+ZqKS7UcXhPUs=; b=RdhFtikNi0qDVpBFpSIMkOq0Bx/WvvEwHSPtBu4+YlFmGrzEsOudYTE7ZjbimA/q47qn6m 9UK2RloH9v/eth8fKcZJEcnXljyRO9wp6tjYAP5zRfUXZIfYXiP/66PnxwWnrw58MCJq6Z V5egXdCvwM54aokV3FJD3VoU8Yrj8gI= X-MC-Unique: kDDog2ujO12AVRrSH8IDdg-1 X-Mimecast-MFC-AGG-ID: kDDog2ujO12AVRrSH8IDdg_1782374186 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1782374186; x=1782978986; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dfgp9oF8S6taRG4f0QnXsq+g8DDTcG+ZqKS7UcXhPUs=; b=Y/yV5NMIjyscitnK7LtOpOKGPO1URuDhOjgGnDhHT8vc+CAt7taElP0+JXtYABA8id rCJs9h4UgigeoAuv63Ps5lLFLYXeE/CyE9FlZ3u7w8/5SRy3aNTvFYFjjznvFf8gZyx5 p2lYsJbx3sv1wMiK8fY7SGmntcwqD1DhNPMtYCd6V8hXSRTXrIdl1eCM6IbLN5ioLi0E lWjaLStQW3JEJegSLpxKA1tpggrXLIO64Oy9wUk+xDj0a2RKKsVVc4rgZJWY3kcGJ2FY /jXT8yAHRW62drdOWinHxqznSrANgcO8vHQWCQoMJzis+w2aGtgIp5Mbcw9UMrJsZTOo 6I5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782374186; x=1782978986; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dfgp9oF8S6taRG4f0QnXsq+g8DDTcG+ZqKS7UcXhPUs=; b=CJvdmexC7CODNFdHYXVj6EUjWECylk8ncSz64810bISt5g55lqKHuMhmPlQ20+gyTQ QGz8JuOTkphmlmwTneOSnrvMZChbRdyx9JcGGrO5HFgowylycpCBNKzCK+TujEanYVBV ps+NlfPcRgULH2pD9e6fgw+aFs3G5M5dFbouQ/1EwMGdUPNC5rgcQhS4hDkHhyyRgcuA sOVbB6z2wNldkHSFJ1Sdjt762NPoQfRgCVkWyA2KZq7Pj26QEhLjWviyMxYGMPP7b0Hf RtWXEkZMNIwLzhDob1f7NzgEg+EpFbRO5+zVSN+qgOcK+p2dZUb1ZRC0deL2tfdBJoOe OMCw== X-Gm-Message-State: AOJu0YxD9iddBnncY+udzb9QsptbuifkAxPd2NlWGFlh9bCa14RSo0YG t/5XjmErx9ySTWN4koz9pqFyexY/75KL2CBX20lc9gOZ+wbp0y9LoNr3YXiE28drsyiAAaJLPBI JhKHnQiMj6AEZ2zhgrTOnMU0L7bYa/kPJX6ZHVCg0lxedbpGmZNC1yYaL/vIc8Bt28QOCT8fV9k brBMAg8lQRjdr4EelmFqvKZ13ZxKkAXLwCx4s1bL/W X-Gm-Gg: AfdE7clSG7tZg5Z08HjwLtJ6NG7l8Pj5JTP8CXm8RMqOo7hP2D0xKbgrPc3LTrU37vA 854F2Ww1/7MNTGOZl0Zn3wWVx90ssAFbh95oY/v9vpNNyHrNV1nWrnYV1rdjFk1H8f2pIE2crZf phVku3udtbIG3hjIxbSNOg79WQ8X8jR5U/RWJ/0Ti9SFio/9LoMXuRhdl8ueLC6vMQeEXRyHnYS AqJmUAPALynyH6fErVruOSRbcHCjdsJzE661hEMWl0a2zBMku9jre9fE0zYxp4BTLBLVvVpARPI 0NJ/LVM5fGWzKRfCoqXCNBZu3ZNc9ZUb1oi+S05XbOtEuuzBm6bH4ae2yZfvVmSFDHv0P3WTkak Jmpic6fG9ZOtUwm5M6bfawCsz4rLrzF3fdE9J2KzkD/DZilydIdXIbQKEUFhWVY6hiu4AR158fh lnZgDK X-Received: by 2002:a05:600d:6454:20b0:48a:5565:ec3d with SMTP id 5b1f17b1804b1-49266896338mr11829595e9.22.1782374185759; Thu, 25 Jun 2026 00:56:25 -0700 (PDT) X-Received: by 2002:a05:600d:6454:20b0:48a:5565:ec3d with SMTP id 5b1f17b1804b1-49266896338mr11829285e9.22.1782374185347; Thu, 25 Jun 2026 00:56:25 -0700 (PDT) From: Luigi Leonardi Date: Thu, 25 Jun 2026 09:56:19 +0200 Subject: [PATCH v5 1/2] igvm: use idiomatic meson conditional for IGVM build files MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260625-microvm_device_tree-v5-1-bcff11fd6d1c@redhat.com> References: <20260625-microvm_device_tree-v5-0-bcff11fd6d1c@redhat.com> In-Reply-To: <20260625-microvm_device_tree-v5-0-bcff11fd6d1c@redhat.com> To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Stefano Garzarella , Ani Sinha , Oliver Steffen , Paolo Bonzini , Luigi Leonardi X-Mailer: b4 0.14.3 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=leonardi@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1782374226112158500 Replace the explicit igvm.found() check with system_ss.add(when:, if_true:), matching the pattern used by all other optional backends. Suggested-by: Paolo Bonzini Signed-off-by: Luigi Leonardi --- backends/meson.build | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/backends/meson.build b/backends/meson.build index 60021f45d1..aabfaea5fd 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -34,11 +34,8 @@ 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) - system_ss.add(files('igvm-cfg.c'), igvm) - system_ss.add(files('igvm.c'), igvm) -endif + +system_ss.add(when: igvm, if_true: [files('igvm-cfg.c', 'igvm.c')]) =20 system_ss.add(when: 'CONFIG_SPDM_SOCKET', if_true: files('spdm-socket.c')) =20 --=20 2.54.0 From nobody Sat Jun 27 09:32:39 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1782374214; cv=none; d=zohomail.com; s=zohoarc; b=FBwhhqoi3PAjlMGYqGQkC/iLythxkJvue3R6hKkQK9aygl8IH7qooXqHA2czBHRhHwPEoNG+VrLJDpe7FtuJ8oevWNtECAePfY6pGJCuFSBObzL3G5c9Pal3RQd05jjexq4SxlcS6waM3PMjeeOQzxAJSVyULaPcukh3cFzL6kc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1782374214; 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=bixA52GU/9JmhiaZNEoKJbpEC2AbtCO8l58z9HHgeQc=; b=KinG7ahA1RvguAlKY+86W6/qIVmoKdWfpUJIpPA/JDsM8TSBFrVy4RV3K7hfOYi+mP6Mm2N63/wwEWwutvKtc0WkckpkaaD56Cvs01KOth99/0z9pdwvD2XULGI+VenTfxU3dm9de84X3HgZwoK8CBwyVwfXcXu1lI1rTm5kqB8= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1782374214139610.409590557354; Thu, 25 Jun 2026 00:56:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wcewt-0005ec-2H; Thu, 25 Jun 2026 03:56:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wcewq-0005du-Rq for qemu-devel@nongnu.org; Thu, 25 Jun 2026 03:56:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wcewo-0003pm-V9 for qemu-devel@nongnu.org; Thu, 25 Jun 2026 03:56:32 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-519-NN5bZSrFN9mqqNTX3UG_ig-1; Thu, 25 Jun 2026 03:56:28 -0400 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-46315372c3eso1464609f8f.0 for ; Thu, 25 Jun 2026 00:56:27 -0700 (PDT) Received: from lleonard-thinkpadx1carbongen13.rmtit.csb ([151.29.41.106]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46de7effe5bsm1899390f8f.5.2026.06.25.00.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 00:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782374189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bixA52GU/9JmhiaZNEoKJbpEC2AbtCO8l58z9HHgeQc=; b=SR+NMtlOqcz7SMDMPumv9j14uh7CJQqhDaACHZWRJUR8b4eH8KGEjc8P6qd/mh9mUDV/3R CdGadXnnQ7TvpaekKDEbaftnLm9wfp3f4zyAN/7goB19M8CS249K7VRDd1oLGgOrhS4+g6 0UBdbd4GT7LNAdwlRvPvUkZRc1pCK3w= X-MC-Unique: NN5bZSrFN9mqqNTX3UG_ig-1 X-Mimecast-MFC-AGG-ID: NN5bZSrFN9mqqNTX3UG_ig_1782374187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1782374187; x=1782978987; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bixA52GU/9JmhiaZNEoKJbpEC2AbtCO8l58z9HHgeQc=; b=cerPzBvLFYd/jLLe8O9fObNdRFkDSFuzV37f48buKAHTmODbiJkmVwFUmAtkhgNoDw V1iOQkqPiFUXRQrw2snR/pGFSGt1YeaicsITKAf7iHBZz5X6+RZ5yqCGUGsDt4WybV57 htUj5/amdhYvm7dixsp3lG+2h0QqMAg4N6CwkEjeSJhRfJeB4gXJwC0/Hr3vr8OYnXmW J7UlKMoYgvBPaqq4/tVabwc1Yrxae8olWvDV0IuXfBQukXqkzqWyjA19HyzWKA+uGMJa +GF2sNMu21onsOONSQ66X1vBGNfT9iRc6KLlvfP3UmTSQ60Pbioz8DiJz11gG8/UKAIJ eMpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782374187; x=1782978987; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bixA52GU/9JmhiaZNEoKJbpEC2AbtCO8l58z9HHgeQc=; b=RIadqBtcI83ekX/N1ywEhp0hpVgr7FP0D6FuiQDBtjs/s7tVySPRLaDFL5EJZsSkWp qj785BaLvtXIg8wphpOvjsMF5XffT22/JkIumqkJuf+ivqKrCpvZgNuKAKCKxCe5Ao9H ZsNN2fO2lPZ8HVKL8x0GpDhlH3Ji3RYio0S/vGosJHGIF5nxNc9oXiUXNG0qoDboQLE8 e+zDvHUMi6XJxa/PzxW7xe/n65Aypwe6N91EqURQOcXQJ6gssfv4vki0Tecope1AcXrz I4mPfjdsrD+9SWtbknazgssxsSkk3u3KAHz0cv58TiRPbkveN1y1Y9QUy2YcaM+U9b66 OieQ== X-Gm-Message-State: AOJu0YxuGUfBsRb10yHQPiFqJnGHElxBMIpmKBDKaYpALFzaKEeqYeR/ zOz598OuGMhC3rL3Ex1efoZ8PmeUnyIWOEYuQvt8r5bb06RcXZg4A/dMqUISpRoRubtVmrGZaKu zNH4xypaiLNvSebZHag1yOqZCxgOPjSg+84vPP8t/dK+xAZNtO3NbOJIq4tJ6xwZVgf742OQgt5 eAOG73XXPdmt/PMdw9+ZSwKw9jR8wMI8FVj/o/Jo6G X-Gm-Gg: AfdE7ckGng+ZxBQWQhIBDB8s1Oy8qZNri+lEJLxcZWgPGolSchh2ZAnw8VPPJznKpGy NGBDPXx39Wk18s6cBk2Nk2YxVGz63UquTtT5GtC3GORb5iMJMMxAY8b/HWsVI3/4EVIlV1oPooH FnRClxXQ0Np0r2eBVStSR1q+8foIK3/JQN4mvFRc7reCo9j4Av/ee8uf+KgykqtxCo7li/xarLF RVjbbAKHiRu2mhvALsCSulf6b+qgIFt6DyYisNdJ9r4zW/GbkIdBpka2WC+N9Ku9UiuaUs0X0zy Q5qgLhMh4hQ0iCgLL7WgmrzFjcCrhYFIUZ/94orUGq+7zgIkRMNuSq+p2j6xcSagt7ZHWo9S+oN NUPqtXAiyWKLAacC4vUN1q+AyKdZMaOatWjpJLfaCpb4BRxkzTMaIFq3VZngSHrioPMSew5oXyF eL+YuO X-Received: by 2002:a5d:584e:0:b0:46d:a16b:d1d with SMTP id ffacd0b85a97d-46dc1e82acemr1973692f8f.43.1782374186803; Thu, 25 Jun 2026 00:56:26 -0700 (PDT) X-Received: by 2002:a5d:584e:0:b0:46d:a16b:d1d with SMTP id ffacd0b85a97d-46dc1e82acemr1973620f8f.43.1782374186343; Thu, 25 Jun 2026 00:56:26 -0700 (PDT) From: Luigi Leonardi Date: Thu, 25 Jun 2026 09:56:20 +0200 Subject: [PATCH v5 2/2] igvm: add device tree parameter support MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260625-microvm_device_tree-v5-2-bcff11fd6d1c@redhat.com> References: <20260625-microvm_device_tree-v5-0-bcff11fd6d1c@redhat.com> In-Reply-To: <20260625-microvm_device_tree-v5-0-bcff11fd6d1c@redhat.com> To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Stefano Garzarella , Ani Sinha , Oliver Steffen , Paolo Bonzini , Luigi Leonardi X-Mailer: b4 0.14.3 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=leonardi@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1782374216713158500 Coconut SVSM, with the upcoming device tree support [1], will use the IGVM device tree parameter to discover virtio-mmio and ISA serial devices instead of relying on the fw_cfg interface, which is QEMU-specific. The device tree is packed before copying into the IGVM parameter area to reduce its size, since IGVM files can define tighter memory constraints for parameter areas. Packing is done in the generic IGVM backend rather than in per-architecture device tree setup code, so that each architecture does not need to handle it individually. [1] https://github.com/coconut-svsm/svsm/pull/1006 Signed-off-by: Luigi Leonardi --- Error handling on qigvm_find_param_entry will change once [2] is merged. I am already using the new approach here. [2] https://lore.kernel.org/qemu-devel/20260618-igvm_error-v2-1-2b03f4790e4= f@redhat.com/ --- backends/igvm.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++= ++++ backends/meson.build | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/backends/igvm.c b/backends/igvm.c index 3f4b97a5d4..53e96fae25 100644 --- a/backends/igvm.c +++ b/backends/igvm.c @@ -26,6 +26,10 @@ #include #include =20 +#ifdef CONFIG_FDT +#include +#endif + #ifndef IGVM_VHT_OPTIONAL_BIT #define IGVM_VHT_OPTIONAL_BIT (1U << 31) #endif @@ -119,6 +123,10 @@ static int qigvm_directive_snp_id_block(QIgvm *ctx, co= nst uint8_t *header_data, static int qigvm_initialization_guest_policy(QIgvm *ctx, const uint8_t *header_data, Error **errp); +#ifdef CONFIG_FDT +static int qigvm_directive_device_tree(QIgvm *ctx, const uint8_t *header_d= ata, + Error **errp); +#endif =20 struct QIGVMHandler { IgvmVariableHeaderType type; @@ -149,6 +157,10 @@ static struct QIGVMHandler handlers[] =3D { qigvm_initialization_guest_policy }, { IGVM_VHT_MADT, IGVM_HEADER_SECTION_DIRECTIVE, qigvm_directive_madt }, +#ifdef CONFIG_FDT + { IGVM_VHT_DEVICE_TREE, IGVM_HEADER_SECTION_DIRECTIVE, + qigvm_directive_device_tree }, +#endif }; =20 static int qigvm_handler(QIgvm *ctx, IgvmVariableHeaderType raw_type, @@ -780,6 +792,49 @@ static int qigvm_directive_snp_id_block(QIgvm *ctx, co= nst uint8_t *header_data, return 0; } =20 +#ifdef CONFIG_FDT +static int qigvm_directive_device_tree(QIgvm *ctx, const uint8_t *header_d= ata, + Error **errp) +{ + const IGVM_VHS_PARAMETER *param =3D (const IGVM_VHS_PARAMETER *)header= _data; + g_autofree void *fdt_packed =3D NULL; + QIgvmParameterData *param_entry; + uint32_t fdt_size; + + param_entry =3D qigvm_find_param_entry(ctx, param->parameter_area_inde= x); + if (param_entry =3D=3D NULL) { + error_setg(errp, "IGVM: parameter area index %u not found", + param->parameter_area_index); + return -1; + } + + if (ctx->machine_state->fdt =3D=3D NULL) { + error_setg(errp, "IGVM: device tree not available"); + return -1; + } + + fdt_size =3D fdt_totalsize(ctx->machine_state->fdt); + fdt_packed =3D g_memdup2(ctx->machine_state->fdt, fdt_size); + + if (fdt_pack(fdt_packed)) { + error_setg(errp, "IGVM: failed to pack device tree"); + return -1; + } + + fdt_size =3D fdt_totalsize(fdt_packed); + if (fdt_size > param_entry->size) { + error_setg(errp, + "IGVM: device tree size exceeds parameter area" + " defined in IGVM file"); + return -1; + } + + memcpy(param_entry->data, fdt_packed, fdt_size); + + return 0; +} +#endif + static int qigvm_initialization_guest_policy(QIgvm *ctx, const uint8_t *header_data, Error *= *errp) { diff --git a/backends/meson.build b/backends/meson.build index aabfaea5fd..8792c58c36 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -35,7 +35,7 @@ endif system_ss.add(when: gio, if_true: files('dbus-vmstate.c')) system_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c')) =20 -system_ss.add(when: igvm, if_true: [files('igvm-cfg.c', 'igvm.c')]) +system_ss.add(when: igvm, if_true: [files('igvm-cfg.c', 'igvm.c'), fdt]) =20 system_ss.add(when: 'CONFIG_SPDM_SOCKET', if_true: files('spdm-socket.c')) =20 --=20 2.54.0