From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735370; cv=none; d=zohomail.com; s=zohoarc; b=jDVinCQN23Gf4keuVyIDei2t0RrjATf1LPRuAVEbHLNwVftuBcXXbOwx7AiuvdIMm8mvH6Kcz7DlZwBJHIK59wgOWUab3VJbagE3/lmXBqNj5GfhVvrVq0z1aTu5f54P4QE203aj+mmDba3iYRWwPrYG80CfiDIhMj21uoQlifE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735370; 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=Owcx4mH1ywv43G3/wzVsA1viFGMbTgXcrT4ggMYA3GA=; b=llxSrT8XYwXRk2m5Kt6Jryp2j9/uHM0PLnl5tfVP/nNraEv09SIRwVYq1PClMRlVd0A4M24xsoMQQEJNF/BCi6Bzuta07lQWFEku3e9ZKPApITHAChC+pyB1Een33BAaZRKGwu8ucYvWJSw8m1r3kX+vNQeovAqD9WqKJAmH7Bk= 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+importer2=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 1673735370376900.8395757054305; Sat, 14 Jan 2023 14:29:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0J-000128-JI; Sat, 14 Jan 2023 17:27:59 -0500 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 1pGp0H-00011C-DU for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:27:57 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0F-0003ha-MM for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:27:57 -0500 Received: by mail-ej1-x634.google.com with SMTP id qx13so1658665ejb.13 for ; Sat, 14 Jan 2023 14:27:55 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:27:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=Owcx4mH1ywv43G3/wzVsA1viFGMbTgXcrT4ggMYA3GA=; b=apxSPGU0/0rberXJUa6MokKVr/t+/Coa1/3ipdRkK4xXSogUH03VuZ+uMbqX0XSMqG puzcsDZx1bSPZGVDKvzBlMhR3A1LY510HGcwyKiJlIHKBFtFUYM7xQQBuBUQZGM887r0 EzJ0YqUEUuGFJ/u9bWpKcoyKcAT+YZExPDQXHFufqH+sn687d6DwjE6+oqg0sN8d5CBk A7zso8F+A9l2QePrE3u6RBBwXtOAk/BKKZTkxrApr5tYC4oA1v5gBeFi9DoSrFIbl+kh 4fGRlMphAddsX8F3V7wBYY1E4pUtNvMvPRwnFQ5eyBpyGravksbJ8d7ynr9lTHXIqTvE ki7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Owcx4mH1ywv43G3/wzVsA1viFGMbTgXcrT4ggMYA3GA=; b=eRbSnqP6YaCQrrdYu06ILcfZmNRSy42JFRK+DkVpQqImyjpjFAG+PBjlxRzn2eKoOK h6wPwTyMFmQHaux8pezPhyTkGK/ndyQlvdEEvXwxvDiwbsFmdPhF7gcJ4PjiMteXkwq+ 7xBnkrCy9lp5g+fAEWzuUZ0eT7Bi/Hjv8RClggG+2Qtx3fiJQPlBdDzS7/w6qXhYZQaB h7Maugrn5AKEyeHzGYcOnYWGmrDgE2iKkgRqu0yTkJc0Xtf+1Th2qJpPSRaSNfvSdZwt vl1oYKZFBREweuAHIL6Qkudzqi/D/UZd92ebSH+AP1tWKh7r2xgh92gxOPg4vvXrHXTA mzYw== X-Gm-Message-State: AFqh2kpnQ7Rjq9YTet50rYo9CpB5lkwQDFsdfeCvabCLY+RfrRbGYzxK 16MRbiPNxFkQosWLsETUyUklp6yJKnQ= X-Google-Smtp-Source: AMrXdXsvBbIH9MjUOJnmtwhnJ0meFzIU0Z2lfTC2J+KiH/zhfkDTowhQS7++d+Sd79Cb7eL992A+9w== X-Received: by 2002:a17:907:175c:b0:84d:45db:b203 with SMTP id lf28-20020a170907175c00b0084d45dbb203mr19453747ejc.12.1673735274186; Sat, 14 Jan 2023 14:27:54 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 1/7] hw/acpi: Add missing includes Date: Sat, 14 Jan 2023 23:27:32 +0100 Message-Id: <20230114222738.282478-2-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=shentey@gmail.com; helo=mail-ej1-x634.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735372064100003 Content-Type: text/plain; charset="utf-8" When removing the "hw/boards.h" include from hw/acpi/acpi_dev_interface.h, these include directives must be added to make the code compile again. Signed-off-by: Bernhard Beschow --- hw/acpi/hmat.h | 3 ++- hw/acpi/cpu.c | 2 ++ hw/acpi/hmat.c | 1 + hw/acpi/memory_hotplug.c | 1 + monitor/qmp-cmds.c | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) 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/hw/acpi/cpu.c b/hw/acpi/cpu.c index 4e580959a2..9148b3a49e 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -1,6 +1,8 @@ #include "qemu/osdep.h" #include "migration/vmstate.h" #include "hw/acpi/cpu.h" +#include "hw/core/cpu.h" +#include "hw/boards.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..f5abec5715 100644 --- a/hw/acpi/hmat.c +++ b/hw/acpi/hmat.c @@ -28,6 +28,7 @@ #include "qemu/units.h" #include "sysemu/numa.h" #include "hw/acpi/hmat.h" +#include "hw/acpi/aml-build.h" =20 /* * ACPI 6.3: 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" diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 2932b3f3a5..45b0f2905d 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -44,6 +44,7 @@ #include "hw/acpi/acpi_dev_interface.h" #include "hw/intc/intc.h" #include "hw/rdma/rdma.h" +#include "hw/boards.h" #include "monitor/stats.h" =20 NameInfo *qmp_query_name(Error **errp) --=20 2.39.0 From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735320; cv=none; d=zohomail.com; s=zohoarc; b=WvDrq7JUGCcVAjbBELQ8OqXchfLs4CUcrBBJyO6meCl8jtKNi7NALCrHeKe95urRAKbJBdpTII9YZ/ntKQuDzXyOBgf7km+rz2yVbBKd+23YBx6IG3wFAQQC1OPwW2CKQuenysou1Un4w5B+2ztwtDrPVlNMPGjyBcGC8L9Nx0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735320; 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=whT6D5WKLjFRXoHNNRzzdcMxrjsv8D/ocKlR+tR8VYk=; b=eSGUtYXPAF62R8WoaEUKbLNFoUqXQGRrYwsvy2gui+Mum35T0fzuawWPXyWgZbjBiIE/injEsbWdxIsd/XMQY5hofVsmepVHaFYiO1nJTG/Uj4rUE1IexiTSWV0oR6l/hpB51RmZ76Ml2XH5K4/WgDMNM2rt0MbPkXnKD0dPH7s= 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+importer2=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 1673735320770836.5621918012649; Sat, 14 Jan 2023 14:28:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0K-000129-3Y; Sat, 14 Jan 2023 17:28:00 -0500 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 1pGp0I-00011W-QN for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:27:58 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0H-0003hn-2I for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:27:58 -0500 Received: by mail-ej1-x632.google.com with SMTP id az20so40947975ejc.1 for ; Sat, 14 Jan 2023 14:27:56 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=whT6D5WKLjFRXoHNNRzzdcMxrjsv8D/ocKlR+tR8VYk=; b=WHbOBWzJAkQyMLLQfJXWSaVCt3I/O6O1uDJPg/FoGqhhPoyGkezg+TfPdlKI5SU5o+ HzodhhNm4uCmuGEqZq57NXdTjYWOF+f8gNyr7NDPwLdF6xz9Pc1Fd0Yx8cqqTyQ/BpzG YddevsFgzJoN2LIlxgcUmCzXU8DUn6lEZuXf23jBnGcdsSFahNAIqA+c1PKAOwz5mSCo rLcpGq1PcjvlZrvyZdaApOp29RUndBooHadzGwdsqF6IYtzZJwT4RY9B8zQ9laGE8PjU NN4u4z3lIoHdzDSLRIN/g1Pq8WEybGJNfM4mq06FKoC59OmyfeVElWYj+xqKsmYFdIho hkoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=whT6D5WKLjFRXoHNNRzzdcMxrjsv8D/ocKlR+tR8VYk=; b=X57wrINiZOcaVTf2gYUgGKwJJfvUvnhZGSWpRAsiz/1r558nkNRNyy/Dza8ZbvaJbT VZBB+UHYoVDs21dWBkYTHrV7z/Gs9zMqsSzSZkGNr8TANaVFt1h0vckB0duhF1FYOsN6 jmGsOsAbANt2LC47dsqJ/7oSPxcNaxEYkpBV7mFJVk3eJY9h7qYQPudoXNSqKBByCc9O C24w4fKKsh9ndtrCdqesqSZ4huWT5vtxIkOOpNd+LNWQmqxUygVS3fiODtRsFIJS57Q7 /Q/QdvpDnI7PJFwhDpNHIefHML0onR3WHSZaaq+zD0ECbJ7981hKv66/kogT6ga8jTwA Ejrw== X-Gm-Message-State: AFqh2kqOXbELFiHsQuAmlH4ogbIvJCu0GeMcOFHKAPD01CTjO+kt9wQH do0nzl6cvjRLBDKijvN1GmZSMH/tYYQ= X-Google-Smtp-Source: AMrXdXseShLRJvcoW1cddVaMbQAVjFy8FSqQ3ggqoBzFsa0zqAjCqfs50FaeE0JoeH8LZSkEHdmVmg== X-Received: by 2002:a17:906:5a71:b0:84d:4a2b:73b9 with SMTP id my49-20020a1709065a7100b0084d4a2b73b9mr18900278ejc.59.1673735275448; Sat, 14 Jan 2023 14:27:55 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 2/7] hw/acpi/acpi_dev_interface: Remove unused parameter from AcpiDeviceIfClass::madt_cpu Date: Sat, 14 Jan 2023 23:27:33 +0100 Message-Id: <20230114222738.282478-3-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=shentey@gmail.com; helo=mail-ej1-x632.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735322580100001 The only function ever assigned to AcpiDeviceIfClass::madt_cpu is pc_madt_cpu_entry() which doesn't use the AcpiDeviceIf parameter. Signed-off-by: Bernhard Beschow Reviewed-by: Igor Mammedov --- include/hw/acpi/acpi_dev_interface.h | 3 +-- include/hw/i386/pc.h | 6 ++---- hw/acpi/acpi-x86-stub.c | 5 ++--- hw/acpi/cpu.c | 3 +-- hw/i386/acpi-common.c | 7 +++---- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_de= v_interface.h index ea6056ab92..a1648220ff 100644 --- a/include/hw/acpi/acpi_dev_interface.h +++ b/include/hw/acpi/acpi_dev_interface.h @@ -52,8 +52,7 @@ struct AcpiDeviceIfClass { /* */ void (*ospm_status)(AcpiDeviceIf *adev, ACPIOSTInfoList ***list); void (*send_event)(AcpiDeviceIf *adev, AcpiEventStatusBits ev); - void (*madt_cpu)(AcpiDeviceIf *adev, int uid, - const CPUArchIdList *apic_ids, GArray *entry, + void (*madt_cpu)(int uid, const CPUArchIdList *apic_ids, GArray *entry, bool force_enabled); }; #endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 991f905f5d..a0647165d1 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -9,7 +9,6 @@ #include "hw/block/flash.h" #include "hw/i386/x86.h" =20 -#include "hw/acpi/acpi_dev_interface.h" #include "hw/hotplug.h" #include "qom/object.h" #include "hw/i386/sgx-epc.h" @@ -193,9 +192,8 @@ bool pc_system_ovmf_table_find(const char *entry, uint8= _t **data, void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size); =20 /* hw/i386/acpi-common.c */ -void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, - const CPUArchIdList *apic_ids, GArray *entry, - bool force_enabled); +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, + GArray *entry, bool force_enabled); =20 /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); diff --git a/hw/acpi/acpi-x86-stub.c b/hw/acpi/acpi-x86-stub.c index 3df1e090f4..d0d399d26b 100644 --- a/hw/acpi/acpi-x86-stub.c +++ b/hw/acpi/acpi-x86-stub.c @@ -2,9 +2,8 @@ #include "hw/i386/pc.h" #include "hw/i386/acpi-build.h" =20 -void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, - const CPUArchIdList *apic_ids, GArray *entry, - bool force_enabled) +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, + GArray *entry, bool force_enabled) { } =20 diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 9148b3a49e..c59a0acbf1 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -357,7 +357,6 @@ void build_cpus_aml(Aml *table, MachineState *machine, = CPUHotplugFeatures opts, 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); - AcpiDeviceIf *adev =3D ACPI_DEVICE_IF(obj); =20 cpu_ctrl_dev =3D aml_device("%s", cphp_res_path); { @@ -668,7 +667,7 @@ void build_cpus_aml(Aml *table, MachineState *machine, = CPUHotplugFeatures opts, =20 /* build _MAT object */ assert(adevc && adevc->madt_cpu); - adevc->madt_cpu(adev, i, arch_ids, madt_buf, + adevc->madt_cpu(i, arch_ids, madt_buf, true); /* set enabled flag */ aml_append(dev, aml_name_decl("_MAT", aml_buffer(madt_buf->len, (uint8_t *)madt_buf->data))); diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 4aaafbdd7b..52e5c1439a 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -33,9 +33,8 @@ #include "acpi-build.h" #include "acpi-common.h" =20 -void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, - const CPUArchIdList *apic_ids, GArray *entry, - bool force_enabled) +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, + GArray *entry, bool force_enabled) { uint32_t apic_id =3D apic_ids->cpus[uid].arch_id; /* Flags =E2=80=93 Local APIC Flags */ @@ -112,7 +111,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(adev, i, apic_ids, table_data, false); + adevc->madt_cpu(i, apic_ids, table_data, false); if (apic_ids->cpus[i].arch_id > 254) { x2apic_mode =3D true; } --=20 2.39.0 From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735345; cv=none; d=zohomail.com; s=zohoarc; b=W31e4KVuw8yL7Ts1VeIH98cxEBX8Z1evhKKsV+91Zt+YzKTq6/bEiucLiE20XO3tpaBxz8ifKHkhdy2My3zrmvG36rTLV3M7a/yGyINcCt+1irCpPPwAqO6CXG17qeLQWJVw8gNz1PJS+Nz2N+OpFxFsGl9rZLCI4WGHZpNvhEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735345; 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=UgcCIq04sStSaxyfa0AQh8ota7xey1Q2r5NQSKgYtsY=; b=aL+RXg2FCJ4tMkeaa8LVYf46WLTmqbchFG8A3ARdfKm/Vj+szTvO/FEckMcryn7HvEpql+iQvVbB6qDFJ7ewVc2i7UU64Afs+jaKK/N2vpqrU8bhvYjKdwe9dlo0jGOdKq695QgUDqLOQDgJLOxSzNhoBovZaDBDstgF19dVx+c= 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+importer2=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 1673735345820817.5249944460414; Sat, 14 Jan 2023 14:29:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0L-00012h-LQ; Sat, 14 Jan 2023 17:28:01 -0500 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 1pGp0K-00012A-7y for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:00 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0I-0003iH-8W for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:00 -0500 Received: by mail-ej1-x62f.google.com with SMTP id ud5so60067053ejc.4 for ; Sat, 14 Jan 2023 14:27:57 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=UgcCIq04sStSaxyfa0AQh8ota7xey1Q2r5NQSKgYtsY=; b=ePtioxCw2Db+hSZX/3XPB1H/mYqYCIxcypPzGHtoCDVn63yYZCGOe5NelsH2NZaMWH qVu2HzYB1muXYWl5g5zMCUjS1SWFKsM0il5HSK7IwJHCF8VZNwjL0jxuECUnhpI5qlPH waR1C3AS+Xj0mKVPv5NkqD7yN583VFh7OBGOFI2+s1hWrIxMRIp+J+D4950YOA1jClrq bkJTMQcDuFU64GQk4c4AMsI0GycZ9yUXQRVX54jWOChDPrWkZa/cp6Jqx3oTE54CQe+4 CxY6EUKry1v80uvEfwSPPYaGqx0PFbnRwD7TO6GW+qCb6JST9VbbsIKuUOqtXUA9WJiB wRdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=UgcCIq04sStSaxyfa0AQh8ota7xey1Q2r5NQSKgYtsY=; b=WxG4N7JhQ/XijUhK2GGGmr9DS0o0BmRCVctZ/Qana6lYMtTdqi0PUiGeJuYp2lvYdN R6nBXuxBGR5hzx1/rivVFqVya6RniKUNBvqvavn8aK3XUxjOT7fwnMSlKXWxyO0bFH/K uhBXLuD6HNsuQSA8Sr+gTuPiEFqDXF1IHRRqIXWqEUP+Xcy1nMs0GosK0LmxRd/OZIJE d3JqZ08aB8l1o76cJ8wJuWDA2tehbtuvQKiqYxfIz0oEqBeTn8I1HXqTM9TzaJa6U8UT d7kcDs2H8Pf5OPpqANMUY03wHInSdrjHng7agUOhbdadwPAPquZzG0Vupqu0yac86CHu VXYA== X-Gm-Message-State: AFqh2krDtLRspkxfCu6Ebsv+03WvhQbm35kxcfFzypApWYMFBoO7rwd4 BroXCJuijk9LX0XsZrh29VbLkp3bnfM= X-Google-Smtp-Source: AMrXdXvv17CX5J169iKQHTtXbixBnoxWECITJRsnXtjURrq89kNV5Idcf3FvTi1c4s771QbRvhJ4YA== X-Received: by 2002:a17:906:38c6:b0:7c0:dcc2:e7b1 with SMTP id r6-20020a17090638c600b007c0dcc2e7b1mr72667201ejd.43.1673735276698; Sat, 14 Jan 2023 14:27:56 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 3/7] hw/acpi/acpi_dev_interface: Resolve AcpiDeviceIfClass::madt_cpu Date: Sat, 14 Jan 2023 23:27:34 +0100 Message-Id: <20230114222738.282478-4-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=shentey@gmail.com; helo=mail-ej1-x62f.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735347949100003 Content-Type: text/plain; charset="utf-8" This class attribute was always set to pc_madt_cpu_entry(). pc_madt_cpu_entry() is architecture dependent and was assigned to the attribute even in architecture agnostic code such as in hw/acpi/piix4.c and hw/isa/lpc_ich9. Not having to set madt_cpu there resolves the assumption that these device models are only ever used with ACPI on x86 targets. The only target independent location where madt_cpu was called was hw/ acpi/cpu.c. Here a function pointer can be passed via an argument instead. The other locations where it was called was in x86 specific code where pc_madt_cpu_entry() can be used directly. Signed-off-by: Bernhard Beschow --- hw/i386/acpi-common.h | 7 +++++-- include/hw/acpi/acpi_dev_interface.h | 3 --- include/hw/acpi/cpu.h | 6 +++++- include/hw/i386/pc.h | 4 ---- hw/acpi/acpi-x86-stub.c | 6 ------ hw/acpi/cpu.c | 11 ++++------- hw/acpi/piix4.c | 2 -- hw/i386/acpi-build.c | 5 ++--- hw/i386/acpi-common.c | 5 ++--- hw/i386/acpi-microvm.c | 3 +-- hw/i386/generic_event_device_x86.c | 9 --------- hw/isa/lpc_ich9.c | 1 - 12 files changed, 19 insertions(+), 43 deletions(-) diff --git a/hw/i386/acpi-common.h b/hw/i386/acpi-common.h index a68825acf5..968d625d88 100644 --- a/hw/i386/acpi-common.h +++ b/hw/i386/acpi-common.h @@ -1,15 +1,18 @@ #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" +#include "hw/boards.h" =20 /* Default IOAPIC ID */ #define ACPI_BUILD_IOAPIC_ID 0x0 =20 +void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, GArray *ent= ry, + bool force_enabled); + 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/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_de= v_interface.h index a1648220ff..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 */ @@ -52,7 +51,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/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h index 999caaf510..25b25bb594 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 (*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, + hwaddr io_base, madt_cpu_fn madt_cpu, const char *res_root, const char *event_handler_method); =20 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index a0647165d1..a5cce88653 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -191,10 +191,6 @@ bool pc_system_ovmf_table_find(const char *entry, uint= 8_t **data, int *data_len); void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, size_t flash_size); =20 -/* hw/i386/acpi-common.c */ -void pc_madt_cpu_entry(int uid, const CPUArchIdList *apic_ids, - GArray *entry, bool force_enabled); - /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); =20 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/cpu.c b/hw/acpi/cpu.c index c59a0acbf1..bc77c00d66 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -2,7 +2,6 @@ #include "migration/vmstate.h" #include "hw/acpi/cpu.h" #include "hw/core/cpu.h" -#include "hw/boards.h" #include "qapi/error.h" #include "qapi/qapi-events-acpi.h" #include "trace.h" @@ -340,7 +339,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, + hwaddr io_base, madt_cpu_fn madt_cpu, const char *res_root, const char *event_handler_method) { @@ -355,8 +354,8 @@ 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); + + assert(madt_cpu); =20 cpu_ctrl_dev =3D aml_device("%s", cphp_res_path); { @@ -666,9 +665,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 */ + madt_cpu(i, arch_ids, madt_buf, true /* set enabled flag */); 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/acpi/piix4.c b/hw/acpi/piix4.c index 0a81f1ad93..4d0d4fdeeb 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/southbridge/piix.h" #include "hw/irq.h" #include "hw/isa/apm.h" @@ -643,7 +642,6 @@ static void piix4_pm_class_init(ObjectClass *klass, voi= d *data) hc->unplug =3D piix4_device_unplug_cb; 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/acpi-build.c b/hw/i386/acpi-build.c index 127c4e2d50..0be3960a37 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1440,7 +1440,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, .fw_unplugs_cpu =3D pm->smi_on_cpu_unplug, }; build_cpus_aml(dsdt, machine, opts, pm->cpu_hp_io_base, - "\\_SB.PCI0", "\\_GPE._E02"); + pc_madt_cpu_entry, "\\_SB.PCI0", "\\_GPE._E02"); } =20 if (pcms->memhp_io_base && nr_mem) { @@ -2424,8 +2424,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 52e5c1439a..aabf78092e 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 1, .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 fb09185cbd..d8a444d06c 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -213,8 +213,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 { 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 8d541e2b54..0ab0a341be 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -870,7 +870,6 @@ static void ich9_lpc_class_init(ObjectClass *klass, voi= d *data) hc->unplug =3D ich9_pm_device_unplug_cb; 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.39.0 From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735325; cv=none; d=zohomail.com; s=zohoarc; b=AByGfTgkNSedgHSUwjKmirXY3j676AGQ06rlwuya8a8joZZiXkiG6sCzyUuYrdsbjnXGcGmnNj0bHVn38xCC6pWf3Aeq3MGhTdLBEs93tiDQbFSGJxznOgAsP1zmgby5sfdG0o+8AUWXz82b4llCuiNblAEcGh3KcLE0M+o8Qq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735325; 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=+zSOZJsBppn3t1Lm0Gh6s/YJ/fxcXIeync0E72eGIe8=; b=V2+cBUiKqIeHZW9FJPC9c+/VYJbPBqPwcIQBCbGXDMTGmFPALf4y5MXZ4a1F5WxP+GixfGrkoyEFGyG7gM2waVzg8buDTe+mf1UhYsu8uuGQob/LMwIfxMD11y6wlCVSXL+wgbsF6oXbeK7M9/xGoFWKsI+Tr4Nb9/oKRlHxkI4= 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+importer2=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 1673735325439939.3594615392082; Sat, 14 Jan 2023 14:28:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0S-00015B-Qx; Sat, 14 Jan 2023 17:28:08 -0500 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 1pGp0P-000145-6T for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:05 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0J-0003iR-GQ for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:04 -0500 Received: by mail-ej1-x632.google.com with SMTP id ud5so60067119ejc.4 for ; Sat, 14 Jan 2023 14:27:59 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=+zSOZJsBppn3t1Lm0Gh6s/YJ/fxcXIeync0E72eGIe8=; b=fROJa/j2ez0y4TKCEIOyZIOO760XvNukGBFBUz7xnSBhAEcqF42oRivd8kyBgjwSjO UDDhPcMYcJuD5o/sMseW7/44T08l7DZZQIiIrGBs7qwMchxVJG0Qvp+SaFH0/wpUpAhg FVUghSgYgAj+wily2ZEsxVcfcvCZS2OJc1rMggDyMSm3htoKjULAND/Ywa6xqBNlvHr1 8FdtP75eLe+Om02s+0UVXKIWr1jasvQ6pF3qtLDLHTOi+zdBTweMr5PqZBuG1FReFilc SERvp4+fwxjH3N865L2mKTY/pRGS7WEfJTBI/b8mrFRybPPBugpv4xiQLhuxsBVinWpu VKQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=+zSOZJsBppn3t1Lm0Gh6s/YJ/fxcXIeync0E72eGIe8=; b=zLTXY2DKBu9BHKFKtzpiRMJmcJ54EK5TyswWMIcs45ors6ybtbvvwPDuy6cCOB7Tpl EqKmulTOBJ9GK9BhhfVfOkJHKNWtpAOW47UjSHhzSmH4xT0BmrqbSGlwywZf2KSO68sa Y3/xQOLw4AIQXCWX9Ydfez5nElobu8VZssoEwh4QJ1wv5wC7bVDqrrA7O+zT932pb44f iZADRFLjMTlcr2BwbLzqTiQgopX7yCoYLY36cJDUxlnGC0SCl38WJwzkxdO2EHSegdLc /zNudKhtkYs3BWkddisA8CYCq51whV5D2tul+Mjtuigphosz1BeQH2343vxxf1rYqnHn CfNQ== X-Gm-Message-State: AFqh2koAgIjSWf1BcMEzLk8jEZx+v9b8GG+VWDfuxckYuRyNwgI8aOj/ WseF05+F58zp/WGu65doaGbR6ww1epY= X-Google-Smtp-Source: AMrXdXtlz1dPbFl7D/EebiTTUkpHtIUKZgNER9l/ktM14i+Wn/c8VpRMdaSTAz/yQPiXMoTFgXhBPg== X-Received: by 2002:a17:907:6e05:b0:7c1:235d:2a2b with SMTP id sd5-20020a1709076e0500b007c1235d2a2bmr95271840ejc.24.1673735277837; Sat, 14 Jan 2023 14:27:57 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 4/7] hw/i386/acpi-build: Remove unused attributes Date: Sat, 14 Jan 2023 23:27:35 +0100 Message-Id: <20230114222738.282478-5-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=shentey@gmail.com; helo=mail-ej1-x632.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735325793100001 Content-Type: text/plain; charset="utf-8" Ammends commit 3db119da7915 'pc: acpi: switch to AML API composed DSDT'. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-build.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 0be3960a37..428328dc2d 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -117,8 +117,6 @@ typedef struct AcpiMiscInfo { #ifdef CONFIG_TPM TPMVersion tpm_version; #endif - const unsigned char *dsdt_code; - unsigned dsdt_size; } AcpiMiscInfo; =20 typedef struct FwCfgTPMConfig { --=20 2.39.0 From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735379; cv=none; d=zohomail.com; s=zohoarc; b=ecvE9ZnRKibxn2lscuGyjgP6h0BYO7BWNk/sI8/zc9PnVQ51pnf3EaWnAsntfsLZ6bFSRcYpZIJjP1r47aBi8rJB1Hmu9WSrHFUVrh/7rb7SFKMboSXWLV2Ez3BPwKnp1qlQYFYbQNFdoOT5FmwGxg8OeUSXf+Iqo6Xtig4tyVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735379; 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=Br9tsj3IszJMPOMTWZCrt0qVOVX2hHgtMo+eZ0RApoM=; b=itD9i+zd2M1sdjCjmMpbWAGj0YiFnaTY1Y7Z7zqznwaB35GrEv62+7GiwRiuL4vwQYYofP39S7go7AurmBVodgOvRx7eSOqcEPJmWM+VtovwuLgjc/QJxpMYaiLfYakiXSaUiFWaN0qj1ugspwaS0NfUrSq/LYR7gTfEd6rdrqo= 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+importer2=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 167373537995189.4749242557416; Sat, 14 Jan 2023 14:29:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0O-00013C-W5; Sat, 14 Jan 2023 17:28:05 -0500 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 1pGp0M-00012v-Dm for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:02 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0K-0003if-P5 for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:02 -0500 Received: by mail-ej1-x632.google.com with SMTP id bk15so2533471ejb.9 for ; Sat, 14 Jan 2023 14:28:00 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:27:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=Br9tsj3IszJMPOMTWZCrt0qVOVX2hHgtMo+eZ0RApoM=; b=nvNOaq23564DWWNxLQqqhfw24gV5in2WPsF97XF3MUNvqgEuaqoHhNcRTLM2xM6wAu 2OxcRDHAEhdxZj9z2OXo852xJmbIluHUSfsspmEQspjfocKK9hzZKp/GplZYhwwNupjJ u5VDvcNL8EUja42gcbuzEauZb0qLFfM9XmJ1c6nJMYyeZkwjAjWoCp7FG3FOU9QS1Tgj imYssAWaO0EnTtmQJUZVaCRm6fW+lkk1SJurR+18R4WXIxPqUVFBMSyUnz15ZWmYrsZA i0a6kp/Z3gKTBZgxz5cu9JRsqBH1/zDo3ghZwZ6oFykXpgTqmeuRjn9BR2PeP9eyIJqI dyTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Br9tsj3IszJMPOMTWZCrt0qVOVX2hHgtMo+eZ0RApoM=; b=tOykuNyJHIHCKPbBb8VyiDjFP+1uoLe7rShBfvcovC4LRwsITKCxE1FORGDbDEteFl 01SUMhQ+rA88g/GGHpvuo1+fRT3Yb4C1xXECrlruB91GxyLuG/qWG2eoYfHNhtks7jWV Qkm0Y23TeFvVjy1DqkYJQ2XP/ppGjH0KB7ZnN1VsG8OX9yKMA7/d7qg1oLVWnENbnO2H ZUFMOQCoyebKpWI7oPyAovUDmdwbRcneFsiuBLfbEDAKdF4ccCQHRVAiRDzd3OhKGbDi OzyaoRwym1l++w2r4YaOVpsp/nL7enAIpTMe6cb55xfyAIQO0yuRokiFhyCq4HWBhoIA K/TA== X-Gm-Message-State: AFqh2kord8/rVUs7NtJ22sr3OD7qWk4kElV0tn6IrNvFpDq1KIeqC+xq Q8B9/JDT7EUAmJZFV4X33qbYl/B72gk= X-Google-Smtp-Source: AMrXdXtFTAdidrtpnRcuLXM7y29iIce1SBuDBQSd0BHrLlfnhZISx9HyojEHKdgyBAYui2yAdi87UQ== X-Received: by 2002:a17:907:8c0c:b0:7fd:f1b5:7fd5 with SMTP id ta12-20020a1709078c0c00b007fdf1b57fd5mr77500462ejc.19.1673735279193; Sat, 14 Jan 2023 14:27:59 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 5/7] hw/acpi/acpi_aml_interface: Extract qbus_build_aml() Date: Sat, 14 Jan 2023 23:27:36 +0100 Message-Id: <20230114222738.282478-6-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=shentey@gmail.com; helo=mail-ej1-x632.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735382061100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/acpi/acpi_aml_interface.h | 11 +++++++++++ hw/i2c/smbus_ich9.c | 5 +---- hw/isa/lpc_ich9.c | 5 +---- hw/isa/piix3.c | 5 +---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/hw/acpi/acpi_aml_interface.h b/include/hw/acpi/acpi_am= l_interface.h index 436da069d6..cb2f1c9910 100644 --- a/include/hw/acpi/acpi_aml_interface.h +++ b/include/hw/acpi/acpi_aml_interface.h @@ -2,7 +2,9 @@ #define ACPI_AML_INTERFACE_H =20 #include "qom/object.h" +#include "qemu/queue.h" #include "hw/acpi/aml-build.h" +#include "hw/qdev-core.h" =20 #define TYPE_ACPI_DEV_AML_IF "acpi-dev-aml-interface" typedef struct AcpiDevAmlIfClass AcpiDevAmlIfClass; @@ -46,4 +48,13 @@ static inline void call_dev_aml_func(DeviceState *dev, A= ml *scope) } } =20 +static inline void qbus_build_aml(BusState *bus, Aml *scope) +{ + BusChild *kid; + + QTAILQ_FOREACH(kid, &bus->children, sibling) { + call_dev_aml_func(DEVICE(kid->child), scope); + } +} + #endif diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c index ee50ba1f2c..52ba77f3fc 100644 --- a/hw/i2c/smbus_ich9.c +++ b/hw/i2c/smbus_ich9.c @@ -97,13 +97,10 @@ static void ich9_smbus_realize(PCIDevice *d, Error **er= rp) =20 static void build_ich9_smb_aml(AcpiDevAmlIf *adev, Aml *scope) { - BusChild *kid; ICH9SMBState *s =3D ICH9_SMB_DEVICE(adev); BusState *bus =3D BUS(s->smb.smbus); =20 - QTAILQ_FOREACH(kid, &bus->children, sibling) { - call_dev_aml_func(DEVICE(kid->child), scope); - } + qbus_build_aml(bus, scope); } =20 static void ich9_smb_class_init(ObjectClass *klass, void *data) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 0ab0a341be..d5d4b0f177 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -813,7 +813,6 @@ static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEvent= StatusBits ev) static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope) { Aml *field; - BusChild *kid; ICH9LPCState *s =3D ICH9_LPC_DEVICE(adev); BusState *bus =3D BUS(s->isa_bus); Aml *sb_scope =3D aml_scope("\\_SB"); @@ -835,9 +834,7 @@ static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml = *scope) aml_append(sb_scope, field); aml_append(scope, sb_scope); =20 - QTAILQ_FOREACH(kid, &bus->children, sibling) { - call_dev_aml_func(DEVICE(kid->child), scope); - } + qbus_build_aml(bus, scope); } =20 static void ich9_lpc_class_init(ObjectClass *klass, void *data) diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c index eabad7ba58..93077bb3b9 100644 --- a/hw/isa/piix3.c +++ b/hw/isa/piix3.c @@ -317,7 +317,6 @@ static void pci_piix3_realize(PCIDevice *dev, Error **e= rrp) static void build_pci_isa_aml(AcpiDevAmlIf *adev, Aml *scope) { Aml *field; - BusChild *kid; Aml *sb_scope =3D aml_scope("\\_SB"); BusState *bus =3D qdev_get_child_bus(DEVICE(adev), "isa.0"); =20 @@ -333,9 +332,7 @@ static void build_pci_isa_aml(AcpiDevAmlIf *adev, Aml *= scope) aml_append(sb_scope, field); aml_append(scope, sb_scope); =20 - QTAILQ_FOREACH(kid, &bus->children, sibling) { - call_dev_aml_func(DEVICE(kid->child), scope); - } + qbus_build_aml(bus, scope); } =20 static void pci_piix3_class_init(ObjectClass *klass, void *data) --=20 2.39.0 From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735359; cv=none; d=zohomail.com; s=zohoarc; b=S+DiS6zJ/PHDJ6S+ckA/ZF9UcfzdUzk94THGrVuHqNcKjzz54LK0pfcl07DMCLNiPrPBO6cDHEje5Hpgq9GW0nWNItytiX25BCypnmyyTA7Cf+N9lnKIVW7PAZM5mnpt/ZgcaiX8GN38cjlUA+kX/qrFPIyGQdIjpis/3w+4JqY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735359; 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=KbvtpHhDfsdmUGIyCrGLdQ6hWFCYi1M1hBOX3D1iFH4=; b=GW4WjwoTDRtDb5l9hkBMaCe9HTdCOE44Mc6zPnfNJDbX1VmKfVZ73qlBTVgwADtJPUUVQuomGPYwevHX0c/lSKt7aK1OKY0NkLJ1NulBKenBpycgu1dMtd93q4CrOMtsmx708ULTZtJZp6c1uU5mY2sxVdBVHhMqBnFc5XuiAE0= 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+importer2=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 1673735359653389.8800585977401; Sat, 14 Jan 2023 14:29:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0R-00014m-8C; Sat, 14 Jan 2023 17:28:07 -0500 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 1pGp0N-000134-8w for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:03 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0L-0003iq-RQ for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:03 -0500 Received: by mail-ej1-x62b.google.com with SMTP id v6so17019231ejg.6 for ; Sat, 14 Jan 2023 14:28:01 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=KbvtpHhDfsdmUGIyCrGLdQ6hWFCYi1M1hBOX3D1iFH4=; b=FWg7OXpeixiIBJdCm6F00FW7yFE6DPr2StA1q0W6QHXHJzZcrThcM2ax3ucUupuQ43 sjPtq8m2RR2u2xpVXtF4gAHaPoUDW8yjwdztQGEWx0QpPE2ZNzlGDdYMp0CATt0qh9Mf u2Y+/Hoig9QIliSRMo4Pt26Z4s6/4pvxAi+R/twDpaKshERSuxULMl8BsToxlWNFhJ71 6TSMxV7ieNaJ1HiU7rSLMZmZWyCQ000BTmI3x9Gcb1c/vZs7grq9S28SZyWDYkWssY7Z 7wYBMULmcM1mkU//LlY9P7SZEBuiOJcj3tdI8XR5hzBdbJzB2CA7FDJMSWxZcCGWZLNm r0mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=KbvtpHhDfsdmUGIyCrGLdQ6hWFCYi1M1hBOX3D1iFH4=; b=mRaBBU3cI6/RMWpeeDUHn1lklpA8QdxkOZEoZFDIuyeoQ8z4mlWcSmzT5oriOzEQZc VwJuISSpLe22+MMM+poAyy5x0bUFJinQ95eRkrPiLB7esu+MC6RQvmGhWTFxUREiw+iq Z9VEYqMNhb2iIyAeKJyQYG2WLepSi2ATkUSOT3VkbwLCHCCeQQQVndMKouu6a5oXKhcg fyr1uDkiKqqVWcyzVePm2eYWOMm74S68xrIwYZUdHlIiDMJUJza6nHD41/HpxDSyt7x4 50eTGuEqvebT+cwW81DsgnRD2lMRsZSyu8nyskNepx0eBfEiHL8zrgKNGQUI3M9Bwk48 o6CA== X-Gm-Message-State: AFqh2kqAnoTGJGJEZlL3bvjwC+3WlSLQAnH/HB4sFklKqcn1GzNMldYl +grrmYEPZNfYuuLsSb/CCyZXL9igu4I= X-Google-Smtp-Source: AMrXdXugoub1agY3DmEO2p6RD4zpvrdrauIIA8rJ36hch8sa0IZp76348QzmvK0qqiu/crjPMwJNOQ== X-Received: by 2002:a17:906:7247:b0:86e:a013:c264 with SMTP id n7-20020a170906724700b0086ea013c264mr1311381ejk.24.1673735280307; Sat, 14 Jan 2023 14:28:00 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 6/7] hw/i386/acpi-microvm: Reuse qbus_build_aml() Date: Sat, 14 Jan 2023 23:27:37 +0100 Message-Id: <20230114222738.282478-7-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=shentey@gmail.com; helo=mail-ej1-x62b.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735359955100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-microvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index d8a444d06c..fec22d85c1 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -26,6 +26,7 @@ =20 #include "exec/memory.h" #include "hw/acpi/acpi.h" +#include "hw/acpi/acpi_aml_interface.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/bios-linker-loader.h" #include "hw/acpi/generic_event_device.h" @@ -129,7 +130,7 @@ build_dsdt_microvm(GArray *table_data, BIOSLinker *link= er, =20 sb_scope =3D aml_scope("_SB"); fw_cfg_add_acpi_dsdt(sb_scope, x86ms->fw_cfg); - isa_build_aml(ISA_BUS(isabus), sb_scope); + qbus_build_aml(BUS(isabus), sb_scope); build_ged_aml(sb_scope, GED_DEVICE, x86ms->acpi_dev, GED_MMIO_IRQ, AML_SYSTEM_MEMORY, GED_MMIO_BASE); acpi_dsdt_add_power_button(sb_scope); --=20 2.39.0 From nobody Sun Apr 28 18:45:45 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1673735337; cv=none; d=zohomail.com; s=zohoarc; b=bGeZjKSSFKKhBJPFGh/7eTlBTvee2kKOKL0zMDOFnt6HcafC+05u+6JmX7u2Ct7/Ptwrl8oF9k4++H0qpZ8v9SnrAQMCd9B2zgjKkp0Z45rfjyG+xfo2EqqaOJcTWgB4cwR8D7Ia3Lyytn+hMUQoAGu1a8JWV9IGeFJvQ2FVK4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673735337; 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=wzORsWbTapB5OlO96gO8KniljyDWuA5amvSZ6XptoxM=; b=LZbMfpbK13bXMg33iZ19JY97lUUhF7PmBEx1Wz5b2O2i3iJmeJ3i6PX0DqYQE4idAWv8Kxd0RA8LPA27VgI2QFflMArJDV9WO+iE83Ri2azxuWtfduXTzM0pZLsrxteVniA9xumBGXyhM7csURCTtEtrrsGeoo5choHh6woNh24= 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+importer2=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 1673735337066663.0315986000967; Sat, 14 Jan 2023 14:28:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGp0T-00015O-8Q; Sat, 14 Jan 2023 17:28:09 -0500 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 1pGp0O-00013D-7O for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:04 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGp0M-0003hR-Gr for qemu-devel@nongnu.org; Sat, 14 Jan 2023 17:28:03 -0500 Received: by mail-ej1-x62b.google.com with SMTP id u9so60069752ejo.0 for ; Sat, 14 Jan 2023 14:28:02 -0800 (PST) Received: from Provence.localdomain (dynamic-077-013-123-004.77.13.pool.telefonica.de. [77.13.123.4]) by smtp.gmail.com with ESMTPSA id og5-20020a1709071dc500b0084d420503a3sm8324840ejc.178.2023.01.14.14.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Jan 2023 14:28:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=wzORsWbTapB5OlO96gO8KniljyDWuA5amvSZ6XptoxM=; b=S7Q/rT7fuPJSYSjcqJ+DRN5JPyEIzaNQkLUuPRCfOpp9FnlgNvAQAzntwSu/+HdGUy p9hYDTuU+NlFbfrPLnNJU/hsnJMKaLUW918T36xYAEcOEr5HkWC3EKuC1DZTuayQVkkX hoJcuFkxH5QtAW+PKBfYBGO4EgIVfJPvJWuQd7i/Rg5zsFNLiSxBHzDDzsSkNyHvxQhW yffD1Xkkgc59wLagAU9U7tq4HkAHQsam9zMBbS64l2xBKUPEW2EgfidhA0OcxwuJRZeR 2vxHq7caHoFzKjR5OE9u2TTigd8tUVviEXpcBgr71hMI21OiTv/RVoWzlaCHeU3MhcUb aI+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wzORsWbTapB5OlO96gO8KniljyDWuA5amvSZ6XptoxM=; b=NBuCPIienpoyWmhrdRQkaolt88K7ei1dbKe5jwokUNsRkpaXlHjkAgXI8eQFALK80h lfAABbhZqJ0qzwHfhBM29uvF9rkYvFvYhspDSsvM8PgB7fjav/yFxT+e78ymdbqAdD5k LXeGC9yvQnUF6a5djYM0SftYVyhPmVl3tutj/SzQpvUejg0AE1dZpdgaWbt2sjqumPgN DoaGy+99CS04D5l1M1ZXZS+H0sSwGvxstPa0lTnEFLYpS+NULPJ3VSmTNVY9wjCPTE7Z qmxi4j0B65bDbE7yjktrBg+K3XZuELCW35/r+CBhfO8Q+5lqTy2IG1zFPCxtFyjXXTo+ +KlA== X-Gm-Message-State: AFqh2krlyRMSAPym+5ppudLsPUB9/P1f3HR6+eAz02ZXskkOewA42yAl eFYBXPTsofzaMJNLT67cE/0Ey0VeeoE= X-Google-Smtp-Source: AMrXdXu/jFLdpy0FM7Mnl3qi7/gI7/Cu6CrYQBpV4hzU+uQI6eXeDdAooI/Uzp4ZRgBsUxBUbKkieg== X-Received: by 2002:a17:906:524b:b0:7c1:5098:907f with SMTP id y11-20020a170906524b00b007c15098907fmr73163244ejm.61.1673735281513; Sat, 14 Jan 2023 14:28:01 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Richard Henderson , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Ani Sinha , Markus Armbruster , Aurelien Jarno , Igor Mammedov , Paolo Bonzini , Bernhard Beschow Subject: [PATCH 7/7] hw/isa/isa-bus: Remove now unused isa_build_aml() Date: Sat, 14 Jan 2023 23:27:38 +0100 Message-Id: <20230114222738.282478-8-shentey@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114222738.282478-1-shentey@gmail.com> References: <20230114222738.282478-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=shentey@gmail.com; helo=mail-ej1-x62b.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1673735337839100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/isa/isa.h | 1 - hw/isa/isa-bus.c | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 6c8a8a92cb..25acd5c34c 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -86,7 +86,6 @@ bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, E= rror **errp); ISADevice *isa_create_simple(ISABus *bus, const char *name); =20 ISADevice *isa_vga_init(ISABus *bus); -void isa_build_aml(ISABus *bus, Aml *scope); =20 /** * isa_register_ioport: Install an I/O port region on the ISA bus. diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 1bee1a47f1..f155b80010 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -24,7 +24,6 @@ #include "hw/sysbus.h" #include "sysemu/sysemu.h" #include "hw/isa/isa.h" -#include "hw/acpi/acpi_aml_interface.h" =20 static ISABus *isabus; =20 @@ -188,15 +187,6 @@ ISADevice *isa_vga_init(ISABus *bus) } } =20 -void isa_build_aml(ISABus *bus, Aml *scope) -{ - BusChild *kid; - - QTAILQ_FOREACH(kid, &bus->parent_obj.children, sibling) { - call_dev_aml_func(DEVICE(kid->child), scope); - } -} - static void isabus_bridge_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); --=20 2.39.0