All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Denis Mukhin <dmkhn@proton.me>,
	dmukhin@ford.com, xen-devel@lists.xenproject.org,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>
Subject: Re: [PATCH v2 20/35] xen/console: introduce console_owner_domid()
Date: Wed, 8 Jan 2025 09:04:22 +0100	[thread overview]
Message-ID: <Z34xhkNu5YLyEzut@macbook.local> (raw)
In-Reply-To: <a2fa92ff-a5fb-4adc-86aa-1481ebec92fe@suse.com>

On Wed, Jan 08, 2025 at 08:28:32AM +0100, Jan Beulich wrote:
> On 08.01.2025 00:40, Stefano Stabellini wrote:
> > On Tue, 7 Jan 2025, Jan Beulich wrote:
> >> On 06.01.2025 19:48, Stefano Stabellini wrote:
> >>> On Mon, 6 Jan 2025, Jan Beulich wrote:
> >>>> On 04.01.2025 05:15, Denis Mukhin wrote:
> >>>>>
> >>>>> On Tuesday, December 10th, 2024 at 11:28 PM, Jan Beulich <jbeulich@suse.com> wrote:
> >>>>>
> >>>>>>
> >>>>>>
> >>>>>> On 06.12.2024 05:41, Denis Mukhin via B4 Relay wrote:
> >>>>>>
> >>>>>>> From: Denis Mukhin dmukhin@ford.com
> >>>>>>>
> >>>>>>> console_owner_domid() is introduced to obtain the "console owner" domain ID.
> >>>>>>>
> >>>>>>> The call is used in NS8250 emulator to identify the case when physical xen
> >>>>>>> console focus is owned by the domain w/ NS8250 emulator, in which case,
> >>>>>>> messages from guest OS are formatted w/o '(XEN)' prefix.
> >>>>>>
> >>>>>>
> >>>>>> Such messages ought to be processed through guest_printk(), which wants a
> >>>>>> domain pointer, not a domid_t anyway. Plus isn't that going to be
> >>>>>> current->domain anyway at the callsite, eliminating the need for such a
> >>>>>>
> >>>>>> helper altogether?
> >>>>>
> >>>>> If the current domain is owning the physical console and printing, say, Linux
> >>>>> login prompt, there's no need to add "(XEN)" for every printout; adding timestamps
> >>>>> can be disabled from Xen command line.
> >>>>
> >>>> Surely there shouldn't be (XEN), but without (d<N>) it'll be ambiguous in a log
> >>>> which domain a message came from. As long as only Dom0 messages are left un-
> >>>> prefixed, that's likely fine. Yet as soon as multiple domains can issue such
> >>>> messages (and have console "focus") I think the prefix needs to be there.
> >>>
> >>> It looks like we are aligned on the desired behavior,
> >>
> >> Hmm, no, I don't think we are. I don't ...
> >>
> >>> but for clarity,
> >>> see https://marc.info/?l=xen-devel&m=173405161613716, also copy/pasted
> >>> here:
> >>>
> >>> I think we should provide a consistent behavior across architectures.
> >>> The current behavior with vpl011 and dom0less on ARM is the following:
> >>>
> >>> - no prefix for Dom0 output
> >>> - DOM$NUM for DomUs when not in focus, otherwise no prefix
> >>
> >> ... view this model as a desirable one. It leaves room for ambiguity.
> > 
> > Adding a few more people in CC for feedback.
> > 
> > My priority is to keep the architectures aligned. It might be OK to
> > change output format, but then let's do it uniformly on ARM as well.
> > 
> > Jan, please clarify what you think would be better than the above. Is it
> > the following? I don't think I understood your preference.
> > 
> > - DOM$NUM for Dom0 and DomUs when not in focus, otherwise no prefix
> 
> No, I mean like we have it with guest_printk() today. (XEN) for Xen's
> own messages, (d<N>) for ordinary domains' ones, and no prefix
> exclusively for the hardware/control domain. What is best to do when
> hardware and control domains are distinct I'm uncertain - I'd be
> inclined to suggest that the hardware domain then stay the one without
> any prefix.

One concern I have with this approach is whether the addition of the
(d<N>) prefixes will skew output of interactive applications.  So far
the prefix is added to output from all domains different than dom0
because the console is not interactive for them, and hence no input
can be consumed.

If that changes however, and domains different than dom0 can get input
from the Xen console then I wonder how much the added prefix will skew
output.  Another possible option would be to not print the prefix for
the domain that has the console input assigned (current target), and
print it for all other domains (even for dom0 when not in focus).

Thanks, Roger.


  reply	other threads:[~2025-01-08  8:04 UTC|newest]

Thread overview: 218+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06  4:41 [PATCH v2 00/35] Introduce NS8250 UART emulator Denis Mukhin
2024-12-06  4:41 ` Denis Mukhin via B4 Relay
2024-12-06  4:41 ` [PATCH v2 01/35] xen: introduce resource.h Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:13   ` Jan Beulich
2025-01-04  2:23     ` Denis Mukhin
2024-12-11 11:01   ` Roger Pau Monné
2025-01-04  3:10     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 02/35] xen/irq: introduce NO_IRQ Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:17   ` Jan Beulich
2025-01-04  2:26     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 03/35] xen/ctype: introduce isconsole() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:22   ` Jan Beulich
2025-01-04  2:31     ` Denis Mukhin
2025-01-06  8:55       ` Jan Beulich
2024-12-06  4:41 ` [PATCH v2 04/35] arm/vuart: use guest_printk() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-06  4:41 ` [PATCH v2 05/35] arm/vuart: make domain_has_vuart() public Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-06  4:41 ` [PATCH v2 06/35] riscv/domain: introduce domain_has_vuart() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-06  4:41 ` [PATCH v2 07/35] ppc/domain: " Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:24   ` Jan Beulich
2024-12-06  4:41 ` [PATCH v2 08/35] x86/domain: " Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:26   ` Jan Beulich
2025-01-04  2:34     ` Denis Mukhin
2024-12-11 15:13   ` Roger Pau Monné
2025-01-04  3:11     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 09/35] x86/domain: print emulation_flags Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:30   ` Jan Beulich
2025-01-04  3:55     ` Denis Mukhin
2024-12-11 15:19   ` Roger Pau Monné
2024-12-12 11:53     ` Jan Beulich
2024-12-12 12:11       ` Roger Pau Monné
2024-12-12 12:50         ` Jan Beulich
2025-01-04  3:56     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 10/35] xen/domain: add get_initial_domain_id() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:50   ` Jan Beulich
2025-01-04  2:50     ` Denis Mukhin
2024-12-11 16:50   ` Roger Pau Monné
2025-01-04  4:44     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 11/35] xen/domain: enable max_init_domid for all architectures Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:57   ` Jan Beulich
2025-01-04  2:51     ` Denis Mukhin
2024-12-11 17:00   ` Roger Pau Monné
2025-01-04  3:13     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 12/35] xen/console: move vpl011-related code to vpl011 emulator Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 13:33   ` Jan Beulich
2025-01-04  2:49     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 13/35] xen/console: rename console_input_domain Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 14:01   ` Jan Beulich
2025-01-04  2:53     ` Denis Mukhin
2024-12-11 17:17   ` Roger Pau Monné
2025-01-04  3:13     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 14/35] xen/console: rename switch_serial_input() to console_find_owner() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 14:13   ` Jan Beulich
2024-12-11 17:22     ` Roger Pau Monné
2025-01-04  3:14       ` Denis Mukhin
2025-01-04  2:54     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 15/35] xen/console: rename console_rx to console_owner Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 14:23   ` Jan Beulich
2024-12-12  8:58   ` Roger Pau Monné
2025-01-04  3:20     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 16/35] xen/console: introduce printk_common() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 14:27   ` Jan Beulich
2025-01-04  2:57     ` Denis Mukhin
2025-01-06  9:04       ` Jan Beulich
2024-12-12  9:14   ` Roger Pau Monné
2024-12-12 11:57     ` Jan Beulich
2024-12-12 12:15       ` Roger Pau Monné
2024-12-12 12:52         ` Jan Beulich
2024-12-12 15:25           ` Roger Pau Monné
2024-12-13  1:03           ` Stefano Stabellini
2025-01-04  4:11             ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 17/35] xen/console: introduce consoled_is_enabled() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 14:31   ` Jan Beulich
2025-01-04  3:00     ` Denis Mukhin
2025-01-06  9:05       ` Jan Beulich
2024-12-12  9:31   ` Roger Pau Monné
2025-01-04  3:21     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 18/35] xen/console: introduce use of 'is_console' flag Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 14:52   ` Jan Beulich
2025-01-04  3:05     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 19/35] xen/console: introduce console_set_owner() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 15:02   ` Jan Beulich
2025-01-04  3:07     ` Denis Mukhin
2025-01-06  9:08       ` Jan Beulich
2024-12-12 10:12   ` Roger Pau Monné
2024-12-12 11:59     ` Jan Beulich
2024-12-12 12:16       ` Roger Pau Monné
2025-01-04  3:31       ` Denis Mukhin
2025-01-04  3:30     ` Denis Mukhin
2025-01-06  9:58       ` Jan Beulich
2025-01-06 20:03         ` Denis Mukhin
2025-01-07  8:37           ` Jan Beulich
2024-12-06  4:41 ` [PATCH v2 20/35] xen/console: introduce console_owner_domid() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 22:11   ` Jason Andryuk
2024-12-11  7:33     ` Jan Beulich
2025-01-04  4:16       ` Denis Mukhin
2025-01-04  4:12     ` Denis Mukhin
2024-12-11  7:28   ` Jan Beulich
2025-01-04  4:15     ` Denis Mukhin
2025-01-06  9:14       ` Jan Beulich
2025-01-06 18:48         ` Stefano Stabellini
2025-01-07  8:40           ` Jan Beulich
2025-01-07 23:40             ` Stefano Stabellini
2025-01-08  7:28               ` Jan Beulich
2025-01-08  8:04                 ` Roger Pau Monné [this message]
2025-01-08  8:13                   ` Jan Beulich
2025-01-08  8:35                     ` Roger Pau Monné
2025-01-08 22:15                       ` Denis Mukhin
2025-01-09  0:29                         ` Stefano Stabellini
2025-01-09  8:06                           ` Roger Pau Monné
2025-01-09 23:46                             ` Stefano Stabellini
2025-01-10  1:39                               ` Denis Mukhin
2025-01-09  8:25                           ` Jan Beulich
2025-01-09  8:27                         ` Jan Beulich
2025-01-10  1:34                           ` Denis Mukhin
2024-12-12 10:18   ` Roger Pau Monné
2025-01-04  4:11     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 21/35] xen/console: introduce console_init_owner() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-10 22:30   ` Jason Andryuk
2024-12-11  7:31   ` Jan Beulich
2025-01-04  3:22     ` Denis Mukhin
2024-12-12 10:23   ` Roger Pau Monné
2025-01-04  3:23     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 22/35] xen/console: introduce handle_keypress_in_domain() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 10:51   ` Roger Pau Monné
2025-01-04  3:25     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 23/35] xen/console: introduce console_write() Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 12:04   ` Roger Pau Monné
2025-01-04  3:50     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 24/35] xen/console: introduce hwdom_crashconsole= Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 12:29   ` Roger Pau Monné
2025-01-04  4:48     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 25/35] xen/console: simplify console owner switch hint Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-06  4:41 ` [PATCH v2 26/35] xen/console: make console buffer size configurable Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 12:47   ` Roger Pau Monné
2025-01-04  3:52     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 27/35] xen/console: flush console ring to physical console Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 14:21   ` Roger Pau Monné
2025-01-04  3:56     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 28/35] xen/8250-uart: add missing definitions Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 14:29   ` Roger Pau Monné
2025-01-04  4:01     ` Denis Mukhin
2024-12-12 15:07   ` Jan Beulich
2025-01-04  4:00     ` Denis Mukhin
2024-12-06  4:41 ` [PATCH v2 29/35] x86/hvm: add HVM-specific Kconfig Denis Mukhin
2024-12-06  4:41   ` Denis Mukhin via B4 Relay
2024-12-12 15:06   ` Roger Pau Monné
2025-01-04  3:58     ` Denis Mukhin
2024-12-06  4:42 ` [PATCH v2 30/35] x86/hvm: add helpers for raising guest IRQs Denis Mukhin
2024-12-06  4:42   ` Denis Mukhin via B4 Relay
2024-12-12 16:18   ` Roger Pau Monné
2025-01-04  4:02     ` Denis Mukhin
2024-12-06  4:42 ` [PATCH v2 31/35] x86/hvm: introduce NS8250 UART emulator Denis Mukhin
2024-12-06  4:42   ` Denis Mukhin via B4 Relay
2024-12-13 11:43   ` Roger Pau Monné
2025-01-04  6:28     ` Denis Mukhin
2024-12-16 15:04   ` Jan Beulich
2025-01-04  5:31     ` Denis Mukhin
2025-01-06  9:19       ` Jan Beulich
2025-01-06 20:16         ` Denis Mukhin
2025-01-07  8:43           ` Jan Beulich
2024-12-06  4:42 ` [PATCH v2 32/35] x86/hvm: add debugging facility to " Denis Mukhin
2024-12-06  4:42   ` Denis Mukhin via B4 Relay
2024-12-13 12:08   ` Roger Pau Monné
2025-01-04  4:31     ` Denis Mukhin
2024-12-16 15:08   ` Jan Beulich
2025-01-04  4:37     ` Denis Mukhin
2024-12-06  4:42 ` [PATCH v2 33/35] x86/domain: implement domain_has_vuart() Denis Mukhin
2024-12-06  4:42   ` Denis Mukhin via B4 Relay
2024-12-13 12:23   ` Roger Pau Monné
2024-12-13 20:45     ` Stefano Stabellini
2024-12-16  8:40       ` Roger Pau Monné
2025-01-04  5:26       ` Denis Mukhin
2025-01-04  5:19     ` Denis Mukhin
2025-01-07 15:16       ` Roger Pau Monné
2025-01-07 17:33         ` Denis Mukhin
2024-12-16 15:11   ` Jan Beulich
2025-01-04  5:26     ` Denis Mukhin
2024-12-06  4:42 ` [PATCH v2 34/35] xen/console: enable console owners w/ emulated NS8250 Denis Mukhin
2024-12-06  4:42   ` Denis Mukhin via B4 Relay
2024-12-10 22:46   ` Jason Andryuk
2024-12-11  7:35     ` Jan Beulich
2024-12-11  7:38     ` Jan Beulich
2025-01-04  3:12       ` Denis Mukhin
2025-01-04  3:08     ` Denis Mukhin
2024-12-06  4:42 ` [PATCH v2 35/35] docs/misc: update console documentation Denis Mukhin
2024-12-06  4:42   ` Denis Mukhin via B4 Relay
2024-12-14 18:05 ` [PATCH v2 00/35] Introduce NS8250 UART emulator Marek Marczykowski-Górecki
2024-12-16  9:04   ` Roger Pau Monné
2025-01-04  4:28     ` Denis Mukhin
2025-01-04  4:27   ` 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=Z34xhkNu5YLyEzut@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=dmkhn@proton.me \
    --cc=dmukhin@ford.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.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.