From: mhkelley58@gmail.com
To: will.deacon@arm.com, catalin.marinas@arm.com,
mark.rutland@arm.com, marc.zyngier@arm.com,
linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com,
jasowang@redhat.com, marcelo.cerri@canonical.com,
sthemmin@microsoft.com, kys@microsoft.com
Cc: mikelley@microsoft.com
Subject: [PATCH v2 3/4] Drivers: hv: vmbus: Add hooks for per-CPU IRQ
Date: Wed, 29 Aug 2018 08:22:27 -0700 [thread overview]
Message-ID: <1535556148-10452-4-git-send-email-mikelley@microsoft.com> (raw)
In-Reply-To: <1535556148-10452-1-git-send-email-mikelley@microsoft.com>
From: Michael Kelley <mikelley@microsoft.com>
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, and are needed by 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>
Reviewed-by: James Morris <jmorris@namei.org>
---
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 f377044..44ba554 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -109,6 +109,10 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
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/disable */
+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 748a1c41..f8d1245 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -300,6 +300,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(VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
@@ -429,6 +430,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;
}
--
1.8.3.1
next prev parent reply other threads:[~2018-08-29 15:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 15:22 [PATCH v2 0/4] Enable Linux guests on Hyper-V on ARM64 mhkelley58
2018-08-29 15:22 ` [PATCH v2 1/4] arm64: hyperv: Add core Hyper-V include files mhkelley58
2018-08-30 18:23 ` KY Srinivasan
2018-08-31 15:42 ` Michael Kelley (EOSG)
2018-08-29 15:22 ` [PATCH v2 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor mhkelley58
2018-08-30 18:51 ` KY Srinivasan
2018-08-31 15:44 ` Michael Kelley (EOSG)
2018-08-29 15:22 ` mhkelley58 [this message]
2018-08-29 15:22 ` [PATCH v2 4/4] Drivers: hv: Enable CONFIG_HYPERV on ARM64 mhkelley58
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1535556148-10452-4-git-send-email-mikelley@microsoft.com \
--to=mhkelley58@gmail.com \
--cc=apw@canonical.com \
--cc=catalin.marinas@arm.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=marcelo.cerri@canonical.com \
--cc=mark.rutland@arm.com \
--cc=mikelley@microsoft.com \
--cc=olaf@aepfle.de \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®