From: Paolo Bonzini <pbonzini@redhat.com>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: kvm <kvm@vger.kernel.org>, Jan Kiszka <jan.kiszka@web.de>,
Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH v3] kvm-unit-tests : Basic architecture of VMX nested test case
Date: Tue, 30 Jul 2013 16:59:44 +0200 [thread overview]
Message-ID: <51F7D4E0.8000903@redhat.com> (raw)
In-Reply-To: <CABpY8M+fghoMms4p1OrPQnpGCYcw=PAMjTCxTr4L9E_CZLhMrw@mail.gmail.com>
Il 30/07/2013 16:57, Arthur Chunqi Li ha scritto:
> On Tue, Jul 30, 2013 at 10:53 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 28/07/2013 16:00, Arthur Chunqi Li ha scritto:
>>> +
>>> + while (1) {
>>> + asm volatile (
>>> + "mov %%rsp, %%rsi\n\t"
>>> + "mov %2, %%rdi\n\t"
>>> + "vmwrite %%rsi, %%rdi\n\t"
>>> +
>>> + LOAD_GPR_C
>>> + "cmpl $0, %1\n\t"
>>> + "jne 1f\n\t"
>>> + LOAD_RFLAGS
>>> + "vmlaunch\n\t"
>>> + "jmp 2f\n\t"
>>> + "1: "
>>> + "vmresume\n\t"
>>> + "2: "
>>> + "setbe %0\n\t"
>>
>> Perhaps here add
>>
>> jbe vmx_return
>> ud2
>>
>> but it can be added in a follow-up.
>>
>>> + "vmx_return:\n\t"
>>> + SAVE_GPR_C
>>> + SAVE_RFLAGS
>>> + : "=m"(fail)
>>> + : "m"(launched), "i"(HOST_RSP)
>>> + : "rdi", "rsi", "memory", "cc"
>>> +
>>> + );
>>
>> Nice! :)
>>
>> I pushed the patch.
> Hi Paolo,
> Slow down pushing it. There's something wrong with host_rflags
> handling. I will commit another version as well as your suggestion,
> you could push that version.
Well, too late...
anyway I prefer follow-up patches because they make the differences
clearer. With a single 1200-line patch it is a bit complicated to follow.
Paolo
prev parent reply other threads:[~2013-07-30 15:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-28 14:00 [PATCH v3] kvm-unit-tests : Basic architecture of VMX nested test case Arthur Chunqi Li
2013-07-28 14:24 ` Arthur Chunqi Li
2013-07-28 14:32 ` Arthur Chunqi Li
2013-07-28 14:34 ` Gleb Natapov
2013-07-30 7:31 ` Marius Vlad
2013-07-30 7:42 ` Gleb Natapov
2013-07-30 7:59 ` Marius Vlad
2013-07-30 8:07 ` Gleb Natapov
2013-07-30 9:14 ` Arthur Chunqi Li
2013-07-30 11:51 ` Marius Vlad
2013-07-30 14:53 ` Paolo Bonzini
2013-07-30 14:57 ` Arthur Chunqi Li
2013-07-30 14:59 ` Paolo Bonzini [this message]
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=51F7D4E0.8000903@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=yzt356@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox