From patchwork Wed Jun 28 15:53:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1801191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IOiHK7Oj; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QrmTY1zYYz20ZV for ; Thu, 29 Jun 2023 01:58:41 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEXXG-0003eM-Dv; Wed, 28 Jun 2023 11:56:50 -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 1qEXWU-0002ov-GS for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:56:05 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEXWO-0001rK-Mw for qemu-devel@nongnu.org; Wed, 28 Jun 2023 11:55:58 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fba5a8af2cso390235e9.3 for ; Wed, 28 Jun 2023 08:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687967755; x=1690559755; 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=PS9p0CO5xuXT5CmTtX8By8EJcaMyoP638DTVL9KLDbs=; b=IOiHK7OjveeptVVVCASlvxA6zQi77wf/srMfTGPyknWY5WCoj3A5DxwWS9UjA6E6x1 HwKGYR6viVhdvfWfnRsu1ZdF3T8zLdiz37EUAYb54pg5rREhUCEst2a//oHFHzzHM6E8 iR2d/mO8x//fbfgEu8/SgzrVnpesXUiLKDTPI2MYvl4norwz8WpQhpXXVsLCVOe9Dxhl jfMohx5nI5W1KVJmmuWjJFpi9yAaTzAvKwcE6WAAKm+jPrdoB8Jv3xv2uUrrTNbY1+su 23Ae7sPgeXMQWzdL7Kd3jYO8vRnOIrj7108wlAdtI+s0jpqk99DS46FZ/h5sXgz+6V7u 0T1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687967755; x=1690559755; 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=PS9p0CO5xuXT5CmTtX8By8EJcaMyoP638DTVL9KLDbs=; b=WKod1YRxCok32xj1IcIdNCclF/WaBrEjXRxW3y1Vv1owQwADv6AIXfy5cmKAWUdJyP j4PKTwGRSsxlZmLlYMA3GgSmwZwPtAX1tUxPzDW8lUGj+EHn1rW7g+AA0G8d2SYiBweQ u0H/SIhukH8D/pBzyQQ/ULQIiN/3ouW+bMr6Qo7pI7IucaIeL2/R8xDINcERAUoIrLCt aNl5uRKnUiEcLPijcTwp1AFXhWd1aT1rdpgyCTW1jmP0+5VJ19a0RyC5fiYSxBayUHyl y+eE+mlph02sJDcqBe9sbLEMV3q73HB5EFJss2+PPA1ov9FY1nvXXwMgO2/AjEjbWf3J SJVw== X-Gm-Message-State: AC+VfDwjbDMazTudGnRNleg+Ag+ZoPCqHBUVBiaQXuwJ6Ee2cFMcbO1P ojP5iq8krpJaRVC2PIWngncB71CVPJcb2KVZeYY= X-Google-Smtp-Source: ACHHUZ7y+fNuTAVetRl2osxgYvIdWZL5T8wxKPucEfuwtX+KZA80swCOAMOLVIZrcTm8oeo2TuimrQ== X-Received: by 2002:a1c:7214:0:b0:3fa:8cd5:b64a with SMTP id n20-20020a1c7214000000b003fa8cd5b64amr6950703wmc.0.1687967754916; Wed, 28 Jun 2023 08:55:54 -0700 (PDT) Received: from m1x-phil.lan ([176.187.207.229]) by smtp.gmail.com with ESMTPSA id s25-20020a7bc399000000b003fa96fe2bebsm9159019wmj.41.2023.06.28.08.55.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 28 Jun 2023 08:55:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Zhao Liu , Sunil Muthuswamy , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 27/30] target/i386/WHPX: Fix error message when fail to set ProcessorCount Date: Wed, 28 Jun 2023 17:53:10 +0200 Message-Id: <20230628155313.71594-28-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230628155313.71594-1-philmd@linaro.org> References: <20230628155313.71594-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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é Message-Id: <20230529124331.412822-1-zhao1.liu@linux.intel.com> [PMD: Use '%u' format for ProcessorCount] Signed-off-by: Philippe Mathieu-Daudé --- 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 9ee04ee650..57580ca383 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2598,8 +2598,8 @@ static int whpx_accel_init(MachineState *ms) sizeof(WHV_PARTITION_PROPERTY)); if (FAILED(hr)) { - error_report("WHPX: Failed to set partition core count to %d," - " hr=%08lx", ms->smp.cores, hr); + error_report("WHPX: Failed to set partition processor count to %u," + " hr=%08lx", prop.ProcessorCount, hr); ret = -EINVAL; goto error; }