[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] VirtIO Support for Memory Regions

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] VirtIO Support for Memory Regions
Date: Wed, 24 Feb 2010 09:01:37 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 02/24/2010 05:14 AM, Avi Kivity wrote:
On 02/24/2010 08:20 AM, Cam Macdonell wrote:

Virtio is really a DMA engine. One of the nice things about it's design is that you can do things like transparent bounce buffering if needed. Adding a mechanism like this breaks this abstract and turns virtio into something
that's more than I think it should be.

For guest shared memory, what makes sense to me is to make use of uio_pci within a guest to map bars in userspace. The device can have the first bar map a small MMIO region that is tied to a ioeventfd with KVM. With just qemu, it can be tied to a normal eventfd. You can use irqfd with KVM to tie
an eventfd to the PCI irq.  Likewise, you can use a normal eventfd to
emulate that. I'd suggest using a /dev/shm file to act as the shared memory segment. You'll need a little magic within qemu_ram_alloc() to use this
(maybe qemu_ram_alloc() should take a context parameter so this can be
Part of my goal with this patch was to support systems without PCI.
My previous patch

Which? The only one I know of is s390 (and it would be a pity not to have shared memory for that).

uio provides insulation against devices and busses. When you use uio in userspace, you don't have to have direct knowledge of the fact that a device is or isn't a PCI device.


Anthony Liguori

reply via email to

[Prev in Thread] Current Thread [Next in Thread]