From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 1/7] svm: Add test for selective cr0 intercept Date: Sun, 12 Sep 2010 11:36:30 +0200 Message-ID: <20100912093629.GD680@8bytes.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Joerg Roedel , Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from 8bytes.org ([88.198.83.132]:59650 "EHLO 8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399Ab0ILJgb (ORCPT ); Sun, 12 Sep 2010 05:36:31 -0400 Content-Disposition: inline In-Reply-To: <4C8C981A.9070303@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 agree that this is a test specific to that bug. I should probably add another test to check if the correct intercepts are reported. Joerg