From nobody Wed Nov 12 07:03:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568647701; cv=none; d=zoho.com; s=zohoarc; b=Ohokbxok2jXaSlnKrvzV9oC3IWDAc1Up3XTLgvD+Q9ytgPdfWx7HSN+orIbEPfeB03SCs/m+jme3cBzz/ZJnK3Iqh5mmw4Ra5Ny6MT/5sms/vFFrwDFb1atoV56zlLDO0KCaJxfEdi/O0jh9JcsjOPcFBqJwzE/Fr4ydmzT//gQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568647701; h=Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=KiFCZUVAPnnWNqhg3WDsyPWMV8xe1NmN4cPuEbcJmC4=; b=M7GKpNEsYNq9XOlWYckM6LZOFQ3bBZWCJaw9COtATuBTRv/JJTMKcYY+L+kWhxqBaeUtk+TFkKpzUq4Rz/VRcbuzFvBLv/mD/gHZ2/tELEuOWR6iETnOXRMXoyijP+ZFaOm6bvaVZoHv5GO5QIIyAQKlpzKKAp5fLUD92Qj/Ny4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568647701965143.87989678879865; Mon, 16 Sep 2019 08:28:21 -0700 (PDT) Received: from localhost ([::1]:35886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9svL-0001kl-Tt for importer@patchew.org; Mon, 16 Sep 2019 11:28:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53855) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9sDC-0006gY-EI for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9sDA-0007ZP-1l for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:41 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:54519) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9sD7-0007YJ-V8 for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:38 -0400 Received: by mail-wm1-x335.google.com with SMTP id p7so60637wmp.4 for ; Mon, 16 Sep 2019 07:42:36 -0700 (PDT) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id i14sm17024298wra.78.2019.09.16.07.42.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Sep 2019 07:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=KiFCZUVAPnnWNqhg3WDsyPWMV8xe1NmN4cPuEbcJmC4=; b=BbUlwGO+gso8YZDbG4T+MReP3mREKgRl1mYeC45zamXl+voad8SeFVwmMlZDYQeQRF 8tRt5iW+6pZOYAjs7wXyNmlzUwpmm3XgSiaLBeircu9bzQsVQc37ogAXfaOdZalYFhzb +e80/3a3AiIJkAePRLLN6sCZ64pc95ENY7b0ZLkdNX5ullcDwVBHiNsLln+LLaM63Uq7 YlXZb77GIHFCGbU8x1fHgkC7lwqEfgwdpJwzzlz3Gbn+QUiN8aGINU3pkxMA3jEfnOUD uyYGMnRHNXPKv2hV1Q9pnHTn3pfMjW3ewUaH6VBYU5xNNYsA9fUJdk/mWnB0srWvBxKx R8Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=KiFCZUVAPnnWNqhg3WDsyPWMV8xe1NmN4cPuEbcJmC4=; b=XwwgoGbf1Vdoa2ESMIe74d+Apru3zjPWoXN0FpipE2JQiwEbHftAUiUIEIcgxzqZrz wTfms09sKdURWvN9GtGmNjOOBqQm7LOiJ4e7a1aD1sW2YTHchKQKakr1IrZBHwgB5V5K wzxBqM2YVCjzRMmVi3VmEQYRXKZ9fYL5nCCEVIoUh44zd/hOuNJEyu6et5NT6YZReg1d Yko4pyo4TZT6oVY3zdydKpp50YNo2o9x1zxpYoBpCHrUSYljNEu4Wu5knCuzzM2KgFcy iNfpYLlTz3JJVv/KGVlcPZ0Ix43oyRpoeh4ynvCGA6FHqVgJHe8nNpSSA/j6Ig20iiyX PMbg== X-Gm-Message-State: APjAAAV0Ro8VfjmyaHtO3iXlyLGWS1iuyxl2UDLBi/5h96ioHlRb1q6d 9HIQW+ONnJe4ERjmjZalNMXMP1u3 X-Google-Smtp-Source: APXvYqwpFtieHmWoMHoSEI4NxDvLoh0fZ7yPel91NweI9mQBSi8HUzJUxwfChB3t2DMfZDUJRqAfQA== X-Received: by 2002:a1c:2302:: with SMTP id j2mr47813wmj.174.1568644955495; Mon, 16 Sep 2019 07:42:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 16 Sep 2019 16:42:02 +0200 Message-Id: <1568644929-9124-23-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568644929-9124-1-git-send-email-pbonzini@redhat.com> References: <1568644929-9124-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::335 Subject: [Qemu-devel] [PULL 22/29] hw/i386/pc: Replace PCMachineState argument with MachineState in fw_cfg_arch_create 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In the previous commit we removed the last access to PCMachineState. Replace it with a generic MachineState argument and use it to retrieve the CPUArchIdList. Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5b3f615..8d2e600 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -936,15 +936,15 @@ static void pc_build_smbios(PCMachineState *pcms) } } =20 -static FWCfgState *fw_cfg_arch_create(PCMachineState *pcms, - const CPUArchIdList *cpus, +static FWCfgState *fw_cfg_arch_create(MachineState *ms, uint16_t boot_cpus, uint16_t apic_id_limit) { FWCfgState *fw_cfg; uint64_t *numa_fw_cfg; int i; - MachineState *ms =3D MACHINE(pcms); + MachineClass *mc =3D MACHINE_GET_CLASS(ms); + const CPUArchIdList *cpus =3D mc->possible_cpu_arch_ids(ms); int nb_numa_nodes =3D ms->numa_state->num_nodes; =20 fw_cfg =3D fw_cfg_init_io_dma(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4, @@ -1869,7 +1869,7 @@ void pc_memory_init(PCMachineState *pcms, option_rom_mr, 1); =20 - fw_cfg =3D fw_cfg_arch_create(pcms, mc->possible_cpu_arch_ids(machine), + fw_cfg =3D fw_cfg_arch_create(machine, pcms->boot_cpus, pcms->apic_id_limit); =20 rom_set_fw(fw_cfg); --=20 1.8.3.1