[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/9] xen/x86: PVH Dom0 fixes and fallout adjustments


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 14 Sep 2021 18:27:51 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/FUPmgE0iKT7YxUURvlZlq/MtNcRKfBk8QhYO56li0I=; b=Oih5P4AE+atSEkVprqyWU7MDlGbx8Wp7CZG4u3HibtR78LpTjcfafewYKJck4vq4QaGfsmtPauzknUCXYAPlU7Jq9NnoWMdC3BYdQ9LJ6+N2mxuTSrWG1dlr61J6kk5num02a5qt07vKWPV10HH2WPmPpdIciBXP7M/AQF6Hbsrw53TIsogTm0qQWdIVgLCrdxi1jMV2LUHunKfftSgmCmMtuuczQM9+1yMgYLTtaTbQRrb9eTYAi+DRJqShwzN6L+L0yistVvMsXDGMm+RXKTIoGSROzlKBXWnwlFQnv7zSFg+NFYRYQ44n+pJy2bSzUgBh0VpbwJKRsUZGqiOrVA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LR+UjHDak1cqYTDLICD7KCXbaMD+tUGN2bO0ZU0HScW5bizOffYJtDwIvAKscoBrBPL/XNZrvOR8fsWhNAhGgSnCjjQISTWagZKR0aIi2Bx2q2QUA5VO7KnF4xAdhiFvG5TvYXjB9ajnpTknvZ3MmEbma0Dvi9esf8MC723H0tFW47wtdJGm58pvC/0a8hd5xRP6Qb1J1C74blZ0LJ2+EFDepOvUBYGQjaB3lqpTup28L1E4xtZCeAJnJ0HUP8qR/3sbpTayeAy/ea22e3SJ10LvTRCruCIWgwvqdiN4LDsVbJNsYmGEEQlbB+3ko6AHc8kEuh8jf5GBJqxV0llCGw==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 14 Sep 2021 16:28:15 +0000
  • Ironport-data: A9a23:xFRCm6JbAf6ysWIsFE+RRpIlxSXFcZb7ZxGr2PjKsXjdYENS0TYAy WYWUGiGOv3ZYDf3L9pzbNvn90oH75LTnNBiTARlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZ0ideSc+EH140UM6x7Zj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2kwvdPl dtg6qbpF18uBrfQxroEWkRHRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsF2gcsuNo/zNZ43sXB81zDJS/0hRPgvRo2Xv4ABg29t3aiiG970Q vsgMjxGYCjcICRSYFUuFpsYpcKn0yyXnzpw9wvO+PtfD3Lo5BdqzLHnPd7Re9qLbcZYhECVo iTB5WuRKhUbMsGPjDmI6HShgsfRki7hHoEfDru18rhtmlL77nweDlgaWEW2pdG9i1WiQJRPJ koM4C0soKMuskuxQbHVXRe1vXqFtR40QMdLHqsx7wTl4qjb+QGCHUAfUyVMLtchsaceTzsw1 0TPmMj1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PhHO9OgLX5VI3KNGOKhILCFvAA0WKN+UyEJwTOssJbyK d8Y+xfJbTLfDxHZB/BkWuFL+o=
  • Ironport-sdr: sTpUpzu+P8oaQRNY5oXHzA/ElGr3kPGrlXi84A4uofqfk6PPHYpYRY7ciF7GoNVfqz+Z1L6hmw VA1YjAxELHjmcmVbt6UXOHEGm+2aA6uMndc/v9lBuB66SS65ASavL6xJzznfdLiDJtjx7tJaTn WO0qYQaMVSv+oRLdL8yIxXTySoYjLDxGJ1T/9xFX2zWNG/515XaacX6oylv+o763LOUhi9KcMC EzfYoGoBKRUaWBGkNyW/kl0I0BR+l3wd2WUVEhfMLCOPd6InzZfzTf5ejiNUtktPik7scXSyrO FXsLZebhKJQw2kJigpir6FsL
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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. 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.

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

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.