linux/drivers/xen/xenbus
Henry Wang a3607581cd drivers/xen: Improve the late XenStore init protocol
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>
2024-05-23 12:41:18 +02:00
..
Makefile xen/xenbus: Use *-y instead of *-objs in Makefile 2024-05-17 12:14:13 +02:00
xenbus_client.c xen/xenbus: document will_handle argument for xenbus_watch_path() 2024-02-12 18:03:14 +01:00
xenbus_comms.c xen: Fix event channel callback via INTX/GSI 2021-01-13 16:12:00 +01:00
xenbus_dev_backend.c
xenbus_dev_frontend.c xen/xenbus: Add __counted_by for struct read_buffer and use struct_size() 2023-10-16 15:18:33 +02:00
xenbus_probe_backend.c xenbus/backend: dynamically allocate the xen-backend shrinker 2023-10-04 10:32:23 -07:00
xenbus_probe_frontend.c xen: xenbus: Use helper function IS_ERR_OR_NULL() 2023-08-21 09:55:11 +02:00
xenbus_probe.c drivers/xen: Improve the late XenStore init protocol 2024-05-23 12:41:18 +02:00
xenbus_xs.c xen/xenbus: Avoid a lockdep warning when adding a watch 2023-08-22 08:04:59 +02:00
xenbus.h bus: Make remove callback return void 2021-07-21 11:53:42 +02:00