summaryrefslogtreecommitdiff
path: root/include/xen
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2021-01-13 16:26:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-27 13:05:37 +0300
commitcdb2e1449399e401e4a1d0b66b5a89961c279e86 (patch)
treea394e5d9b927c2b0732b77a71697189a4b1e8ea3 /include/xen
parentc0b32d4522b40c5e7fd8679ee155cec95e532a0d (diff)
downloadlinux-cdb2e1449399e401e4a1d0b66b5a89961c279e86.tar.xz
xen: Fix event channel callback via INTX/GSI
[ Upstream commit 3499ba8198cad47b731792e5e56b9ec2a78a83a2 ] For a while, event channel notification via the PCI platform device has been broken, because we attempt to communicate with xenstore before we even have notifications working, with the xs_reset_watches() call in xs_init(). We tend to get away with this on Xen versions below 4.0 because we avoid calling xs_reset_watches() anyway, because xenstore might not cope with reading a non-existent key. And newer Xen *does* have the vector callback support, so we rarely fall back to INTX/GSI delivery. To fix it, clean up a bit of the mess of xs_init() and xenbus_probe() startup. Call xs_init() directly from xenbus_init() only in the !XS_HVM case, deferring it to be called from xenbus_probe() in the XS_HVM case instead. Then fix up the invocation of xenbus_probe() to happen either from its device_initcall if the callback is available early enough, or when the callback is finally set up. This means that the hack of calling xenbus_probe() from a workqueue after the first interrupt, or directly from the PCI platform device setup, is no longer needed. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Link: https://lore.kernel.org/r/20210113132606.422794-2-dwmw2@infradead.org Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/xenbus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h
index eba01ab5a55e..fe9a9fa2ebc4 100644
--- a/include/xen/xenbus.h
+++ b/include/xen/xenbus.h
@@ -187,7 +187,7 @@ void xs_suspend_cancel(void);
struct work_struct;
-void xenbus_probe(struct work_struct *);
+void xenbus_probe(void);
#define XENBUS_IS_ERR_READ(str) ({ \
if (!IS_ERR(str) && strlen(str) == 0) { \