From patchwork Wed Mar 19 14:11:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 14022631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8080C35FFC for ; Wed, 19 Mar 2025 14:13:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuuAQ-0001w6-VW; Wed, 19 Mar 2025 10:13:11 -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 1tuuA9-0001hO-9b for qemu-devel@nongnu.org; Wed, 19 Mar 2025 10:12:55 -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 1tuuA2-0006k9-U6 for qemu-devel@nongnu.org; Wed, 19 Mar 2025 10:12:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742393536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gZxumUja9ZMA7v5/GxYUkXpt869qPq+P/J3qB1Vohng=; b=BcCbNW/eeLgom00IyKCwnDgBHZprULW30WrgvZ1KRU34OBg46IrjF8Vpcd6OShx3O3GcOJ 3tRR/Erx1EjOXMip/zLn5Pm8dF5JLSCHgDyImGZKMhZdjSrI0h3Aysv5GubvegJa6+65Qr iSafa5rWxAgD1WVfrqBzRuqFISe1JwM= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-460-ZIe5ZpWMPm6Rr-IbSxr0dg-1; Wed, 19 Mar 2025 10:12:12 -0400 X-MC-Unique: ZIe5ZpWMPm6Rr-IbSxr0dg-1 X-Mimecast-MFC-AGG-ID: ZIe5ZpWMPm6Rr-IbSxr0dg_1742393531 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F3097180AF67; Wed, 19 Mar 2025 14:12:10 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.45.224.38]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AFDFC1828A87; Wed, 19 Mar 2025 14:12:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6E29D18003B4; Wed, 19 Mar 2025 15:11:59 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: Bibo Mao , Kashyap Chamarthy , Paolo Bonzini , Song Gao , Jiaxun Yang , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , qemu-riscv@nongnu.org, Daniel Henrique Barboza , Liu Zhiwei , Weiwei Li , Gerd Hoffmann , Palmer Dabbelt Subject: [PATCH v3 4/6] hw/uefi-vars-sysbus: allow for riscv virt Date: Wed, 19 Mar 2025 15:11:56 +0100 Message-ID: <20250319141159.1461621-5-kraxel@redhat.com> In-Reply-To: <20250319141159.1461621-1-kraxel@redhat.com> References: <20250319141159.1461621-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass client-ip=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.337, 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_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Allow the device being added to riscv virt VMs. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Reviewed-by: Daniel Henrique Barboza --- hw/riscv/virt.c | 2 ++ hw/uefi/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index dae46f4733cd..e517002fdfc7 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -57,6 +57,7 @@ #include "hw/acpi/aml-build.h" #include "qapi/qapi-visit-common.h" #include "hw/virtio/virtio-iommu.h" +#include "hw/uefi/var-service-api.h" /* KVM AIA only supports APLIC MSI. APLIC Wired is always emulated by QEMU. */ static bool virt_use_kvm_aia_aplic_imsic(RISCVVirtAIAType aia_type) @@ -1935,6 +1936,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) hc->plug = virt_machine_device_plug_cb; machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_UEFI_VARS_SYSBUS); #ifdef CONFIG_TPM machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); #endif diff --git a/hw/uefi/Kconfig b/hw/uefi/Kconfig index ca6c2bc46a96..f139008b632b 100644 --- a/hw/uefi/Kconfig +++ b/hw/uefi/Kconfig @@ -1,3 +1,3 @@ config UEFI_VARS bool - default y if X86_64 || AARCH64 + default y if X86_64 || AARCH64 || RISCV64