From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH] xen/hvc: If we use xen_raw_printk let it also work on HVM guests.
Date: Wed, 14 Aug 2013 08:46:47 -0400 [thread overview]
Message-ID: <20130814124647.GD10764@phenom.dumpdata.com> (raw)
In-Reply-To: <1376464556.9273.75.camel@hastur.hellion.org.uk>
On Wed, Aug 14, 2013 at 08:15:56AM +0100, Ian Campbell wrote:
> On Tue, 2013-08-13 at 20:10 -0400, Konrad Rzeszutek Wilk wrote:
> > On Tue, Aug 13, 2013 at 11:20:05PM +0100, Ian Campbell wrote:
> > > 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@tycho.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?
> >
> > The one I typed up above - no. The one I had sent - yes.
> >
> > But with that above mentioned comment from Daniel I think it is still
> > worth trying to do dom0_write_console and if the hypercall returns -ENOSYS
> > then fall back on 0xe9.
> >
> > And lastly send an patch to make hypercall_io work under HVM.
>
> So you didn't try under PVHVM? That's what I was asking when I asked if
> you tried it, since that is the point of this patch.
Not the one I typed up above. Just the one I sent. I have a habit of
sending patches that have been tested first - and I hadn't had the chance
yet to redo it the way above.
>
> Ian.
>
> Ian.
>
next prev parent reply other threads:[~2013-08-14 12:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 14:55 Konrad Rzeszutek Wilk
2013-08-13 20:31 ` [Xen-devel] " Ian Campbell
2013-08-13 20:53 ` Konrad Rzeszutek Wilk
2013-08-13 20:59 ` Ian Campbell
2013-08-13 22:20 ` Ian Campbell
2013-08-14 0:10 ` Konrad Rzeszutek Wilk
2013-08-14 7:15 ` Ian Campbell
2013-08-14 12:46 ` Konrad Rzeszutek Wilk [this message]
2013-08-15 14:40 ` Ian Campbell
2013-08-20 19:35 ` Konrad Rzeszutek Wilk
2013-08-21 9:15 ` Ian Campbell
2013-08-21 10:44 ` Konrad Rzeszutek Wilk
2013-08-22 7:15 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130814124647.GD10764@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome