From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7009AC433DB for ; Sun, 21 Feb 2021 00:20:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1A58964E92 for ; Sun, 21 Feb 2021 00:20:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A58964E92 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mutex.one Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDcU6-0002VO-WD for qemu-devel@archiver.kernel.org; Sat, 20 Feb 2021 19:20:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDcSl-0001j4-OF; Sat, 20 Feb 2021 19:19:03 -0500 Received: from mail.mutex.one ([62.77.152.124]:51100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDcSj-0004mh-1Y; Sat, 20 Feb 2021 19:19:03 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.mutex.one (Postfix) with ESMTP id 29A1DBF4418C; Sun, 21 Feb 2021 02:18:56 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at mail.mutex.one Received: from mail.mutex.one ([127.0.0.1]) by localhost (mail.mutex.one [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9IX3g2YofLiI; Sun, 21 Feb 2021 02:18:54 +0200 (EET) Received: [127.0.0.1] (localhost [127.0.0.1])nknown [109.103.89.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mutex.one (Postfix) with ESMTPSA id 047DDBF4417C; Sun, 21 Feb 2021 02:18:53 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mutex.one; s=default; t=1613866734; bh=3WPWotBqLZCn+wFHpFjW8Z1e/+ZITf1YaWpg/LRKpgw=; h=From:To:Cc:Subject:Date:From; b=grtqjDgGsJl2ZmmPo6KcntCjf01arCovRyWO6gHDYR9Y4uzBGSchm4mqEsglNa5X9 zhaweBphQmj2bCNJ+8XBKsRzZnX2wUAfigEjBzqE589NJK9dy7BNikoF8ToCgCKGQ4 hXsKoyX8jWpkNoCyHvNbI7zeXV4Ndj+S1iXndDhM= From: Marian Postevca To: qemu-devel@nongnu.org Subject: [PATCH v2 0/2] Rework ACPI OEM fields handling to simplify code (was: acpi: Remove duplicated code handling OEM ID and OEM table ID fields) Date: Sun, 21 Feb 2021 02:17:35 +0200 Message-Id: <20210221001737.24499-1-posteuca@mutex.one> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=62.77.152.124; envelope-from=marian@mutex.one; helo=mail.mutex.one 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, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Xiao Guangrong , Sergio Lopez , "Michael S . Tsirkin" , Richard Henderson , Dongjiu Geng , Shannon Zhao , Xiang Zheng , "open list : ACPI/HEST/GHES" , Marian Postevca , Igor Mammedov , Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This patch series consolidates ACPI OEM fields handling by: - Moving common code in PC and MICROVM to X86. - Changes unnecessary dynamic memory allocation to static allocation - Uses dedicated structure to keep values of fields instead of two separate strings - Adds helper macros to initialize the structure v2: - Move the setters/getters of OEM fields to X86MachineState to remove duplication - Change commit message to make it clear the second commit is a re-factor Marian Postevca (2): acpi: Move setters/getters of oem fields to X86MachineState acpi: Consolidate the handling of OEM ID and OEM Table ID fields hw/acpi/hmat.h | 2 +- hw/i386/acpi-common.h | 2 +- include/hw/acpi/acpi-build-oem.h | 55 ++++++++++++++++++++++ include/hw/acpi/aml-build.h | 16 +++---- include/hw/acpi/ghes.h | 2 +- include/hw/acpi/pci.h | 2 +- include/hw/acpi/vmgenid.h | 2 +- include/hw/arm/virt.h | 4 +- include/hw/i386/microvm.h | 4 -- include/hw/i386/pc.h | 4 -- include/hw/i386/x86.h | 4 ++ include/hw/mem/nvdimm.h | 4 +- hw/acpi/aml-build.c | 27 ++++++----- hw/acpi/ghes.c | 5 +- hw/acpi/hmat.c | 4 +- hw/acpi/nvdimm.c | 22 +++++---- hw/acpi/pci.c | 4 +- hw/acpi/vmgenid.c | 6 ++- hw/arm/virt-acpi-build.c | 40 ++++++---------- hw/arm/virt.c | 16 +++---- hw/i386/acpi-build.c | 78 +++++++++++++++----------------- hw/i386/acpi-common.c | 4 +- hw/i386/acpi-microvm.c | 13 ++---- hw/i386/microvm.c | 66 --------------------------- hw/i386/pc.c | 63 -------------------------- hw/i386/x86.c | 61 +++++++++++++++++++++++++ 26 files changed, 237 insertions(+), 273 deletions(-) create mode 100644 include/hw/acpi/acpi-build-oem.h -- 2.26.2