From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH 10/10] KVM: MSI to INTx translate Date: Tue, 4 Nov 2008 19:40:07 +0800 Message-ID: <200811041940.07596.sheng@linux.intel.com> References: <1225428647-27614-1-git-send-email-sheng@linux.intel.com> <1225428647-27614-11-git-send-email-sheng@linux.intel.com> <4910312E.6030309@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mga05.intel.com ([192.55.52.89]:29614 "EHLO fmsmga101.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751064AbYKDLnA (ORCPT ); Tue, 4 Nov 2008 06:43:00 -0500 In-Reply-To: <4910312E.6030309@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Tuesday 04 November 2008 19:25:34 Avi Kivity wrote: > Sheng Yang wrote: > > Now we use MSI as default one, and translate MSI to INTx when guest need > > INTx rather than MSI. For legacy device, we provide support for > > non-sharing host IRQ. > > Won't we run into trouble with edge-triggered vs level-triggered. Yes, in theory, we got a little trouble, but not that much. The mechanism based on a assumption: every time guest got a interrupt, it would deassert the interrupt source sooner or later. So we take the Ack action as the same as deassert the IRQ line here (unmasked the IRQ). So the biggest known issue is, after guest got the interrupt, rather than deassert it, guest driver took the advantage of level triggered interrupt, and just want to deassert after it receive it for e.g. 10 times. Then we would got the trouble. But it's so tricky and we don't know any device by now take this way yet. Of course they can, so we also suggest to use a whitelist/blacklist for this approach. But this should work in most condition. Yeah, it's aggressive, but we think it's reasonable, and tested OK (in my limited environment). Also I heard that Hyper-V or Vmware did this. Any more concerns? Hope we didn't neglect something. -- regards Yang, Sheng