linux-stable/drivers/xen
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
..
events xen/events: close evtchn after mapping cleanup 2024-03-06 14:45:20 +00:00
xen-pciback xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-11-20 11:52:01 +01:00
xenbus drivers/xen: Improve the late XenStore init protocol 2024-06-12 11:03:53 +02:00
xenfs
Kconfig
Makefile
acpi.c
arm-device.c
balloon.c
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-02-05 20:12:58 +00:00
gntdev-dmabuf.h
gntdev.c
grant-dma-iommu.c
grant-dma-ops.c
grant-table.c
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c
platform-pci.c xen: simplify evtchn_do_upcall() call maze 2023-12-08 08:51:20 +01:00
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c swiotlb-xen: provide the "max_mapping_size" method 2023-12-03 07:32:11 +01:00
sys-hypervisor.c
time.c
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c
xlate_mmu.c