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 23:20:05 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC:	<xen-devel@...ts.xenproject.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [Xen-devel] [PATCH] xen/hvc: If we use xen_raw_printk let it
 also work on HVM guests.

On Tue, 2013-08-13 at 21:59 +0100, Ian Campbell wrote:

> > What it should be is:
> > > >  
> > > >  void xen_raw_console_write(const char *str)
> > > >  {
> > > > -	dom0_write_console(0, str, strlen(str));
> > > > +	if (!xen_domain())
> > > > +		return;
> > > > +
> > > > +	if (xen_pv_domain())
> >             xen_domain()
> > 
> > > > +		dom0_write_console(0, str, strlen(str));
> > > > +	else if (xen_hvm_domain() || xen_cpuid_base()) {
> >      
> > 	else if (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);
> > > > +	}
> > > >  }
> > 
> > And then that should adhere to what I wrote up.
> 
> I think it does too.

Except as Daniel notes in <520A7145.5010306@...ho.nsa.gov> for unrelated
reasons:

>         HVM guests can still use the PV output - they just need to use the console
>         write hypercall instead of the HVM I/O port. I would think that PVH guests
>         would default to using the hypercall as it is more efficient (it takes a
>         string rather than one character per write).
>         
>         Actually, checking... the console_io hypercall would need to be added to
>         the hvm_hypercall{32,64}_table for an HVM guest to be able to use it; they
>         currently must use the I/O port. I didn't check the PVH patches.

Or did you actually try this code and it worked?

Ian.

--
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