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

Re: [PATCH] ns16550c: avoid crash in ns16550_endboot in PV shim mode



On Fri, 2023-10-20 at 11:14 +0100, Andrew Cooper wrote:
> On 19/10/2023 5:21 pm, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> > 
> > In shim mode there is no hardware_domain. Dereferencing the pointer
> > doesn't end well.
> > 
> > Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
> > ---
> > This is about as far as I got in my abortive attempt to use the PV shim
> > without an actual PV console being provided by the HVM hosting
> > environment. It still doesn't pass the guest's console through to
> > serial; that only seems to shim to an actual PV console.
> 
> There's no such thing as a Xen VM without a PV console.

Huh? There are literally millions of them. Every EC2 Xen HVM instance
boots with a serial device but no Xen console. That's true of the ones
running on true Xen, as well as the newer launches which are running on
top of Linux/KVM.

We implemented Xen console support in the Nitro hypervisor, then had to
disable it because it wasn't faithful to the production environment
that guests previously experienced on Xen, and eventually ripped it out
because it was dead code.

Likewise, upstream Qemu's Xen emulation mode doesn't currently have
console support (although I did just add it to get the shim working).

> And yes, this is an error, but that horse bolted 2 decades ago.
> 
> 
> It would be nice if having a "real" serial didn't crash like this, but
> PV Shim is specialised to transplant one normal-looking PV guest, and
> the interposition logic is tied to the PV console.

That's a nicer model. When Spectre/Meltdown broke and we posted the
'Vixen' version of a shim, it actually implemented a console backend
and would output to the serial port. But I do agree it's nicer not to.

Even with a PV console though, it might still be useful to have the
shim's output going to a serial port while the guest's output goes to
the console though, to keep them separate.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


 


Rackspace

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