From nobody Fri May 17 01:27:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615827887; cv=none; d=zohomail.com; s=zohoarc; b=QCfW+xtLb/0fMXuq2uhaBUp/4IowTwpbWm47g6FwqOzbj+lVskfnRDH0AfYtH/g7Yb2UPPolToi+qGGHHt0hyFWRm9wcqAdWAOFi4pjGTZBbj/q4pgvIBsURwzcXd+8fVonR0dtsVhZyfaG8Aq1GIr7d7QoBVmrtN63+H22txl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615827887; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=eXBXuTBobkVS4Z7U4WlcUAPBhsSnyBbul7EuaAHIH7E=; b=YSobYvP4qXN5z+bguq6DpG/x8tHBFzUkZ9mzqlBKkeQGZSy+nXBTYZsduXI81WXqvnxpRsQNVuLG2L9CC4B2gBeto1iX6JT6Vl2NrG+ogGxzlHxbABWIGmJi0OIZGbQYYbsSUoCYbRGjgpqNKDtYEs5U2IijGmsSlP2U6QXs7jU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615827887656310.43980968718495; Mon, 15 Mar 2021 10:04:47 -0700 (PDT) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-565-8B5h_um1PUKOFuYnqpKHfA-1; Mon, 15 Mar 2021 13:04:45 -0400 Received: by mail-wm1-f69.google.com with SMTP id a68so2483077wme.1 for ; Mon, 15 Mar 2021 10:04:45 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id k4sm25209374wrd.9.2021.03.15.10.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 10:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615827886; 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=eXBXuTBobkVS4Z7U4WlcUAPBhsSnyBbul7EuaAHIH7E=; b=eHRN68mrXjqulxghRxW6HPtc1LCCG48s1WOq/XkrQdmHj+chmmey5HK041b9UlSpA875rB obFP+sG9MI8V7Ib+psQ/126umfxs7RizB0ZVoAbwV7C89mPZVM8YZbC0bhhcO7yqjflu6i iujE/xh6dLsEs9ZJ5hXDvlkv1ir5KgM= X-MC-Unique: 8B5h_um1PUKOFuYnqpKHfA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eXBXuTBobkVS4Z7U4WlcUAPBhsSnyBbul7EuaAHIH7E=; b=pjgJOg2c5Ob/GW5hObEGWxofzQsCXAncB5TAnQZlGJHvvGQR2XRVMlBrb44otQQXFD 9zS+FGZZNuS7YYlwOcyVCh57HW3m7bGnia+KZrSQQD/8m9VhVh/i3eubA2H+oacuM0Bn 4a/voKKsF9rIoNTIdBPInc0TkngFczfshmLjx6yVtyzs9iDq7fA6iCeVmofOdz1j7r3j ky2C7244nTJxR3uHYYuZuvNxINEkkd5AT/ovtOaquEUuhwO2nCJy89LRn+PGhpeoeK4h PnghjgzMnt6zJ8XlarmiKSFeqGRv5mR1kwtSjMCgdw3vqR7wL1ZutTaUtwRt9VFB+WRG vE1A== X-Gm-Message-State: AOAM530XbQUE7UtfKKM2XGsNch2ign51gAG1R8fmtJ7tuYMtPI5V+Xa2 OrFkeTS5QsFVClrXAEiL/e13Vgwz3/8Nt5Wqj9ZAq9HQsh3HiY36P9YEQdc2ZtQB55w8PZPiZvD qvsRekNhgdZ1+tw== X-Received: by 2002:a7b:ce91:: with SMTP id q17mr690391wmj.28.1615827881831; Mon, 15 Mar 2021 10:04:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD8b8kejxc8x3h2zwM5gYhuPBm8ZNt6JAvpBqpaaRpPL8ww/HURRunrfaGaewvh9dplMUi1Q== X-Received: by 2002:a7b:ce91:: with SMTP id q17mr690379wmj.28.1615827881711; Mon, 15 Mar 2021 10:04:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Christian Borntraeger Subject: [PATCH] hw/core: Only build guest-loader if libfdt is available Date: Mon, 15 Mar 2021 18:04:39 +0100 Message-Id: <20210315170439.2868903-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Add a Kconfig entry for guest-loader so we can optionally deselect it (default is built in), and add a Meson dependency on libfdt. This fixes when building with --disable-fdt: /usr/bin/ld: libcommon.fa.p/hw_core_guest-loader.c.o: in function `loader= _insert_platform_data': hw/core/guest-loader.c:56: undefined reference to `qemu_fdt_add_subnode' /usr/bin/ld: hw/core/guest-loader.c:57: undefined reference to `qemu_fdt_= setprop' /usr/bin/ld: hw/core/guest-loader.c:61: undefined reference to `qemu_fdt_= setprop_string_array' /usr/bin/ld: hw/core/guest-loader.c:68: undefined reference to `qemu_fdt_= setprop_string' /usr/bin/ld: hw/core/guest-loader.c:74: undefined reference to `qemu_fdt_= setprop_string_array' collect2: error: ld returned 1 exit status Fixes: a33ff6d2c6b ("hw/core: implement a guest-loader to support static hy= pervisor guests") Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/core/Kconfig | 5 +++++ hw/core/meson.build | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/core/Kconfig b/hw/core/Kconfig index fdf03514d7d..9397503656d 100644 --- a/hw/core/Kconfig +++ b/hw/core/Kconfig @@ -11,6 +11,11 @@ config GENERIC_LOADER bool default y =20 +config GUEST_LOADER + bool + default y + depends on TCG + config OR_IRQ bool =20 diff --git a/hw/core/meson.build b/hw/core/meson.build index 9cd72edf513..59f1605bb07 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -16,6 +16,7 @@ common_ss.add(files('cpu.c')) common_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c')) common_ss.add(when: 'CONFIG_GENERIC_LOADER', if_true: files('generic-loade= r.c')) +common_ss.add(when: ['CONFIG_GUEST_LOADER', fdt], if_true: files('guest-lo= ader.c')) common_ss.add(when: 'CONFIG_OR_IRQ', if_true: files('or-irq.c')) common_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('platform-bus.c'= )) common_ss.add(when: 'CONFIG_PTIMER', if_true: files('ptimer.c')) @@ -37,8 +38,6 @@ 'clock-vmstate.c', )) =20 -softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('guest-loader.c')) - specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files( 'machine-qmp-cmds.c', 'numa.c', --=20 2.26.2