All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/PV: suppress unnecessary Dom0 construction output
@ 2021-08-16 15:30 Jan Beulich
  2021-08-16 16:20 ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2021-08-16 15:30 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné

Especially with XEN_GUEST, being a prereq of PV_SHIM, defaulting to N,
v{xenstore,console}_{start,end} can only ever be zero in such default
configurations. And in case video is the only output configured, space
is scarce. Omit the two lines carrying no information at all in this
case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -580,8 +580,10 @@ int __init dom0_construct_pv(struct doma
            " Init. ramdisk: %p->%p\n"
            " Phys-Mach map: %p->%p\n"
            " Start info:    %p->%p\n"
+#ifdef CONFIG_PV_SHIM
            " Xenstore ring: %p->%p\n"
            " Console ring:  %p->%p\n"
+#endif
            " Page tables:   %p->%p\n"
            " Boot stack:    %p->%p\n"
            " TOTAL:         %p->%p\n",
@@ -589,8 +591,10 @@ int __init dom0_construct_pv(struct doma
            _p(vinitrd_start), _p(vinitrd_end),
            _p(vphysmap_start), _p(vphysmap_end),
            _p(vstartinfo_start), _p(vstartinfo_end),
+#ifdef CONFIG_PV_SHIM
            _p(vxenstore_start), _p(vxenstore_end),
            _p(vconsole_start), _p(vconsole_end),
+#endif
            _p(vpt_start), _p(vpt_end),
            _p(vstack_start), _p(vstack_end),
            _p(v_start), _p(v_end));



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/PV: suppress unnecessary Dom0 construction output
  2021-08-16 15:30 [PATCH] x86/PV: suppress unnecessary Dom0 construction output Jan Beulich
@ 2021-08-16 16:20 ` Andrew Cooper
  2021-08-17  8:44   ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2021-08-16 16:20 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei Liu, Roger Pau Monné

On 16/08/2021 16:30, Jan Beulich wrote:
> Especially with XEN_GUEST, being a prereq of PV_SHIM, defaulting to N,
> v{xenstore,console}_{start,end} can only ever be zero in such default
> configurations. And in case video is the only output configured, space
> is scarce. Omit the two lines carrying no information at all in this
> case.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> as this is an
improvement, but honestly I think it would be better done differently.

Each line ought be a separate printk() in the first place, and these two
messages should be conditional on opt_pv_shim rather than
CONFIG_PV_SHIM.  That will also shrink the output for native boot when
SHIM is enabled.

It also lets you conditionally drop the ramdisk line which has some
conditional printing a few lines earlier for the physical layout, but
unconditional printing for the virtual layout.

And on that note, the earlier few printk()'s really need some newline
corrections.

If you do go with this approach, feel free to retain my Ack.

~Andrew



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/PV: suppress unnecessary Dom0 construction output
  2021-08-16 16:20 ` Andrew Cooper
@ 2021-08-17  8:44   ` Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2021-08-17  8:44 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Wei Liu, Roger Pau Monné, xen-devel

On 16.08.2021 18:20, Andrew Cooper wrote:
> On 16/08/2021 16:30, Jan Beulich wrote:
>> Especially with XEN_GUEST, being a prereq of PV_SHIM, defaulting to N,
>> v{xenstore,console}_{start,end} can only ever be zero in such default
>> configurations. And in case video is the only output configured, space
>> is scarce. Omit the two lines carrying no information at all in this
>> case.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> as this is an
> improvement, but honestly I think it would be better done differently.
> 
> Each line ought be a separate printk() in the first place, and these two
> messages should be conditional on opt_pv_shim rather than
> CONFIG_PV_SHIM.  That will also shrink the output for native boot when
> SHIM is enabled.
> 
> It also lets you conditionally drop the ramdisk line which has some
> conditional printing a few lines earlier for the physical layout, but
> unconditional printing for the virtual layout.
> 
> And on that note, the earlier few printk()'s really need some newline
> corrections.
> 
> If you do go with this approach, feel free to retain my Ack.

When making the change I was actually thinking about splitting the
printk(), including suppression of the initrd line. Since you now
indicate you would welcome this, I will indeed do so. Thanks for
the (in advance) ack.

Jan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-17  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 15:30 [PATCH] x86/PV: suppress unnecessary Dom0 construction output Jan Beulich
2021-08-16 16:20 ` Andrew Cooper
2021-08-17  8:44   ` Jan Beulich

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.