linux-stable/drivers/xen/xenbus
Henry Wang 5d626f2b87 drivers/xen: Improve the late XenStore init protocol
[ Upstream commit a3607581cd ]

Currently, the late XenStore init protocol is only triggered properly
for the case that HVM_PARAM_STORE_PFN is ~0ULL (invalid). For the
case that XenStore interface is allocated but not ready (the connection
status is not XENSTORE_CONNECTED), Linux should also wait until the
XenStore is set up properly.

Introduce a macro to describe the XenStore interface is ready, use
it in xenbus_probe_initcall() to select the code path of doing the
late XenStore init protocol or not. Since now we have more than one
condition for XenStore late init, rework the check in xenbus_probe()
for the free_irq().

Take the opportunity to enhance the check of the allocated XenStore
interface can be properly mapped, and return error early if the
memremap() fails.

Fixes: 5b3353949e ("xen: add support for initializing xenstore later as HVM domain")
Signed-off-by: Henry Wang <xin.wang2@amd.com>
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/20240517011516.1451087-1-xin.wang2@amd.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:03:53 +02:00
..
Makefile
xenbus.h
xenbus_client.c xen/xenbus: fix xenbus_setup_ring() 2022-09-16 09:50:47 +02:00
xenbus_comms.c
xenbus_dev_backend.c
xenbus_dev_frontend.c
xenbus_probe.c drivers/xen: Improve the late XenStore init protocol 2024-06-12 11:03:53 +02:00
xenbus_probe_backend.c
xenbus_probe_frontend.c xen: move from strlcpy with unused retval to strscpy 2022-08-25 13:38:07 +02:00
xenbus_xs.c