From: dmkhn@proton.me
To: Jan Beulich <jbeulich@suse.com>
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/2] xen/console: unify printout behavior for UART emulators
Date: Wed, 11 Jun 2025 00:10:11 +0000 [thread overview]
Message-ID: <aEjJXH36f48kul+4@kraken> (raw)
In-Reply-To: <8585aaa1-65fc-44cf-822b-d69429d81020@suse.com>
On Thu, Jun 05, 2025 at 08:15:15AM +0200, Jan Beulich wrote:
> On 05.06.2025 02:57, dmkhn@proton.me wrote:
> > On Wed, Jun 04, 2025 at 12:48:05PM +0200, Jan Beulich wrote:
> >> On 31.05.2025 02:04, dmkhn@proton.me wrote:
> >>> --- a/xen/arch/x86/hvm/hvm.c
> >>> +++ b/xen/arch/x86/hvm/hvm.c
> >>> @@ -577,7 +577,7 @@ static int cf_check hvm_print_line(
> >>> if ( (cd->pbuf_idx == (DOMAIN_PBUF_SIZE - 1)) || (c == '\n') )
> >>> {
> >>> cd->pbuf[cd->pbuf_idx] = '\0';
> >>> - guest_printk(cd, XENLOG_G_DEBUG "%s\n", cd->pbuf);
> >>> + guest_printk(cd, "%s\n", cd->pbuf);
> >>> cd->pbuf_idx = 0;
> >>> }
> >>
> >> Why this and ...
> >>
> >>> @@ -755,7 +765,7 @@ static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer,
> >>> else
> >>> {
> >>> cd->pbuf[cd->pbuf_idx] = '\0';
> >>> - guest_printk(cd, XENLOG_G_DEBUG "%s%s\n", cd->pbuf, kbuf);
> >>> + guest_printk(cd, "%s%s\n", cd->pbuf, kbuf);
> >>> cd->pbuf_idx = 0;
> >>> }
> >>
> >> ... this change? There's no compensation for it ...
> >>
> >>> @@ -1013,12 +1023,21 @@ void printk(const char *fmt, ...)
> >>> va_end(args);
> >>> }
> >>>
> >>> +/*
> >>> + * Print message from the guest on the diagnostic console.
> >>> + * Prefixes all messages w/ "(dX)" if domain X does not own physical console
> >>> + * focus.
> >>> + */
> >>> void guest_printk(const struct domain *d, const char *fmt, ...)
> >>> {
> >>> va_list args;
> >>> - char prefix[16];
> >>> + char prefix[16] = "";
> >>> + struct domain *consd;
> >>>
> >>> - snprintf(prefix, sizeof(prefix), "(d%d) ", d->domain_id);
> >>> + consd = console_get_domain();
> >>> + if ( consd != d )
> >>> + snprintf(prefix, sizeof(prefix), "(d%d) ", d->domain_id);
> >>> + console_put_domain(consd);
> >>>
> >>> va_start(args, fmt);
> >>> vprintk_common(fmt, args, prefix);
> >>
> >> ... here afaics, so it looks like you're undermining rate-limiting of
> >> those messages.
> >
> > I droppped behavior change for I/O debug port on x86 and HYPERVISOR_console_io
> > hypercall.
> >
> > But my understanding is that all guest debugging facilities, if enabled, should
> > not be rate-limited.
>
> I certainly disagree there. How much rate limiting to apply to guest output is a
> matter of the guest_loglvl= command line option. Its default settings are the way
> they are for a reason.
Oh, I see!
Thanks for clarification!
>
> Jan
>
prev parent reply other threads:[~2025-06-11 0:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-31 0:04 [PATCH v1 0/2] xen/console: updates to diagnostic messages prefixes dmkhn
2025-05-31 0:04 ` [PATCH v1 1/2] xen/console: introduce CONSOLE_PREFIX dmkhn
2025-05-31 0:04 ` [PATCH v1 2/2] xen/console: unify printout behavior for UART emulators dmkhn
2025-06-04 10:48 ` Jan Beulich
2025-06-05 0:57 ` dmkhn
2025-06-05 6:15 ` Jan Beulich
2025-06-11 0:10 ` dmkhn [this message]
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=aEjJXH36f48kul+4@kraken \
--to=dmkhn@proton.me \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmukhin@ford.com \
--cc=jbeulich@suse.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.