All of lore.kernel.org
 help / color / mirror / Atom feed
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 3/5] xen/console: add locking for serial_rx ring buffer access
Date: Fri, 6 Feb 2026 14:24:16 -0800	[thread overview]
Message-ID: <aYZqEBz9ERuOZf+D@kraken> (raw)
In-Reply-To: <20260204233712.3396752-3-stefano.stabellini@amd.com>

On Wed, Feb 04, 2026 at 03:37:10PM -0800, Stefano Stabellini wrote:
> Guard every mutation of serial_rx_cons/prod with console_lock so that
> cross-domain reads can't see stale data:
> 
> - In console_switch_input(): protect console_rx assignment with the lock
>   using irqsave/irqrestore variants since this can be called from
>   interrupt context
> 
> - In __serial_rx(): protect the ring buffer write operation when
>   delivering input to the hardware domain
> 
> - In do_console_io() CONSOLEIO_read: hold the lock around the entire
>   read loop, using a local buffer copy to avoid holding the lock during
>   copy_to_guest_offset()
> 
> This is preparatory work for allowing multiple domains to use the
> console_io hypercalls where proper synchronization is required.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>

Reviewed-by: Denis Mukhin <dmukhin@ford.com> 


  reply	other threads:[~2026-02-06 22:25 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 [this message]
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
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=aYZqEBz9ERuOZf+D@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.