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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to