From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/9] Implement GIF, clgi and stgi v5 Date: Thu, 30 Oct 2008 20:10:02 +0200 Message-ID: <4909F87A.1090908@redhat.com> References: <1224522290-11740-1-git-send-email-agraf@suse.de> <1224522290-11740-2-git-send-email-agraf@suse.de> <1224522290-11740-3-git-send-email-agraf@suse.de> <1224522290-11740-4-git-send-email-agraf@suse.de> <4909F6B1.4060503@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Graf , kvm@vger.kernel.org, joro@8bytes.org To: Anthony Liguori Return-path: Received: from mx2.redhat.com ([66.187.237.31]:33339 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755562AbYJ3SKA (ORCPT ); Thu, 30 Oct 2008 14:10:00 -0400 In-Reply-To: <4909F6B1.4060503@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: >> >> +static int stgi_interception(struct vcpu_svm *svm, struct kvm_run >> *kvm_run) >> +{ > > It feels a little strange to see this here instead of an > implementation of stgi/clgi in x86_emulate. Any reason for not going > that route? > We already know the instruction is stgi, no need to go through the guest page tables to fetch it. We do the same thing for all instructions for which we have the length and all the information necessary to execute it. > GIF somehow needs exposure to userspace too, right? Otherwise, when > using -no-kernel-apic, userspace may try to inject an interrupt when > the guest cannot handle it, right? Hmm, right, it needs to close the interrupt window. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.