public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 3/4] test: Add mode-switch test for nested svm
Date: Mon, 2 Aug 2010 16:56:03 +0200	[thread overview]
Message-ID: <20100802145603.GB18307@amd.com> (raw)
In-Reply-To: <4C56D52B.2050804@redhat.com>

On Mon, Aug 02, 2010 at 10:24:43AM -0400, Avi Kivity wrote:
>   On 08/02/2010 05:11 PM, Roedel, Joerg wrote:

> > This is testing the failure case without the nested-svm efer patch I
> > submitted last week. The sequence above (which switches from long mode
> > to real mode and back to long mode) fails without this patch.
> 
> A direct test would be to
> 
>    mov $MSR_EFER, %ecx
>    rdmsr
>    xor $EFER_NX, %eax
>    wrmsr
> 
> and see that L1 EFER was updated.
> 
> I don't object to the more complicated test, but in general prefer 
> simpler, direct tests so that when they fail we know exactly why.

True, smaller tests are generally better. But I think its good to also
test that the whole sequence works. I can add a seperate test for the
efer bug if you want.
It gets more tricky to test cr0 or cr4 writes because this will require
to put the nested guest into real-mode or protected-mode directly.

	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632


  reply	other threads:[~2010-08-02 15:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 13:33 [PATCH 0/4] qemu-kvm: Add some nested svm tests Joerg Roedel
2010-08-02 13:33 ` [PATCH 1/4] test: Run tests with asid 1 Joerg Roedel
2010-08-02 13:33 ` [PATCH 2/4] test: Add nested svm next_rip test Joerg Roedel
2010-08-02 13:33 ` [PATCH 3/4] test: Add mode-switch test for nested svm Joerg Roedel
2010-08-02 13:55   ` Avi Kivity
2010-08-02 14:11     ` Roedel, Joerg
2010-08-02 14:24       ` Avi Kivity
2010-08-02 14:56         ` Roedel, Joerg [this message]
2010-08-02 13:33 ` [PATCH 4/4] test: Add test to check if asid 0 is allowed Joerg Roedel
2010-08-02 14:44 ` [PATCH 0/4] qemu-kvm: Add some nested svm tests 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=20100802145603.GB18307@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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