From: dmukhin@ford.com
To: Stefano Stabellini <stefano.stabellini@amd.com>
Cc: xen-devel@lists.xenproject.org, grygorii_strashko@epam.com,
anthony.perard@vates.tech, michal.orzel@amd.com, julien@xen.org,
roger.pau@citrix.com, jason.andryuk@amd.com,
victorm.lira@amd.com, andrew.cooper3@citrix.com,
jbeulich@suse.com, sstabellini@kernel.org
Subject: Re: [PATCH v10 4/5] xen/console: handle multiple domains using console_io hypercalls
Date: Fri, 6 Feb 2026 14:29:32 -0800 [thread overview]
Message-ID: <aYZrTF3uWiZLsjOB@kraken> (raw)
In-Reply-To: <20260204233712.3396752-4-stefano.stabellini@amd.com>
On Wed, Feb 04, 2026 at 03:37:11PM -0800, Stefano Stabellini wrote:
> Allow multiple dom0less domains to use the console_io hypercalls to
> print to the console. Handle them in a similar way to vpl011: only the
> domain which has focus can read from the console. All domains can write
> to the console but the ones without focus have a prefix. In this case
> the prefix is applied by using guest_printk instead of printk or
> console_puts which is what the original code was already doing.
>
> When switching focus using Ctrl-AAA, discard any unread data in the
> input buffer. Input is read quickly and the user would be aware of it
> being slow or stuck as they use Ctrl-AAA to switch focus domain.
> In that situation, it is to be expected that the unread input is lost.
>
> The domain writes are buffered when the domain is not in focus. Push out
> the buffer after the domain enters focus on the first guest write.
>
> Locking updates:
>
> - Discard unread input under the lock when switching focus (including
> when returning to Xen) so that cross-domain reads can't see stale data
>
> - Require is_focus_domain() callers to hold console_lock, and re-check
> focus after each chunk in the CONSOLEIO_read loop so a focus change
> simply stops further copies without duplicating or leaking input
>
> - Hold cons->lock while flushing buffered writes in the focus path so
> the direct-write fast path does not race buffered guests or HVM debug
> output
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.com>
next prev parent reply other threads:[~2026-02-06 22:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 23:35 [PATCH v10 0/5] xen: console_io for dom0less guests Stefano Stabellini
2026-02-04 23:37 ` [PATCH v10 1/5] xen/console: use ACCESS_ONCE for console_rx Stefano Stabellini
2026-02-05 2:13 ` dmukhin
2026-02-04 23:37 ` [PATCH v10 2/5] xen: change VIRQ_CONSOLE to VIRQ_DOMAIN to allow non-hwdom binding Stefano Stabellini
2026-02-06 0:50 ` dmukhin
2026-02-09 9:13 ` Jan Beulich
2026-02-09 23:23 ` Stefano Stabellini
2026-02-10 7:47 ` Jan Beulich
2026-02-13 20:09 ` Stefano Stabellini
2026-02-16 9:04 ` Jan Beulich
2026-02-18 15:07 ` Daniel P. Smith
2026-02-18 15:14 ` Jan Beulich
2026-02-18 16:08 ` Daniel P. Smith
2026-02-04 23:37 ` [PATCH v10 3/5] xen/console: add locking for serial_rx ring buffer access Stefano Stabellini
2026-02-06 22:24 ` dmukhin
2026-02-10 15:48 ` Jan Beulich
2026-02-04 23:37 ` [PATCH v10 4/5] xen/console: handle multiple domains using console_io hypercalls Stefano Stabellini
2026-02-06 22:29 ` dmukhin [this message]
2026-02-10 16:05 ` Jan Beulich
2026-02-04 23:37 ` [PATCH v10 5/5] xen: enable dom0less guests to use " Stefano Stabellini
2026-02-05 2:09 ` dmukhin
2026-02-05 22:09 ` Stefano Stabellini
2026-02-06 0:47 ` dmukhin
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=aYZrTF3uWiZLsjOB@kraken \
--to=dmukhin@ford.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=grygorii_strashko@epam.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=stefano.stabellini@amd.com \
--cc=victorm.lira@amd.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.