* [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0
[not found] <4efa804e-3250-227f-00c7-347581366cd4@suse.com>
@ 2021-09-07 10:09 ` Jan Beulich
2021-09-23 14:05 ` Juergen Gross
2021-09-07 10:10 ` [PATCH 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU Jan Beulich
1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2021-09-07 10:09 UTC (permalink / raw)
To: Juergen Gross, Boris Ostrovsky
Cc: xen-devel, Stefano Stabellini, linuxppc-dev, lkml
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>
--- 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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU
[not found] <4efa804e-3250-227f-00c7-347581366cd4@suse.com>
2021-09-07 10:09 ` [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0 Jan Beulich
@ 2021-09-07 10:10 ` Jan Beulich
2021-09-23 14:08 ` Juergen Gross
1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2021-09-07 10:10 UTC (permalink / raw)
To: Juergen Gross, Boris Ostrovsky
Cc: xen-devel, Stefano Stabellini, linuxppc-dev, lkml
xenboot_write_console() is dealing with these quite fine so I don't see
why xenboot_console_setup() would return -ENOENT in this case.
Adjust documentation accordingly.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1266,7 +1266,7 @@
The VGA and EFI output is eventually overwritten by
the real console.
- The xen output can only be used by Xen PV guests.
+ The xen option can only be used in Xen domains.
The sclp output can only be used on s390.
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -618,10 +618,8 @@ static int __init xenboot_console_setup(
{
static struct xencons_info xenboot;
- if (xen_initial_domain())
+ if (xen_initial_domain() || !xen_pv_domain())
return 0;
- if (!xen_pv_domain())
- return -ENODEV;
return xencons_info_pv_init(&xenboot, 0);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0
2021-09-07 10:09 ` [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0 Jan Beulich
@ 2021-09-23 14:05 ` Juergen Gross
0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2021-09-23 14:05 UTC (permalink / raw)
To: Jan Beulich, Boris Ostrovsky
Cc: xen-devel, Stefano Stabellini, linuxppc-dev, lkml
[-- Attachment #1.1.1: Type: text/plain, Size: 529 bytes --]
On 07.09.21 12:09, Jan Beulich wrote:
> 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>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU
2021-09-07 10:10 ` [PATCH 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU Jan Beulich
@ 2021-09-23 14:08 ` Juergen Gross
0 siblings, 0 replies; 4+ messages in thread
From: Juergen Gross @ 2021-09-23 14:08 UTC (permalink / raw)
To: Jan Beulich, Boris Ostrovsky
Cc: xen-devel, Stefano Stabellini, linuxppc-dev, lkml
[-- Attachment #1.1.1: Type: text/plain, Size: 336 bytes --]
On 07.09.21 12:10, Jan Beulich wrote:
> xenboot_write_console() is dealing with these quite fine so I don't see
> why xenboot_console_setup() would return -ENOENT in this case.
>
> Adjust documentation accordingly.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-23 14:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <4efa804e-3250-227f-00c7-347581366cd4@suse.com>
2021-09-07 10:09 ` [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0 Jan Beulich
2021-09-23 14:05 ` Juergen Gross
2021-09-07 10:10 ` [PATCH 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU Jan Beulich
2021-09-23 14:08 ` Juergen Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).