From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC290C388F7 for ; Fri, 13 Nov 2020 15:56:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E79A208D5 for ; Fri, 13 Nov 2020 15:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbgKMP4j (ORCPT ); Fri, 13 Nov 2020 10:56:39 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:56299 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726503AbgKMP4i (ORCPT ); Fri, 13 Nov 2020 10:56:38 -0500 Received: by mail-wm1-f68.google.com with SMTP id c9so8527280wml.5; Fri, 13 Nov 2020 07:56:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=s6hyMVEFfMlo0q95MNqmUfjlLkrSXFwE1LaCrXDrf1U=; b=T7GlhVgQg1AiqMBL5AxD8kXFbzWQbAmSuPZCfSo0A8EkuVLrlJ0ifWX652KFtdMPAc 5uRrKQhTQ2rQ1Oy7zIQvyD6H6eIwNVhrW2HIu4tFMCE7HzwPEOuFa50oJmgy36GxHa4K B1Xgn0mhxHJmO4re6AGPMZl1CSoUFq50/yahdNG908uC2In/piy8H21Cxy7LUpe60BKM 49UzKynUQXiCFabc7wmgXXm6uHkxIMFmSjP+koGasjsMIN/RcL+7DXMvVbJJPmO3UXZB uTGB3/V3hAvapO1ym9TxyxU/2kZXOVOBFhdjH3oxYqf5Tfd907vuXzwJeIa9ZrbLdBeS 6EyQ== X-Gm-Message-State: AOAM531aY59mXvySawSFjRp+tZFqo4xe2QmOzHd84n8LTSbAD26hOdRC Ek1E8jJGz+yAlPEFrMtJeNA= X-Google-Smtp-Source: ABdhPJwxmDHIqC3YZFsvlTECTSLwSAi65CsT4dZPk+I9eWtnFzWgSXA34nI1Jw+q43SYi23eyToExQ== X-Received: by 2002:a1c:2643:: with SMTP id m64mr3286089wmm.28.1605282992030; Fri, 13 Nov 2020 07:56:32 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id m18sm9567357wru.37.2020.11.13.07.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 07:56:31 -0800 (PST) Date: Fri, 13 Nov 2020 15:56:29 +0000 From: Wei Liu To: Vitaly Kuznetsov Cc: Wei Liu , Linux on Hyper-V List , virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Lillian Grassin-Drake , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" Subject: Re: [PATCH v2 10/17] x86/hyperv: implement and use hv_smp_prepare_cpus Message-ID: <20201113155629.bkw45kcuqhr6puck@liuwe-devbox-debian-v2> References: <20201105165814.29233-1-wei.liu@kernel.org> <20201105165814.29233-11-wei.liu@kernel.org> <87y2j6wmm7.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y2j6wmm7.fsf@vitty.brq.redhat.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On Thu, Nov 12, 2020 at 05:44:48PM +0100, Vitaly Kuznetsov wrote: > Wei Liu writes: > > > Microsoft Hypervisor requires the root partition to make a few > > hypercalls to setup application processors before they can be used. > > > > Signed-off-by: Lillian Grassin-Drake > > Signed-off-by: Sunil Muthuswamy > > Co-Developed-by: Lillian Grassin-Drake > > Co-Developed-by: Sunil Muthuswamy > > Signed-off-by: Wei Liu > > --- > > CPU hotplug and unplug is not yet supported in this setup, so those > > paths remain untouched. > > --- > > arch/x86/kernel/cpu/mshyperv.c | 27 +++++++++++++++++++++++++++ > > 1 file changed, 27 insertions(+) > > > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > > index f7633e1e4c82..4795e54550e6 100644 > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -31,6 +31,7 @@ > > #include > > #include > > #include > > +#include > > > > struct ms_hyperv_info ms_hyperv; > > EXPORT_SYMBOL_GPL(ms_hyperv); > > @@ -208,6 +209,30 @@ static void __init hv_smp_prepare_boot_cpu(void) > > hv_init_spinlocks(); > > #endif > > } > > + > > +static void __init hv_smp_prepare_cpus(unsigned int max_cpus) > > +{ > > +#if defined(CONFIG_X86_64) > > '#ifdef CONFIG_X86_64' is equally good as you can't compile x86_64 > support as a module :-) > > > + int i; > > + int ret; > > + > > + native_smp_prepare_cpus(max_cpus); > > + > > So hypotetically, if hv_root_partition is true but 'ifdef CONFIG_X86_64' > is false, we won't even be doing native_smp_prepare_cpus()? This doesn't > sound right. Either move it outside of #ifdef or put the #ifdef around > 'smp_ops.smp_prepare_cpus' assignment too. > Fixed. Thanks. Wei.