All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] x86/video: do not assume a video mode to be unconditionally present
Date: Fri, 19 Apr 2024 11:26:16 +0200	[thread overview]
Message-ID: <bcb3b5f9-7226-47ed-ada6-4ebcffa47b6e@suse.com> (raw)
In-Reply-To: <ZiIgb4Wnv-GCOoyx@macbook>

On 19.04.2024 09:42, Roger Pau Monné wrote:
> On Tue, Apr 02, 2024 at 11:49:20AM +0200, Jan Beulich wrote:
>> On 28.03.2024 16:35, Roger Pau Monne wrote:
>>> There's no reason to assume VGA text mode 3 to be unconditionally available.
>>> With the addition of booting Xen itself in PVH mode there's a boot path that
>>> explicitly short-circuits all the real-mode logic, including the VGA detection.
>>>
>>> Leave the default user selected mode as text mode 3 in boot_vid_mode, but do
>>> not populate boot_vid_info with any default settings.  It will either be
>>> populated by the real-mode video detection code, or left zeroed in case
>>> real-mode code is skipped.
>>>
>>> Note that only PVH skips the real-mode portion of the boot trampoline,
>>> otherwise the only way to skip it is to set `no-real-mode` on the command line,
>>> and the description for the option already notes that VGA would be disabled as
>>> a result of skipping real-mode bootstrap.
>>>
>>> This fixes Xen incorrectly reporting:
>>>
>>> (XEN) Video information:
>>> (XEN)  VGA is text mode 80x25, font 8x16
>>>
>>> When booted as a PVH guest.
>>
>> And what effect does this have on a bare-metal boot with no-real-mode in use?
>> The default on x86 hardware still is that in the absence of other information,
>> a VGA of some kind can be assumed to be there. Yes, there are headless
>> systems, but better assume VGA is there when there's not than the other way
>> around.
> 
> But that contradicts the text of the 'no-real-mode' option, which
> explicitly notes:
> 
> "Do not execute real-mode bootstrap code when booting Xen. This option
> should not be used except for debugging. It will effectively disable
> the vga option, which relies on real mode to set the video mode."

Well. Even without setting a video mode, _some_ mode is set (by firmware) as
long as there is a VGA. In the absence of a "vga=" option iirc we'd retrieve
that setting, unless we're not allowed to by "no-real-mode". In which case,
as indicated, we may still be better off guessing a basic mode than kind of
suggesting the absence of any VGA.

Besides, when booting from EFI vga= is respected despite not going through
real mode. So the quoted text isn't quite right anyway.

Jan

>> What I would have expected is for the PVH boot path to clear boot_vid_info.
> 
> Well, my intention was to fix both PVH and also make the
> implementation of the 'no-real-mode' option consistent with the
> documentation.
> 
> Thanks, Roger.



      reply	other threads:[~2024-04-19  9:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 15:35 [PATCH 0/2] x86/video: improve early video detection Roger Pau Monne
2024-03-28 15:35 ` [PATCH 1/2] x86/video: add boot_video_info offset generation to asm-offsets Roger Pau Monne
2024-03-28 19:55   ` Andrew Cooper
2024-04-02  9:38   ` Jan Beulich
2024-04-02  9:43     ` Jan Beulich
2024-04-19  7:25       ` Roger Pau Monné
2024-03-28 15:35 ` [PATCH 2/2] x86/video: do not assume a video mode to be unconditionally present Roger Pau Monne
2024-03-28 19:58   ` Andrew Cooper
2024-04-02  9:54     ` Jan Beulich
2024-04-02 10:06       ` Andrew Cooper
2024-04-02  9:49   ` Jan Beulich
2024-04-19  7:42     ` Roger Pau Monné
2024-04-19  9:26       ` Jan Beulich [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=bcb3b5f9-7226-47ed-ada6-4ebcffa47b6e@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --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.