* [PATCH char-misc 1/1] Drivers: hv: vmbus: Add hooks for per-CPU IRQ
@ 2018-03-12 3:49 Michael Kelley
2018-03-12 9:18 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Michael Kelley @ 2018-03-12 3:49 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
leann.ogasawara, marcelo.cerri, sthemmin, kys
Cc: mikelley
Add hooks to enable/disable a per-CPU IRQ for VMbus. These hooks
are in the architecture independent setup and shutdown paths for
Hyper-V. They are being added as staging for upcoming code for
Linux guests on Hyper-V on ARM64. The x86/x64 implementation
is null because VMbus interrupts on x86/x64 don't use an IRQ.
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
---
arch/x86/include/asm/mshyperv.h | 4 ++++
drivers/hv/hv.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index e73c4d0..b73b839 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -168,6 +168,10 @@ void hyperv_vector_handler(struct pt_regs *regs);
void hv_setup_vmbus_irq(void (*handler)(void));
void hv_remove_vmbus_irq(void);
+/* On x86/x64, there isn't a real IRQ to be enabled/disabled */
+static inline void hv_enable_vmbus_irq(void) {}
+static inline void hv_disable_vmbus_irq(void) {}
+
void hv_setup_kexec_handler(void (*handler)(void));
void hv_remove_kexec_handler(void);
void hv_setup_crash_handler(void (*handler)(struct pt_regs *regs));
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index b1f6793..6a3ea4e 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -299,6 +299,7 @@ int hv_synic_init(unsigned int cpu)
hv_set_siefp(siefp.as_uint64);
/* Setup the shared SINT. */
+ hv_enable_vmbus_irq();
hv_get_synint_state(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT,
shared_sint.as_uint64);
@@ -433,6 +434,7 @@ int hv_synic_cleanup(unsigned int cpu)
hv_get_synic_state(sctrl.as_uint64);
sctrl.enable = 0;
hv_set_synic_state(sctrl.as_uint64);
+ hv_disable_vmbus_irq();
return 0;
}
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH char-misc 1/1] Drivers: hv: vmbus: Add hooks for per-CPU IRQ
2018-03-12 3:49 [PATCH char-misc 1/1] Drivers: hv: vmbus: Add hooks for per-CPU IRQ Michael Kelley
@ 2018-03-12 9:18 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2018-03-12 9:18 UTC (permalink / raw)
To: mikelley
Cc: olaf, sthemmin, jasowang, linux-kernel, marcelo.cerri, apw,
devel, vkuznets, leann.ogasawara
On Sun, Mar 11, 2018 at 08:49:02PM -0700, Michael Kelley wrote:
> Add hooks to enable/disable a per-CPU IRQ for VMbus. These hooks
> are in the architecture independent setup and shutdown paths for
> Hyper-V. They are being added as staging for upcoming code for
> Linux guests on Hyper-V on ARM64. The x86/x64 implementation
> is null because VMbus interrupts on x86/x64 don't use an IRQ.
Please submit this _with_ the new code that uses this "hook". We don't
add new apis unless they are actually used.
thanks,
greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-12 9:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 3:49 [PATCH char-misc 1/1] Drivers: hv: vmbus: Add hooks for per-CPU IRQ Michael Kelley
2018-03-12 9:18 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.