From nobody Mon May 20 18:04:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1685363708; cv=none; d=zohomail.com; s=zohoarc; b=gPzlteJj2GErmZcUItjd1M9zwJiAknUsCJqJjsxOpDqKYd0R45PtGFZdGBKc8y2U6VCyD+rOeUJz4gX1u4+y6GyL2aAxeodUndzsiGtOq29rqAif+LAiQqnmlXmtQtGnxqRRJBhen6GAI0/OFyiuvolxpTdyeLVOpcTNFlFS3nE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685363708; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=QRgHwCd+uuHYwDYar/06I6vm5UXjal9jPXFw+VS7xeA=; b=cqxMh+e1B6aThLAfWQwhQEiIxn/QCJquTBM8czJuYwKniiVBsJgygw7lcZ2tpJyG5AC8490r/vLb4uBp/sL3s4WzQWYgEJLYJELYOKAlCcMjvpUsvSuhLhnbNK8q5NnfxvYn09bngu1Wl8WgSy9q4LTU+pAzloNoatohKKG/MnQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685363708080457.46095371357626; Mon, 29 May 2023 05:35:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3c4i-0008JC-FR; Mon, 29 May 2023 08:34:12 -0400 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 1q3c4g-0008E2-QM for qemu-devel@nongnu.org; Mon, 29 May 2023 08:34:10 -0400 Received: from mga04.intel.com ([192.55.52.120]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3c4e-00029t-OA for qemu-devel@nongnu.org; Mon, 29 May 2023 08:34:10 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2023 05:34:07 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.28]) by orsmga001.jf.intel.com with ESMTP; 29 May 2023 05:34:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685363648; x=1716899648; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XuAKagteAexMEQ4SotNMhHfLEnHPvGDtrOoAZ+fZIck=; b=iBthjKRyZS/zE1mB2mRKlwDsQI4acG/fOHqx/Y4xniwW8zOyr/dErG6B NRnOyYMefCoE1UzGjn4Y/VuJKWOf7hQiuNF4DcEG3a40XfE4u5YBIuy61 cdDZkhGvIscu5Kzx7mrWuFUtYok1Rl9A7Efd9RzhGDJbF9nRr/vXTeU8m FqvWzoTGno1ur5wvyl2XUb1YL1h60XYXB7uZIezxqDIj9dPryUwxesdAG SGPlLbteCCaIjnvsZfr2wD0irJL05gt2/pQboMQqw6AuOgbirvnPyW1xA RcnWntmDIZ8IEZjKoSvCRWjacBIAvxt8oaDs4ZXE4aKmUt0jB1s3ipqLM Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="353538567" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="353538567" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10725"; a="739136252" X-IronPort-AV: E=Sophos;i="6.00,201,1681196400"; d="scan'208";a="739136252" From: Zhao Liu To: Sunil Muthuswamy Cc: qemu-devel@nongnu.org, Zhenyu Wang , Zhao Liu Subject: [PATCH] i386/WHPX: Fix error message when fail to set ProcessorCount Date: Mon, 29 May 2023 20:43:31 +0800 Message-Id: <20230529124331.412822-1-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: none client-ip=192.55.52.120; envelope-from=zhao1.liu@linux.intel.com; helo=mga04.intel.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.16, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1685363709812100003 Content-Type: text/plain; charset="utf-8" From: Zhao Liu 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology") changes the meaning of MachineState.smp.cores from "the number of cores in one package" to "the number of cores in one die" and doesn't fix other uses of MachineState.smp.cores. And because of the introduction of cluster, now smp.cores just means "the number of cores in one cluster". This clearly does not fit the semantics here. And before this error message, WHvSetPartitionProperty() is called to set prop.ProcessorCount. So the error message should show the prop.ProcessorCount other than "cores per cluster" or "cores per package". Cc: Sunil Muthuswamy Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/whpx/whpx-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 52af81683c1e..5882bf22d0a1 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2613,8 +2613,8 @@ static int whpx_accel_init(MachineState *ms) sizeof(WHV_PARTITION_PROPERTY)); =20 if (FAILED(hr)) { - error_report("WHPX: Failed to set partition core count to %d," - " hr=3D%08lx", ms->smp.cores, hr); + error_report("WHPX: Failed to set partition processor count to %d," + " hr=3D%08lx", prop.ProcessorCount, hr); ret =3D -EINVAL; goto error; } --=20 2.34.1