public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Lyon <pugs@lyon-about.com>
To: Pawel Moll <pawel.moll@arm.com>
Cc: "rusty@rustcorp.com.au" <rusty@rustcorp.com.au>,
	"mst@redhat.com" <mst@redhat.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: BUG: virtio_mmio multi-queue competely  broken -- virtio *registers* considered harmful
Date: Thu, 02 May 2013 08:17:41 -0700	[thread overview]
Message-ID: <51828395.8040701@lyon-about.com> (raw)
In-Reply-To: <1367494640.25984.54.camel@hornet>

On 05/02/2013 04:37 AM, Pawel Moll wrote:
> 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 from
>> virtio_pci.  These registers, in particular VIRTIO_MMIO_QUEUE_SEL and
>> VIRTIO_PCI_QUEUE_SEL,
>> are active in nature, and not just passive like a normal memory
>> location.  Thus, the host side must react immediately upon write of
>> these registers to map some other registers (queue address, size, etc)
>> to queue-specific locations.  This is just not possible for mmio, and, I
>> 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 without
> 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ł
>
>
Ah, my mistake. I was assuming that mmio just used shared memory 
regions, not that there was emulated IO registers.  I was driven to that
assumption by looking at the rpmsg use case in which a main processor 
talks to satellite processors - there seems to be no
hypervisor and therefore no emulated IO in that case.  However, looking 
deeper, it seems that rpmsg has its own notify mechanism anyways, so it
is not so cleanly layered on virtio.  Also, for my needs, I want rpmsg 
and virtio_net.

In my desire to use a PCIe card to emulate virtio I am also talking 
about a non-hypervisor use case - just  leveraging the virtio framework 
for inter-processor
communication.  Virtio is so close to being the answer it woud be a 
shame if it wasn't. So I would propose that virtio be restructured such 
that the configuration
layout is identical among virtio transports and acts like memory, the 
configuration location is transport-specific, and the notification 
mechanism is transport specific - but I
could live writing to some queue specific memory/io location (for both 
pci and mmio).



      reply	other threads:[~2013-05-02 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02  3:40 BUG: virtio_mmio multi-queue competely broken -- virtio *registers* considered harmful Tom Lyon
2013-05-02  5:25 ` Michael S. Tsirkin
2013-05-02 15:05   ` Tom Lyon
2013-05-02 11:37 ` Pawel Moll
2013-05-02 15:17   ` Tom Lyon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51828395.8040701@lyon-about.com \
    --to=pugs@lyon-about.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pawel.moll@arm.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox