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: Juergen Gross <jgross@suse.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments
Date: Wed, 15 Sep 2021 10:29:12 +0200	[thread overview]
Message-ID: <0d011380-292b-49a2-f900-ead44e8a0bc0@suse.com> (raw)
In-Reply-To: <YUDNh9r8nYOxB76n@MacBook-Air-de-Roger.local>

On 14.09.2021 18:27, Roger Pau Monné wrote:
> On Tue, Sep 14, 2021 at 05:13:52PM +0200, Jan Beulich wrote:
>> On 14.09.2021 14:41, Roger Pau Monné wrote:
>>> On Tue, Sep 14, 2021 at 01:58:29PM +0200, Jan Beulich wrote:
>>>> On 14.09.2021 13:15, Roger Pau Monné wrote:
>>>>> On Tue, Sep 14, 2021 at 11:03:23AM +0200, Jan Beulich wrote:
>>>>>> On 14.09.2021 10:32, Roger Pau Monné wrote:
>>>>>>> On Tue, Sep 07, 2021 at 12:04:34PM +0200, Jan Beulich wrote:
>>>>>>>> 2) Dom0, unlike in the PV case, cannot access the screen (to use as a
>>>>>>>>    console) when in a non-default mode (i.e. not 80x25 text), as the
>>>>>>>>    necessary information (in particular about VESA-bases LFB modes) is
>>>>>>>>    not communicated. On the hypervisor side this looks like deliberate
>>>>>>>>    behavior, but it is unclear to me what the intentions were towards
>>>>>>>>    an alternative model. (X may be able to access the screen depending
>>>>>>>>    on whether it has a suitable driver besides the presently unusable
>>>>>>>>    /dev/fb<N> based one.)
>>>>>>>
>>>>>>> I had to admit most of my boxes are headless servers, albeit I have
>>>>>>> one NUC I can use to test gfx stuff, so I don't really use gfx output
>>>>>>> with Xen.
>>>>>>>
>>>>>>> As I understand such information is fetched from the BIOS and passed
>>>>>>> into Xen, which should then hand it over to the dom0 kernel?
>>>>>>
>>>>>> That's how PV Dom0 learns of the information, yes. See
>>>>>> fill_console_start_info(). (I'm in the process of eliminating the
>>>>>> need for some of the "fetch from BIOS" in Xen right now, but that's
>>>>>> not going to get us as far as being able to delete that code, no
>>>>>> matter how much in particular Andrew would like that to happen.)
>>>>>>
>>>>>>> I guess the only way for Linux dom0 kernel to fetch that information
>>>>>>> would be to emulate the BIOS or drop into realmode and issue the BIOS
>>>>>>> calls?
>>>>>>
>>>>>> Native Linux gets this information passed from the boot loader, I think
>>>>>> (except in the EFI case, as per below).
>>>>>>
>>>>>>> Is that an issue on UEFI also, or there dom0 can fetch the framebuffer
>>>>>>> info using the PV EFI interface?
>>>>>>
>>>>>> There it's EFI boot services functions which can be invoked before
>>>>>> leaving boot services (in the native case). Aiui the PVH entry point
>>>>>> lives logically past any EFI boot services interaction, and hence
>>>>>> using them is not an option (if there was EFI firmware present in Dom0
>>>>>> in the first place, which I consider difficult all by itself - this
>>>>>> can't be the physical system's firmware, but I also don't see where
>>>>>> virtual firmware would be taken from).
>>>>>>
>>>>>> There is no PV EFI interface to obtain video information. With the
>>>>>> needed information getting passed via start_info, PV has no need for
>>>>>> such, and I would be hesitant to add a fundamentally redundant
>>>>>> interface for PVH. The more that the information needed isn't EFI-
>>>>>> specific at all.
>>>>>
>>>>> I think our only option is to expand the HVM start info information to
>>>>> convey that data from Xen into dom0.
>>>>
>>>> PHV doesn't use the ordinary start_info, does it?
>>>
>>> No, it's HVM start info as described in:
>>>
>>> xen/include/public/arch-x86/hvm/start_info.h
>>>
>>> We have already extended it once to add a memory map, we could extend
>>> it another time to add the video information.
>>
>> Okay, I'll try to make a(nother) patch along these lines. Since there's
>> a DomU counterpart in PV's start_info - where does that information get
>> passed for PVH? (I'm mainly wondering whether there's another approach
>> to consider.)
> 
> We don't pass the video information at all for PVH, neither in domU or
> dom0 modes if that's what you mean. Not sure what video information we
> could pass for domU anyway, as that would be a PV framebuffer that
> would need setup ATM. Maybe we could at some point provide some kind
> of emulated or passed through card.
> 
> The information contained in start_info that's needed for PVH is
> passed using hvm params, just like it's done for plain HVM guests.

This is what I was referring to; I'm sorry for having been unclear.
It's no video _mode_ information, but information on hot to get at
the console.

> We
> could pass the video information in a hvm param I guess, but it would
> require stealing guest memory to store it (and mark as reserved in
> the memory map). Not sure that's better than expanding HVM start info.

I don't think it would be; a param doesn't seem a good fit here,
and I have to admit I'm not even convinced its a good fit for
xenstore and console coordinates (that's fine for HVM; the only
reason I can see for PVH to use the same is the expectation of
the line between both to become increasingly blurred).

> Maybe there's another hypercall interface I'm missing we could use to
> propagate that information to dom0?

I don't think there is; if anything we'd have to add something.

Jan


      reply	other threads:[~2021-09-15  8:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 10:04 [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments Jan Beulich
2021-09-07 10:07 ` [PATCH 1/9] xen/x86: prevent PVH type from getting clobbered Jan Beulich
2021-09-23 13:06   ` Juergen Gross
2021-09-07 10:08 ` [PATCH 2/9] xen/x86: allow PVH Dom0 without XEN_PV=y Jan Beulich
2021-09-23 14:03   ` Juergen Gross
2021-09-07 10:09 ` [PATCH 3/9] xen/x86: make "earlyprintk=xen" work better for PVH Dom0 Jan Beulich
2021-09-07 10:09   ` Jan Beulich
2021-09-23 14:05   ` Juergen Gross
2021-09-23 14:05     ` Juergen Gross
2021-09-07 10:09 ` [PATCH 4/9] xen/x86: allow "earlyprintk=xen" to work for PV Dom0 Jan Beulich
2021-09-23 14:06   ` Juergen Gross
2021-09-07 10:10 ` [PATCH 5/9] xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU Jan Beulich
2021-09-07 10:10   ` Jan Beulich
2021-09-23 14:08   ` Juergen Gross
2021-09-23 14:08     ` Juergen Gross
2021-09-07 10:10 ` [PATCH 6/9] xen/x86: generalize preferred console model from PV to PVH Dom0 Jan Beulich
2021-09-23 14:54   ` Juergen Gross
2021-09-07 10:11 ` [PATCH 7/9] xen/x86: hook up xen_banner() also for PVH Jan Beulich
2021-09-23 14:59   ` Juergen Gross
2021-09-23 15:10     ` Jan Beulich
2021-09-23 15:15       ` Juergen Gross
2021-09-23 15:19         ` Jan Beulich
2021-09-23 15:25           ` Juergen Gross
2021-09-23 15:31             ` Jan Beulich
2021-09-29  5:45               ` Juergen Gross
2021-09-29  7:28                 ` Jan Beulich
2021-09-29  7:29                   ` Juergen Gross
2021-09-07 10:12 ` [PATCH 8/9] x86/PVH: adjust function/data placement Jan Beulich
2021-09-23 15:02   ` Juergen Gross
2021-09-07 10:13 ` [PATCH 9/9] xen/x86: adjust data placement Jan Beulich
2021-09-23 15:04   ` Juergen Gross
2021-09-14  8:32 ` [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments Roger Pau Monné
2021-09-14  9:03   ` Jan Beulich
2021-09-14 11:15     ` Roger Pau Monné
2021-09-14 11:58       ` Jan Beulich
2021-09-14 12:41         ` Roger Pau Monné
2021-09-14 15:13           ` Jan Beulich
2021-09-14 16:27             ` Roger Pau Monné
2021-09-15  8:29               ` 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=0d011380-292b-49a2-f900-ead44e8a0bc0@suse.com \
    --to=jbeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.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 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.