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

Re: Inconsistent console behavior during HVM direct boot

  • To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 13 Jan 2021 19:09:51 +0100
  • 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:X-MS-Exchange-SenderADCheck; bh=bANpv8rdVTh0es4gCpFv7kLEh674qA+BIay3iG06Ubk=; b=lCluLjjhMg845WFeAEiZPG2FJV+t4XC4guMJB73I8sMCQjnupLICMdT8OkrjPtpNNz4FuvKWSXfgGzdY4pUhJXZcYtp4yUAvIj3JV0rvzcU21Ey6EkpAAhmWimOVfY8I6PG9MmGJXIMWnMBkTCnWWyURmxn1RYPkWlUZWTEMI/A3QrJR7/sxqceyrkvGnmbyaqrE1bcnRT1ABuDTqc3rr2QDX04tPerJcXVG38ok8anfNypkWQ0dVLpKY5gI2ggNNhbhvUVojggX4MrX/fKSUhlBF/+ILLRkfywfz0AuIMah5Ao8h5HGm3oArA3LPaK7bCAFVbXDwT+GNpftwi9edQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UdX+RLg+zi5EM/NxoyowLIrLGuOIgiRmR9LAweUjaNPNx8LpMGR7qssm6FTQ+wFPQP6t+ooV+tKwixX5S5SSUDUQO2weUEYuAbHTW8wNAjuipx582spNdnKc5f6FvFDcn4l76gcMgA0H73oB3T22rcsCJjrYCndoCIois0LRXzwFo2PgJF8iX6MsQF/pizCd64iMuOlo4gCxkoNkRNaAxp1E2DTZE0Pj9XOmil4bc2KUiExVYQrYraJx3KklaIAzA0Q9X9w+fl6OSRS6+25ZqgfxE8nt7vNP5jFPsK0hzmD0WWQ5vgqCgKI5gW4BvdC6JrNVcgUgdQn75VEB4bXUNw==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <amc96@xxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Wed, 13 Jan 2021 18:10:27 +0000
  • Ironport-sdr: 7K6gGkA8DouezM5caS3ZmrsJ9eJIeSgKsLBKH0zXcsi5283J3S8bFimWTpJCuTABUUfAG2TEN+ aARLLz5FBmT1E7g66ylzavHt5gR4ZLDoUxWk6DF6ZhTw0KvibwXy2foiuXTY+Mx6sDSA30W/W4 kGBAHBc6k5yFEGoP5bRr0TBm/p1f79EjnGlZw8N7GZ8nf5Zs4iWTgwGiiQk0CLzysqYnZsGeBc D434jDNzQsZqWVDghQlw9xT4bfFkVVYQl3T9kfCvcNdH9kQgS1HAfAtLFxFYdetWs4WcS2uXJZ 0SI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jan 13, 2021 at 10:48:02AM -0500, Tamas K Lengyel wrote:
> On Wed, Jan 13, 2021 at 8:18 AM Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
> >
> > On Tue, Jan 12, 2021 at 09:54:18PM -0500, Tamas K Lengyel wrote:
> > > While direct booting a Linux kernel into an HVM VM no console output
> > > is received if serial="pty" is set in the VM config but the kernel
> > > command line specifies "console=hvc0". If "console=ttyS0" is specified
> > > then the console output is received as expected. Conversely, if the
> > > serial line is commented out in the VM config but hvc0 is set on the
> > > kernel command line then it also works. It's unclear whether this
> > > behavior is expected or not, after some discussion it sounds like all
> > > kernels ought to understand hvc0 irrespective of the serial="pty" line
> > > being set or not. Reporting this in case someone has more insight
> > > and/or inclination digging into this.
> >
> > So I think this is (as confusing as it might seem) the intended
> > behavior.
> >
> > Using serial='pty' exposes an emulated serial device to the guest and
> > 'xl console' will fetch the output from that device by default. So on
> > the Linux kernel command line you need to use console=ttyS0 in order
> > to point Linux to use the emulated serial device.
> >
> > however if serial='pty' is not used, there will be no emulated serial
> > device exposed to the guest, only the PV console, and that's what 'xl
> > console' will attach to in that case. You then need to point the Linux
> > kernel to use the PV serial console, by adding the console=hvc0
> > command line.
> >
> > I'm unsure how to clarify this, maybe some additions could be made to
> > the xl.cfg man page to note that using serial='pty' will add an
> > emulated serial device to the guest, and that by default 'xl console'
> > will fetch the output from that device instead of the paravirtualized
> > console?
> Hi Roger,
> that explanation makes sense, I wasn't aware that there would be two
> different console's available to the guest if serial="pty" is set and
> that xl would pick on over the other. So adding that to the
> documentation would be helpful. Perhaps also pointing out under what
> scenario is the emulated console vs the pv console is useful. I assume
> the point of the emulated console would be to get console output from
> software that's not Xen-aware (like GRUB)?

Right, since you can run unmodified OSes (or bootloaders) in HVM mode
it's useful to be able to get serial output from them directly when
using 'xl console' IMO.

Would you be up for writing a patch to xl.cfg man page to clarify

Thanks, Roger.



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