From nobody Tue Nov 26 17:18:41 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1705915483; cv=none; d=zohomail.com; s=zohoarc; b=PKIyhhnVyaoCyQp4DJjumCzoqKgLc8x43m/q/r/kkQM9iCbX/3vj8i40g3WQvvlDvXw7QqCF4rVgcFOOM2fcQnHvC3d/y6PUzRzJp/Dur+GI+9FlDJUOp7a/ZlIXu1cpZLKc5aaxqEYRCS8O9geSB2QWO0nUOk+NxxiwH6BR3wU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705915483; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xoQgOwyOMuVlXIGva6sxyRxJF4LYpW9O+ytvHsdPXy8=; b=J3zPCWAoPqY0xeojtyP1rjABinnpWAdiZmSnsZFkcuuz7fAAw02cKs8bfL8P5a5eagoe85324EtOJBZtsDzaid+lBUkj+rXEW5nx+ynkSBhC12QpZ5Ob82/RZIZtVrKUFI6q4EK/SRdD86CekHfo7a/74IathxA/l9VQwqzbcl0= 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 170591548334539.479462088822515; Mon, 22 Jan 2024 01:24:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRqXU-0007D9-JX; Mon, 22 Jan 2024 04:24:20 -0500 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 1rRqXS-0007Cv-Pc for qemu-devel@nongnu.org; Mon, 22 Jan 2024 04:24:18 -0500 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 1rRqXR-000626-2E for qemu-devel@nongnu.org; Mon, 22 Jan 2024 04:24:18 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-tK_8G8blNXOou15reClWOA-1; Mon, 22 Jan 2024 04:24:13 -0500 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-40eaed4f393so5096845e9.1 for ; Mon, 22 Jan 2024 01:24:13 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.gmail.com with ESMTPSA id m10-20020adffa0a000000b003392172fd60sm8167907wrr.51.2024.01.22.01.24.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 01:24:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705915455; 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; bh=xoQgOwyOMuVlXIGva6sxyRxJF4LYpW9O+ytvHsdPXy8=; b=aK/G1jYh8QEqMec+ZOnhCUuoJPb573GwoT2wYLAMxN5x8/WtQ23TvFmLW3nFax6aGfeeoB 4Tny3v6Y2gzOa52+Qa0l/288gl3LBB5pWVH/6UbJKjg43OZKhSTjvSAj3CxwdIQVAbn9jQ wXgkzCK6vh7PRhAp3HGnMEpWpjaYM7U= X-MC-Unique: tK_8G8blNXOou15reClWOA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705915451; x=1706520251; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xoQgOwyOMuVlXIGva6sxyRxJF4LYpW9O+ytvHsdPXy8=; b=rTj4vhe9xibwV/eSNJMrS873Fvjw2xApVF5zSB3NykZtLWlAasFniBuY7YG/A+gbxk l2/FH4MdlL8RpXd7RBwrZb1K0BXZ5ZOzPIq0tf0eT1eg7I+2SNH2oZIZPtkZU0Pv4t1V w0bHf9mvC4zP8tD6pFXMB29keEFeKMqrDZOOCEuQap0HljkzyKwawk/4b1mH0vgs8cGs sIiGxazd51kpFpRjuy6J7sFzT3fSiDsromJ+2qGbRsiIwc0+ggwmgf3Fx+8V0XyBL3YO WwV28/Ff+2yrKMLmQbxkhKmdXWyq5zSnrzTzVm/covwaqJeJOGAUTRzHeudwH9pciLwb uh1A== X-Gm-Message-State: AOJu0YzXI//3BCfaQIUDa5vUU8YTRAX57P1KfPsFwH3U4pcDOqpJflTh qhPjLh7kMGZtmyCQcDj8YaVQYxauA48HjNYcAXT2Fo4k09F3dP82AJfl5rxkIy93USku0Ii8mU0 s/sqOuRkmzQat+RyT2f74qwq4oPga5OXvmzLYutylOXoIYCpBYDeCN/Z8268mhA/3EIpiKNw2Va GOFAfXgqU8BUpzPUzLQXLXLJCoJSiFPPHCIX6x X-Received: by 2002:a05:600c:3b84:b0:40e:aed5:3218 with SMTP id n4-20020a05600c3b8400b0040eaed53218mr437676wms.39.1705915451299; Mon, 22 Jan 2024 01:24:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTqryupOwj5ly+8xFZAiL5yRnrlMXCzoJB+41HPx4RBThwRVNsJSrovX+bqCP067QMUmCfjg== X-Received: by 2002:a05:600c:3b84:b0:40e:aed5:3218 with SMTP id n4-20020a05600c3b8400b0040eaed53218mr437667wms.39.1705915450903; Mon, 22 Jan 2024 01:24:10 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: thuth@redhat.com Subject: [PATCH] monitor: add dumpdtb command only in device-tree-enabled targets Date: Mon, 22 Jan 2024 10:24:09 +0100 Message-ID: <20240122092409.280919-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.287, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 @redhat.com) X-ZM-MESSAGEID: 1705915485332100003 Content-Type: text/plain; charset="utf-8" Remove the command altogether from targets that do not have device tree sup= port, instead of leaving it nonfunctional. Signed-off-by: Paolo Bonzini --- meson.build | 2 -- qapi/machine.json | 2 +- hmp-commands.hx | 2 +- system/meson.build | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index de8e5ad67dc..6bf7f3eb685 100644 --- a/meson.build +++ b/meson.build @@ -3126,8 +3126,6 @@ if fdt_required.length() > 0 or get_option('fdt').ena= bled() endif endif =20 -config_host_data.set('CONFIG_FDT', fdt.found()) - vhost_user =3D not_found if host_os =3D=3D 'linux' and have_vhost_user libvhost_user =3D subproject('libvhost-user') diff --git a/qapi/machine.json b/qapi/machine.json index b6d634b30d5..c5e40857ba4 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1828,4 +1828,4 @@ ## { 'command': 'dumpdtb', 'data': { 'filename': 'str' }, - 'if': 'CONFIG_FDT' } + 'if': 'TARGET_NEEDS_FDT' } diff --git a/hmp-commands.hx b/hmp-commands.hx index 17b5ea839d9..f7263957240 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1819,7 +1819,7 @@ ERST .flags =3D "p", }, =20 -#if defined(CONFIG_FDT) +#if defined(TARGET_NEED_FDT) { .name =3D "dumpdtb", .args_type =3D "filename:F", diff --git a/system/meson.build b/system/meson.build index 25e21172505..4e54f5d1a4b 100644 --- a/system/meson.build +++ b/system/meson.build @@ -32,7 +32,7 @@ if have_tpm endif =20 system_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) -system_ss.add(when: fdt, if_true: files('device_tree.c')) +system_ss.add(when: 'TARGET_NEED_FDT', if_true: [fdt, files('device_tree.c= ')]) if host_os =3D=3D 'linux' system_ss.add(files('async-teardown.c')) endif --=20 2.43.0