From patchwork Mon Nov 7 22:49:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 13035480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E2EEC4332F for ; Mon, 7 Nov 2022 23:18:37 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osAvg-0007Sx-2W; Mon, 07 Nov 2022 17:49:20 -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 1osAve-0007Og-LQ for qemu-devel@nongnu.org; Mon, 07 Nov 2022 17:49:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osAvd-00028y-3E for qemu-devel@nongnu.org; Mon, 07 Nov 2022 17:49:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667861356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X4Z960VIxvzpdnrCdhzcTsEiETvQalucQByjEZaVNKQ=; b=RPhnY25hvpcKNpXNP7UETjKG/dNs2RfpcdgMhNJOLKA/RXqGUvsuy33rl9EiYHw6MxTXOF DfF6ugqv/2h7Utv5QMeUhcNtaEyocl4U1vBncpIilkNRhj4XB3Y7mW7lXLHsCSjuwSAyYU eGiG9YiYDXooDSzb7zHQ7ymIp2oc26A= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-473-7tstCr0rN-Gnrn8SlDv41w-1; Mon, 07 Nov 2022 17:49:14 -0500 X-MC-Unique: 7tstCr0rN-Gnrn8SlDv41w-1 Received: by mail-qt1-f199.google.com with SMTP id fz10-20020a05622a5a8a00b003a4f466998cso9111899qtb.16 for ; Mon, 07 Nov 2022 14:49:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=X4Z960VIxvzpdnrCdhzcTsEiETvQalucQByjEZaVNKQ=; b=CPv47YPfe3pvqrN9Zj9fdpX4M1gJ+iOrR2K/MbZgyYjm6udrkFqYO0ZMqtX8+O/Wgk BNYa2g5ylKDP1w8SM1kvg00lvyqjcshf5i+3e0dpERVhLneaDlvC0obKDiBF+dnnx3TN aKLfQ21JSdZntchPZYgcmvrbPyG67Wt24lUC+/nwhXDNRP1vmRGMv5I/t5VdMrhIkPAk 5Uos2bmmaibEmWF7vosIL4kOsIwsMGhoyPdI2OjMItjsntylfkCuA0QfJ8ggvXildPzg thdmqyFXU3D335FPiqA8KevbZKyk2n8GAKNFxuG4kTOdKcXFSUVqB80ViMQecpXHqt4f BZgA== X-Gm-Message-State: ACrzQf0gGES+SakRyWBuxmkf5q7S3QMckwspJQKkxP4Bu+wLcJXFjBM/ BvRVOkC3tzQkNPFeGHQlEHEhihTHedPVwSMy3iWDLoolC3QTsL4Sl78i/4QHtuEc2+uiu0hVGDc 3EPSX/F7LVhLgW7AYJPyPNbfW+tnz2MhjG76Ndijh9s3EY0YNckrUnXYb0VXh X-Received: by 2002:a05:620a:2109:b0:6fa:75bb:c766 with SMTP id l9-20020a05620a210900b006fa75bbc766mr16907120qkl.369.1667861354272; Mon, 07 Nov 2022 14:49:14 -0800 (PST) X-Google-Smtp-Source: AMsMyM5Vo8lmM/gxOE30L89YCASVkxUywNwpwQbOpLDj5Pdxura9U8d7naUNKnl4Ml7PjaxSJQqXaw== X-Received: by 2002:a05:620a:2109:b0:6fa:75bb:c766 with SMTP id l9-20020a05620a210900b006fa75bbc766mr16907101qkl.369.1667861353954; Mon, 07 Nov 2022 14:49:13 -0800 (PST) Received: from redhat.com ([87.249.138.11]) by smtp.gmail.com with ESMTPSA id j19-20020a05620a289300b006b949afa980sm7868738qkp.56.2022.11.07.14.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 14:49:13 -0800 (PST) Date: Mon, 7 Nov 2022 17:49:09 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Miguel Luis , Ani Sinha , Shannon Zhao , Igor Mammedov , qemu-arm@nongnu.org Subject: [PULL v4 19/83] acpi: arm/virt: madt: bump to revision 4 accordingly to ACPI 6.0 Errata A Message-ID: <20221107224600.934080-20-mst@redhat.com> References: <20221107224600.934080-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221107224600.934080-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Miguel Luis MADT has been updated with the GIC Structures from ACPI 6.0 Errata A and so MADT revision and GICC Structure must be updated also. Fixes: 37f33084ed2e ("acpi: arm/virt: madt: use build_append_int_noprefix() API to compose MADT table") Signed-off-by: Miguel Luis Reviewed-by: Ani Sinha Message-Id: <20221011181730.10885-4-miguel.luis@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/arm/virt-acpi-build.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e5377744f3..da9e41e72b 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -685,7 +685,7 @@ build_dbg2(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) }; /* - * ACPI spec, Revision 5.1 Errata A + * ACPI spec, Revision 6.0 Errata A * 5.2.12 Multiple APIC Description Table (MADT) */ static void build_append_gicr(GArray *table_data, uint64_t base, uint32_t size) @@ -704,7 +704,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) int i; VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms); const MemMapEntry *memmap = vms->memmap; - AcpiTable table = { .sig = "APIC", .rev = 3, .oem_id = vms->oem_id, + AcpiTable table = { .sig = "APIC", .rev = 4, .oem_id = vms->oem_id, .oem_table_id = vms->oem_table_id }; acpi_table_begin(&table, table_data); @@ -739,7 +739,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) /* 5.2.12.14 GIC Structure */ build_append_int_noprefix(table_data, 0xB, 1); /* Type */ - build_append_int_noprefix(table_data, 76, 1); /* Length */ + build_append_int_noprefix(table_data, 80, 1); /* Length */ build_append_int_noprefix(table_data, 0, 2); /* Reserved */ build_append_int_noprefix(table_data, i, 4); /* GIC ID */ build_append_int_noprefix(table_data, i, 4); /* ACPI Processor UID */ @@ -759,6 +759,10 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) build_append_int_noprefix(table_data, 0, 8); /* GICR Base Address*/ /* MPIDR */ build_append_int_noprefix(table_data, armcpu->mp_affinity, 8); + /* Processor Power Efficiency Class */ + build_append_int_noprefix(table_data, 0, 1); + /* Reserved */ + build_append_int_noprefix(table_data, 0, 3); } if (vms->gic_version != VIRT_GIC_VERSION_2) { @@ -770,12 +774,6 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) } if (its_class_name() && !vmc->no_its) { - /* - * FIXME: Structure is from Revision 6.0 where 'GIC Structure' - * has additional fields on top of implemented 5.1 Errata A, - * to make it consistent with v6.0 we need to bump everything - * to v6.0 - */ /* * ACPI spec, Revision 6.0 Errata A * (original 6.0 definition has invalid Length)