From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [v2] Shared guest irq support Date: Wed, 15 Oct 2008 15:11:17 +0800 Message-ID: <200810151511.18028.sheng@linux.intel.com> References: <42DFA526FC41B1429CE7279EF83C6BDC01AFB25A@pdsmsx415.ccr.corp.intel.com> <200810151036.30748.sheng@linux.intel.com> <200810151233.39384.amit.shah@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, "Zhang, Xiantao" , "avi" To: Amit Shah Return-path: Received: from mga05.intel.com ([192.55.52.89]:14020 "EHLO fmsmga101.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751796AbYJOHPK (ORCPT ); Wed, 15 Oct 2008 03:15:10 -0400 In-Reply-To: <200810151233.39384.amit.shah@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Wednesday 15 October 2008 15:03:39 Amit Shah wrote: > * On Wednesday 15 Oct 2008 08:06:30 Sheng Yang wrote: > > > > @@ -4115,6 +4116,9 @@ struct kvm *kvm_arch_create_vm(void) > > > > INIT_LIST_HEAD(&kvm->arch.active_mmu_pages); > > > > INIT_LIST_HEAD(&kvm->arch.assigned_dev_head); > > > > > > > > + /* Reserve bit 0 of irq_sources_bitmap for userspace irq > > > > source */ + kvm->arch.irq_sources_bitmap = 1; > > > > + > > > > Amit, could you help to use 1 << KVM_USERSPACE_IRQ_SOURCE_ID here, I come > > to think it's more proper. :) > > This is fine; if you think there has to be a change, the change could be > done in the .h: > > - #define KVM_USERSPACE_IRQ_SOURCE_ID 0 > + #define KVM_USERSPACE_IRQ_SOURCE_ID 1 << 0 Well, I think it's a semantics thing... irq_sources_bitmap is a bitmap, it can't equal to a source_id... So maybe set_bit(KVM_USERSPACE_IRQ_SOURCE_ID, &kvm->arch.irq_sources_bitmap); is the best way here. :) -- regards Yang, Sheng