From nobody Sun Feb 8 23:54:36 2026 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=1619465731; cv=none; d=zohomail.com; s=zohoarc; b=VMe3l74OmO54FMzFjl42mOq0e9cnKu/kG3SQjDp7RoEg7LXPBYIq9/VuLbkdo7LvH86agF6sWYmt/GgYGaHg8BkvCFOfTcSqPfgBHRcw/oxIDKsbabVv3UutRdpZfOEugQthS2MfC8RZgFaT5n9GVYIVtDScJK8oaIYslqBzY0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465731; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=PXI5YNvkwlG2ApE36QveSE3/RRHKZRYtLzz/030d0rU=; b=B2MQXodwCSI1GZMQ8vQRP/wt1mp98qYgEqcTsdpYFruemTixhgNf/h0vr9MoYEdge9ceOVg2x5JMi/Ac61veS1k1bgxPAIG6urBMXhqHYg38oAzoUF9Xk7xjjrHLCy9TTg/HMAqBv3JN73nZ2a2Wvn19gsxhBs6UtvPtSC8of+k= 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 1619465731199695.5091948281441; Mon, 26 Apr 2021 12:35:31 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-KKJzqX3uMnuMTOASPJuqdg-1; Mon, 26 Apr 2021 15:35:28 -0400 Received: by mail-wr1-f72.google.com with SMTP id i43-20020adf90ae0000b029010a6364cdbaso2981341wri.18 for ; Mon, 26 Apr 2021 12:35:28 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id u5sm396893wmg.25.2021.04.26.12.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465730; 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=PXI5YNvkwlG2ApE36QveSE3/RRHKZRYtLzz/030d0rU=; b=F+Pj6OnsUNnoE/HEu8QiUeYB1LMhK/XFj6BPAD6xdlgwtq/zFArKmePKHV9aurruEiQOj8 dzjluhSLv/FplfW/xmy02INsCbhyN+ttKEI6II5v2qi8VGDoD9g3YGteYGP58cbGA8ztGL Z2wouSf8qmy+npATmuGg+SidgREA4dI= X-MC-Unique: KKJzqX3uMnuMTOASPJuqdg-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=PXI5YNvkwlG2ApE36QveSE3/RRHKZRYtLzz/030d0rU=; b=rhyOTkw7AMeRguHX4JhXmt7QXB+ECgzDYbqHupfjzcYmQjEkWtowpzkJ0EfQVNXY2x +biGCCnKptHMH5cRotPR0/kN91Vu1qHBOnnjcQ3cns+IMgwNLjWZw2I+ZliTVgAvFXLN 6aLkfVM8gbQUjL8r3MNItJxTb0CgSiShAIINTy3pgX+2dU3K2i8QWOpAQZn3mj4TxqtT pR5CDt/V6i7BRhCsDbhglTijb+enrvNE3VpomfrypNgu1JZLp3orTO4KjVBx5EB7Nbak 1n7Wq235DP4hf/UmSNDJhd8wyUHqWH9zSKQHpVQkJFRLDYb/hSNe2ZCojWdcY8IgdImq HtSg== X-Gm-Message-State: AOAM532piEDi5F2O1FklNVKt/oi7FSAW5TxqwRi9g8Uf5fewU86DElg/ Fea8nGUIVDOPSazkCNRHckQmE62ZRWn2TAJRq2b5fQyniGeK2EHlfk9e0+eGZUxGkJpVIXQRvp3 ZovWUOuYy7teQkg== X-Received: by 2002:adf:f74e:: with SMTP id z14mr15241553wrp.320.1619465727111; Mon, 26 Apr 2021 12:35:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2kJ4FNyQP9qvfWFDwZZ0ClRS49xdh+DCuUW2SUocKMlWCZIT0zufxLO6nlZj80yh2RjuW1g== X-Received: by 2002:adf:f74e:: with SMTP id z14mr15241538wrp.320.1619465726990; Mon, 26 Apr 2021 12:35:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PATCH 1/7] stubs: Restrict fw_cfg stubs to sysemu Date: Mon, 26 Apr 2021 21:35:14 +0200 Message-Id: <20210426193520.4115528-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) User emulation or tools don't use / require the fw_cfg device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Laszlo Ersek --- stubs/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/meson.build b/stubs/meson.build index be6f6d609e5..4ff36401cf9 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -12,7 +12,6 @@ stub_ss.add(files('dump.c')) stub_ss.add(files('error-printf.c')) stub_ss.add(files('fdset.c')) -stub_ss.add(files('fw_cfg.c')) stub_ss.add(files('gdbstub.c')) stub_ss.add(files('get-vm-name.c')) stub_ss.add(when: 'CONFIG_LINUX_IO_URING', if_true: files('io_uring.c')) @@ -49,6 +48,7 @@ stub_ss.add(files('replay-tools.c')) endif if have_system + stub_ss.add(files('fw_cfg.c')) stub_ss.add(files('semihost.c')) stub_ss.add(files('xen-hw-stub.c')) else --=20 2.26.3 From nobody Sun Feb 8 23:54:36 2026 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=1619465736; cv=none; d=zohomail.com; s=zohoarc; b=TQeLoxzbESiCvpboUcsf47moDCZnI7t1OcX6uv4EMtZcmfW5QcqMqrVPefTkZT+N5gKMAuAfsdNrphO37Z6OvjBtwPB6T1ZWkH9bZkYHN6KFCVY15ed/kNLQ2iS9oPQSfLXFKezNpd/FF5IE5Lpb8L0U0jKnb6KKQE+c2ucpNAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465736; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=m3J2o1342PI/Nwq9CiNtPMcwkrmRbYFAeBct1A9GlkY=; b=Sq78KJHkkV8B74TnZG6QTOfR1Oh3fk3YCkyA09xYSnbwBKihJOqrtWc58F5Vlnsvbno06f/JknvqyxyyDXyxlVbqj/8GTQIcbgq5T69edIORtqFQGHUecj/+QsPKH0fSFJDEO/q93RdirQ6aubY85TKEe34+t3/NEoanz/N31zs= 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 161946573679786.3543935406176; Mon, 26 Apr 2021 12:35:36 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-277-9bETGEopP_mfLQLF1AJyVA-1; Mon, 26 Apr 2021 15:35:33 -0400 Received: by mail-wm1-f71.google.com with SMTP id o18-20020a1ca5120000b02901333a56d46eso3355167wme.8 for ; Mon, 26 Apr 2021 12:35:33 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id i11sm1269242wrp.56.2021.04.26.12.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465735; 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=m3J2o1342PI/Nwq9CiNtPMcwkrmRbYFAeBct1A9GlkY=; b=R1ItYCTl8AsUh2XQd9oSEzlP8yNaVzlOPRPAr33eCdrq9FvBAEspLIUyHxmCLb+gMYkwMB f4yZieq8j7LwGhV4EL/xuhM8OGIAwvLdHhBylP4C/3Z37a+8texEuaxtNH/Glh20MrwJQG 0j8SnL83H5CqqQpDISoFRXidYILUi50= X-MC-Unique: 9bETGEopP_mfLQLF1AJyVA-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=m3J2o1342PI/Nwq9CiNtPMcwkrmRbYFAeBct1A9GlkY=; b=F9+IkcuMGcU8Bzy1BZi3zIzPFw+k/j5A70CHF4i1tVwZW+9xUuPQywTFVqMXiEvx4c 6S7QpCDZYYt+G8Rh4C24aznU0u5ckeHavcQwwDvcR+V0vRz0RzrTFDHeNDoMkDAzq4kR I/cjs23vYNEmXwwWITvGPnlS54mEVy2MU1s33bai+PK5xdg61oyhpnRup9ux7NfbJF4w xlCpsYP6AFbc9Y1MsQw2w2PWgHc6pMLVAdfF64WAKvNw642wttyC2PXtxdUf9ueUsQcm 9QyQyF3rGPHf20W/S0c1cU4k4GJ2kFLADNeNTqF+3t76FzkH5r1FWIzaBYGh0zxs2DJl Y8CA== X-Gm-Message-State: AOAM532NU5TDFkpwSzwynk+uFwXaBNw2iwX0TGKAHe6+lXLvcpEdW+cw uDu8EiDdgD2hTipt4zpNLt/EvfEyLwKEwl5jLMhNqYidxUlsIxV2eQwyoeDOMZlWiNen0f/4nkb kQU77CmOX4JtiLA== X-Received: by 2002:a05:600c:2cd6:: with SMTP id l22mr14768500wmc.160.1619465732096; Mon, 26 Apr 2021 12:35:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXqNoDYJSJBVuKEOCsjaj69O8GsYv1GJb+RSGtbi7V1NKSZMRw/Y6KTl0UTxKt42tLmXa42A== X-Received: by 2002:a05:600c:2cd6:: with SMTP id l22mr14768489wmc.160.1619465731909; Mon, 26 Apr 2021 12:35:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 2/7] hw/nvram: Rename FW_CFG_MIPS as generic FW_CFG Kconfig symbol Date: Mon, 26 Apr 2021 21:35:15 +0200 Message-Id: <20210426193520.4115528-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) Targets using the fw_cfg device might have architecture specific keys. If so, they define the fw_cfg_arch_key_name() function. The use of FW_CFG_MIPS is not MIPS-specific, it is simply the architectural implementation. Rename it using the generic 'FW_CFG' and move the Kconfig declaration in hw/nvram/ where fw_cfg code is maintained. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/Kconfig | 5 +---- hw/mips/meson.build | 2 +- hw/nvram/Kconfig | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index aadd436bf4e..bbc6b9c1d11 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -42,7 +42,7 @@ config LOONGSON3V select PCI_DEVICES select PCI_EXPRESS_GENERIC_BRIDGE select MSI_NONBROKEN - select FW_CFG_MIPS + select FW_CFG =20 config MIPS_CPS bool @@ -50,6 +50,3 @@ config MIPS_CPS =20 config MIPS_BOSTON bool - -config FW_CFG_MIPS - bool diff --git a/hw/mips/meson.build b/hw/mips/meson.build index 1195716dc73..893e56f7453 100644 --- a/hw/mips/meson.build +++ b/hw/mips/meson.build @@ -1,6 +1,6 @@ mips_ss =3D ss.source_set() mips_ss.add(files('bootloader.c', 'mips_int.c')) -mips_ss.add(when: 'CONFIG_FW_CFG_MIPS', if_true: files('fw_cfg.c')) +mips_ss.add(when: 'CONFIG_FW_CFG', if_true: files('fw_cfg.c')) mips_ss.add(when: 'CONFIG_FULOONG', if_true: files('fuloong2e.c')) mips_ss.add(when: 'CONFIG_LOONGSON3V', if_true: files('loongson3_bootp.c',= 'loongson3_virt.c')) mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c')) diff --git a/hw/nvram/Kconfig b/hw/nvram/Kconfig index e872fcb1941..cab1070375f 100644 --- a/hw/nvram/Kconfig +++ b/hw/nvram/Kconfig @@ -1,3 +1,6 @@ +config FW_CFG + bool + config DS1225Y bool =20 --=20 2.26.3 From nobody Sun Feb 8 23:54:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1619465740; cv=none; d=zohomail.com; s=zohoarc; b=PpqQAYVmjfkr+HS1eXvbvnvfmSjzizy0tvHYc/a1Y+BzF/NgOySRF5iSQb3+r/vSc6ZSrX7ItZKjiats9JAYhKmMwGXVMtWYFdGvjEgliIPW0lUXxn66qr9B1xdbwxzrwqD/rjb8kE3PXxgsxlvEdnvTkdJOgz+jg+xoGQSwosM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465740; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=eMSZjv63DbKN4jYT+FhVyP0Dhkg/kXBNBsFuwQnf2tE=; b=BxqADAHiMnTNl0oPZWhOUoFxSdltKa7w5hDKukl4JDeUl9vETBAy40qB/xPdbkmHjhetZ8Yoy3KMLcHtpPiuIPF/zUckki7sAZFQM1OCw9+LG9cxJjklKQa/foNIJumYFKUNRQ3lGZr5whE6JzFkZ2OPYyBL8JhIXAR3VzHpi78= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619465740807405.0871769030538; Mon, 26 Apr 2021 12:35:40 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-536-Us3T45tUMriAaNoMfoUlvw-1; Mon, 26 Apr 2021 15:35:37 -0400 Received: by mail-wr1-f71.google.com with SMTP id v2-20020a0560001622b0290106e28f8af8so16837946wrb.9 for ; Mon, 26 Apr 2021 12:35:37 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id g6sm1548706wrr.63.2021.04.26.12.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465739; 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=eMSZjv63DbKN4jYT+FhVyP0Dhkg/kXBNBsFuwQnf2tE=; b=Ri1FPl/Z+NZ6urhbFkRe/krdWGo+JEaw+o6LKCo3mZDI3M4V71JAZkkaCOIv9anbXQmbXe E9FVpJpldHg54M2B0UxwyoOZcHFN2gKJk+VsMdhusuDjuWI36w4/xvHjmIbiPA/592k6kH adVM2HY2tfKwTgitvquEgX0vkADVBJk= X-MC-Unique: Us3T45tUMriAaNoMfoUlvw-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=eMSZjv63DbKN4jYT+FhVyP0Dhkg/kXBNBsFuwQnf2tE=; b=OKtFs6ba1VcCbDUC+ak7D3ScqqbwcVcP0O/sPJA4inm1qMOhv7BAQgSbyqD0xz2VQn tcNm6wuVOpGL/LObBawbPCiGdbYNnh3fwAfg5kwIu291znnwG9bMefGDdx+SnzPV02ZS 5sdnTxuGPDZIPPkxyy1jr9suu7814LeonNTzoo4Xo2tPxRlx6Bvq1QIlqgf4eNVnhJCP 2oSZCPemY3n1x2trjG6kjVaxp0RpIVp4+7IFH+UlEafxspmU2teWuvQQ5NzSqAtQOAEg KhemizDBSH/Oa+SGlJ17+TUdHqNJnF0zmBmFX2i5BjYzFWGSe6b3deoIQYm7qTbMSV50 UrXg== X-Gm-Message-State: AOAM532iLWGBXBenaaKxKdqt456mp4EtiHOuolGUA3bi/AiVbnqczGGz j24AbanmI7f45vXP3lTh6K9jSzbOLSz4h1lVRV79AksB66khtzvsLhpz1dpjLnUnJV96yAmI4L1 FmflQHmJhks5v1g== X-Received: by 2002:adf:e60e:: with SMTP id p14mr24413108wrm.427.1619465736736; Mon, 26 Apr 2021 12:35:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCarOUwZMLYiZkUvUXG/efo8ACPEIazzLFmUDWCbopLkFW0zGGmVl7g4PbDhOalnBj4dY8Ew== X-Received: by 2002:adf:e60e:: with SMTP id p14mr24413088wrm.427.1619465736601; Mon, 26 Apr 2021 12:35:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/7] hw/nvram: Declare FW_CFG_DMA Kconfig symbol in hw/nvram/ Date: Mon, 26 Apr 2021 21:35:16 +0200 Message-Id: <20210426193520.4115528-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) fw_cfg related files are maintained in hw/nvram/, so it makes sense to declare the FW_CFG_DMA Kconfig symbol there, along with the FW_CFG one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/Kconfig | 3 --- hw/nvram/Kconfig | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/display/Kconfig b/hw/display/Kconfig index ca46b5830e7..0e4bb596c43 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -6,9 +6,6 @@ config DDC config EDID bool =20 -config FW_CFG_DMA - bool - config VGA_CIRRUS bool default y if PCI_DEVICES diff --git a/hw/nvram/Kconfig b/hw/nvram/Kconfig index cab1070375f..59fac45c315 100644 --- a/hw/nvram/Kconfig +++ b/hw/nvram/Kconfig @@ -1,6 +1,10 @@ config FW_CFG bool =20 +config FW_CFG_DMA + bool + select FW_CFG + config DS1225Y bool =20 --=20 2.26.3 From nobody Sun Feb 8 23:54:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1619465746; cv=none; d=zohomail.com; s=zohoarc; b=ct5QnJ6FhpAlLIfkq2l1TRxX6yCZuiAU945I8HyDc4XCnAbeBhltcoKxt1Z2TVymsfiTZzSLh0JvDQgOSC7PCyE/AawnM+kIQkjB1ooTwCuzJftpYwwlUmPbsMh61r1rw+TRc05lfl4KxuS0G8OThoiL9hegvkoysj/MoN5DT40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465746; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=x+XKpQxMkw2M8DAIFtIrFWfOxS/FuauQxHxUVGxBmbM=; b=D2CSluGXq6iWj+l1U5PUbPrc/rL8F5XcF9h5RSrHsrlbFMwkX16eVuLMCgQN5mBgIRTmAoyj2rikXJIIHtuO6PeN+sxt9RtkYcQf+VwCVsU0wCpJtDgFa0Ct72xcnv+9dbXO5YLBEoMFrkGj4Qd3E/R5OkZN8KW2TKGc5fItHAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619465746257360.53675153903; Mon, 26 Apr 2021 12:35:46 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-414-CcSkY2DgNjqPa1d-RXkFBA-1; Mon, 26 Apr 2021 15:35:43 -0400 Received: by mail-wr1-f70.google.com with SMTP id q18-20020adfc5120000b029010c2bdd72adso1608325wrf.16 for ; Mon, 26 Apr 2021 12:35:42 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id t14sm1292776wrz.55.2021.04.26.12.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465745; 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=x+XKpQxMkw2M8DAIFtIrFWfOxS/FuauQxHxUVGxBmbM=; b=GjwsueeV1Rp1AxU0bGZdMPdGVhOxJ8M/xByk1J+dPDL6dAliFaFlYOxjedsU9S1s44OlTS 9UUFnmjtVMIW9X2C+3IQmBXa559fdACLZfndPNxLqDH8SesP1vjccvSvuMC46EWLKqbY+D ph6Seb8C24TxXKQOdZL/uAqluwbersY= X-MC-Unique: CcSkY2DgNjqPa1d-RXkFBA-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=x+XKpQxMkw2M8DAIFtIrFWfOxS/FuauQxHxUVGxBmbM=; b=fZCWxTjsqaJwxLtumWLENCJ7gaXUV7JMyklHsVFeDdadNYstxoLsyjFufuRnJ6j9zv q2sY2mboc2j/DXcK8/plguDAcdRbFGod/dqcMqzGI2/6DewNgZXC0l5xtZZ+FwSq2kTP kQUkReDyeZu7GlF7cctkvrrrImE1zUF9abXp9TG096WOovAnft67J0E2S8KPat6Lnucc e2Oq6813Nd2tZMgSsw2jGOGZ4KXeTTcUPMZxRry9sxsj00AfcZxlWnjC+IMSlMNyrT6w vHOxwF0nLKRqPC+gMFlRdeDJOH0fiYBcv96eXRxSl4uCuFBb4V/d3vJUA55TlnXSD8R+ fwQQ== X-Gm-Message-State: AOAM533GI+7jF50Zyk1O+MFYtOSd6tHkU3983K7VMiMcC83aQfZmP6a7 y9TvFkUnYg+f6z560Po6KZU944zwl86c8TQLRPn9HZLx206nX6J/5XI4ohSnbFLz+oDlus/F2qE ZREf62ZWSAQoB2Q== X-Received: by 2002:adf:cd8c:: with SMTP id q12mr24807481wrj.328.1619465741716; Mon, 26 Apr 2021 12:35:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5LsAsP1y6BrNfXip0IXbVkC+0/4kOVMzriBhRt6KKd4Uht/h+rhB5NVVIzRkyXBptEBv9Dw== X-Received: by 2002:adf:cd8c:: with SMTP id q12mr24807460wrj.328.1619465741557; Mon, 26 Apr 2021 12:35:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Igor Mammedov Subject: [PATCH 4/7] hw/acpi/vmgenid: Make ACPI_VMGENID depends on FW_CFG Kconfig Date: Mon, 26 Apr 2021 21:35:17 +0200 Message-Id: <20210426193520.4115528-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) The TYPE_VMGENID device depends on fw_cfg: $ git grep \ fw_cfg hw/acpi/vmgenid.c hw/acpi/vmgenid.c:128: fw_cfg_add_file(s, VMGENID_GUID_FW_CFG_FILE, gu= id->data, hw/acpi/vmgenid.c:131: fw_cfg_add_file_callback(s, VMGENID_ADDR_FW_CFG= _FILE, NULL, NULL, NULL, Add the proper Kconfig dependency. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laszlo Ersek --- hw/acpi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig index 1932f66af8d..b9dc932d2a7 100644 --- a/hw/acpi/Kconfig +++ b/hw/acpi/Kconfig @@ -40,5 +40,6 @@ config ACPI_VMGENID bool default y depends on PC + select FW_CFG =20 config ACPI_HW_REDUCED --=20 2.26.3 From nobody Sun Feb 8 23:54:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1619465750; cv=none; d=zohomail.com; s=zohoarc; b=EXnhDjGv9qtwsqV1YNVXjQwXMXyKYyerWyArxsYgMPl4D+nmDNaUizPzTRp425BqyzaBH4ZoIEzH+4bzRe66XvCpRUyFmQQEUzNAc+nrwX/61EKpvzV2oaGH4m5pqgnsY9wiL6crYzT3C0IzbIcXmRsc/jTEXjumneq/vQ3RklI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465750; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uoXlpYDNcisrlAbO/UUpY9wHK6QDGT6jB/1qXMxl4wc=; b=fxIUUgNLs0wAvfX72xx3vGwOHUAUQAtID/zjDqs51ZqL4N3hjEZcv6W2Wkfz2k5UxBicnGEm9RT8xsruiIjSNKBbqd5Vq1N0Rdz7VzeN4B4+sdUFFVh22Ht5FFrkWbSJK6jex4oVSLkPb3/EwmiW7IzdmvFw2IsHflAK19t+82c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619465750914750.1088523839294; Mon, 26 Apr 2021 12:35:50 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-210-8fS9iCahMPi8QYk4bb24mQ-1; Mon, 26 Apr 2021 15:35:48 -0400 Received: by mail-wr1-f70.google.com with SMTP id h60-20020adf90420000b029010418c4cd0cso18640089wrh.12 for ; Mon, 26 Apr 2021 12:35:47 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id k188sm484762wmf.18.2021.04.26.12.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465749; 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=uoXlpYDNcisrlAbO/UUpY9wHK6QDGT6jB/1qXMxl4wc=; b=ieTMC3dcrvJmOHqSNdKDy8JP5cdN/z3EWrF/a+Ph7NofDW57dTwoKxzFgdUPy3tL8ncMHt e0WKu3UzDyqUdral5Due/iuY4xYieVmL0qT0fJJZMokSGFiQr58I3a4TE2tIYFOWE7bkBs UBIOWPMJkJ53Qz6nKE7vWSlH1/vwJsk= X-MC-Unique: 8fS9iCahMPi8QYk4bb24mQ-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=uoXlpYDNcisrlAbO/UUpY9wHK6QDGT6jB/1qXMxl4wc=; b=krOmfpdn0yLVv1O5OjOdlZSsjWgWS2kCWlTv7JZlVKxrBSvOCTsPRm4KvOrGfCFLwV tdqpUUHW2Lr85NmTGJOH+8SAv0zUC3nIccs7EzC5SyV3+RhJaQC7GCPH1E7kgvKoP0ag 5U+auYFLyxRPmgpcmWqKbJm3iecs9VnInfg/Zew7X5tFMzsdtzcD6Bg/1+mfvIqTPQfw ceKNcsDb9C4gwUTMwW/1M1u+iRgS6CLVykFdHwvxCSNkOiiR30G+uDMCAkXPZsKUmahe PjbVzqQauPgvZbdW59vcTArNsY9odHh7Vjxp5W0w4/mMi6jNUC3RzNyw4T0E/HWZfZdp Ny3A== X-Gm-Message-State: AOAM532H28f/ZL35FsgM5a0p5mpvlIwCo1mRIsQYcODekiSIgLBqDXN5 TnO5r4XfhAZxZ5kbDuVDJgmqkHiUzr8BaSMOkzkqo66eTAlqnMNoP53kzE2252E2HbpO6wQTTRI 0VXKEf1dXBRxn9Q== X-Received: by 2002:a05:6000:12ca:: with SMTP id l10mr18376215wrx.145.1619465746789; Mon, 26 Apr 2021 12:35:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI96ZTANWZjfJONUkNwrqi8hhrvWBdNhqFQRXfNfB3PusmpCZuLW8R0wrQdeXofl0jkM5HaQ== X-Received: by 2002:a05:6000:12ca:: with SMTP id l10mr18376193wrx.145.1619465746673; Mon, 26 Apr 2021 12:35:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , Richard Henderson , Helge Deller , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Eduardo Habkost , David Gibson , Greg Kurz , Mark Cave-Ayland , Artyom Tarasenko Subject: [PATCH 5/7] hw: Have machines Kconfig-select FW_CFG Date: Mon, 26 Apr 2021 21:35:18 +0200 Message-Id: <20210426193520.4115528-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) Beside the loongson3-virt machine (MIPS), the following machines also use the fw_cfg device: - ARM: virt & sbsa-ref - HPPA: generic machine - X86: ACPI based (pc & microvm) - PPC64: various - SPARC: sun4m & sun4u Add their FW_CFG Kconfig dependency. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Eduardo Habkost (i386) --- hw/arm/Kconfig | 2 ++ hw/hppa/Kconfig | 1 + hw/i386/Kconfig | 2 ++ hw/ppc/Kconfig | 1 + hw/sparc/Kconfig | 1 + hw/sparc64/Kconfig | 1 + 6 files changed, 8 insertions(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 8c37cf00da7..3b2641e39dc 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -8,6 +8,7 @@ config ARM_VIRT imply TPM_TIS_SYSBUS select ARM_GIC select ACPI + select FW_CFG select ARM_SMMUV3 select GPIO_KEY select FW_CFG_DMA @@ -216,6 +217,7 @@ config SBSA_REF select PL061 # GPIO select USB_EHCI_SYSBUS select WDT_SBSA + select FW_CFG =20 config SABRELITE bool diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig index 22948db0256..45f40e09224 100644 --- a/hw/hppa/Kconfig +++ b/hw/hppa/Kconfig @@ -14,3 +14,4 @@ config DINO select LASIPS2 select PARALLEL select ARTIST + select FW_CFG diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 7f91f30877f..9e4039a2dce 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -52,6 +52,7 @@ config PC_ACPI select SMBUS_EEPROM select PFLASH_CFI01 depends on ACPI_SMBUS + select FW_CFG =20 config I440FX bool @@ -106,6 +107,7 @@ config MICROVM select ACPI_HW_REDUCED select PCI_EXPRESS_GENERIC_BRIDGE select USB_XHCI_SYSBUS + select FW_CFG =20 config X86_IOMMU bool diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index d11dc30509d..a7ba8283bf1 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -131,6 +131,7 @@ config VIRTEX # Only used by 64-bit targets config FW_CFG_PPC bool + select FW_CFG =20 config FDT_PPC bool diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig index 8dcb10086fd..267bf45fa21 100644 --- a/hw/sparc/Kconfig +++ b/hw/sparc/Kconfig @@ -15,6 +15,7 @@ config SUN4M select STP2000 select CHRP_NVRAM select OR_IRQ + select FW_CFG =20 config LEON3 bool diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig index 980a201bb73..c17b34b9d5b 100644 --- a/hw/sparc64/Kconfig +++ b/hw/sparc64/Kconfig @@ -13,6 +13,7 @@ config SUN4U select PCKBD select SIMBA select CHRP_NVRAM + select FW_CFG =20 config NIAGARA bool --=20 2.26.3 From nobody Sun Feb 8 23:54:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1619465756; cv=none; d=zohomail.com; s=zohoarc; b=a819FnjbUqkRKt4LRyx0kZBa8Gs+w+lBl/+6bdpy4bpB7NDJJP9pQgiaTJ8rUNgQkbqWWc2EIp7N9hO1vVrpOQ2sWibkncfF2TBmOTanE5tUnDUvUYQvYF1wdC8Fivk1ZAjU6nmN5h7smYBdy+YR+el6cr9pbsEGSbjJH5/pQ4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465756; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=/NBJrN/GlacMceBg1qLAcbh146RyM7XsMz2+vmFelAU=; b=AkVtxMnz4FYpgIy6wwQVAXOVqrZ7Oiwflv57T3TA9v5AbYM4WCJidu+d6UDlQ1bbtLMMDMdRV56My05ZjDOxc4tG7j4ML1srJogfq20xDtkdryj1itbwKQX3Qd7IxM8Z8nVvCqDfy8VCzqxUyjMXBuCV8PCLP0Fh4Hvv++2F1kg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 161946575605961.788684129520334; Mon, 26 Apr 2021 12:35:56 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-cbuONM_MMDSruE5R3l_gNQ-1; Mon, 26 Apr 2021 15:35:53 -0400 Received: by mail-wr1-f71.google.com with SMTP id o14-20020a5d474e0000b029010298882dadso19481520wrs.2 for ; Mon, 26 Apr 2021 12:35:52 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id z66sm464116wmc.4.2021.04.26.12.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465755; 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=/NBJrN/GlacMceBg1qLAcbh146RyM7XsMz2+vmFelAU=; b=a7aVwo0pmpruDVLEI/jgxKi06uActu6hBFUVdUw7XP/zI0PoYpxTQvh7jSheaPbig52X7/ 1PBGOBfxnFbwBam2AVKP9W4KU5az+rRdnnNOCsSNp5BAHLaITuahMWC/hGZWA/czbD6zvc G9jHsxkrcya+TedVCysXtiogS2qOc7Y= X-MC-Unique: cbuONM_MMDSruE5R3l_gNQ-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/NBJrN/GlacMceBg1qLAcbh146RyM7XsMz2+vmFelAU=; b=pe54ioctOhPTZ9Wycm1t7yvbvOf6wav8eKU44qQAgAZJ7t1GLeJ2RKoL/g/QTp2F2r N8aUbqxEFXohmrYTEWN6GsqXRcZv++FZyct/3jQ8hhjQXYUvmY59KATrIgC4wJFcpod+ wyJ6UoyqF8WzKZnA8A23aRo/zBaSb1Ml242u97P/ZP/HRzv/iM3z2Ajp69G4mM9Fp+k0 zW28jveYTO8xVnZ1jcAU9JbmRAIhCvk1TdcOXGlKrbzavfK/JqDM2q56n/gndBS/ws8o ZlTjJPnwxlr3MDLSMsdyGFiSt5Pru4QFojjHC2eJMZzjhdXknJ4y9icCcKeagVr9eZyI 7HjQ== X-Gm-Message-State: AOAM53177AkteLPHhA1+eowkMl4yoz/FT4njDcOfFN3r5BBecx6HyM4o sQdKoBScHv674o7bbgItDbpt8YfnwJIqajzw3CgYNaD+4s1UNQEP9iNLO9rnFwNhhirBa7M8cdB o1QkLUFWfrwfUHA== X-Received: by 2002:adf:e7c2:: with SMTP id e2mr5882926wrn.180.1619465751927; Mon, 26 Apr 2021 12:35:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyumkVOaHD3aoGHNGy6imfLuSzZSB+RGcJEgtKiYDmsVoADFCUmJ8o9mNaeKN1+mXVVQ6HPvw== X-Received: by 2002:adf:e7c2:: with SMTP id e2mr5882895wrn.180.1619465751734; Mon, 26 Apr 2021 12:35:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , Richard Henderson , Helge Deller , Palmer Dabbelt , Alistair Francis , Sagar Karandikar , Bastian Koppelmann Subject: [PATCH 6/7] hw/{arm,hppa,riscv}: Add fw_cfg arch-specific stub Date: Mon, 26 Apr 2021 21:35:19 +0200 Message-Id: <20210426193520.4115528-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) The ARM, HPPA and RISC-V architectures don't declare any fw_cfg specific key. To simplify the buildsys machinery and allow building QEMU without the fw_cfg device (in the next commit), first add a per-architecture empty stub defining the fw_cfg_arch_key_name(). Update the MAINTAINERS section to cover the various target-specific fw_cfg.c files. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/fw_cfg.c | 19 +++++++++++++++++++ hw/hppa/fw_cfg.c | 19 +++++++++++++++++++ hw/riscv/fw_cfg.c | 19 +++++++++++++++++++ MAINTAINERS | 2 +- hw/arm/meson.build | 1 + hw/hppa/meson.build | 1 + hw/riscv/meson.build | 1 + 7 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 hw/arm/fw_cfg.c create mode 100644 hw/hppa/fw_cfg.c create mode 100644 hw/riscv/fw_cfg.c diff --git a/hw/arm/fw_cfg.c b/hw/arm/fw_cfg.c new file mode 100644 index 00000000000..de2bca9c76c --- /dev/null +++ b/hw/arm/fw_cfg.c @@ -0,0 +1,19 @@ +/* + * QEMU fw_cfg helpers (ARM specific) + * + * Copyright (c) 2021 Red Hat, Inc. + * + * Author: + * Philippe Mathieu-Daud=C3=A9 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/mips/fw_cfg.h" +#include "hw/nvram/fw_cfg.h" + +const char *fw_cfg_arch_key_name(uint16_t key) +{ + return NULL; +} diff --git a/hw/hppa/fw_cfg.c b/hw/hppa/fw_cfg.c new file mode 100644 index 00000000000..322b03068c7 --- /dev/null +++ b/hw/hppa/fw_cfg.c @@ -0,0 +1,19 @@ +/* + * QEMU fw_cfg helpers (HPPA specific) + * + * Copyright (c) 2021 Red Hat, Inc. + * + * Author: + * Philippe Mathieu-Daud=C3=A9 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/mips/fw_cfg.h" +#include "hw/nvram/fw_cfg.h" + +const char *fw_cfg_arch_key_name(uint16_t key) +{ + return NULL; +} diff --git a/hw/riscv/fw_cfg.c b/hw/riscv/fw_cfg.c new file mode 100644 index 00000000000..8e3d2a8bdea --- /dev/null +++ b/hw/riscv/fw_cfg.c @@ -0,0 +1,19 @@ +/* + * QEMU fw_cfg helpers (RISC-V specific) + * + * Copyright (c) 2021 Red Hat, Inc. + * + * Author: + * Philippe Mathieu-Daud=C3=A9 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/mips/fw_cfg.h" +#include "hw/nvram/fw_cfg.h" + +const char *fw_cfg_arch_key_name(uint16_t key) +{ + return NULL; +} diff --git a/MAINTAINERS b/MAINTAINERS index 36055f14c59..ab8f030d4c0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2162,7 +2162,7 @@ R: Laszlo Ersek R: Gerd Hoffmann S: Supported F: docs/specs/fw_cfg.txt -F: hw/nvram/fw_cfg*.c +F: hw/*/fw_cfg*.c F: stubs/fw_cfg.c F: include/hw/nvram/fw_cfg.h F: include/standard-headers/linux/qemu_fw_cfg.h diff --git a/hw/arm/meson.build b/hw/arm/meson.build index be39117b9b6..fd278de916f 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -1,6 +1,7 @@ arm_ss =3D ss.source_set() arm_ss.add(files('boot.c'), fdt) arm_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c')) +arm_ss.add(when: 'CONFIG_FW_CFG', if_true: files('fw_cfg.c')) arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c')) arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c')) arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c')) diff --git a/hw/hppa/meson.build b/hw/hppa/meson.build index 1deae83aee8..10494cc24b7 100644 --- a/hw/hppa/meson.build +++ b/hw/hppa/meson.build @@ -1,4 +1,5 @@ hppa_ss =3D ss.source_set() hppa_ss.add(when: 'CONFIG_DINO', if_true: files('pci.c', 'machine.c', 'din= o.c', 'lasi.c')) +hppa_ss.add(when: 'CONFIG_FW_CFG', if_true: files('fw_cfg.c')) =20 hw_arch +=3D {'hppa': hppa_ss} diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build index 275c0f7eb7c..ab4d3adb924 100644 --- a/hw/riscv/meson.build +++ b/hw/riscv/meson.build @@ -8,5 +8,6 @@ riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u.c')) riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c')) riscv_ss.add(when: 'CONFIG_MICROCHIP_PFSOC', if_true: files('microchip_pfs= oc.c')) +riscv_ss.add(when: 'CONFIG_FW_CFG', if_true: files('fw_cfg.c')) =20 hw_arch +=3D {'riscv': riscv_ss} --=20 2.26.3 From nobody Sun Feb 8 23:54:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1619465760; cv=none; d=zohomail.com; s=zohoarc; b=l95YL/a7KwbBTObDliEw0hgK8CfVdxfHvgm1zw07tMvDz7neehOcWTdcNbqgP7Rg8cv+VdZQ7O5Lku6ijD/8gPdNVQQKjhKRgq6pgVD1bmeR9d/P8TgHI1wMusRWHBUH0FnA267JdAKx/MRYwPecNzW36ArQQUEntRA1UUcPaFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619465760; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=/SwK7FX3kH1UWtK3h3/1AavB3Zp9Tje3hQEQT9u6kU8=; b=jQKwqInEq9cjPodp1uFTPRa+ysuS4sacKOpwLb6rfLgCFpESirjhYWDXS5GAh3bQTIMMuGHS2aAH9ctdNuvXQ8Q8aQdmfSDljTXylxmzDQcHV+mC/xKYNJY0Pw8EKw3AaYHJgUeL4VaK6kpmCTeGeq8mPPtjNA0UN9gtwdtLJkc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619465760814101.32820746211462; Mon, 26 Apr 2021 12:36:00 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-408-f0D_LdyXPU2xmYLOsLPSDA-1; Mon, 26 Apr 2021 15:35:57 -0400 Received: by mail-wr1-f70.google.com with SMTP id 60-20020adf85420000b0290109440de5e9so3794004wrh.10 for ; Mon, 26 Apr 2021 12:35:57 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id t63sm18527743wma.20.2021.04.26.12.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 12:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619465759; 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=/SwK7FX3kH1UWtK3h3/1AavB3Zp9Tje3hQEQT9u6kU8=; b=bTcCzCsJoyopFVbLfDA4rtz0b5ErYzeocUXSq/yL3YKZMHA49TmXByoTd3+F082XVWWgzz aW2CYAcJ2QIcNg98NiGN7hkAlyemKIrCOuUdtwVjq6FRr/eFokb9Jjwq73cKwjOb8QcoN5 3aI66QRgD7o+iNNFqDzEgbFONmuin2Y= X-MC-Unique: f0D_LdyXPU2xmYLOsLPSDA-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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/SwK7FX3kH1UWtK3h3/1AavB3Zp9Tje3hQEQT9u6kU8=; b=dOa5p2t7+AUhILYZb5/D9/oZf5DTUUicQJ/wmr2ysf0TsZIxasAfbJdPTGOLIGNlyA XilhECTmyGkj8JPy7TRNuacVQhCW1NRhztjyMnc1ug7iAIgYuyzErJdrkzUEgPhhinKf 1wyWbe5QQ8FwoY6cLlkEnCtIKgHR7WQ0GNb/s8KKPmYwwVVXb8yzGWFBadASZIrql56P VzX6CUFDqH/r0tmF+iZcwke/AyALmrggHPNQOrIlhJUcJSEcFRKdVT2Te3Iyd5QXi3yQ gTeXdDruxfD6uVhWdsZM1IObCqhsE1LgqSY2Pr8pGC/eaFJFd3mJ8GLcsNnAR77rNv++ zdag== X-Gm-Message-State: AOAM5326U17K3RqrdVppDlGPy/orJzaf2uOsRaYqchX5bAK9zye7xn5g zNGWOysJsekw+g8e85hgTsovSgVZrDgVpHH7OclmjXt0sqdyDt9IuWPWFjme3dW1vhXOnE9bu56 MH1ppi7XTjwmaVA== X-Received: by 2002:a1c:c911:: with SMTP id f17mr21525715wmb.45.1619465756711; Mon, 26 Apr 2021 12:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCXFZJfuCsZD6GeozfGMj7nTkyuZ7WzQqPIkaCKCWCw6PWoyIT0Kn90gGXuY1yLPwpzSQBTQ== X-Received: by 2002:a1c:c911:: with SMTP id f17mr21525698wmb.45.1619465756518; Mon, 26 Apr 2021 12:35:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-riscv@nongnu.org, Laszlo Ersek , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PATCH 7/7] hw/nvram: Do not build FW_CFG if not required Date: Mon, 26 Apr 2021 21:35:20 +0200 Message-Id: <20210426193520.4115528-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210426193520.4115528-1-philmd@redhat.com> References: <20210426193520.4115528-1-philmd@redhat.com> 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) If the Kconfig 'FW_CFG' symbol is not selected, it is pointless to build the fw_cfg device. Update the stubs. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- stubs/fw_cfg.c | 49 ++++++++++++++++++++++++++++++++++++++++++-- hw/nvram/meson.build | 2 +- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/stubs/fw_cfg.c b/stubs/fw_cfg.c index bb1e3c8aa95..ac1e539c93f 100644 --- a/stubs/fw_cfg.c +++ b/stubs/fw_cfg.c @@ -1,7 +1,7 @@ /* * fw_cfg stubs * - * Copyright (c) 2019 Red Hat, Inc. + * Copyright (c) 2019,2021 Red Hat, Inc. * * Author: * Philippe Mathieu-Daud=C3=A9 @@ -13,9 +13,54 @@ */ =20 #include "qemu/osdep.h" +#include "qapi/error.h" #include "hw/nvram/fw_cfg.h" =20 -const char *fw_cfg_arch_key_name(uint16_t key) +FWCfgState *fw_cfg_find(void) { return NULL; } + +bool fw_cfg_add_from_generator(FWCfgState *s, const char *filename, + const char *gen_id, Error **errp) +{ + error_setg(errp, "fw-cfg device not built in"); + + return true; +} + +void fw_cfg_add_file(FWCfgState *s, const char *filename, + void *data, size_t len) +{ + g_assert_not_reached(); +} + +void fw_cfg_add_file_callback(FWCfgState *s, const char *filename, + FWCfgCallback select_cb, + FWCfgWriteCallback write_cb, + void *callback_opaque, + void *data, size_t len, bool read_only) +{ + g_assert_not_reached(); +} + +void *fw_cfg_modify_file(FWCfgState *s, const char *filename, + void *data, size_t len) +{ + g_assert_not_reached(); +} + +void fw_cfg_set_order_override(FWCfgState *s, int order) +{ + g_assert_not_reached(); +} + +void fw_cfg_reset_order_override(FWCfgState *s) +{ + g_assert_not_reached(); +} + +bool fw_cfg_dma_enabled(void *opaque) +{ + g_assert_not_reached(); +} diff --git a/hw/nvram/meson.build b/hw/nvram/meson.build index fd2951a860f..99e12224483 100644 --- a/hw/nvram/meson.build +++ b/hw/nvram/meson.build @@ -1,7 +1,7 @@ # QOM interfaces must be available anytime QOM is used. qom_ss.add(files('fw_cfg-interface.c')) =20 -softmmu_ss.add(files('fw_cfg.c')) +softmmu_ss.add(when: 'CONFIG_FW_CFG', if_true: files('fw_cfg.c')) softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c')) softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c')) softmmu_ss.add(when: 'CONFIG_NMC93XX_EEPROM', if_true: files('eeprom93xx.c= ')) --=20 2.26.3