Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVMguests.

From: Konrad Rzeszutek Wilk
Date: Mon Sep 30 2013 - 10:45:41 EST


On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote:
> On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote:
>
> >@@ -641,7 +641,20 @@ struct console xenboot_console = {
> >
> > void xen_raw_console_write(const char *str)
> > {
> >- dom0_write_console(0, str, strlen(str));
> >+ ssize_t len = strlen(str);
> >+ int rc = 0;
> >+
> >+ if (xen_domain()) {
> >+ dom0_write_console(0, str, len);
> >+ if (rc == -ENOSYS && xen_hvm_domain())
> >+ goto outb_print;
> >+
> >+ } else if (xen_cpuid_base()) {
> >+ int i;
> >+outb_print:
> >+ for (i = 0; i < len; i++)
> >+ outb(str[i], 0xe9);
> >+ }
> > }
>
> xen_cpuid_base and outb(0xe9) is x86 specific and won't compile on ARM.

Odd, I see outb defined in arch/arm and arch/arm64 ?(arch/arm[|64]/include/asm.io.h)

You are of course right about xen_cpuid_base.

How about this: