From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/4] test: Add mode-switch test for nested svm Date: Mon, 02 Aug 2010 17:24:43 +0300 Message-ID: <4C56D52B.2050804@redhat.com> References: <1280756016-11330-1-git-send-email-joerg.roedel@amd.com> <1280756016-11330-4-git-send-email-joerg.roedel@amd.com> <4C56CE5E.2080908@redhat.com> <20100802141146.GB25471@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , "kvm@vger.kernel.org" To: "Roedel, Joerg" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4151 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827Ab0HBOYu (ORCPT ); Mon, 2 Aug 2010 10:24:50 -0400 In-Reply-To: <20100802141146.GB25471@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/02/2010 05:11 PM, Roedel, Joerg wrote: > >> What is this testing exactly? There is no svm function directly >> associated with mode switch. In fact, most L1s will intercept cr and >> efer access and emulate the mode switch, rather than letting L2 perform >> the mode switch directly. > 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. -- error compiling committee.c: too many arguments to function