summaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-11-16 15:02:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-11-16 15:02:33 -0800
commita5698b3835f5990deef30fa5397cae563af3c68a (patch)
tree9403cbfd38c1e73589d8e4e35d2c837ed4340e93 /drivers/hv
parenta08f4523243c86fe35dec8c81c5ec50f721004ce (diff)
parent92e4dc8b05663d6539b1b8375f3b1cf7b204cfe9 (diff)
downloadlinux-a5698b3835f5990deef30fa5397cae563af3c68a.tar.gz
linux-a5698b3835f5990deef30fa5397cae563af3c68a.tar.bz2
linux-a5698b3835f5990deef30fa5397cae563af3c68a.zip
Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
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
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/hv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 0cde10fe0e71..f202ac7f4b3d 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;
/*