From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/3] KVM: SVM: Restore correct registers after sel_cr0 intercept emulation Date: Sun, 05 Sep 2010 10:09:14 +0300 Message-ID: <4C83421A.7070501@redhat.com> References: <1283441387-7378-1-git-send-email-joerg.roedel@amd.com> <1283441387-7378-3-git-send-email-joerg.roedel@amd.com> <4C7FCA7A.1020809@redhat.com> <20100902162934.GD1964@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" , "linux-kernel@vger.kernel.org" , "stable@kernel.org" To: "Roedel, Joerg" Return-path: In-Reply-To: <20100902162934.GD1964@amd.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/02/2010 07:29 PM, Roedel, Joerg wrote: > >> I agree. We can probably use X86EMUL_PROPAGATE_FAULT to abort >> emulation, but looking at the code, it will take some refactoring. > I thought of an X86EMUL_INTERCEPTED. An architecture specific function > is called after instruction decoding which checks if an intercept is > necessary. If it returns X86EMUL_INTERCEPTED then the instruction > emulation is discarded and kvm goes straight back into the guest. Yes, this sounds just right. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.