RE: [RFC PATCH] Hyper-V: Initialize crash reporting before vmbus
From: Michael Kelley (LINUX)
Date: Mon Jun 20 2022 - 11:09:43 EST
From: Vit Kabele <vit.kabele@xxxxxxxxx> Sent: Monday, June 20, 2022 6:56 AM
>
> On Thu, Jun 16, 2022 at 05:03:16PM +0200, Vitaly Kuznetsov wrote:
> > Vit Kabele <vit.kabele@xxxxxxxxx> writes:
> > > Nevertheless, I am not sure about following:
> > >
> > > 1/ The vmbus_initiate_unload function is called within the panic handler
> > > even when the vmbus initialization does not finish (there might be no
> > > vmbus at all). This should probably not be problem because the vmbus
> > > unload function always checks for current connection state and does
> > > nothing when this is "DISCONNECTED". For better readability, it might be
> > > better to add separate panic notifier for vmbus and crash reporting.
> > >
> > > 2/ Wouldn't it be better to extract the whole reporting capability out
> > > of the vmbus module, so that it stays present in the kernel even when
> > > the vmbus module is possibly unloaded?
> >
> > IMHO yes but as you mention hyperv_panic_event() currently does to
> > things:
> > 1) Initiates VMBus unload
> > 2) Reports panic to the hypervisor
> >
> > I think untangling them moving the later to arch/x86/hyper-v (and
> > arch/arm64/hyperv/) makes sense.
> Ok, I will send the complete patch soon.
>
Vit --
FYI, there's a large patch series [1] that proposed some reorganization
of the panic notifiers across the Linux kernel. Patch 16 of the series
splits the Hyper-V panic notifier into two along the lines that you
suggest. In addition to the patch itself, the comments and follow-on
discussion are relevant to changes you propose. See my responses
throughout the series.
The author of the series is planning a v2, but he's out for a few weeks
so there will be a delay. [2]
Michael
[1] https://lore.kernel.org/linux-hyperv/20220427224924.592546-1-gpiccoli@xxxxxxxxxx/T/#t
[2] https://lore.kernel.org/linux-hyperv/20220427224924.592546-1-gpiccoli@xxxxxxxxxx/T/#m3c190913bcb6f66e3ace792b4e6f2236839d4fa7