]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xen/hvc: If we use xen_raw_printk let it also work on HVM guests.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 27 Sep 2013 21:18:13 +0000 (17:18 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 30 Sep 2013 13:05:45 +0000 (09:05 -0400)
commit04b772d2b819f0dda2163e3193fa7cd447a6245c
tree8bce0cc3f112704a57c86316339cc1c2c6d8a5c1
parentb1922a519e0788518d64abe7ec37d5de30e42305
xen/hvc: If we use xen_raw_printk let it also work on HVM guests.

The xen_raw_printk works great for debugging purposes. We use
for PV guests and we can also use it for HVM guests.

However, for HVM guests we have a fallback of using the 0xe9
port in case the hypervisor does not support an HVM guest of
using the console_io hypercall. As such lets use 0xe9 during
early bootup, and once the hyper-page is setup and if the
console_io hypercall is supported - use that. Otherwise we
will fallback to using the 0xe9 after early bootup.

We also alter the return value for dom0_write_console to return
an error value instead of zero. The HVC API has been supporting
returning error values for quite some time.

P.S.
To use (and to see the output in the Xen ring buffer) one has to build
the hypervisor with 'debug=y'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v1: ifdef xen_cpuid_base as it is X86 specific]
drivers/tty/hvc/hvc_xen.c