lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Aug 2013 21:31:44 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC:	<linux-kernel@...r.kernel.org>, <xen-devel@...ts.xenproject.org>
Subject: Re: [Xen-devel] [PATCH] xen/hvc: If we use xen_raw_printk let it
 also work on HVM guests.

On Fri, 2013-08-09 at 10:55 -0400, Konrad Rzeszutek Wilk wrote:
> The xen_raw_printk works great for debugging purposes and for
> it print anything the Xen hypervisor has to be built with 'debug=y'.
> 
> As such there is no difference between a PV or an PVHVM guest
> using the hypercall, so lets use it.
>
> Lastly if the hyper-page is not setup yet (for example during
> early HVM boot), then use the 0xe9 port if it has detected
> that it is running under an Xen hypervisor.

Does this really do what you say?

I think xen_pv_domain returns false for a PVHVM guest, meaning that we
only use the hypercall for proper PV guests and for PVHVM we use port
0xe9 until the hypercall page is setup at which point we silently
discard any attempt to print via this mechanism.

or am I reading it wrong?

> 
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
>  drivers/tty/hvc/hvc_xen.c |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
> index 682210d..69454a0 100644
> --- a/drivers/tty/hvc/hvc_xen.c
> +++ b/drivers/tty/hvc/hvc_xen.c
> @@ -641,7 +641,17 @@ struct console xenboot_console = {
>  
>  void xen_raw_console_write(const char *str)
>  {
> -	dom0_write_console(0, str, strlen(str));
> +	if (!xen_domain())
> +		return;
> +
> +	if (xen_pv_domain())
> +		dom0_write_console(0, str, strlen(str));
> +	else if (xen_hvm_domain() || xen_cpuid_base()) {
> +		/* The hyperpage has not been setup yet. */
> +		int i, len = strlen(str);
> +		for (i = 0; i < len; i++)
> +			 outb(str[i], 0xe9);
> +	}
>  }
>  
>  void xen_raw_printk(const char *fmt, ...)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ