[PATCH 1/2] virtio: support unlocked queue poll

2013-07-08 Thread Michael S. Tsirkin
This adds a way to check ring empty state after enable_cb outside any locks. Will be used by virtio_net. Note: there's room for more optimization: caller is likely to have a memory barrier already, which means we might be able to get rid of a barrier here. Deferring this optimization until we do

[PATCH 2/2] virtio_net: fix race in RX VQ processing

2013-07-08 Thread Michael S. Tsirkin
virtio net called virtqueue_enable_cq on RX path after napi_complete, so with NAPI_STATE_SCHED clear - outside the implicit napi lock. This violates the requirement to synchronize virtqueue_enable_cq wrt virtqueue_add_buf. In particular, used event can move backwards, causing us to lose interrupts

[PATCH] virtio-net: put virtio net header inline with data

2013-07-08 Thread Michael S. Tsirkin
For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since existing hypervisors require that header is the first s/g element, we need a feature bit for this. Signed-off-by: Michael S. Tsirk

[PULL] vhost: cleanups and fixes

2013-07-08 Thread Michael S. Tsirkin
The following changes since commit 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376: Linux 3.10 (2013-06-30 15:13:29 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to 09a34c8404c1d4c5782de319c02e1

Re: [PATCH 2/2] virtio_net: fix race in RX VQ processing

2013-07-08 Thread Sergei Shtylyov
Hello. On 08-07-2013 13:04, Michael S. Tsirkin wrote: virtio net called virtqueue_enable_cq on RX path after napi_complete, so with NAPI_STATE_SCHED clear - outside the implicit napi lock. This violates the requirement to synchronize virtqueue_enable_cq wrt virtqueue_add_buf. In particular, us

Re: [PATCH 2/2] virtio_net: fix race in RX VQ processing

2013-07-08 Thread Michael S. Tsirkin
On Mon, Jul 08, 2013 at 04:52:26PM +0400, Sergei Shtylyov wrote: > Hello. > > On 08-07-2013 13:04, Michael S. Tsirkin wrote: > > >virtio net called virtqueue_enable_cq on RX path after napi_complete, so > >with NAPI_STATE_SCHED clear - outside the implicit napi lock. > >This violates the requirem

Re: [PATCH] xen: remove unused Kconfig parameter

2013-07-08 Thread Konrad Rzeszutek Wilk
On Mon, Jul 08, 2013 at 08:28:24AM +0200, Michael Opdenacker wrote: > This patch proposes to remove the XEN_PRIVILEGED_GUEST kernel > configuration parameter defined in arch/x86/xen/Kconfig, but used > nowhere in the makefiles and source code. > > This dummy parameter was added 3 years back, and i

Re: [PATCH] xen: remove unused Kconfig parameter

2013-07-08 Thread H. Peter Anvin
On 07/08/2013 12:28 PM, Konrad Rzeszutek Wilk wrote: > On Mon, Jul 08, 2013 at 08:28:24AM +0200, Michael Opdenacker wrote: >> This patch proposes to remove the XEN_PRIVILEGED_GUEST kernel >> configuration parameter defined in arch/x86/xen/Kconfig, but used >> nowhere in the makefiles and source cod

Re: [Xen-devel] [PATCH] xen: remove unused Kconfig parameter

2013-07-08 Thread H. Peter Anvin
On 07/08/2013 12:34 PM, Matt Wilson wrote: > > For reference, here's a related Debian bug report: > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633127 > > Summary: grub2 scripts parse /boot/config-$(uname -r) > What. The. Fuck. -hpa

Re: [PATCH] virtio-spec: add field for scsi command size

2013-07-08 Thread Rusty Russell
Paolo Bonzini writes: > Il 04/07/2013 09:39, Michael S. Tsirkin ha scritto: >>> > Transport feature bits are still negotiated per device though. >>> > virtio-scsi devices in QEMU would not negotiate that feature. >>> > >>> > Paolo >>> > > > So I think it needs to be a per-device feature bit

Re: [Xen-devel] [PATCH] xen: remove unused Kconfig parameter

2013-07-08 Thread Paul Bolle
On Mon, 2013-07-08 at 22:58 +0200, Borislav Petkov wrote: > On Mon, Jul 08, 2013 at 01:29:40PM -0700, H. Peter Anvin wrote: > > What. The. Fuck. > > This is just marvellous: grub2 has a bunch of scripts in /etc/grub.d > which rely on the presence of kernel config files in /boot or / and > greps th

Re: [Xen-devel] [PATCH] xen: remove unused Kconfig parameter

2013-07-08 Thread Konrad Rzeszutek Wilk
Paul Bolle wrote: >On Mon, 2013-07-08 at 22:58 +0200, Borislav Petkov wrote: >> On Mon, Jul 08, 2013 at 01:29:40PM -0700, H. Peter Anvin wrote: >> > What. The. Fuck. >> >> This is just marvellous: grub2 has a bunch of scripts in /etc/grub.d >> which rely on the presence of kernel config files in

Re: [PATCH] virtio-spec: add field for scsi command size

2013-07-08 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Mon, Jul 08, 2013 at 10:51:39AM +0930, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> > On Thu, Jul 04, 2013 at 10:49:42AM +0300, Michael S. Tsirkin wrote: >> >> > case). >> >> > >> >> > Regrettably, initial driver implementations used simple layouts >>

Re: [PATCH] virtio-net: put virtio net header inline with data

2013-07-08 Thread Rusty Russell
"Michael S. Tsirkin" writes: > For small packets we can simplify xmit processing > by linearizing buffers with the header: > most packets seem to have enough head room > we can use for this purpose. > Since existing hypervisors require that header > is the first s/g element, we need a feature bit

Re: [PATCH 1/2] virtio: support unlocked queue poll

2013-07-08 Thread Jason Wang
On 07/08/2013 05:04 PM, Michael S. Tsirkin wrote: > This adds a way to check ring empty state after enable_cb outside any > locks. Will be used by virtio_net. > > Note: there's room for more optimization: caller is likely to have a > memory barrier already, which means we might be able to get rid o

Re: [PATCH 2/2] virtio_net: fix race in RX VQ processing

2013-07-08 Thread Jason Wang
On 07/08/2013 05:04 PM, Michael S. Tsirkin wrote: > virtio net called virtqueue_enable_cq on RX path after napi_complete, so > with NAPI_STATE_SCHED clear - outside the implicit napi lock. > This violates the requirement to synchronize virtqueue_enable_cq wrt > virtqueue_add_buf. In particular, us

[PATCH v2 2/2] virtio_net: fix race in RX VQ processing

2013-07-08 Thread Michael S. Tsirkin
virtio net called virtqueue_enable_cq on RX path after napi_complete, so with NAPI_STATE_SCHED clear - outside the implicit napi lock. This violates the requirement to synchronize virtqueue_enable_cq wrt virtqueue_add_buf. In particular, used event can move backwards, causing us to lose interrupts

[PATCH v2 1/2] virtio: support unlocked queue poll

2013-07-08 Thread Michael S. Tsirkin
This adds a way to check ring empty state after enable_cb outside any locks. Will be used by virtio_net. Note: there's room for more optimization: caller is likely to have a memory barrier already, which means we might be able to get rid of a barrier here. Deferring this optimization until we do

Re: [PATCH] virtio-net: put virtio net header inline with data

2013-07-08 Thread Michael S. Tsirkin
On Tue, Jul 09, 2013 at 11:46:23AM +0930, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > For small packets we can simplify xmit processing > > by linearizing buffers with the header: > > most packets seem to have enough head room > > we can use for this purpose. > > Since existing hypervi