From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 04/10] Implement GIF, clgi and stgi v4 Date: Sun, 19 Oct 2008 11:46:51 +0200 Message-ID: <48FB020B.302@redhat.com> References: <1224099093-10985-1-git-send-email-agraf@suse.de> <1224099093-10985-2-git-send-email-agraf@suse.de> <1224099093-10985-3-git-send-email-agraf@suse.de> <1224099093-10985-4-git-send-email-agraf@suse.de> <1224099093-10985-5-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, joro@8bytes.org, anthony@codemonkey.ws, avi@qumranet.com To: Alexander Graf Return-path: Received: from mx2.redhat.com ([66.187.237.31]:36789 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbYJSJrD (ORCPT ); Sun, 19 Oct 2008 05:47:03 -0400 In-Reply-To: <1224099093-10985-5-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: > This patch implements the GIF flag and the clgi and stgi instructions that > set this flag. Only if the flag is set (default), interrupts can be received by > the CPU. > > To keep the information about that somewhere, this patch adds a new hidden > flags vector. that is used to store information that does not go into the > vmcb, but is SVM specific. > > diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h > index 4b06ca8..dc30b7b 100644 > --- a/include/asm-x86/kvm_host.h > +++ b/include/asm-x86/kvm_host.h > @@ -253,6 +253,7 @@ struct kvm_vcpu_arch { > unsigned long cr3; > unsigned long cr4; > unsigned long cr8; > + u32 hflags; > u64 pdptrs[4]; /* pae */ > u64 shadow_efer; > u64 apic_base; > @@ -734,6 +735,8 @@ enum { > TASK_SWITCH_GATE = 3, > }; > > +#define HF_GIF_MASK (1 << 0) > + Why not use bool for gif? It will improve code readability. -- error compiling committee.c: too many arguments to function