[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/5] xen: Fix event channel callback via INTX/GSI



On Wed, 2021-01-13 at 12:20 +0100, Jürgen Groß wrote:
> 
> /home/gross/korg/src/drivers/xen/xenbus/xenbus_probe.c: In function 
> 'xenbus_probe_initcall':
> /home/gross/korg/src/drivers/xen/xenbus/xenbus_probe.c:711:41:
> error: 
> 'xen_have_vector_callback' undeclared (first use in this function);
> did 
> you mean 'em_data_callback'?
>         (!IS_ENABLED(CONFIG_XEN_PVHVM) || xen_have_vector_callback)))
> 

Oops. I think this should fix it; will retest and post the series again
with this folded into the offending commit.

Thanks.

diff --git a/drivers/xen/xenbus/xenbus_probe.c 
b/drivers/xen/xenbus/xenbus_probe.c
index b1b5b6fe9b52..f3ef23ebcd94 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -699,16 +699,30 @@ void xenbus_probe(void)
        blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
 }
 
+/*
+ * Returns true when XenStore init must be deferred in order to
+ * allow the PCI platform device to be initialised, before we
+ * can actually have event channel interrupts working.
+ */
+static bool xs_hvm_defer_init_for_callback(void)
+{
+#ifdef CONFIG_XEN_PVHVM
+       return xen_store_domain_type == XS_HVM &&
+               !xen_have_vector_callback;
+#else
+       return false;
+#endif
+}
+
 static int __init xenbus_probe_initcall(void)
 {
        /*
         * Probe XenBus here in the XS_PV case, and also XS_HVM unless we
-        * need to wait for the platform PCI device to come up, which is
-        * the (XEN_PVPVM && !xen_have_vector_callback) case.
+        * need to wait for the platform PCI device to come up.
         */
        if (xen_store_domain_type == XS_PV ||
-           (xen_store_domain_type == XS_HVM &&
-            (!IS_ENABLED(CONFIG_XEN_PVHVM) || xen_have_vector_callback)))
+           (xen_store_domain_type == XS_HVM &&
+            !xs_hvm_defer_init_for_callback())
                xenbus_probe();
 
        return 0;
@@ -732,8 +746,7 @@ int xen_set_callback_via(uint64_t via)
         * If xenbus_probe_initcall() deferred the xenbus_probe()
         * due to the callback not functioning yet, we can do it now.
         */
-       if (!xenstored_ready && xen_store_domain_type == XS_HVM &&
-           IS_ENABLED(CONFIG_XEN_PVHVM) && !xen_have_vector_callback)
+       if (!xenstored_ready && xs_hvm_defer_init_for_callback())
                xenbus_probe();
 
        return ret;

Attachment: smime.p7s
Description: S/MIME cryptographic signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.