From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208295; cv=none; d=zohomail.com; s=zohoarc; b=ZgFOCXCIXv8MPUocye4l4DKxAzSq2C0O3Z48W7RqZ+BF8rKnifeXZSF77E80mdkA97Khi4GJMUN5BcemI0RGFBUsjKOaSBskBq8cxIEcovfizf0Wit7w6nBxWnJ0McWU68f9y+gsUjnE1WXpJ4rpjBZjG3QNktBb4YNRVOciZbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208295; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=E8WIkk+1VabMp7gLpv0o+qQaUPvZ3MkvWgBvwO/E//8=; b=D/U2RDqCM5TmtQJvp/b6CwCc6KCBzuqrumZvAKD9Y6lqYlomeBBogyAkzq5QLZfJxOtXwIah1Hrm80Q3b/FxXPGLkZJ5KxI/xMC5OTt7MjP6JG2OFht47Z53qZYweGuZeBN/hipuwZ2A6vHAWzEYqqJn6aQtcxaur0x6WkDe4mI= 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 1693208295471224.38508648878974; Mon, 28 Aug 2023 00:38:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnZ-0006Vc-ER; Mon, 28 Aug 2023 03:36:33 -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 1qaWnQ-0006Sc-Jd for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:25 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnN-0004Iq-J5 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:24 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe24dd8898so26475975e9.2 for ; Mon, 28 Aug 2023 00:36:21 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208179; x=1693812979; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E8WIkk+1VabMp7gLpv0o+qQaUPvZ3MkvWgBvwO/E//8=; b=NbaWg0GCpnL5kaTMxiRBQVUkGoz2rvXV4PgqgJ8gyGaNTx+RJTsYJlaXbmlsVpG+16 8wIi+orImZRRgpRHSYWmuMZVkGrPy2KhZavCecjzYkyGZCgb+P1D6E20lAYAWvi428Pg yp/PE8yRPKFYScM1poyBYoX8og4Azc37uFkuIswQq9mmCPDi5NLsdCho6gHn++BsybGb BsYM7NgcrZTPPTuD/elmfNLAizN0nXd6A6ODDI1G4fGVdT0U33MUrSm29f+6acaHgBgL njQGpNMxGmCCJ8eZhECjnuoCsCHayQW3BQyqN+u5oF4yyI8pKMppx71LJ2gTSE+GVXZI fWCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208179; x=1693812979; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E8WIkk+1VabMp7gLpv0o+qQaUPvZ3MkvWgBvwO/E//8=; b=T8vVbFpR8HvMIzt+VPeZONPQ/vGH7kmiyoH1gSscIY9kbc7M1e4t0pv31YDEhNJTwy KDHzgJn1rBe9SH5lgZ4vHdkv/MwCr+WswG5u0NlRBQGgv1kav4eOADmf6hYzbFTcB/Wl 5vrsTqoIN3IbuHJqBGku8a0Pdku5VnDIfGrwbdQyfHGdHxmAH9YU2nPQbgbKleFxWNxE 1AwfLvPScgZ3eAwHnMVkhCpoURs10WI2yYLkDPe5Yuhdxf/aGkRC3vhdB8Fr+pXCxWmd xBYK/JUvVBwBWR8SyS/dKMtFmnVivSJDlvUx5QhY2/Qcz739/QV33gmdEvGweMYR77ly kicQ== X-Gm-Message-State: AOJu0YzYLzYWJ4/tJPDafYWHlq/VhWCJP9yr0CY94pKoYmOWCHC5P/Wu KfL/UFzHrQBfLnZ7sj9WKNQ9DYZqjd59TA== X-Google-Smtp-Source: AGHT+IFovM9OvG7QNGtahimpYhtHp82bdfx1EUZhB8/ADTV/lDZU7vJUehpJLW2JsMT+6MkgNYyu3A== X-Received: by 2002:a7b:c7d4:0:b0:401:b908:85a2 with SMTP id z20-20020a7bc7d4000000b00401b90885a2mr5351329wmk.23.1693208179265; Mon, 28 Aug 2023 00:36:19 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 1/8] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly Date: Mon, 28 Aug 2023 09:36:02 +0200 Message-ID: <20230828073609.5710-2-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::333; envelope-from=shentey@gmail.com; helo=mail-wm1-x333.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208297698100005 Content-Type: text/plain; charset="utf-8" This is x86-specific code, so there is no advantage in using pc_madt_cpu_entry() behind an architecture-agnostic interface. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-common.h | 3 +-- hw/i386/acpi-build.c | 3 +-- hw/i386/acpi-common.c | 5 ++--- hw/i386/acpi-microvm.c | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/i386/acpi-common.h b/hw/i386/acpi-common.h index a68825acf5..b3c56ee014 100644 --- a/hw/i386/acpi-common.h +++ b/hw/i386/acpi-common.h @@ -1,7 +1,6 @@ #ifndef HW_I386_ACPI_COMMON_H #define HW_I386_ACPI_COMMON_H =20 -#include "hw/acpi/acpi_dev_interface.h" #include "hw/acpi/bios-linker-loader.h" #include "hw/i386/x86.h" =20 @@ -9,7 +8,7 @@ #define ACPI_BUILD_IOAPIC_ID 0x0 =20 void acpi_build_madt(GArray *table_data, BIOSLinker *linker, - X86MachineState *x86ms, AcpiDeviceIf *adev, + X86MachineState *x86ms, const char *oem_id, const char *oem_table_id); =20 #endif diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index bb12b0ad43..09586b8d9b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2547,8 +2547,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState= *machine) =20 acpi_add_table(table_offsets, tables_blob); acpi_build_madt(tables_blob, tables->linker, x86ms, - ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, - x86ms->oem_table_id); + x86ms->oem_id, x86ms->oem_table_id); =20 #ifdef CONFIG_ACPI_ERST { diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 8a0932fe84..43dc23f7e0 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -94,14 +94,13 @@ build_xrupt_override(GArray *entry, uint8_t src, uint32= _t gsi, uint16_t flags) * 5.2.8 Multiple APIC Description Table */ void acpi_build_madt(GArray *table_data, BIOSLinker *linker, - X86MachineState *x86ms, AcpiDeviceIf *adev, + X86MachineState *x86ms, const char *oem_id, const char *oem_table_id) { int i; bool x2apic_mode =3D false; MachineClass *mc =3D MACHINE_GET_CLASS(x86ms); const CPUArchIdList *apic_ids =3D mc->possible_cpu_arch_ids(MACHINE(x8= 6ms)); - AcpiDeviceIfClass *adevc =3D ACPI_DEVICE_IF_GET_CLASS(adev); AcpiTable table =3D { .sig =3D "APIC", .rev =3D 3, .oem_id =3D oem_id, .oem_table_id =3D oem_table_id }; =20 @@ -111,7 +110,7 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *li= nker, build_append_int_noprefix(table_data, 1 /* PCAT_COMPAT */, 4); /* Flag= s */ =20 for (i =3D 0; i < apic_ids->len; i++) { - adevc->madt_cpu(i, apic_ids, table_data, false); + pc_madt_cpu_entry(i, apic_ids, table_data, false); if (apic_ids->cpus[i].arch_id > 254) { x2apic_mode =3D true; } diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index a075360d85..fec22d85c1 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -214,8 +214,7 @@ static void acpi_build_microvm(AcpiBuildTables *tables, =20 acpi_add_table(table_offsets, tables_blob); acpi_build_madt(tables_blob, tables->linker, X86_MACHINE(machine), - ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id, - x86ms->oem_table_id); + x86ms->oem_id, x86ms->oem_table_id); =20 #ifdef CONFIG_ACPI_ERST { --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208312; cv=none; d=zohomail.com; s=zohoarc; b=n4FltNuuFOVVQCdkcTy1FOnpSW3pqK4U+5cx5Trv65Z167IufiYSUjbYutWoo8gDfGyco1vOrbFRIogQfz5wYD5wBtFuNT0yBV75cYfn07XR0S3lnZ1jdwiyQFDDJ9CrlqBB3IMUzwgwsEBE6YdOal95LieFx/SFVJT8RvNcfjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208312; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=StfMQ7yyQc/VnKac7occRcBTAIqflJOOrES/qO1oM/8=; b=AOEqYuy/pQE6lYntIy8VZvzRg5o3Pr1DnGAu0LwpXOKwBeZdE/c4H1XCDpaMvXJYl2MkhYcrOM1+/LOB6BZ+XbgqICVr2/m1gf338YQHpqZcvZxtoBRmVmh1zWr2gf1TRYXtu8X70xXv62gGZeR7bAPsUfGHuLLZYDb1+OlwYlc= 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 1693208312332273.11934763335364; Mon, 28 Aug 2023 00:38:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWna-0006Wk-6J; Mon, 28 Aug 2023 03:36:34 -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 1qaWnR-0006T6-41 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:25 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnO-0004Iu-Np for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:24 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fe4cdb72b9so28123425e9.0 for ; Mon, 28 Aug 2023 00:36:22 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208181; x=1693812981; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=StfMQ7yyQc/VnKac7occRcBTAIqflJOOrES/qO1oM/8=; b=muUz4l0kTvSuN5c1gbwG0df980lCN9N6lz+dyO5c4wfFup6yjQGd2W4b1/94T+mf/Z ztcCzuuvSCUSSZC3+2Yn/krN8NBrKfBJMeyKjhh44IPZxNQD4Nzdwc3sIhiFIkH+w9Lm tAcOE6ltk6ZX+ub1ahGTR0tJg/P4EEuUwMr/CzpiORqc2xOE/Z4LK6QM411lAUBLJZJ2 xMeuOaVlfUTo3AJWVXC2YuK1xpiCP0nppP8zFMV4mnO/UP2jbDvOOm+J9i7m6zljma1I 5o8iyrR0wfwVeymF4BJC0f4rAw6clajDqTr90Xo60c/xcCm0827i7oSjYVAviraIR1Kn VNgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208181; x=1693812981; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=StfMQ7yyQc/VnKac7occRcBTAIqflJOOrES/qO1oM/8=; b=d/XFgxWJVeOXv9OU7D1FSaZkn/HNrkI4sQA5o1XuACqyz3u2nIu15WJNJkK1RARGIU CwRAI5hKjxr8DaH6/iM74C+t+srVO6+79iPyErqTtV5Dy3/l8tbqm5suhKbpMEx5A3Ck Gql/L5jUQQoqznFgGZrEk6M0E44CcdV4L/jTGaV7aTb5KjH9B6cROfiTysiGgKw7xovN SGz2siuuysxL+wwZ7Gv4Gf2arrTKYQUh9Wg3NvVV3MdKRxeDUGQCpWo1F7uZRDLEJzcH ioItLJsmmqGYIeNCgnKLG/0xHrATmNFsnEZCHsyQhiC9aJhGYZnazG53HavFW6K063r+ S6cw== X-Gm-Message-State: AOJu0YwWIaBAkTKcznFdQC8Wg3leev+WQeU0n+11V6WUMGNK6HJ4o4lV h21ak4cCgtT8hnsJhh0Qhy2CxQUo5hMnoA== X-Google-Smtp-Source: AGHT+IFOqYXoWSTUI6oWvT6T5IjrKxpv3B9wY2GXyBKjs1cxLm965S/vPGhKcZ5YFhXu03ptPFDEFA== X-Received: by 2002:a1c:7303:0:b0:3fe:19cf:93c9 with SMTP id d3-20020a1c7303000000b003fe19cf93c9mr18754669wmb.1.1693208180796; Mon, 28 Aug 2023 00:36:20 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 2/8] hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback Date: Mon, 28 Aug 2023 09:36:03 +0200 Message-ID: <20230828073609.5710-3-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::329; envelope-from=shentey@gmail.com; helo=mail-wm1-x329.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208313792100001 Content-Type: text/plain; charset="utf-8" build_cpus_aml() is architecture independent but needs to create architectu= re- specific CPU AML. So far this was achieved by using a virtual method from TYPE_ACPI_DEVICE_IF. However, build_cpus_aml() would resolve this interface= from global (!) state. This makes it quite incomprehensible where this interface comes from (TYPE_PIIX4_PM?, TYPE_ICH9_LPC_DEVICE?, TYPE_ACPI_GED_X86?) an c= an lead to crashes when the generic code is ported to new architectures. So far, build_cpus_aml() is only called in architecture-specific code -- and only in x86. We can therefore simply pass pc_madt_cpu_entry() as callback to build_cpus_aml(). This is the same callback that would be used through TYPE_ACPI_DEVICE_IF. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/acpi/cpu.h | 6 +++++- hw/acpi/cpu.c | 8 ++------ hw/i386/acpi-build.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h index 999caaf510..bc901660fb 100644 --- a/include/hw/acpi/cpu.h +++ b/include/hw/acpi/cpu.h @@ -15,6 +15,7 @@ #include "hw/qdev-core.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" +#include "hw/boards.h" #include "hw/hotplug.h" =20 typedef struct AcpiCpuStatus { @@ -55,8 +56,11 @@ typedef struct CPUHotplugFeatures { const char *smi_path; } CPUHotplugFeatures; =20 +typedef void (*build_madt_cpu_fn)(int uid, const CPUArchIdList *apic_ids, + GArray *entry, bool force_enabled); + void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures = opts, - hwaddr io_base, + build_madt_cpu_fn build_madt_cpu, hwaddr io_base, const char *res_root, const char *event_handler_method); =20 diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 19c154d78f..65a3202d3f 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -338,7 +338,7 @@ const VMStateDescription vmstate_cpu_hotplug =3D { #define CPU_FW_EJECT_EVENT "CEJF" =20 void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures = opts, - hwaddr io_base, + build_madt_cpu_fn build_madt_cpu, hwaddr io_base, const char *res_root, const char *event_handler_method) { @@ -353,8 +353,6 @@ void build_cpus_aml(Aml *table, MachineState *machine, = CPUHotplugFeatures opts, MachineClass *mc =3D MACHINE_GET_CLASS(machine); const CPUArchIdList *arch_ids =3D mc->possible_cpu_arch_ids(machine); char *cphp_res_path =3D g_strdup_printf("%s." CPUHP_RES_DEVICE, res_ro= ot); - Object *obj =3D object_resolve_path_type("", TYPE_ACPI_DEVICE_IF, NULL= ); - AcpiDeviceIfClass *adevc =3D ACPI_DEVICE_IF_GET_CLASS(obj); =20 cpu_ctrl_dev =3D aml_device("%s", cphp_res_path); { @@ -664,9 +662,7 @@ void build_cpus_aml(Aml *table, MachineState *machine, = CPUHotplugFeatures opts, aml_append(dev, method); =20 /* build _MAT object */ - assert(adevc && adevc->madt_cpu); - adevc->madt_cpu(i, arch_ids, madt_buf, - true); /* set enabled flag */ + build_madt_cpu(i, arch_ids, madt_buf, true); /* set enabled fl= ag */ aml_append(dev, aml_name_decl("_MAT", aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data))); g_array_free(madt_buf, true); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 09586b8d9b..c8ac665d36 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1549,8 +1549,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, .smi_path =3D pm->smi_on_cpuhp ? "\\_SB.PCI0.SMI0.SMIC" : NULL, .fw_unplugs_cpu =3D pm->smi_on_cpu_unplug, }; - build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base, - "\\_SB.PCI0", "\\_GPE._E02"); + build_cpus_aml(dsdt, machine, opts, pc_madt_cpu_entry, + pm->cpu_hp_io_base, "\\_SB.PCI0", "\\_GPE._E02"); } =20 if (pcms->memhp_io_base && nr_mem) { --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208237; cv=none; d=zohomail.com; s=zohoarc; b=mi/bNfbNUqkUnWozAb1rXuDwfYQBVBm2MVgJx7o4TCL/KfTGz38Y9nEA8NL01GftXjqWqJBlGuzai7zjTA6KQdoc6817NXQNSutxfkqmC+8ceXbNJOcGHjhRtpLAbhvQmLU/aJNAcaVsBSnT9n0HEFfiMWnM0dC8xPVbGtAAn2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208237; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fKq8BOH9tAPeBWGcEvkFYeZLCjPKRsCheapynaM2kEk=; b=k8T2hZBAXyEFv0tY+HGBFehmksceD5tdcrbQCSsE+c2jEFSF6ixOQCzzygdkuaxy02sK5/80v8Os4NSaEXXpMfyEb8NR0dJEAveUchHAflgRyqmslGl3raEm+Z7TdRhtEPYz6KqSJL/bARCJNrg7C3evM+WFQIykwFF9QLgLqpM= 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 1693208237605184.54824046269027; Mon, 28 Aug 2023 00:37:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnY-0006Ur-DS; Mon, 28 Aug 2023 03:36:32 -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 1qaWnS-0006Td-S6 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:27 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnQ-0004J9-I5 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:26 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-401b5516104so26331425e9.2 for ; Mon, 28 Aug 2023 00:36:24 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208182; x=1693812982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fKq8BOH9tAPeBWGcEvkFYeZLCjPKRsCheapynaM2kEk=; b=fr520EBpAJlzD1B3reRYQQKqp8v1AhhJUvGUX9FfHV+2tC39FUSfuV83JwmxyvRPhn 0X5js9TD4aOWBCigswuQsYON6agrbkwbjD98hD16/NpfdAzshM+U/BcAqgDYRB2IERsu zr8jvhl+JN1404bqx20FbcL0rQfuqeMshQ4DvHwI94zzP1exboPZm5NVOFv5M5htXrjo pcIuy1oprBU5c+JPIyYbNlLJ+GTGk9cK7Sdj2OrBY7WGW5UuXh9r2vczVbTSxuxQDCLQ dGibW3+0nfYMzuND2lkrcqczQimJX7GBkNhXFWoLjDDkueqMV8diBEhDCK3RjU8TN9m9 9fJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208182; x=1693812982; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fKq8BOH9tAPeBWGcEvkFYeZLCjPKRsCheapynaM2kEk=; b=E1lam/MNUJcaMPOo8Bassxgf7XtDz/Qa2ZbzdzkAzy8k3ta+OzCpfwGJXlxfKaiSei lYXm/Wo/NceZi5JIgsqNBtddjVcELpMiotwalSW2owOZOVlcPCphvkThsbRBFxSwmIJU 3CPa1LSS6qVGvYQxnpCaDS7KOn1BaYMsaWz/3jg6I+NszRsLt6GF+Rc4v7BjCnCh5mQT heZ4pNAJJ+UCPdlUq9pVikPMg+w2BbXXWQ0gkkzZZYdWWAKKqC8NyGKluBPIrVx21ZoU iQGjFSgmj6RZFFw34JObg/aRyjvuJhsPC3cxiDDgsZu1XgYhKTmhxRX+6ooieg+kLiR+ 7Cbg== X-Gm-Message-State: AOJu0YwLQmV+mGRjIMCHSdgBNAkXUwYH0z+/GTAKU8CYHyM0C3VF+wCv juRF91TK8n4VBVw7TzBMM5JTnKLKB0yBsg== X-Google-Smtp-Source: AGHT+IEVPXMS8NAJZt0BVrAy7vmlG5+in+ns1TsUe3kDCbSDK2CRg3h+97VrsaNCFKdr3jeBJFhdbQ== X-Received: by 2002:a7b:c38b:0:b0:3fe:2463:2614 with SMTP id s11-20020a7bc38b000000b003fe24632614mr17943895wmj.24.1693208182333; Mon, 28 Aug 2023 00:36:22 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 3/8] hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method Date: Mon, 28 Aug 2023 09:36:04 +0200 Message-ID: <20230828073609.5710-4-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::32b; envelope-from=shentey@gmail.com; helo=mail-wm1-x32b.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208238408100005 Content-Type: text/plain; charset="utf-8" This virtual method was always set to the x86-specific pc_madt_cpu_entry(), even in piix4 which is also used in MIPS. The previous changes use pc_madt_cpu_entry() otherwise, so madt_cpu can be dropped. Since pc_madt_cpu_entry() is now only used in x86-specific code, the stub in hw/acpi/acpi-x86-stub can be removed as well. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/acpi/acpi_dev_interface.h | 2 -- hw/acpi/acpi-x86-stub.c | 6 ------ hw/acpi/piix4.c | 2 -- hw/i386/generic_event_device_x86.c | 9 --------- hw/isa/lpc_ich9.c | 1 - 5 files changed, 20 deletions(-) diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_de= v_interface.h index a1648220ff..ca92928124 100644 --- a/include/hw/acpi/acpi_dev_interface.h +++ b/include/hw/acpi/acpi_dev_interface.h @@ -52,7 +52,5 @@ struct AcpiDeviceIfClass { /* */ void (*ospm_status)(AcpiDeviceIf *adev, ACPIOSTInfoList ***list); void (*send_event)(AcpiDeviceIf *adev, AcpiEventStatusBits ev); - void (*madt_cpu)(int uid, const CPUArchIdList *apic_ids, GArray *entry, - bool force_enabled); }; #endif diff --git a/hw/acpi/acpi-x86-stub.c b/hw/acpi/acpi-x86-stub.c index d0d399d26b..9662a594ad 100644 --- a/hw/acpi/acpi-x86-stub.c +++ b/hw/acpi/acpi-x86-stub.c @@ -1,12 +1,6 @@ #include "qemu/osdep.h" -#include "hw/i386/pc.h" #include "hw/i386/acpi-build.h" =20 -void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, - GArray *entry, bool force_enabled) -{ -} - Object *acpi_get_i386_pci_host(void) { return NULL; diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 63d2113b86..a7892c444c 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -20,7 +20,6 @@ */ =20 #include "qemu/osdep.h" -#include "hw/i386/pc.h" #include "hw/irq.h" #include "hw/isa/apm.h" #include "hw/i2c/pm_smbus.h" @@ -654,7 +653,6 @@ static void piix4_pm_class_init(ObjectClass *klass, voi= d *data) hc->is_hotpluggable_bus =3D piix4_is_hotpluggable_bus; adevc->ospm_status =3D piix4_ospm_status; adevc->send_event =3D piix4_send_gpe; - adevc->madt_cpu =3D pc_madt_cpu_entry; } =20 static const TypeInfo piix4_pm_info =3D { diff --git a/hw/i386/generic_event_device_x86.c b/hw/i386/generic_event_dev= ice_x86.c index e26fb02a2e..8fc233e1f1 100644 --- a/hw/i386/generic_event_device_x86.c +++ b/hw/i386/generic_event_device_x86.c @@ -8,19 +8,10 @@ =20 #include "qemu/osdep.h" #include "hw/acpi/generic_event_device.h" -#include "hw/i386/pc.h" - -static void acpi_ged_x86_class_init(ObjectClass *class, void *data) -{ - AcpiDeviceIfClass *adevc =3D ACPI_DEVICE_IF_CLASS(class); - - adevc->madt_cpu =3D pc_madt_cpu_entry; -} =20 static const TypeInfo acpi_ged_x86_info =3D { .name =3D TYPE_ACPI_GED_X86, .parent =3D TYPE_ACPI_GED, - .class_init =3D acpi_ged_x86_class_init, .interfaces =3D (InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, { TYPE_ACPI_DEVICE_IF }, diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 9c47a2f6c7..92527f3c75 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -876,7 +876,6 @@ static void ich9_lpc_class_init(ObjectClass *klass, voi= d *data) hc->is_hotpluggable_bus =3D ich9_pm_is_hotpluggable_bus; adevc->ospm_status =3D ich9_pm_ospm_status; adevc->send_event =3D ich9_send_gpe; - adevc->madt_cpu =3D pc_madt_cpu_entry; amldevc->build_dev_aml =3D build_ich9_isa_aml; } =20 --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208278; cv=none; d=zohomail.com; s=zohoarc; b=IXturE9L6mcMiN79+CJ0VFPsO81Awg1RuKjsMDXCMSVx9d7sVbW632pZsOtP961IFHmTBmNDV85SbtXcv+c8tznvW9dbukWSaS0HkW5yH10n2C2yCwUpRH7Z++iApM5oU8L0jCquMBARu3lQVv62RVC3FV0BFq0lQ+EvAtvwStU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208278; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KlQwOv5k0qgcpbp2WOyNSYWRjL1JVN9nnZMS2sL7pc8=; b=IGTfWXST2+7HA711n9WPRUApUBuvyI8Mcy/ZlE5SEvcj1oOm1RqPHeZnQosxA4dfYWslCPZYEMtNIfjtkHrducB87VKjJfeh5Wr5HJhaMF8nxIdb7JM9AsERnScqEE7zeRyY0EySJDYmWG0REYV6edfOYtWFj81kyeJMlu8qdS0= 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 169320827884146.65276564369856; Mon, 28 Aug 2023 00:37:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnZ-0006Vp-Km; Mon, 28 Aug 2023 03:36:33 -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 1qaWnU-0006Tl-5p for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:29 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnR-0004JN-UZ for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:27 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4018af103bcso17664815e9.1 for ; Mon, 28 Aug 2023 00:36:25 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208184; x=1693812984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KlQwOv5k0qgcpbp2WOyNSYWRjL1JVN9nnZMS2sL7pc8=; b=KYITN2o8EvZoomWh33I7HsM09y1uKv9Z0vypbuq5gMhuviAzQ1yt0Q5yrdtItx14No iy5zkmVaMIcwmn+ww/8efK5fIHJ90ZU3plHQVNO2UGZ+RwdakJiN31SBp/Sd73uVhEaE VDDQkyl4l0VP0bubHI1Ztv4ZZ+yDtGkxuEx9PFO1WaeqR+3pLVGSDePj/ITMwDCof3By X05iXv1U40nG7/67z5IyJwCP+mVKI9FPkkvFR2MKZD4G7RQDFxc/mB1OY8SzqThfd1JM 8/E/Y7WXGhJnzzuoB8sn847RWaANWzNeaR6AJx1unZZD6wYBHZn7FI4+Yhbfp4J04pWs ddMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208184; x=1693812984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KlQwOv5k0qgcpbp2WOyNSYWRjL1JVN9nnZMS2sL7pc8=; b=ectIBVtWWBfGC0CD3dw4lbzjrpJ/8bZHwHkjiNSTdPhD5x8UTWVdtvzszVr3wgqjLu NY30E2IZOFhEjwq19KWWqgdAHFMtpWWClAXsosz1cgaiJ8Wi2DU0ExRrFPmzc5iCZ2hw ZryKX8nPYWFplavuTX7EHLrmvD/XiKZTFU/2+r3PmhLuXJk1NtkUDGoUfsLSSOPTJi3q fsgARjCRyqvdG8nPClGABz4nRAOk9nrvwefb2VqNwvs68BuX0xoOihpN0XIYIw2DbkMa yieyoDMPsSw49vXyQaLjxMcJCM/If1fJCnOzQTlkQ1qhgCMP5eFCZ8Ihz186mwW9p3ST 3a6w== X-Gm-Message-State: AOJu0YxxKIIQu9Y4WSybT7suWPSHlOqhZZTwbJXVomdUoCdkev28N/Qf RJLGdM9Nk5TNFSgZGjG8uyd8ZoRazZ630w== X-Google-Smtp-Source: AGHT+IHDg9H6PT5mF+/EPNtC6msjPmq1JnyFG0AiOhtCQu7fy2yMtjXlgp16VqO+q/oyfR3+amf46A== X-Received: by 2002:a05:600c:1e85:b0:401:bcec:be3e with SMTP id be5-20020a05600c1e8500b00401bcecbe3emr4715264wmb.17.1693208184168; Mon, 28 Aug 2023 00:36:24 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 4/8] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h" Date: Mon, 28 Aug 2023 09:36:05 +0200 Message-ID: <20230828073609.5710-5-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::32a; envelope-from=shentey@gmail.com; helo=mail-wm1-x32a.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208279156100003 Content-Type: text/plain; charset="utf-8" The "hw/boards.h" is unused since the previous commit. Since its removal requires include fixes in various unrelated files to keep the code compilin= g it has been split in a dedicated commit. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/acpi/hmat.h | 3 ++- include/hw/acpi/acpi_dev_interface.h | 1 - hw/acpi/cpu.c | 1 + hw/acpi/hmat.c | 1 + hw/acpi/memory_hotplug.c | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/acpi/hmat.h b/hw/acpi/hmat.h index b57f0e7e80..fd989cb661 100644 --- a/hw/acpi/hmat.h +++ b/hw/acpi/hmat.h @@ -27,7 +27,8 @@ #ifndef HMAT_H #define HMAT_H =20 -#include "hw/acpi/aml-build.h" +#include "hw/acpi/bios-linker-loader.h" +#include "sysemu/numa.h" =20 /* * ACPI 6.3: 5.2.27.3 Memory Proximity Domain Attributes Structure, diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_de= v_interface.h index ca92928124..68d9d15f50 100644 --- a/include/hw/acpi/acpi_dev_interface.h +++ b/include/hw/acpi/acpi_dev_interface.h @@ -3,7 +3,6 @@ =20 #include "qapi/qapi-types-acpi.h" #include "qom/object.h" -#include "hw/boards.h" #include "hw/qdev-core.h" =20 /* These values are part of guest ABI, and can not be changed */ diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 65a3202d3f..011d2c6c2d 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -1,6 +1,7 @@ #include "qemu/osdep.h" #include "migration/vmstate.h" #include "hw/acpi/cpu.h" +#include "hw/core/cpu.h" #include "qapi/error.h" #include "qapi/qapi-events-acpi.h" #include "trace.h" diff --git a/hw/acpi/hmat.c b/hw/acpi/hmat.c index 3a6d51282a..d9de0daf89 100644 --- a/hw/acpi/hmat.c +++ b/hw/acpi/hmat.c @@ -27,6 +27,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "sysemu/numa.h" +#include "hw/acpi/aml-build.h" #include "hw/acpi/hmat.h" =20 /* diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index d926f4f77d..0b883df813 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -1,6 +1,7 @@ #include "qemu/osdep.h" #include "hw/acpi/memory_hotplug.h" #include "hw/mem/pc-dimm.h" +#include "hw/boards.h" #include "hw/qdev-core.h" #include "migration/vmstate.h" #include "trace.h" --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208277; cv=none; d=zohomail.com; s=zohoarc; b=LnRQW1KLxyRdrNW7u4hDwJHio9af77bBcxyDZf55G/FTc/O0WCbZXHLJd8v2zj1kNDNcNC55CXT114UmJ8WfwRPGf0pdy3IqiAMADnF6nVTr7ulq0dvcFooGBe/mVbZFTLcl7104kdDlSbke4cxf/HAn/b1k4Is8Tz9ujNM/oEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208277; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SYYQ7lw1jAZ/eBJOaSdtRHZgaPVGYm3aKDK2fm6mjko=; b=bR1bfA5A6Aq+fudgnPCxEl94my7jGJKfBO8S9pmhzRalfneoh8TxOq4j0Z8Abtxfp90nQebajH2W3wWuvDDTpJqdcaW7iqWXj2LtiGB9g1gDCI3lp6LcB4u56Y0isvtTSq5Fu6Pz7pmchEM7mRDf/4Z33k5TVBXXjMm5VRz7cqw= 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 1693208277506228.46790629841348; Mon, 28 Aug 2023 00:37:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnb-0006Xw-9t; Mon, 28 Aug 2023 03:36:35 -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 1qaWnV-0006U4-V5 for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:30 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnT-0004JW-KF for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:29 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fee600dce6so27182255e9.1 for ; Mon, 28 Aug 2023 00:36:27 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208185; x=1693812985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SYYQ7lw1jAZ/eBJOaSdtRHZgaPVGYm3aKDK2fm6mjko=; b=cMOr6Y7WjUNp/voojFLbfpcT7+08hee0snIDEudHeZ8zUtMoIzesyYcecO2MZimUL4 IA7auf7h9dQIQPD288Vlt6MRvvoiqWeR0Kr88IOiSG6YGEq4Z/RaWiA9X7jd/c5Jjq2I XyFaMh7q5LhBLA9hVoa4fJrVrGhNtmPALQhmk9vJRlfc9JpkXTa8aJVCY8C9qaQPoN3A z9TBlsTIVY+yyX1wV2O7Ln4OdHdq0tHUps8ZZnyZ1whIU7beeUniXZuHFaDHdqrna+Eo zsVimmq49QS3Pso096REogazzbtDpNmA+17tvJKlrt6ZYp3zoU3BdfeCkYy9bhkqc2pM 5YbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208185; x=1693812985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SYYQ7lw1jAZ/eBJOaSdtRHZgaPVGYm3aKDK2fm6mjko=; b=JfjmVy6sQGxBbrFzmg0+afHd31LMXCsvoou1m35FHPU5juRBsXz1Og25F6uh1/pPVq Umx7GD3XoEZY8d/6L1k9y8LN4TfRlF+p3K6oq6Uez3I53pQ7WZ/GEXwKFeejP/Lj3anL g6Qe/eALt8iBrRCwELMUXu6H7ephhjN8drpCGKqvSX2zOapAIIv/nYzdTUvedFuFizh5 AouOWX8QHaH9A1B+KqCi0D+0RXn2IZ8g/HIIWXiTFi9ieFupB8ogttiJlPzPJ0jFI48t Ukpsh7GDnLfqmiDdR6X4eNs7lAvYUCtM2WoewjCLFrBl82/fWcjcczQmj/hUdwWy/9X/ DBtw== X-Gm-Message-State: AOJu0YynQRZ7KlrBxIejAVHwbsoKXHU5VPpvduy6zB1uyDQATaItHqDy eAmekOQpE3WNX86QTOOdFihoevO7yR9cyw== X-Google-Smtp-Source: AGHT+IHWN4Mk4ZFoVGmxZ+M0xJWd6i/vAx/iqkc2HQMFe7dpIVES5RW84XPt+ipgu9FC8w3t9C6zWg== X-Received: by 2002:a7b:cd14:0:b0:3fc:f9c:a3e6 with SMTP id f20-20020a7bcd14000000b003fc0f9ca3e6mr18691851wmj.9.1693208185482; Mon, 28 Aug 2023 00:36:25 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 5/8] hw/i386: Remove now redundant TYPE_ACPI_GED_X86 Date: Mon, 28 Aug 2023 09:36:06 +0200 Message-ID: <20230828073609.5710-6-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::32c; envelope-from=shentey@gmail.com; helo=mail-wm1-x32c.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208279601100007 Content-Type: text/plain; charset="utf-8" Now that TYPE_ACPI_GED_X86 doesn't assign AcpiDeviceIfClass::madt_cpu any m= ore it is the same as TYPE_ACPI_GED. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/acpi/generic_event_device.h | 2 -- hw/i386/generic_event_device_x86.c | 27 -------------------------- hw/i386/microvm.c | 2 +- hw/i386/meson.build | 1 - 4 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 hw/i386/generic_event_device_x86.c diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/gener= ic_event_device.h index d831bbd889..ba84ce0214 100644 --- a/include/hw/acpi/generic_event_device.h +++ b/include/hw/acpi/generic_event_device.h @@ -69,8 +69,6 @@ #define TYPE_ACPI_GED "acpi-ged" OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED) =20 -#define TYPE_ACPI_GED_X86 "acpi-ged-x86" - #define ACPI_GED_EVT_SEL_OFFSET 0x0 #define ACPI_GED_EVT_SEL_LEN 0x4 =20 diff --git a/hw/i386/generic_event_device_x86.c b/hw/i386/generic_event_dev= ice_x86.c deleted file mode 100644 index 8fc233e1f1..0000000000 --- a/hw/i386/generic_event_device_x86.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * x86 variant of the generic event device for hw reduced acpi - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2 or later, as published by the Free Software Foundation. - */ - -#include "qemu/osdep.h" -#include "hw/acpi/generic_event_device.h" - -static const TypeInfo acpi_ged_x86_info =3D { - .name =3D TYPE_ACPI_GED_X86, - .parent =3D TYPE_ACPI_GED, - .interfaces =3D (InterfaceInfo[]) { - { TYPE_HOTPLUG_HANDLER }, - { TYPE_ACPI_DEVICE_IF }, - { } - } -}; - -static void acpi_ged_x86_register_types(void) -{ - type_register_static(&acpi_ged_x86_info); -} - -type_init(acpi_ged_x86_register_types) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 7227a2156c..d5cde2f075 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -202,7 +202,7 @@ static void microvm_devices_init(MicrovmMachineState *m= ms) =20 /* Optional and legacy devices */ if (x86_machine_is_acpi_enabled(x86ms)) { - DeviceState *dev =3D qdev_new(TYPE_ACPI_GED_X86); + DeviceState *dev =3D qdev_new(TYPE_ACPI_GED); qdev_prop_set_uint32(dev, "ged-event", ACPI_GED_PWR_DOWN_EVT); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, GED_MMIO_BASE); /* sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, GED_MMIO_BASE_MEMHP); */ diff --git a/hw/i386/meson.build b/hw/i386/meson.build index cfdbfdcbcb..ff879069c9 100644 --- a/hw/i386/meson.build +++ b/hw/i386/meson.build @@ -20,7 +20,6 @@ i386_ss.add(when: 'CONFIG_SGX', if_true: files('sgx-epc.c= ','sgx.c'), if_false: files('sgx-stub.c')) =20 i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c')) -i386_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_= device_x86.c')) i386_ss.add(when: 'CONFIG_PC', if_true: files( 'pc.c', 'pc_sysfw.c', --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208254; cv=none; d=zohomail.com; s=zohoarc; b=UBirQFmtgoefJjxH9WBJM6h9gokhnmqEj1pu+lyLDdRZbMRXwoU0z4UIPrb0+AQd4U4XO1R55Hvpz7d5ZVUTAmSYniFGtpmxllqouioMqI82XOj3M9PXqMV+8VF1FcqetpUWi/fUOB0YqRFMgrhVQfDc/yGW3bIwqhtoEup4wmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208254; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=isUKcGkR4S/VOrC+rILLjK0omM6J0l9heaTNLtti6B4=; b=T3G++0bNTO2RNr+tpWe9PaK7K+yo8wL1fSbJtFVRnyhK+nEIgBq3FovNu9zBc1CweBjFjTeqGgOS/l6pOuB4o1D34kBzsGwj8hDKCXW6Cs84jKa55kf7nKCKxpKvk95xrdF+TWaKUI3DHIsNe19nvVtLkn3SLw9SfYbrT0kguFI= 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 1693208254252555.8249234499989; Mon, 28 Aug 2023 00:37:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnc-0006ZE-2k; Mon, 28 Aug 2023 03:36:36 -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 1qaWnX-0006UV-TC for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:31 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnV-0004Jk-Fq for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:31 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fed963273cso23238205e9.1 for ; Mon, 28 Aug 2023 00:36:29 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208187; x=1693812987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=isUKcGkR4S/VOrC+rILLjK0omM6J0l9heaTNLtti6B4=; b=DIt0S4S8RyvZ/2kkMp3E9Sok6tost+J8Tm/OVtEbffzx+bn3rbW6d7HaDNnE4ZA0pV hWXo45UXRHyZcGWoYeAlVHiYQMIYizYJ3zfQqkEQzB4xUuPCb4WJSpjMEcOcyRIwOHTX 45ud/CmR3w/k/R765dg24us3/jszAjxjrX0pB5ATdLy6grizbXBlaM0fn7NZ3A1K1eoL fAd8sD1LzsMNH2Mj6IvSWKdw2wcst+o8aI62U5WdkV9F5oH9uENAeEJKNLu55Zu5JXtR RwTN0geKtAjD67kr+vLzIeQ+OPohOgKkuNn47ucucw+WdGSFg68fk2sD4qglGVlrkV0N PdcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208187; x=1693812987; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=isUKcGkR4S/VOrC+rILLjK0omM6J0l9heaTNLtti6B4=; b=EecRNty30vi6pBYJGa2BlHd8Hj/fxVM1GfMm0uyKW6f4jiHgyQoG1J6Ae1CbHxk2zr xPw2F0nOyFavZy/B76EAQLksA6d0ayUEkgdokJU+y/cebJOOcF+IOGy6+LNmnNSiYWRZ C0G89s9P9/zdiniBOklcqNfTTb7D5WloPag5tjCMusBJTybNf6KwT/6mlNkzGGIFeNP6 nXftkDGuHdP6nW9Wh1Iyt9mVMIvii+YZru2dsRx/2NiAm/jd9CX2iWl3cnEZT8/oXTIJ mRGJsrSJ+Jnk9znujxuZ1kuYTbVinzCb3FXyXm/m+wREJqIs9zry8p7a/BilSUEI7I6f dicA== X-Gm-Message-State: AOJu0YwnhVUIjWdk/R8k4oB05Fcfob82GJvWvhulgVesk7s52kbeL3DW 1kmXL5ay0ZZDF87anVz/KCuUDoJhYp9KPw== X-Google-Smtp-Source: AGHT+IGEQK+2fOd0YuFNSuzs/2saLR1QoUAEIo1Fh6j4/dbI9YGSARrKsguYO/qlFatbiXmfLQRv5Q== X-Received: by 2002:a05:600c:2103:b0:401:bc03:1aae with SMTP id u3-20020a05600c210300b00401bc031aaemr5243269wml.12.1693208187385; Mon, 28 Aug 2023 00:36:27 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 6/8] hw/i386/acpi-build: Determine SMI command port just once Date: Mon, 28 Aug 2023 09:36:07 +0200 Message-ID: <20230828073609.5710-7-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::32f; envelope-from=shentey@gmail.com; helo=mail-wm1-x32f.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208256076100003 Content-Type: text/plain; charset="utf-8" The SMI command port is currently hardcoded by means of the ACPI_PORT_SMI_C= MD macro. This hardcoding is Intel specific and doesn't match VIA, for example. There is already the AcpiFadtData::smi_cmd attribute which is used when bui= lding the FADT. Let's also use it when building the DSDT which confines SMI comma= nd port determination to just one place. This allows it to become a property l= ater, thus resolving the Intel assumption. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-build.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index c8ac665d36..f9e7291150 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1495,14 +1495,14 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(crs, aml_io( AML_DECODE16, - ACPI_PORT_SMI_CMD, - ACPI_PORT_SMI_CMD, + pm->fadt.smi_cmd, + pm->fadt.smi_cmd, 1, 2) ); aml_append(dev, aml_name_decl("_CRS", crs)); aml_append(dev, aml_operation_region("SMIR", AML_SYSTEM_IO, - aml_int(ACPI_PORT_SMI_CMD), 2)); + aml_int(pm->fadt.smi_cmd), 2)); field =3D aml_field("SMIR", AML_BYTE_ACC, AML_NOLOCK, AML_WRITE_AS_ZEROS); aml_append(field, aml_named_field("SMIC", 8)); --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208296; cv=none; d=zohomail.com; s=zohoarc; b=CNmM9JRRep34U/vHXLowaroJBYVXSMVEZ2opR6b5a0AuxLNbGBopQZLgp4DzHPJuCf2PiM6eravpl0z8pgV/Qqxr2mfNpu1/QH5xd0xjswHrTYtkzW+dKr0GzlrtiN3ZfHU3wMPcNJoXKrVX1JLCuQYnGiBAOwrQ+3yqjiPFSEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208296; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HwdJ/CG9aYGX/GjFQP7CsHIbxXH0gsEEQc7AQMYTlTo=; b=eTWfsHQTCvoQNjvssB2y4qCiBMN5nHTa/Ei4x2rO3tlLcVSwUP3GmjYZC4XN7NFjLu6p+0QeY4T5ICcjOXjTbYNm7h6p1ugserQqWweosDx+fyZ8mdykUYLZmgzCWu3RaSx6czUJdpU1bgVbbA1S0gcoj4OEjRNQ4JIAamcKbes= 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 1693208296683834.0039476939257; Mon, 28 Aug 2023 00:38:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnc-0006a1-V8; Mon, 28 Aug 2023 03:36:36 -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 1qaWnZ-0006Wc-VN for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:33 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnX-0004Ju-Ke for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:33 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fefe898f76so28357535e9.0 for ; Mon, 28 Aug 2023 00:36:30 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208189; x=1693812989; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HwdJ/CG9aYGX/GjFQP7CsHIbxXH0gsEEQc7AQMYTlTo=; b=A18Mt8X4Z/A7pW2dxHiRXcHJWZtN/iAN0g2YJxGgjQise5v/zjzUfPf/NzJxitML/c pDE4wm/9Yy9JXOJsibKOCPJPJrEoWhcneIMLpmxqC+RNyeJr6XIqMp4BrAVV30YGTJSL Dyvgfo6L5UGtSybG4grGw2v0J6x6GrL1/yC34Or5v29YxyffRbxGwFP44LHfRYyV/acS RC1RHpw5+pwVUukwsMa6zEtrDczQlDPG0K+elXI1n1N571nWtQSiiW3yEioA5zNRfCit elhIyd7NeBeBLCsyW/EoMLJfUh6Z3chiw7nTUf1KL55tLI6K6TJGrEX28eoRJOcpCkA1 zFGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208189; x=1693812989; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HwdJ/CG9aYGX/GjFQP7CsHIbxXH0gsEEQc7AQMYTlTo=; b=Ni1wHizGmlWMy1gA5c6M4PLpA39O7xNJOhELY54ZgYDPppCjytEaXRDx+G2EZFXqXM K86sYaPa0NZtwFmgSQ63zFdfDvmVF8Hki7OBSsgxjT0ku4/mllrfIxHD4HC6xY0LJJKC U7RO8pVLnuJ+UatHo2/CSEHPGp97XMHfS+JKOJySF94rRB6JD5s17pb2PbRrFIwQYiFl fnVy9FIYZDlwiLec/TDPxE2UEjYvG4kNQ5uc0ddSBgV2sl7J54Ssu7wHN1/NXUybgqPL YpSYp1lzab/zBbyIHIpmDKW3N6DS4Arr+LhOqBu3ct8zt+MUrvNccHr0jqF72HFQp9ab Heaw== X-Gm-Message-State: AOJu0YzuSlKX37E5PEQqy1UcpLUDGnGvnw2yalhR8kpi7+/4fE2ruFau hiXn2cbF/8Yzfwdfehhj3WxRXk+YxJgkNg== X-Google-Smtp-Source: AGHT+IFQXz2CHzmonS/LwWmukgSVpEhfMu6SDSS8LgjuH56X5CR6vIaZbQO4Yk/8JaSO397WzrgE9A== X-Received: by 2002:a7b:c4c9:0:b0:3f6:9634:c8d6 with SMTP id g9-20020a7bc4c9000000b003f69634c8d6mr18962251wmk.18.1693208189131; Mon, 28 Aug 2023 00:36:29 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 7/8] hw/acpi: Trace GPE access in all device models, not just PIIX4 Date: Mon, 28 Aug 2023 09:36:08 +0200 Message-ID: <20230828073609.5710-8-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32d; envelope-from=shentey@gmail.com; helo=mail-wm1-x32d.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208297754100006 Signed-off-by: Bernhard Beschow Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/acpi/core.c | 5 +++++ hw/acpi/piix4.c | 3 --- hw/acpi/trace-events | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 00b1e79a30..c561845a4a 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -32,6 +32,7 @@ #include "qemu/module.h" #include "qemu/option.h" #include "sysemu/runstate.h" +#include "trace.h" =20 struct acpi_table_header { uint16_t _length; /* our length, not actual part of the hdr */ @@ -686,6 +687,8 @@ void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr= , uint32_t val) { uint8_t *cur; =20 + trace_acpi_gpe_ioport_writeb(addr, val); + cur =3D acpi_gpe_ioport_get_ptr(ar, addr); if (addr < ar->gpe.len / 2) { /* GPE_STS */ @@ -709,6 +712,8 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t a= ddr) val =3D *cur; } =20 + trace_acpi_gpe_ioport_readb(addr, val); + return val; } =20 diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index a7892c444c..dd523d2e4c 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -42,7 +42,6 @@ #include "hw/acpi/acpi_dev_interface.h" #include "migration/vmstate.h" #include "hw/core/cpu.h" -#include "trace.h" #include "qom/object.h" =20 #define GPE_BASE 0xafe0 @@ -517,7 +516,6 @@ static uint64_t gpe_readb(void *opaque, hwaddr addr, un= signed width) PIIX4PMState *s =3D opaque; uint32_t val =3D acpi_gpe_ioport_readb(&s->ar, addr); =20 - trace_piix4_gpe_readb(addr, width, val); return val; } =20 @@ -526,7 +524,6 @@ static void gpe_writeb(void *opaque, hwaddr addr, uint6= 4_t val, { PIIX4PMState *s =3D opaque; =20 - trace_piix4_gpe_writeb(addr, width, val); acpi_gpe_ioport_writeb(&s->ar, addr, val); acpi_update_sci(&s->ar, s->irq); } diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events index 78e0a8670e..159937ddb9 100644 --- a/hw/acpi/trace-events +++ b/hw/acpi/trace-events @@ -17,6 +17,10 @@ mhp_acpi_clear_remove_evt(uint32_t slot) "slot[0x%"PRIx3= 2"] clear remove event" mhp_acpi_pc_dimm_deleted(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm deleted" mhp_acpi_pc_dimm_delete_failed(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm d= elete failed" =20 +# core.c +acpi_gpe_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " =3D= =3D> 0x%" PRIx8 +acpi_gpe_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " <= =3D=3D 0x%" PRIx8 + # cpu.c cpuhp_acpi_invalid_idx_selected(uint32_t idx) "0x%"PRIx32 cpuhp_acpi_read_flags(uint32_t idx, uint8_t flags) "idx[0x%"PRIx32"] flags= : 0x%"PRIx8 @@ -48,10 +52,6 @@ acpi_pci_sel_read(uint32_t val) "%" PRIu32 acpi_pci_ej_write(uint64_t addr, uint64_t data) "0x%" PRIx64 " <=3D=3D %" = PRIu64 acpi_pci_sel_write(uint64_t addr, uint64_t data) "0x%" PRIx64 " <=3D=3D %"= PRIu64 =20 -# piix4.c -piix4_gpe_readb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%" P= RIx64 " width: %d =3D=3D> 0x%" PRIx64 -piix4_gpe_writeb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%" = PRIx64 " width: %d <=3D=3D 0x%" PRIx64 - # tco.c tco_timer_reload(int ticks, int msec) "ticks=3D%d (%d ms)" tco_timer_expired(int timeouts_no, bool strap, bool no_reboot) "timeouts_n= o=3D%d no_reboot=3D%d/%d" --=20 2.42.0 From nobody Thu Nov 28 08:50:25 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1693208257; cv=none; d=zohomail.com; s=zohoarc; b=Ayftq/tNWuMj5T26HVZY7rzhsBl2RD5z5cV5qDskPyIyEs8drUlbZ/s+J7LFlrsNHGVpp6ICMEzXwB5vnrYsqR7g1LqyNjmAtrsAZ6WI0Mmjlo9R/MI/SRNe7WikGcZzWUotfXmo/4BHwV+FIB6P3AN9+kDfm9kY3dSC40/6Btc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693208257; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xXRQz+WTZ9cwdEb7LnIQVnwZoTSZIA4RlJg2NnrIBrc=; b=bOJGJQz1C+796WrhhjTDNXGxWnyQOs1dCYMtUSe4SasMpw3jWZUV5KBrvXG5iKCqRTYKVGuHrqtNhSRdl9dyksRfSeWEXupc7Wh81huskQL7dyHGk8+DBGuBT/37y/3RFh4kH6ju3dQqZKpB1H71L5f+r6xbffHB9pHXWt+FLoo= 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 1693208257859805.2896179639887; Mon, 28 Aug 2023 00:37:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaWnc-0006Zi-NT; Mon, 28 Aug 2023 03:36:36 -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 1qaWnb-0006Yb-ED for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:35 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaWnZ-0004K3-4p for qemu-devel@nongnu.org; Mon, 28 Aug 2023 03:36:35 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3fef56f7223so26045275e9.3 for ; Mon, 28 Aug 2023 00:36:32 -0700 (PDT) Received: from Provence.localdomain (dynamic-078-055-055-138.78.55.pool.telefonica.de. [78.55.55.138]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c281100b003fef19bb55csm9795285wmb.34.2023.08.28.00.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 00:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693208191; x=1693812991; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xXRQz+WTZ9cwdEb7LnIQVnwZoTSZIA4RlJg2NnrIBrc=; b=n6sdFvqCeJcCpSq1LR0I+LDvOB9n6LqRTz5MahGDmWnOLB4uCUkgkF0MPjD+OqF1FK 6dW8gaCfhty57M5W3t1RoEQ3pW/yD6MJFZ2GIzlD/pvyPMiP08fRtGGIa2jrmfHWe9pT er3EfFyBWfEj8gdoIxl1XOoLFjFOXmeAD+6KFb9G2X3em42BF1MuViGaAU7SDNP5SQ/D TfbKs9mS6VTefvFytjzTsVc+mIVGRnn4k7wKxyzLT8mIk91Xt/PhbWYMPPRTI3AuAhtW rW94r3Z5O4MhJxxP/oGYzLo24pPn1IvyMpsCXhX8jx2vOghXAXyHva7xF5M4bu49WLO5 ymqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693208191; x=1693812991; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xXRQz+WTZ9cwdEb7LnIQVnwZoTSZIA4RlJg2NnrIBrc=; b=iiUwcbCjwqf04Dz8kt0eLqc4OtqON5R8ygS7mky/sv48PryWykhratnoDUrjGSV1Ap 7lA5lWmXVt17tK1atSQOA3XRr2d/Bid4hVM/9MHFO+mL/4AivGXvEvtWfSI0bFdtBwNX dVC9U96dbwGNOYoDOTB+tPIdER7mWXeB73L6seqoLhKdGr2W+pEMlVPqugWW3vkO2g7C dbFWZt7WIz4myPM1WQxlIgMEvxvjJGoPt0jBcp6aQbGT6iQzC+uAbF/uIdybZTeggV4/ O2EzcYvWtuB6JbvDYOq/CNhWMn+AbbF7B5ZmZPfuPE/gmfAeT0e7JcDrm3GMTfpoKw/N XQiA== X-Gm-Message-State: AOJu0Yy3DZ+hFBe5gC2/dP6RDygl6YizeAbPtxmEMC550xW7vOiolmaf MZuBz3842le55bPIcaNNkQXHkIARpK67/Q== X-Google-Smtp-Source: AGHT+IHcY/6t90eKcWhQyqWRBiDJzmxjf8cTvEMGmGCjrR6E5el3WvQK7g91CpxawlFS7/5SFl2pQA== X-Received: by 2002:a7b:c8d0:0:b0:3fc:193:734e with SMTP id f16-20020a7bc8d0000000b003fc0193734emr19621842wml.32.1693208190657; Mon, 28 Aug 2023 00:36:30 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Sergio Lopez , Ani Sinha , Paolo Bonzini , Aurelien Jarno , Marcel Apfelbaum , Richard Henderson , Igor Mammedov , Bernhard Beschow Subject: [PATCH 8/8] hw/acpi/core: Trace enable and status registers of GPE separately Date: Mon, 28 Aug 2023 09:36:09 +0200 Message-ID: <20230828073609.5710-9-shentey@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230828073609.5710-1-shentey@gmail.com> References: <20230828073609.5710-1-shentey@gmail.com> 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=2a00:1450:4864:20::331; envelope-from=shentey@gmail.com; helo=mail-wm1-x331.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-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 @gmail.com) X-ZM-MESSAGEID: 1693208259360100003 Content-Type: text/plain; charset="utf-8" The bit positions of both registers are related. Tracing the registers independently results in the same offsets across these registers which eases debugging. Signed-off-by: Bernhard Beschow Acked-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/acpi/core.c | 10 +++++++--- hw/acpi/trace-events | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index c561845a4a..ec5e127d17 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -687,13 +687,13 @@ void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t ad= dr, uint32_t val) { uint8_t *cur; =20 - trace_acpi_gpe_ioport_writeb(addr, val); - cur =3D acpi_gpe_ioport_get_ptr(ar, addr); if (addr < ar->gpe.len / 2) { + trace_acpi_gpe_sts_ioport_writeb(addr, val); /* GPE_STS */ *cur =3D (*cur) & ~val; } else if (addr < ar->gpe.len) { + trace_acpi_gpe_en_ioport_writeb(addr - (ar->gpe.len / 2), val); /* GPE_EN */ *cur =3D val; } else { @@ -712,7 +712,11 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t = addr) val =3D *cur; } =20 - trace_acpi_gpe_ioport_readb(addr, val); + if (addr < ar->gpe.len / 2) { + trace_acpi_gpe_sts_ioport_readb(addr, val); + } else { + trace_acpi_gpe_en_ioport_readb(addr - (ar->gpe.len / 2), val); + } =20 return val; } diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events index 159937ddb9..d387adfb0b 100644 --- a/hw/acpi/trace-events +++ b/hw/acpi/trace-events @@ -18,8 +18,10 @@ mhp_acpi_pc_dimm_deleted(uint32_t slot) "slot[0x%"PRIx32= "] pc-dimm deleted" mhp_acpi_pc_dimm_delete_failed(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm d= elete failed" =20 # core.c -acpi_gpe_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " =3D= =3D> 0x%" PRIx8 -acpi_gpe_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " <= =3D=3D 0x%" PRIx8 +acpi_gpe_sts_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 "= =3D=3D> 0x%" PRIx8 +acpi_gpe_en_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " = =3D=3D> 0x%" PRIx8 +acpi_gpe_sts_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 = " <=3D=3D 0x%" PRIx8 +acpi_gpe_en_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 "= <=3D=3D 0x%" PRIx8 =20 # cpu.c cpuhp_acpi_invalid_idx_selected(uint32_t idx) "0x%"PRIx32 --=20 2.42.0