> -----Original Message-----
> From: Dexuan Cui
> Sent: Thursday, August 30, 2018 12:27 PM
> To: KY Srinivasan <k...@microsoft.com>; 'gre...@linuxfoundation.org'
> <gre...@linuxfoundation.org>; Stephen Hemminger
> <sthem...@microsoft.com>; Haiyang Zhang <haiya...@microsoft.com>
> Cc: 'linux-ker...@vger.kernel.org' <linux-ker...@vger.kernel.org>;
> 'driverdev-devel@linuxdriverproject.org' <driverdev-
> de...@linuxdriverproject.org>; 'o...@aepfle.de' <o...@aepfle.de>;
> 'a...@canonical.com' <a...@canonical.com>; 'jasow...@redhat.com'
> <jasow...@redhat.com>; vkuznets <vkuzn...@redhat.com>;
> 'marcelo.ce...@canonical.com' <marcelo.ce...@canonical.com>
> Subject: RE: [PATCH] Drivers: hv: vmbus: Use raw_smp_processor_id() in
> vmbus_connect()
> 
> > From: KY Srinivasan
> > Sent: Thursday, August 30, 2018 09:28
> > ...
> > diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
> > @@ -119,8 +119,9 @@ static int vmbus_negotiate_version(struct
> > vmbus_channel_msginfo *msginfo,
> >          */
> >    if (version >= VERSION_WIN8_1) {
> >        msg->target_vcpu =
> > -            hv_cpu_number_to_vp_number(smp_processor_id());
> > -       vmbus_connection.connect_cpu = smp_processor_id();
> 
> > +       hv_cpu_number_to_vp_number(get_cpu());
> > +       vmbus_connection.connect_cpu = msg->target_vcpu;
> > +       put_cpu();
> 
> While the warning " BUG: using smp_processor_id() in preemptible" can also
> be avoided, the line
> +     vmbus_connection.connect_cpu = msg->target_vcpu;
> seems incorrect, as the "connect_cpu" should reflect Linux CPU numbering
> rather than Hyper-V's vCPU numbering.

Yes of course!  Can you send me a patch with the fix.

K. Y
> 
> -- Dexuan
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to