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 lists1p.gnu.org (lists1p.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 D456BCA5FC1 for ; Wed, 30 Sep 2026 07:40:03 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBov1-00019F-CC; Wed, 30 Sep 2026 03:39:59 -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 1xBov0-00018w-2o for qemu-arm@nongnu.org; Wed, 30 Sep 2026 03:39:58 -0400 Received: from mail-dy2-x0e.google.com ([2607:f8b0:4864:36::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xBouy-0003rP-Jt for qemu-arm@nongnu.org; Wed, 30 Sep 2026 03:39:57 -0400 Received: by mail-dy2-x0e.google.com with SMTP id 5a478bee46e88-341d0522b4dso7721407eec.1 for ; Wed, 30 Sep 2026 00:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790753995; x=1791358795; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=avGERWAPGViLuy2+4NKQbGtxaEZWL3P6uQuD6BbLacI=; b=ebgwOnv2Vt5yFMDAlU8Bi52vt/tH/ceZ10HPdSkbzhsRUKUmL0jN6W77I5C4goQ4aK J+2ARt3rLTZqN/Tey4WV6uxDjCLfPx4p3vXG/jY75kd1J5k/84jpFJtpTwaN6EXzrnlT twKjC3/US8/F1W8pYLO/1bhb3Y0U2vGjTleD6qTJLtL5ox7fdbu38hqwPLLEtkwoxhKD OUbGa7V/S6bw/iryVl/gRzw/UOM7aeZYlqmXLHpuMNyzvaNTOT57ZnU7tDELAqmmnQdI 8svMpEzXriKycBXXFbIeH2R/yhE887gC0xM/baTZ180rcXJjemxUmPvvoFrpAO332GxS WClg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790753995; x=1791358795; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=avGERWAPGViLuy2+4NKQbGtxaEZWL3P6uQuD6BbLacI=; b=lq7w97xOGDBQz9Pt3pNHzoHlnaIJMYF/NNBbuxXYMMQWhihGZ2OVLC8ZGFopyXTVox GD4uG56U0VhEzUdeqxuAPINymykPOhCSCsPZtzhMSM9h92SnVlBbWyo0NgC6ZAbszEf5 6vBgtnNbnLJg4iXO3zS8/eca6kDMMPLfulxCDFipuYu2yRrqSiMcBzWv/h8GYmtGy8bq bKCB+SUC8q3szUyOybOQDfNQMyIuPggnD4ieXGias0ZmstRpwoBPXJbdTfarVfRZIMmq VWK+lNdq8dWz9eN9Xq55Q4Gllq3HxZAZVfD162fzdKG76MYjlcXQ/WaMQIoyU1RKRS5y TnkQ== X-Forwarded-Encrypted: i=1; AKwUvBxW4RbrXp1HNw8yAhVXWi3L4KwG6wJdPP+rr+hlBh+LBdvDLePSEyaWFYSbZVIIs0qQHE3eI5jQOw==@nongnu.org X-Gm-Message-State: AFq9FYJUBrDbY5aRhCM36AvhuU8vCLsEBekE64RfoTMALyXj7DmzDxAd t7fhq4NqnMJCPrh55oI7LlhFMSwSaHo8Gyx1E0ZRpjZJ5xdmYLZvG9iH X-Gm-Gg: AYBFou2gPKgMw+MBnBWUfRRyoFOLZqn4R2opEy5uiTvgpKbb3mq8yzHBUjNUaonGCiY 0giDvqfO5R+/lFaZlxO0qf/rCdzfAK7d5OcjDK9EJmgLO1vPSyKn7EBJ8iGMjr8vPUEnF9JwD5T nLoo8zeUAmxm7I/6/RxqR+nQGeJeCCraQrlIjadFrurpRObula6rEoJx1qBe1fSeC/Dwv2ZXwKU N60H0LoMu1CONJ2Rm7yveHpmryFNvRK0bVdL1k2G5vp6ZC25JfUgfugN9hqOYuSYrNy6mrjoK78 chkUh8sBZh5D08WcfxRenqSmAo00GooRNim//qFurxgWcaklcZsGAheYcx2oZiF56KaiWAD018S hbqREFe0Bxn0oXDNwl3ikoorzVwZgZjdShrkluezuxLN2mk8k9276pADjBtFPlST+uXjEdtDCbd eJGRZxZWiIL1RZ6JeH5ogoI4xsymuCAluS5LDLMQCC4y4ZPdrs5N8+AotuprlIkV7h1hZGLTNYQ vsKYL15ush0lAU0Ultf56C+hGky X-Received: by 2002:a05:7300:b507:b0:340:9d9f:a5c with SMTP id 5a478bee46e88-34cdd6907admr1305963eec.36.1790753995141; Wed, 30 Sep 2026 00:39:55 -0700 (PDT) Received: from DESKTOP-Q716RM7 ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-34cf5b4349bsm1825773eec.25.2026.09.30.00.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 00:39:54 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Cc: Song Gao <17746591750@163.com>, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Alistair Francis , Peter Maydell , Paolo Bonzini , Weiwei Li , Sunil V L , Philippe Mathieu-Daude , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jiaxun Yang , qemu-riscv@nongnu.org, Palmer Dabbelt , Daniel Henrique Barboza , Chao Liu , Igor Mammedov , Richard Henderson , Ani Sinha , qemu-arm@nongnu.org, "Michael S. Tsirkin" Subject: [PATCH v2 2/6] hw/riscv/virt: prefix ACPI helpers with riscv_virt_ Date: Wed, 30 Sep 2026 15:39:29 +0800 Message-ID: <20260930073935.712-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.55.0.windows.3 In-Reply-To: <20260930073935.712-1-luoyonggang@gmail.com> References: <20260930073935.712-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:36::e; envelope-from=luoyonggang@gmail.com; helo=mail-dy2-x0e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@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-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org - virt_acpi_setup and virt_is_acpi_enabled collide with ARM virt when both architectures are linked into one qemu-system binary. - Rename the RISC-V helpers to riscv_virt_acpi_setup and riscv_virt_is_acpi_enabled. Leave file-local virt_acpi_build* names unchanged. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé --- hw/riscv/virt-acpi-build.c | 2 +- hw/riscv/virt.c | 6 +++--- include/hw/riscv/virt.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 8e516ec114..de47631852 100644 --- a/hw/riscv/virt-acpi-build.c +++ b/hw/riscv/virt-acpi-build.c @@ -1021,7 +1021,7 @@ static const VMStateDescription vmstate_virt_acpi_build = { }, }; -void virt_acpi_setup(RISCVVirtState *s) +void riscv_virt_acpi_setup(RISCVVirtState *s) { AcpiBuildTables tables; AcpiBuildState *build_state; diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d4b501802f..9bd1274841 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -705,8 +705,8 @@ static void virt_machine_done(Notifier *notifier, void *data) virt_build_smbios(s); - if (virt_is_acpi_enabled(s)) { - virt_acpi_setup(s); + if (riscv_virt_is_acpi_enabled(s)) { + riscv_virt_acpi_setup(s); } } @@ -1066,7 +1066,7 @@ static void virt_set_iommu_sys(Object *obj, Visitor *v, const char *name, visit_type_OnOffAuto(v, name, &s->iommu_sys, errp); } -bool virt_is_acpi_enabled(RISCVVirtState *s) +bool riscv_virt_is_acpi_enabled(RISCVVirtState *s) { return s->acpi != ON_OFF_AUTO_OFF; } diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index e516898f9a..d8f1342e13 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -121,9 +121,9 @@ enum { #define VIRT_PLIC_SIZE(__num_context) \ (VIRT_PLIC_CONTEXT_BASE + (__num_context) * VIRT_PLIC_CONTEXT_STRIDE) -bool virt_is_acpi_enabled(RISCVVirtState *s); +bool riscv_virt_is_acpi_enabled(RISCVVirtState *s); bool virt_is_iommu_sys_enabled(RISCVVirtState *s); -void virt_acpi_setup(RISCVVirtState *vms); +void riscv_virt_acpi_setup(RISCVVirtState *vms); /* * The virt machine physical address space used by some of the devices -- 2.55.0.windows.3