[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201113155629.bkw45kcuqhr6puck@liuwe-devbox-debian-v2>
Date: Fri, 13 Nov 2020 15:56:29 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: Wei Liu <wei.liu@...nel.org>,
Linux on Hyper-V List <linux-hyperv@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
Linux Kernel List <linux-kernel@...r.kernel.org>,
Michael Kelley <mikelley@...rosoft.com>,
Vineeth Pillai <viremana@...ux.microsoft.com>,
Sunil Muthuswamy <sunilmut@...rosoft.com>,
Nuno Das Neves <nunodasneves@...ux.microsoft.com>,
Lillian Grassin-Drake <ligrassi@...rosoft.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 10/17] x86/hyperv: implement and use
hv_smp_prepare_cpus
On Thu, Nov 12, 2020 at 05:44:48PM +0100, Vitaly Kuznetsov wrote:
> Wei Liu <wei.liu@...nel.org> 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 <ligrassi@...rosoft.com>
> > Signed-off-by: Sunil Muthuswamy <sunilmut@...rosoft.com>
> > Co-Developed-by: Lillian Grassin-Drake <ligrassi@...rosoft.com>
> > Co-Developed-by: Sunil Muthuswamy <sunilmut@...rosoft.com>
> > Signed-off-by: Wei Liu <wei.liu@...nel.org>
> > ---
> > 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 <asm/reboot.h>
> > #include <asm/nmi.h>
> > #include <clocksource/hyperv_timer.h>
> > +#include <asm/numa.h>
> >
> > 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.
Powered by blists - more mailing lists