All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, jgross@suse.com,
	Bertrand.Marquis@arm.com, julien@xen.org,
	Volodymyr_Babchuk@epam.com, Luca Miccio <lucmiccio@gmail.com>,
	Stefano Stabellini <stefano.stabellini@xilinx.com>
Subject: [PATCH v5 5/7] xenstored: send an evtchn notification on introduce_domain
Date: Fri, 29 Apr 2022 13:57:30 -0700	[thread overview]
Message-ID: <20220429205732.2030094-5-sstabellini@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2204291354050.1947187@ubuntu-linux-20-04-desktop>

From: Luca Miccio <lucmiccio@gmail.com>

When xs_introduce_domain is called, send out a notification on the
xenstore event channel so that any (dom0less) domain waiting for the
xenstore interface to be ready can continue with the initialization.
Before sending the notification, clear XS_CONNECTION_STATE_RECONNECTING.

The extra notification is harmless for domains that don't require it.

Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
CC: Juergen Gross <jgross@suse.com>
CC: Julien Grall <julien@xen.org>
---
I dropped the Reviewed-by tags due to the connect = 0 change. Julien
also suggested it would be a good idea to add a clarification statement
about the usage of XS_CONNECTION_STATE_RECONNECTING in the header files
but I wasn't sure what to write. Please advise and I am happy to include
a statement in the next version.

Changes in v5:
- reset XS_CONNECTION_STATE_RECONNECTING before notifying the domU

Changes in v2:
- drop the new late_init parameter
---
 tools/xenstore/xenstored_domain.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c
index ae065fcbee..7bb8c64d33 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -493,6 +493,10 @@ static struct domain *introduce_domain(const void *ctx,
 		/* Now domain belongs to its connection. */
 		talloc_steal(domain->conn, domain);
 
+		/* Notify the domain that xenstore is available */
+		interface->connection = 0x0;
+		xenevtchn_notify(xce_handle, domain->port);
+
 		if (!is_master_domain && !restore)
 			fire_watches(NULL, ctx, "@introduceDomain", NULL,
 				     false, NULL);
-- 
2.25.1



  parent reply	other threads:[~2022-04-29 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 20:57 [PATCH v5 0/7] dom0less PV drivers Stefano Stabellini
2022-04-29 20:57 ` [PATCH v5 1/7] xen/dt: of_property_read_string return -ENODATA when !length Stefano Stabellini
2022-05-03 10:15   ` Luca Fancellu
2022-05-03 10:34   ` Bertrand Marquis
2022-04-29 20:57 ` [PATCH v5 2/7] xen/arm: implement domU extended regions Stefano Stabellini
2022-05-03 10:25   ` Luca Fancellu
2022-05-03 11:18   ` Oleksandr Tyshchenko
2022-04-29 20:57 ` [PATCH v5 3/7] xen: introduce xen,enhanced dom0less property Stefano Stabellini
2022-04-29 20:57 ` [PATCH v5 4/7] xen/arm: configure dom0less domain for enabling xenstore after boot Stefano Stabellini
2022-05-02  6:33   ` Jan Beulich
2022-05-03  8:35   ` Bertrand Marquis
2022-04-29 20:57 ` Stefano Stabellini [this message]
2022-05-03  8:51   ` [PATCH v5 5/7] xenstored: send an evtchn notification on introduce_domain Juergen Gross
2022-04-29 20:57 ` [PATCH v5 6/7] tools: add example application to initialize dom0less PV drivers Stefano Stabellini
2022-05-03  8:58   ` Juergen Gross
2022-04-29 20:57 ` [PATCH v5 7/7] docs: document dom0less + " Stefano Stabellini
2022-05-03 10:35   ` Luca Fancellu
2022-05-03 10:56     ` Luca Fancellu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220429205732.2030094-5-sstabellini@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=lucmiccio@gmail.com \
    --cc=stefano.stabellini@xilinx.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.