opnsense-src/sys/dev/xen
Roger Pau Monné 4772e86beb xen/blkback: fix reconnection of backend
The hotplug script will be executed only once for each backend,
regardless of the frontend triggering reconnections. Fix blkback to
deal with the hotplug script being executed only once, so that
reconnections don't stall waiting for a hotplug script execution
that will never happen.

As a result of the fix move the initialization of dev_mode, dev_type
and dev_name to the watch callback, as they should be set only once
the first time the backend connects.

This fix is specially relevant for guests wanting to use UEFI OVMF
firmware, because OVMF will use Xen PV block devices and disconnect
afterwards, thus allowing them to be used by the guest OS. Without
this change the guest OS will stall waiting for the block backed to
attach.

Fixes: de0bad0001 ('blkback: add support for hotplug scripts')
MFC after: 1 week
Sponsored by: Citrix Systems R&D
2021-05-11 15:43:42 +02:00
..
balloon xen: allow limiting the amount of duplicated pending xenstore watches 2020-12-30 11:18:26 +01:00
blkback xen/blkback: fix reconnection of backend 2021-05-11 15:43:42 +02:00
blkfront Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
console xen: remove x86-ism from Xen common code 2021-03-01 13:33:01 +01:00
control xen: allow limiting the amount of duplicated pending xenstore watches 2020-12-30 11:18:26 +01:00
debug Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
efi xen/efi: introduce a PV interface for EFI run time services for dom0 2021-02-16 15:26:12 +01:00
evtchn dev/xenstore: fix return with locks held 2020-05-20 11:01:10 +00:00
gntdev Convert allocations of the phys pager to vm_pager_allocate(). 2020-09-08 23:38:49 +00:00
grant_table dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
netback xen/netback: do not attempt to connect in the Initialised state 2021-03-23 11:07:09 +01:00
netfront dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
pci
pcifront dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
privcmd xen/privcmd: implement the restrict ioctl 2021-01-11 16:33:27 +01:00
pvcpu xen: attach the PV CPU if no CPU device is present 2018-07-19 08:00:52 +00:00
timer Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
xenpci dev/xen: clean up empty lines in .c and .h files 2020-09-01 21:45:08 +00:00
xenstore xen: allow limiting the amount of duplicated pending xenstore watches 2020-12-30 11:18:26 +01:00