projects/linux·commit a5698b38

Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux

a5698b38 · Linus Torvalds <[email protected]> · 2020-11-16 15:02:33 -08:00

Pull Hyper-V fix from Wei Liu:
 "One patch from Chris to fix kexec on Hyper-V"

* tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected
Commit
a5698b3835f5990deef30fa5397cae563af3c68a
Parents
a08f4523 · 92e4dc8b

Merge commit. Changes below are compared with the first parent: a08f4523.

Changes

1 files changed · +6 −2

FileStatusAddDelContent
drivers/hv/hv.cmodified+6−2View file

drivers/hv/hv.c

View file
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 0cde10f..f202ac7 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -244,9 +244,13 @@ int hv_synic_cleanup(unsigned int cpu)
/*
* Hyper-V does not provide a way to change the connect CPU once
- * it is set; we must prevent the connect CPU from going offline.
+ * it is set; we must prevent the connect CPU from going offline
+ * while the VM is running normally. But in the panic or kexec()
+ * path where the vmbus is already disconnected, the CPU must be
+ * allowed to shut down.
*/
- if (cpu == VMBUS_CONNECT_CPU)
+ if (cpu == VMBUS_CONNECT_CPU &&
+ vmbus_connection.conn_state == CONNECTED)
return -EBUSY;
/*