public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org,
	Christoph Egger <christoph.egger@amd.com>
Subject: Re: [PATCH] add sysenter/syscall emulation for 32bit compat mode
Date: Wed, 17 Jun 2009 09:51:57 +0200	[thread overview]
Message-ID: <4A38A09D.9090104@amd.com> (raw)
In-Reply-To: <20090617050236.GA23051@amit-x200.redhat.com>

Amit Shah wrote:
> Hi Andre,
> 
> On (Tue) Jun 16 2009 [15:25:13], Andre Przywara wrote:
>> sysenter/sysexit are not supported on AMD's 32bit compat mode, whereas
>> syscall is not supported on Intel's 32bit compat mode. To allow cross
>> vendor migration we emulate the missing instructions by setting up the
>> processor state accordingly.
>> The sysenter code was originally sketched by Amit Shah, it was completed,
>> debugged,  syscall added and made-to-work by Christoph Egger and polished
>> up by Andre Przywara.
>> Please note that sysret does not need to be emulated, because it will be
>> exectued in 64bit mode and returning to 32bit compat mode works on Intel.
> 
> Thanks for picking this up. You also had a testcase for this, right?
Yes. We started a Linux 64bit guest on an AMD host and migrated it to an 
Intel box. On both boxes we ran a test benchmark which is measuring the 
time needed for a few million syscalls (GETPID via syscall()), both as a 
64bit and a 32bit binary. Then we repeated the test the other way round 
(started on Intel, migrated to AMD).
Without the patch the 32bit test was aborted with SIGILL. With the patch 
everything went well, excecpt that the execution time was much longer.
Earlier we observed that this shouldn't be much of an issue in real 
life, as a tight-loop execution of GETPID is a real corner case.

Regards,
Andre.

-- 
Andre Przywara
AMD-OSRC (Dresden)
Tel: x29712


  reply	other threads:[~2009-06-17  7:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 13:25 [PATCH] add sysenter/syscall emulation for 32bit compat mode Andre Przywara
2009-06-17  5:02 ` Amit Shah
2009-06-17  7:51   ` Andre Przywara [this message]
2009-06-17  7:24 ` Avi Kivity

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=4A38A09D.9090104@amd.com \
    --to=andre.przywara@amd.com \
    --cc=amit.shah@redhat.com \
    --cc=avi@redhat.com \
    --cc=christoph.egger@amd.com \
    --cc=kvm@vger.kernel.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