From: Anthony Liguori <anthony@codemonkey.ws>
To: Alexander Graf <agraf@suse.de>
Cc: "kvm@vger.kernel.org list" <kvm@vger.kernel.org>,
Amit Shah <amit.shah@redhat.com>, Avi Kivity <avi@redhat.com>,
Elsie Wahlig <elsie.wahlig@amd.com>,
"Serebrin,
Benjamin (Calendar)" <Benjamin.Serebrin@exchange.amd.com>,
"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: Cross vendor migration ideas
Date: Wed, 12 Nov 2008 09:59:45 -0600 [thread overview]
Message-ID: <491AFD71.1060105@codemonkey.ws> (raw)
In-Reply-To: <746BBAD1-41EB-4966-8A88-B50314F75EC6@suse.de>
Alexander Graf wrote:
>
> On 12.11.2008, at 16:45, Anthony Liguori wrote:
>
>> Alexander Graf wrote:
>>> Hi,
>>>
>>> I was thinking a bit about cross vendor migration recently and since
>>> we're doing open source development, I figured it might be a good
>>> idea to talk to everyone about this.
>>>
>>> So why are we having a problem?
>>>
>>> In normal operation we don't. If we're running a 32-bit kernel, we
>>> can use SYSENTER to jump from kernel<->userspace. If we're on a
>>> 64-bit kernel with 64-bit userspace, every CPU supports SYSCALL. At
>>> least Linux is being smart on this and does use exactly these two
>>> capabilities in these two cases.
>>> But if we're running in compat mode (64-bit kernel with 32-bit
>>> userspace), things differ. Intel supports only SYSENTER here, while
>>> AMD only supports SYSCALL. Both can still use int80.
>>
>> Obviously we can trap-and-emulate but that would be slow in a
>> relatively fast past.
>
> If we can do it without emulation, I'd greatly prefer it, as
> syscall/sysenter emulation in the hypervisor most probably isn't
> exactly fast ;-). And you don't really want to degrade performance
> just because you're migrating (think flashplayer here). I guess
> Windows 64-bit contains even more 32-bit parts.
>
>> I wonder if patching is an option?
>
> Windows does have background daemons that check code in runtime and
> compares that to checksums. So binary patching might break Windows
> pretty easily. I'm really wondering why the CR8 patching still works -
> maybe even that'll break with Windows 7.
The Hyper-V spec claims that the accesses to the TPR will always be in 5
byte instructions. Presumably this is to allow binary patching to be
reliable. I'm pretty sure newer versions of Windows don't access the
TPR so frequently or at least access it through CR8.
With VT on modern processors, TPR patching is unnecessary so as long as
they use CR8 on AMD processors, all should be okay.
Although here is obviously another spot where cross vendor migration
could be problematic :-)
Regards,
Anthony Liguori
> Alex
next prev parent reply other threads:[~2008-11-12 15:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 15:39 Cross vendor migration ideas Alexander Graf
2008-11-12 15:45 ` Anthony Liguori
2008-11-12 15:50 ` Alexander Graf
2008-11-12 15:59 ` Anthony Liguori [this message]
2008-11-13 0:02 ` Skywing
2008-11-13 1:48 ` Serebrin, Benjamin (Calendar)
2008-11-15 13:03 ` Andi Kleen
2008-11-15 16:39 ` Alexander Graf
2008-11-15 17:37 ` Andi Kleen
2008-11-16 15:36 ` Avi Kivity
2008-11-17 11:09 ` Andi Kleen
2008-11-17 11:59 ` Avi Kivity
2008-11-15 17:38 ` Glauber Costa
2008-11-16 14:58 ` Avi Kivity
2008-11-13 10:16 ` Avi Kivity
2008-11-12 20:06 ` Andi Kleen
2008-11-12 20:52 ` Alexander Graf
2008-11-13 10:20 ` Avi Kivity
2008-11-12 16:52 ` Amit Shah
2008-11-12 17:19 ` Alexander Graf
2008-11-13 4:35 ` Amit Shah
2008-11-13 13:38 ` Alexander Graf
2008-11-14 13:07 ` Amit Shah
2008-11-14 23:43 ` Nitin A Kamble
2008-11-17 10:07 ` Amit Shah
-- strict thread matches above, loose matches on Subject: below --
2008-11-16 0:23 Skywing
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=491AFD71.1060105@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=Benjamin.Serebrin@exchange.amd.com \
--cc=agraf@suse.de \
--cc=amit.shah@redhat.com \
--cc=avi@redhat.com \
--cc=elsie.wahlig@amd.com \
--cc=jun.nakajima@intel.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