From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 01/13] KVM: x86 emulator: add framework for instruction Date: Sat, 26 Mar 2011 11:54:53 +0200 Message-ID: <4D8DB7ED.7070803@redhat.com> References: <1301045356-25257-1-git-send-email-joerg.roedel@amd.com> <1301045356-25257-2-git-send-email-joerg.roedel@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: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586Ab1CZJy4 (ORCPT ); Sat, 26 Mar 2011 05:54:56 -0400 In-Reply-To: <1301045356-25257-2-git-send-email-joerg.roedel@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/25/2011 11:29 AM, Joerg Roedel wrote: > From: Avi Kivity > > When running in guest mode, certain instructions can be intercepted by > hardware. This also holds for nested guests running on emulated > virtualization hardware, in particular instructions emulated by kvm > itself. > > This patch adds a framework for intercepting instructions. If an > instruction is marked for interception, and if we're running in guest > mode, a callback is called to check whether an intercept is needed or > not. The callback is called at three points in time: immediately after > beginning execution, after checking privilge exceptions, and after > checking memory exception. This suits the different interception points > defined for different instructions and for the various virtualization > instruction sets. > > In addition, a new X86EMUL_INTERCEPT is defined, which any callback or > memory access may define, allowing the more complicated intercepts to be > implemented in existing callbacks. > Subject line truncated. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.