From: Jan Beulich <jbeulich@suse.com>
To: dmkhn@proton.me
Cc: andrew.cooper3@citrix.com, anthony.perard@vates.tech,
julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com,
sstabellini@kernel.org, dmukhin@ford.com,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 2/8] xen/console: introduce console input permission
Date: Wed, 26 Mar 2025 14:44:39 +0100 [thread overview]
Message-ID: <7a2f80b3-5018-4f15-973c-fe950a574b11@suse.com> (raw)
In-Reply-To: <20250318233617.849903-3-dmukhin@ford.com>
On 19.03.2025 00:36, dmkhn@proton.me wrote:
> @@ -564,10 +586,25 @@ static void __serial_rx(char c)
> /* Deliver input to the PV shim console. */
> rc = consoled_guest_tx(c);
>
> - if ( rc )
> + switch ( rc )
> + {
> + case 0:
> + break;
> +
> + case -EBUSY: /* Loopback mode */
> + case -ENOSPC: /* FIFO is full */
> guest_printk(d,
> XENLOG_WARNING "failed to process console input: %d\n",
> rc);
> + break;
> +
> + default:
> + d->console.input_allowed = false;
This aspect isn't mentioned / justified in the description, and I also
can't deduce why you would do so. Or to put it differently, why you'd
then not also take away input focus from this domain, for it no longer
being eligible to have focus.
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -512,7 +512,7 @@ struct domain
> bool auto_node_affinity;
> /* Is this guest fully privileged (aka dom0)? */
> bool is_privileged;
> - /* Can this guest access the Xen console? */
> + /* XSM: permission to use HYPERCALL_console_io hypercall */
> bool is_console;
> /* Is this guest being debugged by dom0? */
> bool debugger_attached;
> @@ -651,6 +651,12 @@ struct domain
> unsigned int num_llc_colors;
> const unsigned int *llc_colors;
> #endif
> +
> + /* Console settings. */
> + struct {
> + /* Permission to own physical console input. */
> + bool input_allowed;
> + } console;
Are further fields going to be added to this sub-struct? If not, is having
a sub-struct here actually worth it?
Jan
next prev parent reply other threads:[~2025-03-26 13:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 23:36 [PATCH v1 0/8] xen/console: cleanup console input switch logic dmkhn
2025-03-18 23:36 ` [PATCH v1 1/8] xen/console: fix trailing whitespaces dmkhn
2025-03-19 9:45 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 2/8] xen/console: introduce console input permission dmkhn
2025-03-26 13:44 ` Jan Beulich [this message]
2025-03-29 0:03 ` Denis Mukhin
2025-03-18 23:36 ` [PATCH v1 3/8] xen/domain: introduce domid_top dmkhn
2025-03-26 13:52 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 4/8] xen/domain: introduce domid_alloc() dmkhn
2025-03-26 13:56 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 5/8] xen/console: rename switch_serial_input() to console_switch_focus() dmkhn
2025-03-26 13:58 ` Jan Beulich
2025-03-18 23:36 ` [PATCH v1 6/8] xen/console: rename console_rx to console_focus dmkhn
2025-03-26 14:00 ` Jan Beulich
2025-03-18 23:37 ` [PATCH v1 7/8] xen/console: introduce console_set_focus() dmkhn
2025-03-19 19:53 ` Denis Mukhin
2025-03-26 14:28 ` Jan Beulich
2025-03-26 14:32 ` Jan Beulich
2025-03-18 23:37 ` [PATCH v1 8/8] xen/console: introduce console_get_focus() dmkhn
2025-03-19 19:52 ` [PATCH v1 0/8] xen/console: cleanup console input switch logic Denis Mukhin
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=7a2f80b3-5018-4f15-973c-fe950a574b11@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmkhn@proton.me \
--cc=dmukhin@ford.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--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.