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 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 F1F94C54798 for ; Tue, 5 Mar 2024 13:46:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhV77-0005Fh-OP; Tue, 05 Mar 2024 08:45:54 -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 1rhV5v-0004Py-9v for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:38 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhV5t-0004J2-J4 for qemu-devel@nongnu.org; Tue, 05 Mar 2024 08:44:35 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5131c48055cso875969e87.1 for ; Tue, 05 Mar 2024 05:44:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709646271; x=1710251071; darn=nongnu.org; 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=iOxnYUajpBTpGKSyr9S0Yy8S7gw3p/1QBOxX+w9BDyM=; b=BcGyntElQvi+nCVmOH8W61Vrfi0XwkkwMs6sOzD5ShzIlU8Q57BR05UnfP7SG4dF2W QI2JvQkx+LVvUGSNAros4rktqbFb9JxNEIDa+ISG5hnZ8i668bFxSYO4tuFBzRU2LfVO S9mljKrttARTE7KMQrHVXvBhaSUVOUF1kQG0v/II2MTSO9cjLnddQJTVnlQeRJhr6DcL 9wmNtiwCoG6IEutzJpumIpmwbHaJ6T5w11yR1i+PpJ+B23ed8Z+XAUUI7cCFL9MggpNK Qu4b/YG2RFobv6r7pd3Oh9dToibTWqb3nSqf+epmm4JztumZMRVocRcHVtO9yRyO5IpX ZRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709646271; x=1710251071; 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=iOxnYUajpBTpGKSyr9S0Yy8S7gw3p/1QBOxX+w9BDyM=; b=AWI/1fI+9ojMEXn4t5KkBNHIPvsf9t5q9t539akRX5bT7U24wz4s6AckAue2X0py8f G/2XTsdXeiikEQpMBjcEQb1LbVOJGgepbi2ajY4K/beLuuanWS+FX5jKsnMSfZBmlVtS 3y9RboJPAhpMnMKQtNFB6spM+uak2fgda0dZOX4MsJ+CGucZGqSnKerDfXTfnWxUmL3S Ef3OmomZlCeSHNSRnhukAZ4HyGVFem33DsSlThJkpbHPNtaL6zqWlvThJnOeg0iVEW8n qbzYn8XjWMTJVrcj3iyQl1v7j9+6Y2T3uYrV5K5r1wVmzcJoeJxq2XH6r9cspZn5a2ta cz0Q== X-Gm-Message-State: AOJu0Yz1C17JKajbA/WsNMldtC4BFY3307QFPWlun5OiJEF6hOJ5o1Da titpcP1edhivZAsG4Jep/YChz9INpUDgxpLGbl+P42EbkI4ckOmayb2Wn9zXCN/YMMzzr8s/Gii v X-Google-Smtp-Source: AGHT+IHpOzBhI25sZswJgzVD41rB8MjyWnj6iLrgSAs150NP2za1mp4EKVUQTwD9LVaUetj1tdSnbA== X-Received: by 2002:a05:6512:10ce:b0:513:588a:260f with SMTP id k14-20020a05651210ce00b00513588a260fmr510188lfg.38.1709646271091; Tue, 05 Mar 2024 05:44:31 -0800 (PST) Received: from m1x-phil.lan ([176.176.177.70]) by smtp.gmail.com with ESMTPSA id bu16-20020a056000079000b0033dc3f3d689sm15142258wrb.93.2024.03.05.05.44.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 05:44:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: Igor Mammedov , Richard Henderson , kvm@vger.kernel.org, Marcelo Tosatti , devel@lists.libvirt.org, David Hildenbrand , Ani Sinha , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost Subject: [PATCH-for-9.1 18/18] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Tue, 5 Mar 2024 14:42:20 +0100 Message-ID: <20240305134221.30924-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305134221.30924-1-philmd@linaro.org> References: <20240305134221.30924-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 machine, which got removed. Since it is constant, replace the class field by a definition. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index b4a9ea46a3..2e57a1b5da 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,9 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @acpi_data_size: Size of the chunk of memory at the top of RAM - * for the BIOS ACPI tables and other BIOS - * datastructures. * @gigabyte_align: Make sure that guest addresses aligned at * 1Gbyte boundaries get mapped to host * addresses aligned at 1Gbyte boundaries. This @@ -100,7 +97,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - unsigned acpi_data_size; int pci_root_uid; /* SMBIOS compat: */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4b9f4c5c2c..ce9e6b6272 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -256,6 +256,16 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); +/* + * @PC_ACPI_DATA_SIZE: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define PC_ACPI_DATA_SIZE (0x20000 + 0x8000) + GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -652,8 +662,7 @@ void xen_load_linux(PCMachineState *pcms) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus); rom_set_fw(fw_cfg); - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || !strcmp(option_rom[i].name, "linuxboot_dma.bin") || @@ -987,8 +996,7 @@ void pc_memory_init(PCMachineState *pcms, } if (linux_boot) { - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_ACPI_DATA_SIZE, pcmc->pvh_enabled); } for (i = 0; i < nb_option_roms; i++) { @@ -1737,9 +1745,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported - * to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true; -- 2.41.0