From: Jan Beulich <jbeulich@suse.com>
To: Juergen Gross <jgross@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH v2 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0
Date: Thu, 30 Sep 2021 14:17:41 +0200 [thread overview]
Message-ID: <4fd89dcb-cfc5-c740-2e94-bb271e432d3e@suse.com> (raw)
In-Reply-To: <9a26d4ff-80a1-e0c1-f528-31a8568d41f7@suse.com>
The xen_hvm_early_write() path better wouldn't be taken in this case;
while port 0xE9 can be used, the hypercall path is quite a bit more
efficient. Put that first, as it may also work for DomU-s (see also
xen_raw_console_write()).
While there also bail from the function when the first
domU_write_console() failed - later ones aren't going to succeed.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -632,17 +632,16 @@ static void xenboot_write_console(struct
unsigned int linelen, off = 0;
const char *pos;
+ if (dom0_write_console(0, string, len) >= 0)
+ return;
+
if (!xen_pv_domain()) {
xen_hvm_early_write(0, string, len);
return;
}
- dom0_write_console(0, string, len);
-
- if (xen_initial_domain())
+ if (domU_write_console(0, "(early) ", 8) < 0)
return;
-
- domU_write_console(0, "(early) ", 8);
while (off < len && NULL != (pos = strchr(string+off, '\n'))) {
linelen = pos-string+off;
if (off + linelen > len)
next prev parent reply other threads:[~2021-09-30 12:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 12:12 [PATCH v2 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments Jan Beulich
2021-09-30 12:16 ` [PATCH v2 1/9] xen/x86: prevent PVH type from getting clobbered Jan Beulich
2021-09-30 12:16 ` [PATCH v2 2/9] xen/x86: allow PVH Dom0 without XEN_PV=y Jan Beulich
2021-09-30 12:17 ` Jan Beulich [this message]
2021-09-30 12:18 ` [PATCH v2 4/9] xen/x86: allow "earlyprintk=xen" to work for PV Dom0 Jan Beulich
2021-09-30 12:18 ` [PATCH v2 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU Jan Beulich
2021-09-30 12:19 ` [PATCH v2 6/9] xen/x86: generalize preferred console model from PV to PVH Dom0 Jan Beulich
2021-09-30 12:19 ` [PATCH v2 7/9] xen/x86: hook up xen_banner() also for PVH Jan Beulich
2021-09-30 12:45 ` Juergen Gross
2021-09-30 12:20 ` [PATCH v2 8/9] x86/PVH: adjust function/data placement Jan Beulich
2021-09-30 12:21 ` [PATCH v2 9/9] xen/x86: adjust data placement Jan Beulich
2021-09-30 12:45 ` Juergen Gross
2021-10-05 6:38 ` [PATCH v2 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments Juergen Gross
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=4fd89dcb-cfc5-c740-2e94-bb271e432d3e@suse.com \
--to=jbeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®