From: Wei Liu <wei.liu@kernel.org>
To: Andrea Parri <parri.andrea@gmail.com>
Cc: Chris Co <chrco@linux.microsoft.com>,
linux-hyperv@vger.kernel.org, kys@microsoft.com,
haiyangz@microsoft.com, sthemmin@microsoft.com,
wei.liu@kernel.org, chrco@microsoft.com, mikelley@microsoft.com,
andrea.parri@microsoft.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected
Date: Wed, 11 Nov 2020 10:59:18 +0000 [thread overview]
Message-ID: <20201111105918.veq42r7oj45hhjv3@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <20201110201833.GA3550@andrea>
On Tue, Nov 10, 2020 at 09:18:33PM +0100, Andrea Parri wrote:
> On Tue, Nov 10, 2020 at 07:01:18PM +0000, Chris Co wrote:
> > From: Chris Co <chrco@microsoft.com>
> >
> > When invoking kexec() on a Linux guest running on a Hyper-V host, the
> > kernel panics.
> >
> > RIP: 0010:cpuhp_issue_call+0x137/0x140
> > Call Trace:
> > __cpuhp_remove_state_cpuslocked+0x99/0x100
> > __cpuhp_remove_state+0x1c/0x30
> > hv_kexec_handler+0x23/0x30 [hv_vmbus]
> > hv_machine_shutdown+0x1e/0x30
> > machine_shutdown+0x10/0x20
> > kernel_kexec+0x6d/0x96
> > __do_sys_reboot+0x1ef/0x230
> > __x64_sys_reboot+0x1d/0x20
> > do_syscall_64+0x6b/0x3d8
> > entry_SYSCALL_64_after_hwframe+0x44/0xa9
> >
> > This was due to hv_synic_cleanup() callback returning -EBUSY to
> > cpuhp_issue_call() when tearing down the VMBUS_CONNECT_CPU, even
> > if the vmbus_connection.conn_state = DISCONNECTED. hv_synic_cleanup()
> > should succeed in the case where vmbus_connection.conn_state
> > is DISCONNECTED.
> >
> > Fix is to add an extra condition to test for
> > vmbus_connection.conn_state == CONNECTED on the VMBUS_CONNECT_CPU and
> > only return early if true. This way the kexec() path can still shut
> > everything down while preserving the initial behavior of preventing
> > CPU offlining on the VMBUS_CONNECT_CPU while the VM is running.
> >
> > Fixes: 8a857c55420f29 ("Drivers: hv: vmbus: Always handle the VMBus messages on CPU0")
> > Signed-off-by: Chris Co <chrco@microsoft.com>
> > Cc: stable@vger.kernel.org
>
> Reviewed-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Applied to hyperv-fixes. Thanks Chris and Andrea.
Wei.
prev parent reply other threads:[~2020-11-11 10:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 19:01 Chris Co
2020-11-10 20:18 ` Andrea Parri
2020-11-11 10:59 ` Wei Liu [this message]
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=20201111105918.veq42r7oj45hhjv3@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=andrea.parri@microsoft.com \
--cc=chrco@linux.microsoft.com \
--cc=chrco@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=parri.andrea@gmail.com \
--cc=sthemmin@microsoft.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®