All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Egger, Christoph" <chegger@amazon.de>
To: Jan Beulich <JBeulich@suse.com>, hanyandong <hanyandong@iie.ac.cn>
Cc: xen-devel@lists.xen.org
Subject: Re: there is no sysret in X86_emulate, why?
Date: Thu, 30 Oct 2014 12:22:37 +0200	[thread overview]
Message-ID: <5452116D.3060906@amazon.de> (raw)
In-Reply-To: <54521B4D0200007800043677@mail.emea.novell.com>

On 2014/10/30 12:04, Jan Beulich wrote:
>>>> On 30.10.14 at 02:46, <hanyandong@iie.ac.cn> wrote:
>> (1)In x86_emulate(), there are sysenter/sysexit, syscall. But why no sysret?
> 
> Perhaps on the basis that this already when introduced was only
> meant to be usable on 64-bit hypervisors, and 64-bit capable CPUs
> always support SYSRET (whereas the scope of support for the
> other three varies)? Christoph, you added that code years ago - is
> there any other explanation for this?

Back at that time I was working on live migration between AMD and Intel
forth and back. The sysenter/sysexit emulation covers the case of
running 32bit binaries in compat mode in a 64bit DomU.
The syscall emulation also covers a case I do not remember anymore.

Christoph

> 
>> (2)I want to iuntercept syscall/sysret, so I unset the EFER.SCE, so 
>> syscall/sysret will trap into Xen, then I emulate syscall/sysret.
>> But  I only see syscall and did not see one sysret,  the guest run as usual. 
>>  any one can give me an hint?
> 
> Assuming you did everything correctly, this seems odd. But in any
> event I'd suggest confirming such behavior in a native environment
> first.
> 
> Jan
> 

  reply	other threads:[~2014-10-30 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  1:46 there is no sysret in X86_emulate, why? hanyandong
2014-10-30 10:04 ` Jan Beulich
2014-10-30 10:22   ` Egger, Christoph [this message]
2014-10-31  1:56     ` hanyandong
2014-10-30 11:59   ` hanyandong

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=5452116D.3060906@amazon.de \
    --to=chegger@amazon.de \
    --cc=JBeulich@suse.com \
    --cc=hanyandong@iie.ac.cn \
    --cc=xen-devel@lists.xen.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 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.