From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 3/9] Implement GIF, clgi and stgi v5 Date: Thu, 30 Oct 2008 14:11:24 -0500 Message-ID: <490A06DC.5030107@codemonkey.ws> 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> <4909F87A.1090908@redhat.com> 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: Avi Kivity Return-path: Received: from hs-out-0708.google.com ([64.233.178.243]:63548 "EHLO hs-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752907AbYJ3TL3 (ORCPT ); Thu, 30 Oct 2008 15:11:29 -0400 Received: by hs-out-0708.google.com with SMTP id 4so384167hsl.5 for ; Thu, 30 Oct 2008 12:11:28 -0700 (PDT) In-Reply-To: <4909F87A.1090908@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > 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. Fair enough. Regards, Anthony Liguori >> 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. >