All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@novell.com>,
	Ross Philipson <Ross.Philipson@citrix.com>
Cc: George Dunlap <dunlapg@gmail.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Enble 6 argument hypercalls for HVMs
Date: Wed, 15 Dec 2010 11:43:45 +0000	[thread overview]
Message-ID: <C92E5A71.2907C%keir@xen.org> (raw)
In-Reply-To: <4D08A920020000780002811F@vpn.id2.novell.com>

On 15/12/2010 10:40, "Jan Beulich" <JBeulich@novell.com> wrote:

>>>> On 15.12.10 at 11:06, Keir Fraser <keir@xen.org> wrote:
>> On 15/12/2010 09:07, "Jan Beulich" <JBeulich@novell.com> wrote:
>> 
>>>>>> On 14.12.10 at 23:16, Ross Philipson <Ross.Philipson@citrix.com> wrote:
>>>> Enable 6 argument hypercalls for HVMs. The hypercall code handles a sixth
>>>> argument in EBP or R9 but the HVM code is not passing the value.
>>>> 
>>>> Signed-off-by: Ross Philipson <ross.philipson@citrix.com>
>>> 
>>> I'm curious what hypercall there is that takes 6 arguments,
>>> particularly on 64-bit (where the maximum so far is 4).
>> 
>> The v4v hypercalls in XenClient (not as yet submitted upstream) take 6
>> arguments. Multicalls also need fixing up for a sixth argument, making
>> everything consistent with existing PV hypercall logic.
> 
> I would generally take this as an indication that this actually works,
> but at least with tracing enabled I can't see how it would on 64-bit
> (note the last two reloads):

Yes, well, obviously noone has tried 6-arg (or 5-arg!) hypercalls from a
64-bit PV guest with tracing enabled. The code appears obviously wrong here.
Cc'ing George -- he should be able to test this and submit the obvious
patch. This looks like a cut-n-paste error from x86_64/compat/entry.S into
x86_64/entry.S -- it wouldn't have been picked up by George because we don't
generally run any 64-bit PV guests.

>         call  trace_hypercall
>         /* Now restore all the registers that trace_hypercall clobbered */
>         movq  UREGS_rax+SHADOW_BYTES(%rsp),%rax   /* Hypercall #  */
>         movq  UREGS_rdi+SHADOW_BYTES(%rsp),%rdi   /* Arg 1        */
>         movq  UREGS_rsi+SHADOW_BYTES(%rsp),%rsi   /* Arg 2        */
>         movq  UREGS_rdx+SHADOW_BYTES(%rsp),%rdx   /* Arg 3        */
>         movq  UREGS_r10+SHADOW_BYTES(%rsp),%rcx   /* Arg 4        */
>         movq  UREGS_rdi+SHADOW_BYTES(%rsp),%r8    /* Arg 5        */
>         movq  UREGS_rbp+SHADOW_BYTES(%rsp),%r9    /* Arg 6        */
> 
> Looking at this code also makes me wonder once again whether
> it really is a good idea to have a generally not taken forward
> branch here.

Which generally not-taken branch? The 'je 1f' instruction generally *will*
be taken!

 -- Keir

> Jan
> 

  reply	other threads:[~2010-12-15 11:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 22:16 [PATCH] Enble 6 argument hypercalls for HVMs Ross Philipson
2010-12-15  9:07 ` Jan Beulich
2010-12-15 10:06   ` Keir Fraser
2010-12-15 10:40     ` Jan Beulich
2010-12-15 11:43       ` Keir Fraser [this message]
2010-12-15 12:12         ` Jan Beulich
2010-12-15 13:20           ` Keir Fraser

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=C92E5A71.2907C%keir@xen.org \
    --to=keir@xen.org \
    --cc=JBeulich@novell.com \
    --cc=Ross.Philipson@citrix.com \
    --cc=dunlapg@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.