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

From: Ian Campbell
Date: Sat Oct 26 2013 - 04:27:43 EST

On Fri, 2013-10-25 at 15:38 -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote:
> > But stepping back how/why is this function called on x86 when not
> > running under Xen? Wouldn't the use have to be using console=hvc or
> > earlyprintk=xen or something -- which strikes me as user error... IOW
> > can we not just nuke the check
> It shouldn't - ever. On x86 it is called from the early PV bootup code.
> I occasionaly use it when developing/debugging and as such want it working
> in HVM even during early bootup.

Does earlyprintk=ttyS0,cough not Just Work for HVM guests? That would
avoid all of this stuff and assuming it works would be preferable IMHO.

Anyway, if not, then given that the xen_cpuid_base case is entirely x86
specific perhaps we can abstract this as something like:

if (xen_arch_raw_console(str))


Then ARM:
#define xen_arch_raw_console 0
and x86
static inline int xen_arch_raw_console(str)
if (xen_domain())
return 0;

/* Do the outb thing */
return 1;

This would also avoid the need for #ifdef x86 in the main function which
Julien pointed out.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at