Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2504787pxj; Mon, 31 May 2021 04:02:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/kQPckh/GyXM5Mna9UtKCbUVnzsE3x9O4edMIiveRuYBV+rVylCLfq0Vekg/RL3GNlNAT X-Received: by 2002:a05:6e02:11b1:: with SMTP id 17mr6736583ilj.225.1622458946533; Mon, 31 May 2021 04:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622458946; cv=none; d=google.com; s=arc-20160816; b=J02nZGHVg6KrjISKeVewfsrMA+M5SJjl3SLeseRkApI8Pv3DgRnCLg18rMJSoyMfzk QQxgNFtEnlBI24QSiI5jwNzzo5zGoZlEUBgkvCqK9s+5Zp2ekop86l2X9a89ITrsymjd AOvMI+WiA6F8JJEWk6abXGRkVhYC0o9OAxsuCbKVm/OVqFCHB1X2IAFFyjbBwytwmtHJ v7qLg1GPzDiEzT7XPK3TEGBuomhM1Lpycs9JbhgeWaknqSTYd8hH2N7f1+YJXzjL4vfW 4PUVm3rQkb/dnpzhbrA44aXLVo/tGYkcnhIsmBhSRDYdheTmhcAcasG2d2Ta7+RK7kMl oEnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=cHg9rnFx1Hr6LTraeqQPRPTYr4rEZm92MuTQAUKcmZU=; b=D5lhe0Hb08XXDOM+e/TYfEo8M+zxkza21tw55bkAXhj8PghtJz1N5YdsqdjmFDaOd9 Xi4I64QNnYexxBSCly2QgVzRZFAoUn73gpDnOtDJ/ZZ0EMNvgL2jjGKYuGUQc+rOX0Pu njNaiXlODq3ee0JkqnkTIkRwAm4JwHmBwCUKsUb8fQSEV6pXlKqBxxUe4wxYExDyQPoZ jrS6iDxbRHmb7OFHKEO4csOa4sGKR+e9JsLIUQHQeYZOKsynTYjSqYFBeAm95Lc1oqRB sxP3PqzMX+k2N2mUD3+Ilp/ssgVEQPeFWoh5gBfTc55EqSrDB43VwDt3wUL/usb/YecF /LBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pnYqze9c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si13016689iln.143.2021.05.31.04.02.12; Mon, 31 May 2021 04:02:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pnYqze9c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231292AbhEaLDN (ORCPT + 99 others); Mon, 31 May 2021 07:03:13 -0400 Received: from linux.microsoft.com ([13.77.154.182]:52466 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbhEaLDH (ORCPT ); Mon, 31 May 2021 07:03:07 -0400 Received: from [192.168.1.79] (unknown [106.201.36.115]) by linux.microsoft.com (Postfix) with ESMTPSA id 4979F20B7178; Mon, 31 May 2021 04:01:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4979F20B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1622458887; bh=cHg9rnFx1Hr6LTraeqQPRPTYr4rEZm92MuTQAUKcmZU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=pnYqze9cTbkvCCFB/cJed0KeYs9wWOS6E5On1sujrV49HkgbUVYFFPydRxjP0gnLM lLasu0B3Z6m8Wr8waCInEkWF3g41bIkl/VoRIa6TaA/iOiTuTmECf9p3YXbDeUN5FV F57uJXiDK3xSpWoOD3L7YwWguPXRU8cbD6UoRufw= Subject: Re: [PATCH] x86/hyperv: LP creation with lp_index on same CPU-id To: Wei Liu Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, nunodasneves@linux.microsoft.com, viremana@linux.microsoft.com, sunilmut@microsoft.com, Michael Kelley References: <20210531074046.113452-1-kumarpraveen@linux.microsoft.com> <20210531105732.muzbpk4yksttsfwz@liuwe-devbox-debian-v2> From: Praveen Kumar Message-ID: <572da60e-714f-b207-a89e-6dc40209e2da@linux.microsoft.com> Date: Mon, 31 May 2021 16:31:04 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210531105732.muzbpk4yksttsfwz@liuwe-devbox-debian-v2> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/2021 4:27 PM, Wei Liu wrote: > On Mon, May 31, 2021 at 01:10:46PM +0530, Praveen Kumar wrote: >> The hypervisor expects the lp_index to be same as cpu-id during LP creation >> This fix correct the same, as cpu_physical_id can give different cpu-id. > > Code looks fine to me, but the commit message can be made clearer. > > """ > The hypervisor expects the logical processor index to be the same as > CPU's id during logical processor creation. Using cpu_physical_id > confuses Microsoft Hypervisor's scheduler. That causes the root > partition not boot when core scheduler is used. > > This patch removes the call to cpu_physical_id and uses the CPU index > directly for bringing up logical processor. This scheme works for both > classic scheduler and core scheduler. > > Fixes: 333abaf5abb3 (x86/hyperv: implement and use hv_smp_prepare_cpus) > """ > > No action is required from you. If you are fine with this commit message > I can incorporate it and update the subject line when committing this > patch. > Thanks Wei for your comments. I'm fine with your inputs. Please go ahead. Thanks. Regards, ~Praveen. >> >> Signed-off-by: Praveen Kumar >> --- >> arch/x86/kernel/cpu/mshyperv.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c >> index 22f13343b5da..4fa0a4280895 100644 >> --- a/arch/x86/kernel/cpu/mshyperv.c >> +++ b/arch/x86/kernel/cpu/mshyperv.c >> @@ -236,7 +236,7 @@ static void __init hv_smp_prepare_cpus(unsigned int max_cpus) >> for_each_present_cpu(i) { >> if (i == 0) >> continue; >> - ret = hv_call_add_logical_proc(numa_cpu_node(i), i, cpu_physical_id(i)); >> + ret = hv_call_add_logical_proc(numa_cpu_node(i), i, i); >> BUG_ON(ret); >> } >> >> -- >> 2.25.1 >>