linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
@ 2013-02-06 15:25 K. Y. Srinivasan
  2013-02-06 19:13 ` Greg KH
  0 siblings, 1 reply; 22+ messages in thread
From: K. Y. Srinivasan @ 2013-02-06 15:25 UTC (permalink / raw)
  To: x86, gregkh, linux-kernel, devel, olaf, apw, jasowang, tglx, hpa,
	JBeulich, bp
  Cc: K. Y. Srinivasan

Use the infrastructure for delivering VMBUS interrupts using a
special vector. With this patch, we can now properly handle
the VMBUS interrupts that can be delivered on any CPU. Also,
turn on interrupt load balancing as well.

This patch requires the infrastructure that was implemented in the patch:
X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/channel_mgmt.c |    2 +-
 drivers/hv/hv.c           |    5 ++---
 drivers/hv/vmbus_drv.c    |   11 +++++++----
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 53a8600..ff1be16 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -318,7 +318,7 @@ static u32 get_vp_index(uuid_le *type_guid)
 		return 0;
 	}
 	cur_cpu = (++next_vp % max_cpus);
-	return 0;
+	return cur_cpu;
 }
 
 /*
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 1c5481d..7311589 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -272,7 +272,7 @@ u16 hv_signal_event(void *con_id)
  * retrieve the initialized message and event pages.  Otherwise, we create and
  * initialize the message and event pages.
  */
-void hv_synic_init(void *irqarg)
+void hv_synic_init(void *arg)
 {
 	u64 version;
 	union hv_synic_simp simp;
@@ -281,7 +281,6 @@ void hv_synic_init(void *irqarg)
 	union hv_synic_scontrol sctrl;
 	u64 vp_index;
 
-	u32 irq_vector = *((u32 *)(irqarg));
 	int cpu = smp_processor_id();
 
 	if (!hv_context.hypercall_page)
@@ -335,7 +334,7 @@ void hv_synic_init(void *irqarg)
 	rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
 
 	shared_sint.as_uint64 = 0;
-	shared_sint.vector = irq_vector; /* HV_SHARED_SINT_IDT_VECTOR + 0x20; */
+	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
 	shared_sint.masked = false;
 	shared_sint.auto_eoi = true;
 
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index cf19dfa..bf421e0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -36,6 +36,7 @@
 #include <linux/kernel_stat.h>
 #include <asm/hyperv.h>
 #include <asm/hypervisor.h>
+#include <asm/mshyperv.h>
 #include "hyperv_vmbus.h"
 
 
@@ -528,7 +529,6 @@ static void vmbus_flow_handler(unsigned int irq, struct irq_desc *desc)
 static int vmbus_bus_init(int irq)
 {
 	int ret;
-	unsigned int vector;
 
 	/* Hypervisor initialization...setup hypercall page..etc */
 	ret = hv_init();
@@ -558,13 +558,16 @@ static int vmbus_bus_init(int irq)
 	 */
 	irq_set_handler(irq, vmbus_flow_handler);
 
-	vector = IRQ0_VECTOR + irq;
+	/*
+	 * Register our interrupt handler.
+	 */
+	hv_register_vmbus_handler(irq, vmbus_isr);
 
 	/*
-	 * Notify the hypervisor of our irq and
+	 * Initialize the per-cpu interrupt state and
 	 * connect to the host.
 	 */
-	on_each_cpu(hv_synic_init, (void *)&vector, 1);
+	on_each_cpu(hv_synic_init, NULL, 1);
 	ret = vmbus_connect();
 	if (ret)
 		goto err_irq;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-06 15:25 [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts K. Y. Srinivasan
@ 2013-02-06 19:13 ` Greg KH
  2013-02-09 14:09   ` KY Srinivasan
  2013-02-13  0:30   ` H. Peter Anvin
  0 siblings, 2 replies; 22+ messages in thread
From: Greg KH @ 2013-02-06 19:13 UTC (permalink / raw)
  To: K. Y. Srinivasan
  Cc: x86, linux-kernel, devel, olaf, apw, jasowang, tglx, hpa, JBeulich, bp

On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
> Use the infrastructure for delivering VMBUS interrupts using a
> special vector. With this patch, we can now properly handle
> the VMBUS interrupts that can be delivered on any CPU. Also,
> turn on interrupt load balancing as well.
> 
> This patch requires the infrastructure that was implemented in the patch:
> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> 

Because of the dependancy, this should go through the x86 tree as well:
	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-06 19:13 ` Greg KH
@ 2013-02-09 14:09   ` KY Srinivasan
  2013-02-13  0:30   ` H. Peter Anvin
  1 sibling, 0 replies; 22+ messages in thread
From: KY Srinivasan @ 2013-02-09 14:09 UTC (permalink / raw)
  To: Greg KH
  Cc: x86, linux-kernel, devel, olaf, apw, jasowang, tglx, hpa, JBeulich, bp



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, February 06, 2013 2:13 PM
> To: KY Srinivasan
> Cc: x86@kernel.org; linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> olaf@aepfle.de; apw@canonical.com; jasowang@redhat.com;
> tglx@linutronix.de; hpa@zytor.com; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
> > Use the infrastructure for delivering VMBUS interrupts using a
> > special vector. With this patch, we can now properly handle
> > the VMBUS interrupts that can be delivered on any CPU. Also,
> > turn on interrupt load balancing as well.
> >
> > This patch requires the infrastructure that was implemented in the patch:
> > X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> >
> 
> Because of the dependancy, this should go through the x86 tree as well:
> 	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> 

Peter,

Let me know if I need to make any adjustments to these patches. These set of
patches are key for Linux scalability on Hyper-V.

Regards,

K. Y


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-06 19:13 ` Greg KH
  2013-02-09 14:09   ` KY Srinivasan
@ 2013-02-13  0:30   ` H. Peter Anvin
  2013-02-13  0:43     ` KY Srinivasan
  2013-02-13 14:07     ` KY Srinivasan
  1 sibling, 2 replies; 22+ messages in thread
From: H. Peter Anvin @ 2013-02-13  0:30 UTC (permalink / raw)
  To: Greg KH
  Cc: K. Y. Srinivasan, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp

On 02/06/2013 11:13 AM, Greg KH wrote:
> On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
>> Use the infrastructure for delivering VMBUS interrupts using a
>> special vector. With this patch, we can now properly handle
>> the VMBUS interrupts that can be delivered on any CPU. Also,
>> turn on interrupt load balancing as well.
>>
>> This patch requires the infrastructure that was implemented in the patch:
>> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
>>
> 
> Because of the dependancy, this should go through the x86 tree as well:
> 	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 

This does not apply to v3.8-rc7 + the set of three vmbus patches for
x86.  I take it there are additional dependencies -- K.Y., what do I
need here?

	-hpa



^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13  0:30   ` H. Peter Anvin
@ 2013-02-13  0:43     ` KY Srinivasan
  2013-02-13  0:46       ` H. Peter Anvin
  2013-02-13 14:07     ` KY Srinivasan
  1 sibling, 1 reply; 22+ messages in thread
From: KY Srinivasan @ 2013-02-13  0:43 UTC (permalink / raw)
  To: H. Peter Anvin, Greg KH
  Cc: x86, linux-kernel, devel, olaf, apw, jasowang, tglx, JBeulich, bp



> -----Original Message-----
> From: H. Peter Anvin [mailto:hpa@zytor.com]
> Sent: Tuesday, February 12, 2013 7:31 PM
> To: Greg KH
> Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On 02/06/2013 11:13 AM, Greg KH wrote:
> > On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
> >> Use the infrastructure for delivering VMBUS interrupts using a
> >> special vector. With this patch, we can now properly handle
> >> the VMBUS interrupts that can be delivered on any CPU. Also,
> >> turn on interrupt load balancing as well.
> >>
> >> This patch requires the infrastructure that was implemented in the patch:
> >> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> >>
> >
> > Because of the dependancy, this should go through the x86 tree as well:
> > 	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> 
> This does not apply to v3.8-rc7 + the set of three vmbus patches for
> x86.  I take it there are additional dependencies -- K.Y., what do I
> need here?

Do none of the earlier patches apply or just this patch. If none of them
apply, I could rebase all of them and resend them. Please let me know.

Regards,

K. Y
> 
> 	-hpa
> 
> 
> 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13  0:43     ` KY Srinivasan
@ 2013-02-13  0:46       ` H. Peter Anvin
  2013-02-13  0:50         ` KY Srinivasan
  0 siblings, 1 reply; 22+ messages in thread
From: H. Peter Anvin @ 2013-02-13  0:46 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: Greg KH, x86, linux-kernel, devel, olaf, apw, jasowang, tglx,
	JBeulich, bp

On 02/12/2013 04:43 PM, KY Srinivasan wrote:
>>
>> This does not apply to v3.8-rc7 + the set of three vmbus patches for
>> x86.  I take it there are additional dependencies -- K.Y., what do I
>> need here?
> 
> Do none of the earlier patches apply or just this patch. If none of them
> apply, I could rebase all of them and resend them. Please let me know.
> 

The earlier (set of 3) patches apply just fine.

	-hpa



^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13  0:46       ` H. Peter Anvin
@ 2013-02-13  0:50         ` KY Srinivasan
  2013-02-13  0:59           ` H. Peter Anvin
  0 siblings, 1 reply; 22+ messages in thread
From: KY Srinivasan @ 2013-02-13  0:50 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Greg KH, x86, linux-kernel, devel, olaf, apw, jasowang, tglx,
	JBeulich, bp



> -----Original Message-----
> From: H. Peter Anvin [mailto:hpa@zytor.com]
> Sent: Tuesday, February 12, 2013 7:46 PM
> To: KY Srinivasan
> Cc: Greg KH; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On 02/12/2013 04:43 PM, KY Srinivasan wrote:
> >>
> >> This does not apply to v3.8-rc7 + the set of three vmbus patches for
> >> x86.  I take it there are additional dependencies -- K.Y., what do I
> >> need here?
> >
> > Do none of the earlier patches apply or just this patch. If none of them
> > apply, I could rebase all of them and resend them. Please let me know.
> >
> 
> The earlier (set of 3) patches apply just fine.

Apply them and I will rebase this patch and send it out.

Regards,

K. Y 
> 
> 	-hpa
> 
> 
> 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13  0:50         ` KY Srinivasan
@ 2013-02-13  0:59           ` H. Peter Anvin
  0 siblings, 0 replies; 22+ messages in thread
From: H. Peter Anvin @ 2013-02-13  0:59 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: Greg KH, x86, linux-kernel, devel, olaf, apw, jasowang, tglx,
	JBeulich, bp

On 02/12/2013 04:50 PM, KY Srinivasan wrote:
> 
> Apply them and I will rebase this patch and send it out.
> 

Pull the -tip tree and you can base it on the x86/hyperv branch.

	-hpa



^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13  0:30   ` H. Peter Anvin
  2013-02-13  0:43     ` KY Srinivasan
@ 2013-02-13 14:07     ` KY Srinivasan
  2013-02-13 16:22       ` Greg KH
  1 sibling, 1 reply; 22+ messages in thread
From: KY Srinivasan @ 2013-02-13 14:07 UTC (permalink / raw)
  To: H. Peter Anvin, Greg KH
  Cc: x86, linux-kernel, devel, olaf, apw, jasowang, tglx, JBeulich, bp



> -----Original Message-----
> From: H. Peter Anvin [mailto:hpa@zytor.com]
> Sent: Tuesday, February 12, 2013 7:31 PM
> To: Greg KH
> Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On 02/06/2013 11:13 AM, Greg KH wrote:
> > On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
> >> Use the infrastructure for delivering VMBUS interrupts using a
> >> special vector. With this patch, we can now properly handle
> >> the VMBUS interrupts that can be delivered on any CPU. Also,
> >> turn on interrupt load balancing as well.
> >>
> >> This patch requires the infrastructure that was implemented in the patch:
> >> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> >>
> >
> > Because of the dependancy, this should go through the x86 tree as well:
> > 	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> 
> This does not apply to v3.8-rc7 + the set of three vmbus patches for
> x86.  I take it there are additional dependencies -- K.Y., what do I
> need here?

Greg,

Peter has checked in the infrastructural patches into v3.8-rc7. This version
does not have the patches that upgraded the VMBUS protocol version to the
win8 levels. How will the infrastructural patches get moved forward to the version where you
have checked-in all the vmbus protocol updates:
[PATCH 00/28] Drivers: hv: Update the Vmbus protocol.

Now that Peter has checked in the needed patches, could you take this patch through your tree.
Let me know, if you need, I can re-send this patch to you.

Regards,

K. Y



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 14:07     ` KY Srinivasan
@ 2013-02-13 16:22       ` Greg KH
  2013-02-13 17:08         ` KY Srinivasan
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2013-02-13 16:22 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: H. Peter Anvin, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp

On Wed, Feb 13, 2013 at 02:07:52PM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: H. Peter Anvin [mailto:hpa@zytor.com]
> > Sent: Tuesday, February 12, 2013 7:31 PM
> > To: Greg KH
> > Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> > jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> > Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> > delivering VMBUS interrupts
> > 
> > On 02/06/2013 11:13 AM, Greg KH wrote:
> > > On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
> > >> Use the infrastructure for delivering VMBUS interrupts using a
> > >> special vector. With this patch, we can now properly handle
> > >> the VMBUS interrupts that can be delivered on any CPU. Also,
> > >> turn on interrupt load balancing as well.
> > >>
> > >> This patch requires the infrastructure that was implemented in the patch:
> > >> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> > >>
> > >
> > > Because of the dependancy, this should go through the x86 tree as well:
> > > 	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > 
> > This does not apply to v3.8-rc7 + the set of three vmbus patches for
> > x86.  I take it there are additional dependencies -- K.Y., what do I
> > need here?
> 
> Greg,
> 
> Peter has checked in the infrastructural patches into v3.8-rc7. This version
> does not have the patches that upgraded the VMBUS protocol version to the
> win8 levels.

What is "this version"?

> How will the infrastructural patches get moved forward to the version
> where you have checked-in all the vmbus protocol updates:
> [PATCH 00/28] Drivers: hv: Update the Vmbus protocol.

Those are in the char-misc git tree and will to go Linus for 3.9-rc1.

> Now that Peter has checked in the needed patches, could you take this
> patch through your tree.

What again is "this"?

> Let me know, if you need, I can re-send this patch to you.

Will it cause build problems if I take this patch in my tree, without
the changes in the -tip tree?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 16:22       ` Greg KH
@ 2013-02-13 17:08         ` KY Srinivasan
  2013-02-13 18:19           ` H. Peter Anvin
  0 siblings, 1 reply; 22+ messages in thread
From: KY Srinivasan @ 2013-02-13 17:08 UTC (permalink / raw)
  To: Greg KH
  Cc: H. Peter Anvin, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, February 13, 2013 11:22 AM
> To: KY Srinivasan
> Cc: H. Peter Anvin; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On Wed, Feb 13, 2013 at 02:07:52PM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: H. Peter Anvin [mailto:hpa@zytor.com]
> > > Sent: Tuesday, February 12, 2013 7:31 PM
> > > To: Greg KH
> > > Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> > > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> > > jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com;
> bp@alien8.de
> > > Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> > > delivering VMBUS interrupts
> > >
> > > On 02/06/2013 11:13 AM, Greg KH wrote:
> > > > On Wed, Feb 06, 2013 at 07:25:59AM -0800, K. Y. Srinivasan wrote:
> > > >> Use the infrastructure for delivering VMBUS interrupts using a
> > > >> special vector. With this patch, we can now properly handle
> > > >> the VMBUS interrupts that can be delivered on any CPU. Also,
> > > >> turn on interrupt load balancing as well.
> > > >>
> > > >> This patch requires the infrastructure that was implemented in the patch:
> > > >> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> > > >>
> > > >
> > > > Because of the dependancy, this should go through the x86 tree as well:
> > > > 	Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > >
> > >
> > > This does not apply to v3.8-rc7 + the set of three vmbus patches for
> > > x86.  I take it there are additional dependencies -- K.Y., what do I
> > > need here?
> >
> > Greg,
> >
> > Peter has checked in the infrastructural patches into v3.8-rc7. This version
> > does not have the patches that upgraded the VMBUS protocol version to the
> > win8 levels.
> 
> What is "this version"?

I looked at the tree that Peter checked in the patches:

https://git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=shortlog;h=refs/heads/x86/hyperv

The code under drivers/hv is not the current tip code in your tree. That is the reason, I don't
think this patch:  [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
should go into Peter's tree.

> 
> > How will the infrastructural patches get moved forward to the version
> > where you have checked-in all the vmbus protocol updates:
> > [PATCH 00/28] Drivers: hv: Update the Vmbus protocol.
> 
> Those are in the char-misc git tree and will to go Linus for 3.9-rc1.
 
The patches that Peter checked in have no dependence on the vmbus patches
that you have checked into 3.9-rc1. My question was with regards to how the
patches that Peter has checked in to 3.8-rc7 will be merged into 3.9-rc1. If the patches that
Peter checked are going to show up in 3.9 rc1, then that would be perfect.
> 
> > Now that Peter has checked in the needed patches, could you take this
> > patch through your tree.
> 
> What again is "this"?
"this" is the current patch in this email:
[PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts

As noted earlier, this patch requires the patches that Peter has now checked into 3.8 rc7. If these
are going to be merged with 3.9-rc1, then you can pick up the patch titled:

 [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts


> 
> > Let me know, if you need, I can re-send this patch to you.
> 
> Will it cause build problems if I take this patch in my tree, without
> the changes in the -tip tree?

You need to first pick up the patches that Peter has check in. 

Regards,

K. Y



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 17:08         ` KY Srinivasan
@ 2013-02-13 18:19           ` H. Peter Anvin
  2013-02-13 18:23             ` Greg KH
  0 siblings, 1 reply; 22+ messages in thread
From: H. Peter Anvin @ 2013-02-13 18:19 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: Greg KH, x86, linux-kernel, devel, olaf, apw, jasowang, tglx,
	JBeulich, bp

Sounds like we have the joy of a cross-tree dependency...

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 18:19           ` H. Peter Anvin
@ 2013-02-13 18:23             ` Greg KH
  2013-02-13 18:33               ` KY Srinivasan
  2013-02-13 18:36               ` H. Peter Anvin
  0 siblings, 2 replies; 22+ messages in thread
From: Greg KH @ 2013-02-13 18:23 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: KY Srinivasan, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp

On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
> Sounds like we have the joy of a cross-tree dependency...

Yeah, a mess.

KY, how about I just wait until all of this gets merged with Linus for
3.9-rc1, and then you resend me the patches you have to take advantage
of these new bits?  That makes it easy for everyone involved.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 18:23             ` Greg KH
@ 2013-02-13 18:33               ` KY Srinivasan
  2013-02-13 18:36               ` H. Peter Anvin
  1 sibling, 0 replies; 22+ messages in thread
From: KY Srinivasan @ 2013-02-13 18:33 UTC (permalink / raw)
  To: Greg KH, H. Peter Anvin
  Cc: x86, linux-kernel, devel, olaf, apw, jasowang, tglx, JBeulich, bp



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, February 13, 2013 1:24 PM
> To: H. Peter Anvin
> Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
> > Sounds like we have the joy of a cross-tree dependency...

Fortunately, the dependency order is "right". 
> 
> Yeah, a mess.
> 
> KY, how about I just wait until all of this gets merged with Linus for
> 3.9-rc1, and then you resend me the patches you have to take advantage
> of these new bits?  That makes it easy for everyone involved.

Sounds good. I have only one patch that is needed to take advantage of the patches
that Peter has checked in. I will resend you this patch once 3.9-rc1 catches up with the tip.
Would you know when 3.9 would catch up with the tip. 

Regards,

K. Y



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 18:23             ` Greg KH
  2013-02-13 18:33               ` KY Srinivasan
@ 2013-02-13 18:36               ` H. Peter Anvin
  2013-02-13 18:52                 ` Greg KH
  1 sibling, 1 reply; 22+ messages in thread
From: H. Peter Anvin @ 2013-02-13 18:36 UTC (permalink / raw)
  To: Greg KH
  Cc: KY Srinivasan, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp

On 02/13/2013 10:23 AM, Greg KH wrote:
> On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
>> Sounds like we have the joy of a cross-tree dependency...
> 
> Yeah, a mess.
> 
> KY, how about I just wait until all of this gets merged with Linus for
> 3.9-rc1, and then you resend me the patches you have to take advantage
> of these new bits?  That makes it easy for everyone involved.
> 

The other option is you can pull tip:x86/hyperv from me... it has *only*
these changes.  I can then let you push them to Linus or I can push them
to Linus before you push your tree.

	-hpa



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 18:36               ` H. Peter Anvin
@ 2013-02-13 18:52                 ` Greg KH
  2013-02-17 18:13                   ` KY Srinivasan
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2013-02-13 18:52 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: KY Srinivasan, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp

On Wed, Feb 13, 2013 at 10:36:26AM -0800, H. Peter Anvin wrote:
> On 02/13/2013 10:23 AM, Greg KH wrote:
> > On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
> >> Sounds like we have the joy of a cross-tree dependency...
> > 
> > Yeah, a mess.
> > 
> > KY, how about I just wait until all of this gets merged with Linus for
> > 3.9-rc1, and then you resend me the patches you have to take advantage
> > of these new bits?  That makes it easy for everyone involved.
> > 
> 
> The other option is you can pull tip:x86/hyperv from me... it has *only*
> these changes.  I can then let you push them to Linus or I can push them
> to Linus before you push your tree.

Nah, I'll just wait, it's not that big of a deal here, it will all make
it into 3.9-final eventually.

greg k-h

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-13 18:52                 ` Greg KH
@ 2013-02-17 18:13                   ` KY Srinivasan
  2013-02-17 18:25                     ` Greg KH
  0 siblings, 1 reply; 22+ messages in thread
From: KY Srinivasan @ 2013-02-17 18:13 UTC (permalink / raw)
  To: Greg KH, H. Peter Anvin
  Cc: x86, linux-kernel, devel, olaf, apw, jasowang, tglx, JBeulich, bp



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Wednesday, February 13, 2013 1:53 PM
> To: H. Peter Anvin
> Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On Wed, Feb 13, 2013 at 10:36:26AM -0800, H. Peter Anvin wrote:
> > On 02/13/2013 10:23 AM, Greg KH wrote:
> > > On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
> > >> Sounds like we have the joy of a cross-tree dependency...
> > >
> > > Yeah, a mess.
> > >
> > > KY, how about I just wait until all of this gets merged with Linus for
> > > 3.9-rc1, and then you resend me the patches you have to take advantage
> > > of these new bits?  That makes it easy for everyone involved.
> > >
> >
> > The other option is you can pull tip:x86/hyperv from me... it has *only*
> > these changes.  I can then let you push them to Linus or I can push them
> > to Linus before you push your tree.
> 
> Nah, I'll just wait, it's not that big of a deal here, it will all make
> it into 3.9-final eventually.

Peter's check-ins are now in Linux-next. Should I send you the vmbus patch that uses this infrastructure.

Regards,

K. Y



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-17 18:13                   ` KY Srinivasan
@ 2013-02-17 18:25                     ` Greg KH
  2013-02-17 18:51                       ` KY Srinivasan
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2013-02-17 18:25 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: H. Peter Anvin, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp

On Sun, Feb 17, 2013 at 06:13:49PM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > Sent: Wednesday, February 13, 2013 1:53 PM
> > To: H. Peter Anvin
> > Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> > jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> > Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> > delivering VMBUS interrupts
> > 
> > On Wed, Feb 13, 2013 at 10:36:26AM -0800, H. Peter Anvin wrote:
> > > On 02/13/2013 10:23 AM, Greg KH wrote:
> > > > On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
> > > >> Sounds like we have the joy of a cross-tree dependency...
> > > >
> > > > Yeah, a mess.
> > > >
> > > > KY, how about I just wait until all of this gets merged with Linus for
> > > > 3.9-rc1, and then you resend me the patches you have to take advantage
> > > > of these new bits?  That makes it easy for everyone involved.
> > > >
> > >
> > > The other option is you can pull tip:x86/hyperv from me... it has *only*
> > > these changes.  I can then let you push them to Linus or I can push them
> > > to Linus before you push your tree.
> > 
> > Nah, I'll just wait, it's not that big of a deal here, it will all make
> > it into 3.9-final eventually.
> 
> Peter's check-ins are now in Linux-next. Should I send you the vmbus
> patch that uses this infrastructure.

No one can base their tree on linux-next, so no.  Please wait for them
to get into Linus's tree.

Or send them to me now, with the instructions to apply them after
3.9-rc1, and I will save them for that point in time.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-17 18:25                     ` Greg KH
@ 2013-02-17 18:51                       ` KY Srinivasan
  2013-02-17 19:15                         ` H. Peter Anvin
  0 siblings, 1 reply; 22+ messages in thread
From: KY Srinivasan @ 2013-02-17 18:51 UTC (permalink / raw)
  To: Greg KH
  Cc: H. Peter Anvin, x86, linux-kernel, devel, olaf, apw, jasowang,
	tglx, JBeulich, bp



> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Sunday, February 17, 2013 1:25 PM
> To: KY Srinivasan
> Cc: H. Peter Anvin; x86@kernel.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com; bp@alien8.de
> Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> On Sun, Feb 17, 2013 at 06:13:49PM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > > Sent: Wednesday, February 13, 2013 1:53 PM
> > > To: H. Peter Anvin
> > > Cc: KY Srinivasan; x86@kernel.org; linux-kernel@vger.kernel.org;
> > > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> > > jasowang@redhat.com; tglx@linutronix.de; JBeulich@suse.com;
> bp@alien8.de
> > > Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> > > delivering VMBUS interrupts
> > >
> > > On Wed, Feb 13, 2013 at 10:36:26AM -0800, H. Peter Anvin wrote:
> > > > On 02/13/2013 10:23 AM, Greg KH wrote:
> > > > > On Wed, Feb 13, 2013 at 10:19:15AM -0800, H. Peter Anvin wrote:
> > > > >> Sounds like we have the joy of a cross-tree dependency...
> > > > >
> > > > > Yeah, a mess.
> > > > >
> > > > > KY, how about I just wait until all of this gets merged with Linus for
> > > > > 3.9-rc1, and then you resend me the patches you have to take advantage
> > > > > of these new bits?  That makes it easy for everyone involved.
> > > > >
> > > >
> > > > The other option is you can pull tip:x86/hyperv from me... it has *only*
> > > > these changes.  I can then let you push them to Linus or I can push them
> > > > to Linus before you push your tree.
> > >
> > > Nah, I'll just wait, it's not that big of a deal here, it will all make
> > > it into 3.9-final eventually.
> >
> > Peter's check-ins are now in Linux-next. Should I send you the vmbus
> > patch that uses this infrastructure.
> 
> No one can base their tree on linux-next, so no.  Please wait for them
> to get into Linus's tree.
> 
> Or send them to me now, with the instructions to apply them after
> 3.9-rc1, and I will save them for that point in time.

Thanks Greg. Will do.

K. Y
> 
> thanks,
> 
> greg k-h
> 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-17 18:51                       ` KY Srinivasan
@ 2013-02-17 19:15                         ` H. Peter Anvin
  0 siblings, 0 replies; 22+ messages in thread
From: H. Peter Anvin @ 2013-02-17 19:15 UTC (permalink / raw)
  To: KY Srinivasan
  Cc: Greg KH, x86, linux-kernel, devel, olaf, apw, jasowang, tglx,
	JBeulich, bp

On 02/17/2013 10:51 AM, KY Srinivasan wrote:
>>
>> No one can base their tree on linux-next, so no.  Please wait for them
>> to get into Linus's tree.
>>
>> Or send them to me now, with the instructions to apply them after
>> 3.9-rc1, and I will save them for that point in time.
>
> Thanks Greg. Will do.
>

As I said, I'm also perfectly happy to have you take over the 
tip:x86/hyperv branch for this cycle...

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
  2013-02-17 19:30 K. Y. Srinivasan
@ 2013-02-27 14:39 ` KY Srinivasan
  0 siblings, 0 replies; 22+ messages in thread
From: KY Srinivasan @ 2013-02-27 14:39 UTC (permalink / raw)
  To: KY Srinivasan, gregkh, linux-kernel, devel, olaf, apw, jasowang, hpa

Greg,

Can this patch go in now. I checked Linus' tree and it looks like all the needed patches are all checked in.

Regards,

K. Y

> -----Original Message-----
> From: K. Y. Srinivasan [mailto:kys@microsoft.com]
> Sent: Sunday, February 17, 2013 2:31 PM
> To: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> jasowang@redhat.com; hpa@zytor.com
> Cc: KY Srinivasan
> Subject: [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for
> delivering VMBUS interrupts
> 
> Use the infrastructure for delivering VMBUS interrupts using a
> special vector. With this patch, we can now properly handle
> the VMBUS interrupts that can be delivered on any CPU. Also,
> turn on interrupt load balancing as well.
> 
> This patch requires the infrastructure that was implemented in the patch:
> X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts
> 
> Greg, Please apply this patch after 3.9-rc1.
> 
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
>  drivers/hv/channel_mgmt.c |    2 +-
>  drivers/hv/hv.c           |    5 ++---
>  drivers/hv/vmbus_drv.c    |   11 +++++++----
>  3 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> index 53a8600..ff1be16 100644
> --- a/drivers/hv/channel_mgmt.c
> +++ b/drivers/hv/channel_mgmt.c
> @@ -318,7 +318,7 @@ static u32 get_vp_index(uuid_le *type_guid)
>  		return 0;
>  	}
>  	cur_cpu = (++next_vp % max_cpus);
> -	return 0;
> +	return cur_cpu;
>  }
> 
>  /*
> diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
> index 1c5481d..7311589 100644
> --- a/drivers/hv/hv.c
> +++ b/drivers/hv/hv.c
> @@ -272,7 +272,7 @@ u16 hv_signal_event(void *con_id)
>   * retrieve the initialized message and event pages.  Otherwise, we create and
>   * initialize the message and event pages.
>   */
> -void hv_synic_init(void *irqarg)
> +void hv_synic_init(void *arg)
>  {
>  	u64 version;
>  	union hv_synic_simp simp;
> @@ -281,7 +281,6 @@ void hv_synic_init(void *irqarg)
>  	union hv_synic_scontrol sctrl;
>  	u64 vp_index;
> 
> -	u32 irq_vector = *((u32 *)(irqarg));
>  	int cpu = smp_processor_id();
> 
>  	if (!hv_context.hypercall_page)
> @@ -335,7 +334,7 @@ void hv_synic_init(void *irqarg)
>  	rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT,
> shared_sint.as_uint64);
> 
>  	shared_sint.as_uint64 = 0;
> -	shared_sint.vector = irq_vector; /* HV_SHARED_SINT_IDT_VECTOR +
> 0x20; */
> +	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
>  	shared_sint.masked = false;
>  	shared_sint.auto_eoi = true;
> 
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index cf19dfa..bf421e0 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -36,6 +36,7 @@
>  #include <linux/kernel_stat.h>
>  #include <asm/hyperv.h>
>  #include <asm/hypervisor.h>
> +#include <asm/mshyperv.h>
>  #include "hyperv_vmbus.h"
> 
> 
> @@ -528,7 +529,6 @@ static void vmbus_flow_handler(unsigned int irq, struct
> irq_desc *desc)
>  static int vmbus_bus_init(int irq)
>  {
>  	int ret;
> -	unsigned int vector;
> 
>  	/* Hypervisor initialization...setup hypercall page..etc */
>  	ret = hv_init();
> @@ -558,13 +558,16 @@ static int vmbus_bus_init(int irq)
>  	 */
>  	irq_set_handler(irq, vmbus_flow_handler);
> 
> -	vector = IRQ0_VECTOR + irq;
> +	/*
> +	 * Register our interrupt handler.
> +	 */
> +	hv_register_vmbus_handler(irq, vmbus_isr);
> 
>  	/*
> -	 * Notify the hypervisor of our irq and
> +	 * Initialize the per-cpu interrupt state and
>  	 * connect to the host.
>  	 */
> -	on_each_cpu(hv_synic_init, (void *)&vector, 1);
> +	on_each_cpu(hv_synic_init, NULL, 1);
>  	ret = vmbus_connect();
>  	if (ret)
>  		goto err_irq;
> --
> 1.7.4.1
> 
> 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
@ 2013-02-17 19:30 K. Y. Srinivasan
  2013-02-27 14:39 ` KY Srinivasan
  0 siblings, 1 reply; 22+ messages in thread
From: K. Y. Srinivasan @ 2013-02-17 19:30 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, jasowang, hpa; +Cc: K. Y. Srinivasan

Use the infrastructure for delivering VMBUS interrupts using a
special vector. With this patch, we can now properly handle
the VMBUS interrupts that can be delivered on any CPU. Also,
turn on interrupt load balancing as well.

This patch requires the infrastructure that was implemented in the patch:
X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts

Greg, Please apply this patch after 3.9-rc1.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/channel_mgmt.c |    2 +-
 drivers/hv/hv.c           |    5 ++---
 drivers/hv/vmbus_drv.c    |   11 +++++++----
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 53a8600..ff1be16 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -318,7 +318,7 @@ static u32 get_vp_index(uuid_le *type_guid)
 		return 0;
 	}
 	cur_cpu = (++next_vp % max_cpus);
-	return 0;
+	return cur_cpu;
 }
 
 /*
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 1c5481d..7311589 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -272,7 +272,7 @@ u16 hv_signal_event(void *con_id)
  * retrieve the initialized message and event pages.  Otherwise, we create and
  * initialize the message and event pages.
  */
-void hv_synic_init(void *irqarg)
+void hv_synic_init(void *arg)
 {
 	u64 version;
 	union hv_synic_simp simp;
@@ -281,7 +281,6 @@ void hv_synic_init(void *irqarg)
 	union hv_synic_scontrol sctrl;
 	u64 vp_index;
 
-	u32 irq_vector = *((u32 *)(irqarg));
 	int cpu = smp_processor_id();
 
 	if (!hv_context.hypercall_page)
@@ -335,7 +334,7 @@ void hv_synic_init(void *irqarg)
 	rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
 
 	shared_sint.as_uint64 = 0;
-	shared_sint.vector = irq_vector; /* HV_SHARED_SINT_IDT_VECTOR + 0x20; */
+	shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
 	shared_sint.masked = false;
 	shared_sint.auto_eoi = true;
 
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index cf19dfa..bf421e0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -36,6 +36,7 @@
 #include <linux/kernel_stat.h>
 #include <asm/hyperv.h>
 #include <asm/hypervisor.h>
+#include <asm/mshyperv.h>
 #include "hyperv_vmbus.h"
 
 
@@ -528,7 +529,6 @@ static void vmbus_flow_handler(unsigned int irq, struct irq_desc *desc)
 static int vmbus_bus_init(int irq)
 {
 	int ret;
-	unsigned int vector;
 
 	/* Hypervisor initialization...setup hypercall page..etc */
 	ret = hv_init();
@@ -558,13 +558,16 @@ static int vmbus_bus_init(int irq)
 	 */
 	irq_set_handler(irq, vmbus_flow_handler);
 
-	vector = IRQ0_VECTOR + irq;
+	/*
+	 * Register our interrupt handler.
+	 */
+	hv_register_vmbus_handler(irq, vmbus_isr);
 
 	/*
-	 * Notify the hypervisor of our irq and
+	 * Initialize the per-cpu interrupt state and
 	 * connect to the host.
 	 */
-	on_each_cpu(hv_synic_init, (void *)&vector, 1);
+	on_each_cpu(hv_synic_init, NULL, 1);
 	ret = vmbus_connect();
 	if (ret)
 		goto err_irq;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-02-27 14:45 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 15:25 [PATCH 1/1] Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts K. Y. Srinivasan
2013-02-06 19:13 ` Greg KH
2013-02-09 14:09   ` KY Srinivasan
2013-02-13  0:30   ` H. Peter Anvin
2013-02-13  0:43     ` KY Srinivasan
2013-02-13  0:46       ` H. Peter Anvin
2013-02-13  0:50         ` KY Srinivasan
2013-02-13  0:59           ` H. Peter Anvin
2013-02-13 14:07     ` KY Srinivasan
2013-02-13 16:22       ` Greg KH
2013-02-13 17:08         ` KY Srinivasan
2013-02-13 18:19           ` H. Peter Anvin
2013-02-13 18:23             ` Greg KH
2013-02-13 18:33               ` KY Srinivasan
2013-02-13 18:36               ` H. Peter Anvin
2013-02-13 18:52                 ` Greg KH
2013-02-17 18:13                   ` KY Srinivasan
2013-02-17 18:25                     ` Greg KH
2013-02-17 18:51                       ` KY Srinivasan
2013-02-17 19:15                         ` H. Peter Anvin
2013-02-17 19:30 K. Y. Srinivasan
2013-02-27 14:39 ` KY Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).