From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/7] svm: Add test for selective cr0 intercept Date: Sun, 12 Sep 2010 16:42:41 +0200 Message-ID: <4C8CE6E1.2010808@redhat.com> References: <1284132850-19302-1-git-send-email-joerg.roedel@amd.com> <1284132850-19302-2-git-send-email-joerg.roedel@amd.com> <4C8C981A.9070303@redhat.com> <20100912093629.GD680@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , Marcelo Tosatti , kvm@vger.kernel.org To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:57547 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752032Ab0ILOms (ORCPT ); Sun, 12 Sep 2010 10:42:48 -0400 In-Reply-To: <20100912093629.GD680@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: On 09/12/2010 11:36 AM, Joerg Roedel wrote: > On Sun, Sep 12, 2010 at 11:06:34AM +0200, Avi Kivity wrote: >> On 09/10/2010 06:34 PM, Joerg Roedel wrote: >>> + /* >>> + * If we are here the test failed, not sure what to do now because we >>> + * are not in guest-mode anymore so we can't trigger an intercept. >>> + * Trigger a tripple-fault for now. >>> + */ >>> + printf("sel_cr0 test failed. Can not recover from this - exiting\n"); >>> + exit(1); >> Don't understand - we're still in guest mode (only running very >> slowly...). All you have to do is fall off the end here, and you'll >> exit with VMMCALL. > The bug I fixed was, that the guest continues to run in l1 mode with the > l2 rip, rsp, and rax. So if the bug is there, it continues to run in > this function, but with no chance to intercept anymore because the guest > is not longer in emulated guest mode. I see. Of course it is right to test for specific regressions, not just random features. > I agree that this is a test specific to that bug. I should probably add > another test to check if the correct intercepts are reported. The more, the merrier! -- error compiling committee.c: too many arguments to function