[PATCH] virtio-spec: clarify ro/rw bits and updating rule of virtio-net status field

2012-03-19 Thread Jason Wang
This patch clarifies VIRTIO_NET_S_LINK_UP as a read-only bit and VIRTIO_NET_S_ANNOUNCE as a read-writable bit. Also introduce the write 1 to clear semantics for all read-writable bits of config status field. This could help to reduce the config status field updating race between host and guest and

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Anthony Liguori
On 03/19/2012 06:52 PM, Rusty Russell wrote: On Mon, 19 Mar 2012 17:13:06 -0500, Anthony Liguori wrote: Maybe just make this a hidden option like x-miio? x-violate-the-virtio-spec-to-trick-old-linux-drivers-into-working-on-power? "To configure the device, we use the first I/O region of the

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Rusty Russell
On Mon, 19 Mar 2012 17:13:06 -0500, Anthony Liguori wrote: > > Maybe just make this a hidden option like x-miio? > > x-violate-the-virtio-spec-to-trick-old-linux-drivers-into-working-on-power? "To configure the device, we use the first I/O region of the PCI device." Meh, it does sound a little

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Anthony Liguori
On 03/19/2012 04:29 PM, Michael S. Tsirkin wrote: On Mon, Mar 19, 2012 at 04:07:45PM -0500, Anthony Liguori wrote: On 03/19/2012 03:49 PM, Michael S. Tsirkin wrote: On Mon, Mar 19, 2012 at 02:19:33PM -0500, Anthony Liguori wrote: On 03/19/2012 10:56 AM, Michael S. Tsirkin wrote: Currently vir

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Michael S. Tsirkin
On Mon, Mar 19, 2012 at 04:07:45PM -0500, Anthony Liguori wrote: > On 03/19/2012 03:49 PM, Michael S. Tsirkin wrote: > >On Mon, Mar 19, 2012 at 02:19:33PM -0500, Anthony Liguori wrote: > >>On 03/19/2012 10:56 AM, Michael S. Tsirkin wrote: > >>>Currently virtio-pci is specified so that configuration

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Michael S. Tsirkin
On Mon, Mar 19, 2012 at 04:07:45PM -0500, Anthony Liguori wrote: > On 03/19/2012 03:49 PM, Michael S. Tsirkin wrote: > >On Mon, Mar 19, 2012 at 02:19:33PM -0500, Anthony Liguori wrote: > >>On 03/19/2012 10:56 AM, Michael S. Tsirkin wrote: > >>>Currently virtio-pci is specified so that configuration

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Anthony Liguori
On 03/19/2012 03:49 PM, Michael S. Tsirkin wrote: On Mon, Mar 19, 2012 at 02:19:33PM -0500, Anthony Liguori wrote: On 03/19/2012 10:56 AM, Michael S. Tsirkin wrote: Currently virtio-pci is specified so that configuration of the device is done through a PCI IO space (via BAR 0 of the virtual PCI

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Michael S. Tsirkin
On Mon, Mar 19, 2012 at 02:19:33PM -0500, Anthony Liguori wrote: > On 03/19/2012 10:56 AM, Michael S. Tsirkin wrote: > >Currently virtio-pci is specified so that configuration of the device is > >done through a PCI IO space (via BAR 0 of the virtual PCI device). > >However, Linux guests happen to u

[PATCHv2] virtio-pci: add MMIO property

2012-03-19 Thread Michael S. Tsirkin
Currently virtio-pci is specified so that configuration of the device is done through a PCI IO space (via BAR 0 of the virtual PCI device). However, Linux guests happen to use ioread/iowrite/iomap primitives for access, and these work uniformly across memory/io BARs. While PCI IO accesses are fast

Re: [Qemu-devel] [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Anthony Liguori
On 03/19/2012 10:56 AM, Michael S. Tsirkin wrote: Currently virtio-pci is specified so that configuration of the device is done through a PCI IO space (via BAR 0 of the virtual PCI device). However, Linux guests happen to use ioread/iowrite/iomap primitives for access, and these work uniformly ac

Re: [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Michael S. Tsirkin
On Mon, Mar 19, 2012 at 07:58:12PM +0200, Avi Kivity wrote: > On 03/19/2012 05:56 PM, Michael S. Tsirkin wrote: > > Currently virtio-pci is specified so that configuration of the device is > > done through a PCI IO space (via BAR 0 of the virtual PCI device). > > However, Linux guests happen to use

Re: [PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Avi Kivity
On 03/19/2012 05:56 PM, Michael S. Tsirkin wrote: > Currently virtio-pci is specified so that configuration of the device is > done through a PCI IO space (via BAR 0 of the virtual PCI device). > However, Linux guests happen to use ioread/iowrite/iomap primitives > for access, and these work unifor

vhost question

2012-03-19 Thread Steve Glass
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm using virtio to implement a mac80211 device in the guest. On the host side I plan to use a simple network simulation to control delivery of frames between guests. Right now I've used the vhost approach on the host side and can pass buffers fr

vhost question

2012-03-19 Thread Steve Glass
Hi, I'm using virtio to implement a mac80211 device in the guest. On the host side I plan to use a simple network simulation to control delivery of frames between guests. Right now I've used the vhost approach on the host side and can pass buffers from guest to host and back using virtio. My imme

[PATCH RFC] virtio-pci: add MMIO property

2012-03-19 Thread Michael S. Tsirkin
Currently virtio-pci is specified so that configuration of the device is done through a PCI IO space (via BAR 0 of the virtual PCI device). However, Linux guests happen to use ioread/iowrite/iomap primitives for access, and these work uniformly across memory/io BARs. While PCI IO accesses are fast

Re: [V4 PATCH] virtio-net: send gratuitous packet when needed

2012-03-19 Thread Jason Wang
On 03/19/2012 04:44 PM, Michael S. Tsirkin wrote: On Mon, Mar 19, 2012 at 12:46:29PM +1030, Rusty Russell wrote: On Tue, 13 Mar 2012 16:33:31 +0200, "Michael S. Tsirkin" wrote: diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 970d5a2..44a38d6 100644 --- a/include/lin

Re: [V4 PATCH] virtio-net: send gratuitous packet when needed

2012-03-19 Thread Michael S. Tsirkin
On Mon, Mar 19, 2012 at 12:46:29PM +1030, Rusty Russell wrote: > On Tue, 13 Mar 2012 16:33:31 +0200, "Michael S. Tsirkin" > wrote: > > > diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h > > > index 970d5a2..44a38d6 100644 > > > --- a/include/linux/virtio_net.h > > > +++ b/incl

Re: [PATCH] virtio-spec: split virtio-net device status filed into ro and rw byte

2012-03-19 Thread Michael S. Tsirkin
On Mon, Mar 19, 2012 at 11:09:24AM +0800, Jason Wang wrote: > On 03/18/2012 08:22 PM, Michael S. Tsirkin wrote: > >On Fri, Mar 16, 2012 at 11:20:26PM +0800, Jason Wang wrote: > >>This patch splits the device status field of virtio-net into ro and rw > >>byte. This would simplify the implementation