From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X Date: Wed, 18 Feb 2009 19:38:54 +0800 Message-ID: <200902181938.54577.sheng@linux.intel.com> References: <1234950262-4142-1-git-send-email-sheng@linux.intel.com> <200902181913.22815.sheng@linux.intel.com> <499BF118.3060703@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mga10.intel.com ([192.55.52.92]:21047 "EHLO fmsmga102.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751339AbZBRLi6 (ORCPT ); Wed, 18 Feb 2009 06:38:58 -0500 In-Reply-To: <499BF118.3060703@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Wednesday 18 February 2009 19:29:28 Avi Kivity wrote: > Sheng Yang wrote: > > On Wednesday 18 February 2009 19:00:53 Avi Kivity wrote: > >> Sheng Yang wrote: > >>> We have to handle more than one interrupt with one handler for MSI-X. > >>> So we need a bitmap to track the triggered interrupts. > >> > >> Can you explain why? > > > > Or how can we know which interrupt happened? Current we scheduled the > > work later, and no more irq information available at that time. > > We can have a work_struct per interrupt, or we can set a flag in the > msix array that the interrupt is pending. As I know, work_struct itself don't take any data. And host MSI-X array is a type of msix_entry* which is used for pci_enable_msix. But modifying type of guest msix entries should be OK. I will try. -- regards Yang, Sheng