From nobody Wed Nov 12 07:03:42 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=1568649413; cv=none; d=zoho.com; s=zohoarc; b=hY0u+SjamA12AvEzVob3aUpTVZp/We2iAEI7aMfX58o/FCrXaQHugBvLOre++8wj+rA7VKsjY60rlhsbRGEJMFWAVYEYvGtza3dFJUoq7lT+2fZkk/svuuY+EVe1USpY4rSN0br5S+YtyYr+j6rK0zMB7Ln8swPw8ommK+9A7RY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568649413; 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:ARC-Authentication-Results; bh=jOoruMaTeCNDoafHm9yLjtEQ2dgmSuxRKdw4PApSxEU=; b=Rk5aSvxFLiizTLARRq7Mlvje/q2qdNPfSPh5TzuzFcfdKQTaLpqRPcvXXT1mmUOEeeGOgyKSZi3DtoK6PFJwX2b5L1AazKcLhL8WITTs+SpL4hCWbZsEvcSr/YlYrdONgw16jNcazA2L+7w0Fize4jHIWGdLTJtwoZ+1oGSbw4w= 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 1568649413801610.9217281991603; Mon, 16 Sep 2019 08:56:53 -0700 (PDT) Received: from localhost ([::1]:36326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9tMx-0007U7-TU for importer@patchew.org; Mon, 16 Sep 2019 11:56:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53812) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9sD6-0006ev-4x for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9sD4-0007XR-KV for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:35 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:33079) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9sD3-0007Wq-V2 for qemu-devel@nongnu.org; Mon, 16 Sep 2019 10:42:34 -0400 Received: by mail-wr1-x42a.google.com with SMTP id b9so5596908wrs.0 for ; Mon, 16 Sep 2019 07:42:33 -0700 (PDT) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id i14sm17024298wra.78.2019.09.16.07.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Sep 2019 07:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jOoruMaTeCNDoafHm9yLjtEQ2dgmSuxRKdw4PApSxEU=; b=mWPXKb9UZOsYDYsQLg4seRhbOR4KHg9FYhcDN++F6fBtqgEIZxPLIq+7fGSABD0I+D 7bgLi5b2TvWx1h351IovjH35KeN7GdQiKrMs/KwqUfWymlj3YEoNvPhDCJ4yxyllXESa kmpOzjMmiiDO//pLHrn8CuRJ6p1i8jSs3rX4GJgY4GfTCaKNFkfXKG1r7SyB/lT/QzBn TkBel88Uj3fe+6q00bpryCsaKsvhgMa21KkjWMYwzn9nPg2u5Jrk43YPhZoQNMNCtVeg jFueUPlV7RjOLxXlmrpbwZQphz1Zek796pEiTWafdF3Zz0zoe1VXJpdXl6Umh/UFqZS7 zBzA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jOoruMaTeCNDoafHm9yLjtEQ2dgmSuxRKdw4PApSxEU=; b=hZpS9Ywv9Y85pQIPzrrYADZMctFykxLk+iSnOVFlYeDRsjSjbIj6Mqv/R6UnD8zeFJ cIdEqzq9sZzME0dHc6Jra9TaSpmU70MBgqaFMfiKX/BCLSg1yhc8qNYoN7RtfhLCGnW8 s6Ga7uhEJTO1n0IRdrW+LyHOm06xmYtQS/gPwcV4cf4S5kYsS99nIF1azlnBza+x079c Lw+WkL/9zyA7/AMS91RdeT5GpHTYA3XtIkcOoDyHwr+iDAnhxxFCpMtmMl8xjoSQQ3Cx whRez1Wq1Il4vayEm1jotOZs9DtyGefaIPFTMcVhd5q4DC+SINjkTVXzrabEfp4n6tFq 9f+Q== X-Gm-Message-State: APjAAAXQ2/3wLXrbCV+pQ02A8vY3FpyLdVxSNrhHiborlageJ6u3Zg0l 7w0Su4OZ5JsaKzDrmpoVdM7RtjPf X-Google-Smtp-Source: APXvYqwy9Ht7NTtK6Np+Pla70MO4cpb1omyo6b1TBXeWeSSQpWrmaRBJv0Hhi2ZICPMzmhfp6rbJVA== X-Received: by 2002:adf:d848:: with SMTP id k8mr113707wrl.254.1568644952411; Mon, 16 Sep 2019 07:42:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 16 Sep 2019 16:41:59 +0200 Message-Id: <1568644929-9124-20-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> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a Subject: [Qemu-devel] [PULL 19/29] hw/i386/pc: Pass the boot_cpus value by argument 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The boot_cpus is used once. Pass it by argument, this will allow us to remove the PCMachineState argument later. Suggested-by: Samuel Ortiz Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190818225414.22590-6-philmd@redhat.com> --- hw/i386/pc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b15af77..dc2ae6d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -936,7 +936,8 @@ static void pc_build_smbios(PCMachineState *pcms) } } =20 -static FWCfgState *fw_cfg_arch_create(PCMachineState *pcms) +static FWCfgState *fw_cfg_arch_create(PCMachineState *pcms, + uint16_t boot_cpus) { FWCfgState *fw_cfg; uint64_t *numa_fw_cfg; @@ -948,7 +949,7 @@ static FWCfgState *fw_cfg_arch_create(PCMachineState *p= cms) =20 fw_cfg =3D fw_cfg_init_io_dma(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4, &address_space_memory); - fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, pcms->boot_cpus); + fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, boot_cpus); =20 /* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86: * @@ -1869,7 +1870,7 @@ void pc_memory_init(PCMachineState *pcms, option_rom_mr, 1); =20 - fw_cfg =3D fw_cfg_arch_create(pcms); + fw_cfg =3D fw_cfg_arch_create(pcms, pcms->boot_cpus); =20 rom_set_fw(fw_cfg); =20 --=20 1.8.3.1