From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEOT1-0004PG-LS for qemu-devel@nongnu.org; Wed, 10 Jun 2009 10:07:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEOSv-0004Md-Ra for qemu-devel@nongnu.org; Wed, 10 Jun 2009 10:07:50 -0400 Received: from [199.232.76.173] (port=44628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEOSv-0004MX-LX for qemu-devel@nongnu.org; Wed, 10 Jun 2009 10:07:45 -0400 Received: from mx20.gnu.org ([199.232.41.8]:57208) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MEOSv-00024t-9L for qemu-devel@nongnu.org; Wed, 10 Jun 2009 10:07:45 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEOSt-000118-Bh for qemu-devel@nongnu.org; Wed, 10 Jun 2009 10:07:43 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 05/11] qemu: MSI-X support functions Date: Wed, 10 Jun 2009 15:07:34 +0100 References: <200906100019.59981.paul@codesourcery.com> <20090610094604.GD6844@redhat.com> In-Reply-To: <20090610094604.GD6844@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906101507.39823.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Carsten Otte , kvm@vger.kernel.org, Rusty Russell , qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, Blue Swirl , Christian Borntraeger , Avi Kivity > > > Note that platform must set a flag to declare MSI supported. > > > For PC this will be set by APIC. > > > > This sounds wrong. The device shouldn't know or care whether the system > > has a MSI capable interrupt controller. That's for the guest OS to figure > > out. > > You are right of course. In theory there's nothing that breaks if I > set this flag to on, on all platforms. OTOH if qemu emulates some > controller incorrectly, guest might misdetect MSI support in the > controller, and things will break horribly. > > It seems safer to have a flag that can be enabled by people > that know about a specific platform. No. The solution is to fix whatever is broken. If we really need to avoid MSI-X capable devices then that should be done explicity per-device. i.e. you have a different virtio-net device that does not use MSI-X. Paul