From: Pawel Moll Subject: Re: BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful Date: Thu, 02 May 2013 12:37:20 +0100 Message-ID: <1367494640.25984.54.camel@hornet> References: <5181E046.7000309@lyon-about.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "rusty@rustcorp.com.au" , "mst@redhat.com" , "virtualization@lists.linux-foundation.org" , "kvm@vger.kernel.org" To: Tom Lyon Return-path: Received: from service87.mimecast.com ([91.220.42.44]:37901 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758091Ab3EBLhX convert rfc822-to-8bit (ORCPT ); Thu, 2 May 2013 07:37:23 -0400 In-Reply-To: <5181E046.7000309@lyon-about.com> Sender: kvm-owner@vger.kernel.org List-ID: Hi Tom, On Thu, 2013-05-02 at 04:40 +0100, Tom Lyon wrote: > Virtiio_mmio attempts to mimic the layout of some control registers f= rom=20 > virtio_pci. These registers, in particular VIRTIO_MMIO_QUEUE_SEL and= =20 > VIRTIO_PCI_QUEUE_SEL, > are active in nature, and not just passive like a normal memory=20 > location. Thus, the host side must react immediately upon write of=20 > these registers to map some other registers (queue address, size, etc= )=20 > to queue-specific locations. This is just not possible for mmio, and= , I=20 > would argue, not desirable for PCI either. Could you, please, elaborate more about the environment you are talking about here? The intention of the MMIO device is to behave like a normal memory mapped peripheral, say serial port. In the world of architecture withou= t separate I/O address space (like ARM, MIPS, SH-4 to name only those I know anything about), such peripherals are usually mapped into the virtual address space with special attributes, eg. guaranteeing transactions order. That's why the host can "react immediately" and to my knowledge multi-queue virtio devices work just fine. I'd love see comments from someone with x86 expertise in such areas. Maybe we are missing some memory barriers here? So the host implementation would have a chance to react to the QUEUE_SEL access before servicing other transactions? Regards Pawe=C5=82