Re: [PATCHv2 10/14] virtio_net: limit xmit polling

2011-05-27 Thread Rusty Russell
On Wed, 25 May 2011 09:07:59 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Wed, May 25, 2011 at 11:05:04AM +0930, Rusty Russell wrote: Hmm I'm not sure I got it, need to think about this. I'd like to go back and document how my design was supposed to work. This really should have been

Re: [PATCHv2 10/14] virtio_net: limit xmit polling

2011-05-30 Thread Rusty Russell
On Sat, 28 May 2011 23:02:04 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, May 26, 2011 at 12:58:23PM +0930, Rusty Russell wrote: ie. free two packets for every one we're about to add. For steady state that would work really well. Sure, with indirect buffers, but if we don't

Re: [PATCHv3] virtio-spec: 64 bit features, used/avail event, fixes

2011-06-01 Thread Rusty Russell
On Wed, 1 Jun 2011 13:25:48 +0300, Michael S. Tsirkin m...@redhat.com wrote: Add an option to modify the notificatin hand-off in virtio to be basically like Xen: each side published an index, the other side only triggers an event when it crosses that index value (Xen event indexes start at 1,

Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

2011-06-01 Thread Rusty Russell
On Wed, 1 Jun 2011 03:24:29 -0400, Mark Wu d...@redhat.com wrote: Current index allocation in virtio-blk is based on a monotonically increasing variable index. It could cause some confusion about disk name in the case of hot-plugging disks. And it's impossible to find the lowest available

Re: [PATCH RFC 1/3] virtio_ring: add capacity check API

2011-06-01 Thread Rusty Russell
On Wed, 1 Jun 2011 12:49:46 +0300, Michael S. Tsirkin m...@redhat.com wrote: Add API to check ring capacity. Because of the option to use indirect buffers, this returns the worst case, not the normal case capacity. Can we drop the silly add_buf() returns capacity hack then? Thanks, Rusty. --

Re: [PATCH RFC 3/3] virtio_net: limit xmit polling

2011-06-01 Thread Rusty Russell
On Wed, 1 Jun 2011 12:50:03 +0300, Michael S. Tsirkin m...@redhat.com wrote: Current code might introduce a lot of latency variation if there are many pending bufs at the time we attempt to transmit a new one. This is bad for real-time applications and can't be good for TCP either. Free up

Re: [PATCH RFC 2/3] virtio_net: fix tx capacity checks using new API

2011-06-01 Thread Rusty Russell
On Wed, 1 Jun 2011 12:49:54 +0300, Michael S. Tsirkin m...@redhat.com wrote: In the (rare) case where new descriptors are used while virtio_net enables vq callback for the TX vq, virtio_net uses the number of sg entries in the skb it frees to calculate how many descriptors in the ring have

Re: [PATCH 8/8] arch/x86: use printk_ratelimited instead of printk_ratelimit

2011-06-06 Thread Rusty Russell
On Sat, 4 Jun 2011 17:37:04 +0200, Christian Dietrich christian.dietr...@informatik.uni-erlangen.de wrote: Since printk_ratelimit() shouldn't be used anymore (see comment in include/linux/printk.h), replace it with printk_ratelimited. Acked-by: Rusty Russell ru...@rustcorp.com.au (lguest part

Re: [PATCHv2 RFC 0/4] virtio and vhost-net capacity handling

2011-06-06 Thread Rusty Russell
On Thu, 2 Jun 2011 20:17:21 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jun 02, 2011 at 06:42:35PM +0300, Michael S. Tsirkin wrote: OK, here's a new attempt to use the new capacity api. I also added more comments to clarify the logic. Hope this is more readable. Let me know

Re: [PATCH 8/8] arch/x86: use printk_ratelimited instead of printk_ratelimit

2011-06-06 Thread Rusty Russell
On Mon, 6 Jun 2011 10:11:53 +0200, richard -rw- weinberger richard.weinber...@gmail.com wrote: On Mon, Jun 6, 2011 at 8:35 AM, Rusty Russell ru...@rustcorp.com.au wrote: On Sat, 4 Jun 2011 17:37:04 +0200, Christian Dietrich christian.dietr...@informatik.uni-erlangen.de wrote: Since

Re: [PATCHv2 RFC 4/4] Revert virtio: make add_buf return capacity remaining:

2011-06-07 Thread Rusty Russell
On Tue, 7 Jun 2011 18:54:57 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jun 02, 2011 at 06:43:25PM +0300, Michael S. Tsirkin wrote: This reverts commit 3c1b27d5043086a485f8526353ae9fe37bfa1065. The only user was virtio_net, and it switched to min_capacity instead.

Re: [PATCH v2] virtio-spec: Fix wrong bit number of device status

2011-06-07 Thread Rusty Russell
On Tue, 7 Jun 2011 21:09:42 +0800, Amos Kong ak...@redhat.com wrote: qemu-kvm/hw/virtio_config.h: #define VIRTIO_CONFIG_S_ACKNOWLEDGE 1 #define VIRTIO_CONFIG_S_DRIVER 2 #define VIRTIO_CONFIG_S_DRIVER_OK 4 #define VIRTIO_CONFIG_S_FAILED 0x80 virtio-spec:

Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

2011-06-08 Thread Rusty Russell
On Wed, 08 Jun 2011 09:08:29 -0400, Mark Wu d...@redhat.com wrote: Hi Rusty, Yes, I can't figure out an instance of disk probing in parallel either, but as per the following commit, I think we still need use lock for safety. What's your opinion? commit

Re: virtio scsi host draft specification, v3

2011-06-08 Thread Rusty Russell
On Tue, 07 Jun 2011 15:43:49 +0200, Paolo Bonzini pbonz...@redhat.com wrote: Hi all, after some preliminary discussion on the QEMU mailing list, I present a draft specification for a virtio-based SCSI host (controller, HBA, you name it). OK, I'm impressed. This is very well written and I

Re: virtio scsi host draft specification, v3

2011-06-10 Thread Rusty Russell
On Thu, 09 Jun 2011 08:59:27 +0200, Paolo Bonzini pbonz...@redhat.com wrote: On 06/09/2011 01:28 AM, Rusty Russell wrote: after some preliminary discussion on the QEMU mailing list, I present a draft specification for a virtio-based SCSI host (controller, HBA, you name it). OK

Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

2011-06-14 Thread Rusty Russell
versions which use an internal lock. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/include/linux/idr.h b/include/linux/idr.h --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -146,6 +146,9 @@ void ida_remove(struct ida *ida, int id) void ida_destroy(struct ida *ida); void

Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

2011-06-15 Thread Rusty Russell
On Wed, 15 Jun 2011 09:06:38 +0200, Tejun Heo t...@kernel.org wrote: It's inherited from idr which was designed to have separate prepare/allocation stages so that allocation can happen inside an outer spinlock. It doesn't have too much to do with optimization. It's mostly to be able to use

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-07 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 07/01/2013 01:02, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 02/01/2013 06:03, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires

Re: [PATCH] virtio-spec: fix two typos

2013-01-09 Thread Rusty Russell
Stefan Hajnoczi stefa...@gmail.com writes: On Wed, Jan 09, 2013 at 03:55:23PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com VIRTIO_NET_F_VTRL_VQ - VIRTIO_NET_F_CTRL_VQ VIRTIO_NET_CTRL_MQ is defined to 4 in kernel code Signed-off-by: Amos Kong ak...@redhat.com ---

Re: [RFC PATCH 0/2] make mac programming for virtio net more robust

2013-01-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Jan 10, 2013 at 10:45:39PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq

Re: [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: +if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) { +/* Set MAC address by writing config space */ vdev-config-set(vdev, offsetof(struct virtio_net_config, mac), dev-dev_addr, dev-addr_len);

Re: [PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Rusty Russell
Wanlong Gao gaowanl...@cn.fujitsu.com writes: Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. You need to be careful to get_online_cpus() and put_online_cpus() here, so CPUs can't go up and down in the middle of operations. In particular,

Re: [PATCH v5 03/14] KVM: ARM: Initial skeleton to compile KVM support

2013-01-15 Thread Rusty Russell
Christoffer Dall c.d...@virtualopensystems.com writes: On Mon, Jan 14, 2013 at 11:24 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Tue, Jan 08, 2013 at 01:38:55PM -0500, Christoffer Dall wrote: + /* -ENOENT for unknown features, -EINVAL for invalid combinations. */ +

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Rusty Russell
ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; +if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET elem-out_num == 2 +elem-out_sg[1].iov_len == ETH_ALEN) { +/* Set MAC

Re: [PATCH v5 03/14] KVM: ARM: Initial skeleton to compile KVM support

2013-01-16 Thread Rusty Russell
Russell King - ARM Linux li...@arm.linux.org.uk writes: On Wed, Jan 16, 2013 at 01:26:01PM +1030, Rusty Russell wrote: Christoffer Dall c.d...@virtualopensystems.com writes: On Mon, Jan 14, 2013 at 11:24 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Tue, Jan 08, 2013

Re: [PATCH v3] virtio-spec: set mac address by a new vq command

2013-01-20 Thread Rusty Russell
ak...@redhat.com writes: From: Amos Kong ak...@redhat.com Virtio-net driver currently programs MAC address byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address in one time, and added a new feature flag

Re: [RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes

2013-02-07 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained scatterlists: the buffers must be provided as an array of struct scatterlist. Because of these

Re: [RFC PATCH 0/8] virtio: new API for addition of buffers, scatterlist changes

2013-02-13 Thread Rusty Russell
Jens Axboe ax...@kernel.dk writes: On Fri, Feb 08 2013, Rusty Russell wrote: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained scatterlists

Re: [PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes

2013-02-13 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: This series adds a different set of APIs for adding a buffer to a virtqueue. The new API lets you pass the buffers piecewise, wrapping multiple calls to virtqueue_add_sg between virtqueue_start_buf and virtqueue_end_buf. Letting drivers call

Re: [PATCH 0/9] virtio: new API for addition of buffers, scatterlist changes

2013-02-19 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio_scsi and virtio_blk can really use these, to avoid their current hack of copying the whole sg array. Signed-off-by: Ruty Russell ru...@rustcorp.com.au It's much better than the other

Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

2013-02-26 Thread Rusty Russell
as such: static u8 rng_buffer[SMP_CACHE_BYTES 32 ? 32 : SMP_CACHE_BYTES] __cacheline_aligned; Yuck... It would be nice if this has oopsed. Jens, what about this patch? Cheers, Rusty. Subject: scatterlist: sg_set_buf() argument must be in linear mapping. Signed-off-by: Rusty Russell ru

Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

2013-02-26 Thread Rusty Russell
it in the core as virtio_rng would have to allocate a buffer every time (it doesn't know how much the core will want to read). Reported-by: Aurelien Jarno aurel...@aurel32.net Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index

Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

2013-02-27 Thread Rusty Russell
Jens Axboe ax...@kernel.dk writes: On Wed, Feb 27 2013, Rusty Russell wrote: Subject: scatterlist: sg_set_buf() argument must be in linear mapping. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 4bd6c06

Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

2013-02-27 Thread Rusty Russell
Aurelien Jarno aurel...@aurel32.net writes: On Wed, Feb 27, 2013 at 11:56:55AM +1030, Rusty Russell wrote: Aurelien Jarno aurel...@aurel32.net writes: Hi, I have noticed that virtio-rng only returns zero for kernels = 2.6.33 built with CONFIG_HW_RANDOM=m. This is a bit much too

Re: virtio-s390: document GPR4/GPR2 cookie values

2013-03-12 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Thu, 7 Mar 2013 20:02:21 +0200 Michael S. Tsirkin m...@redhat.com wrote: virtio-s390 on kvm can use a cookie value passed to guest s/virtio-s390/virtio-ccw/ (to avoid confusion with s390-virtio, which was never specced) to optimize

Re: [PATCH V2 2/2] tcm_vhost: Use vq-private_data to indicate if the endpoint is setup

2013-04-01 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Rusty's currently doing some reorgs of -net let's delay cleanups there to avoid stepping on each other's toys. Let's focus on scsi here. E.g. any chance framing assumptions can be fixed in 3.10? I am waiting for your removal of the dma-compelete

Re: [PATCH V7 0/5] virtio-scsi multiqueue

2013-04-08 Thread Rusty Russell
Asias He as...@redhat.com writes: On Sat, Apr 06, 2013 at 09:40:13AM +0100, James Bottomley wrote: Well, I haven't had time to look at anything other than the patch I commented on. I'm happy with your fix, so you can add my acked by to that one. Since it's going through the virtio tree,

Re: virtio-net mq vq initialization (was: [PATCH 0/5] Usual batch of random ARM fixes for kvmtool)

2013-04-12 Thread Rusty Russell
Sasha Levin sasha.le...@oracle.com writes: On 04/11/2013 12:36 PM, Will Deacon wrote: Hello folks, Here's the latest round of ARM fixes and updates for kvmtool. Most of this is confined to the arm/ subdirectory, with the exception of a fix to the virtio-mmio vq definitions due to the

Re: virtio-net mq vq initialization

2013-04-14 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Sun, Apr 14, 2013 at 11:59:42AM -0400, Sasha Levin wrote: On 04/14/2013 11:53 AM, Michael S. Tsirkin wrote: Initializing them only when they're actually needed will do the trick here. Not initializing, adding the buffers. In the current

Re: [PATCH] virtio-spec: document virtio-9p

2013-04-15 Thread Rusty Russell
Sasha Levin sasha.le...@oracle.com writes: Add basic documentation for virtio-9p. I can expand more on device operation, but I don't think there's anything significant enough for the spec to be mentioned there. Please let me know if I'm wrong. Signed-off-by: Sasha Levin sasha.le...@oracle.com

Re: [PATCH] virtio-net: fill only rx queues which are being used

2013-04-22 Thread Rusty Russell
Sasha Levin sasha.le...@oracle.com writes: Due to MQ support we may allocate a whole bunch of rx queues but never use them. With this patch we'll safe the space used by the receive buffers until they are actually in use: Idea is good, implementation needs a tiny tweak: @@ -912,8 +913,13 @@

Re: [PATCH v7 3/3] tcm_vhost: Add hotplug/hotunplug support

2013-04-22 Thread Rusty Russell
Asias He as...@redhat.com writes: On Mon, Apr 22, 2013 at 04:17:04PM +0300, Michael S. Tsirkin wrote: + evt = kzalloc(sizeof(*evt), GFP_KERNEL); I think kzalloc not needed here, you init all fields. Not really! evt-event.lun[4-7] is not initialized. It

Re: suggesting wording fixes for virtio-spec 0.9.5

2013-04-22 Thread Rusty Russell
Laszlo Ersek ler...@redhat.com writes: Hi, (I'm not subscribed to either list,) using the word descriptor is misleading in the following sections: Yes, I like the use of 'descriptor chains'. This is a definite improvement. Here's the diff I ended up with (massaged to minimize it). Thanks!

Re: suggesting wording fixes for virtio-spec 0.9.5

2013-04-28 Thread Rusty Russell
Laszlo Ersek ler...@redhat.com writes: On 04/23/13 06:05, Rusty Russell wrote: Laszlo Ersek ler...@redhat.com writes: Hi, (I'm not subscribed to either list,) using the word descriptor is misleading in the following sections: Yes, I like the use of 'descriptor chains

Re: [PATCH] kvm tools: virtio-net mergable rx buffers

2013-04-28 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Apr 24, 2013 at 09:51:57AM +0300, Pekka Enberg wrote: Hi, On 04/23/2013 12:35 PM, Eric Northup wrote: Do you care about guests with drivers that don't negotiate VIRTIO_NET_F_MRG_RXBUF? On Wed, Apr 24, 2013 at 5:51 AM, Sasha Levin

Re: [PATCH v2] virtio-net: fill only rx queues which are being used

2013-04-28 Thread Rusty Russell
Sasha Levin sasha.le...@oracle.com writes: Due to MQ support we may allocate a whole bunch of rx queues but never use them. With this patch we'll safe the space used by the receive buffers until they are actually in use: Thanks, applied! Cheers, Rusty. sh-4.2# free -h total

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-06 Thread Rusty Russell
Asias He as...@redhat.com writes: Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module I like these cleanups, MST pleasee apply. I have some other cleanups which are on hold for the moment pending MST's

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-07 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, May 06, 2013 at 03:41:36PM +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: Asias He (3): vhost: Remove vhost_enable_zcopy in vhost.h vhost: Move VHOST_NET_FEATURES to net.c vhost: Make vhost a separate module I

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, May 07, 2013 at 02:13:44PM +0930, Rusty Russell wrote: AFAICT we should always do zero copy. It seems not to be a win for small packets. I speculate the issue is that ring space isn't released as promptly. Further, we can't do it safely

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-14 Thread Rusty Russell
Asias He as...@redhat.com writes: scsi.c includes vhost.c which uses memcpy_fromiovec. This patch fixes this build failure. From Randy Dunlap: ''' on x86_64: ERROR: memcpy_fromiovec [drivers/vhost/vhost_scsi.ko] undefined! It needs to depend on NET since net/core/

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-15 Thread Rusty Russell
Nicholas A. Bellinger n...@linux-iscsi.org writes: On Wed, 2013-05-15 at 14:47 +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: scsi.c includes vhost.c which uses memcpy_fromiovec. This patch fixes this build failure. From Randy Dunlap: ''' on x86_64

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-15 Thread Rusty Russell
Asias He as...@redhat.com writes: On Wed, May 15, 2013 at 02:47:53PM +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: scsi.c includes vhost.c which uses memcpy_fromiovec. This patch fixes this build failure. From Randy Dunlap: ''' on x86_64: ERROR

Re: [PATCH] virtio_pci: fix macro exported in uapi

2013-05-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: macro VIRTIO_PCI_CONFIG except in the unlikely event userspace actually has a structure with a field named msix_enabled. Get the msix_enabled by value instead, to make it useful for userspace. Signed-off-by: Michael S. Tsirkin m...@redhat.com Macro

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-16 Thread Rusty Russell
Joe Perches j...@perches.com writes: On Thu, 2013-05-16 at 13:04 +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: On Wed, May 15, 2013 at 02:47:53PM +0930, Rusty Russell wrote: [] Other users are using memcpy_fromiovec and friends outside net. It seems a good idea to put

Re: [PATCH] virtio_console: fix uapi header

2013-05-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: uapi should use __u32 not u32. Fix a macro in virtio_console.h which uses u32. Signed-off-by: Michael S. Tsirkin m...@redhat.com Ouch. Added CC:stable, and put into fixes. Mainly because it's embarrassing :) Cheers, Rusty. -- To unsubscribe from

Re: [PATCHv2] virtio_pci: better macro exported in uapi

2013-05-19 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Macro VIRTIO_PCI_CONFIG assumes that userspace actually has a structure with a field named msix_enabled. Add VIRTIO_PCI_CONFIG_OFF that gets the msix_enabled by value instead, to make it useful for userspace. We still keep VIRTIO_PCI_CONFIG around

Re: [PATCH] virtio_pci: fix macro exported in uapi

2013-05-19 Thread Rusty Russell
David Howells dhowe...@redhat.com writes: Rusty Russell ru...@rustcorp.com.au wrote: Macro still isn't usable, because userspace can't know whether it's the new or old. We need to either remove it from UAPI, or rename it to VIRTIO_PCI_CONFIG_OFF. Surely, if userspace is using

Re: provide vhost thread per virtqueue for forwarding scenario

2013-05-22 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On 05/22/2013 05:59 PM, Zang Hongyong wrote: On 2013/5/20 15:43, Michael S. Tsirkin wrote: On Mon, May 20, 2013 at 02:11:19AM +, Qinchuanyu wrote: Yes, I don't think we want to create threads even more aggressively in all cases. I'm worried about

Re: [PATCH rusty/virtio-pci-new-layout] virtio: new layout minor header fixups

2013-05-27 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Fix issues observed with the new layout code, seen when implementing device in qemu: - use of uXX in uapi header - incorrect readonly tag on one field - unconditional warning breaks builds with -Werr Signed-off-by: Michael S.

Re: updated: kvm networking todo wiki

2013-05-28 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, May 24, 2013 at 08:47:58AM -0500, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Fri, May 24, 2013 at 05:41:11PM +0800, Jason Wang wrote: On 05/23/2013 04:50 PM, Michael S. Tsirkin wrote: Hey guys, I've updated

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: Michael S. Tsirkin m...@redhat.com writes: +case offsetof(struct virtio_pci_common_cfg, device_feature_select): +return proxy-device_feature_select; Oh dear no... Please use defines like the rest of QEMU. It is pretty ugly. Yet the

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-28 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 28/05/2013 19:32, Michael S. Tsirkin ha scritto: + +switch (addr) { +case offsetof(struct virtio_pci_common_cfg, device_feature_select): +return proxy-device_feature_select; Oh dear no... Please use defines like

Re: updated: kvm networking todo wiki

2013-05-29 Thread Rusty Russell
Anthony Liguori anth...@codemonkey.ws writes: Rusty Russell ru...@rustcorp.com.au writes: On Fri, May 24, 2013 at 08:47:58AM -0500, Anthony Liguori wrote: FWIW, I think what's more interesting is using vhost-net as a networking backend with virtio-net in QEMU being what's guest facing

Re: [PATCH] virtio_pci: fix capability format, comments

2013-05-29 Thread Rusty Russell
the device originally asked for. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/virtio_pci-common.h b/drivers/virtio/virtio_pci-common.h index ba1bf81..0e3143b 100644 --- a/drivers/virtio/virtio_pci-common.h +++ b/drivers/virtio/virtio_pci-common.h @@ -82,6 +82,9

Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

2013-05-29 Thread Rusty Russell
Jens Axboe ax...@kernel.dk writes: On Wed, Feb 27 2013, Rusty Russell wrote: Aurelien Jarno aurel...@aurel32.net writes: Hi, I have noticed that virtio-rng only returns zero for kernels = 2.6.33 built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a random generator

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-05-29 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: Rusty Russell ru...@rustcorp.com.au writes: Anthony Liguori aligu...@us.ibm.com writes: Michael S. Tsirkin m...@redhat.com writes: +case offsetof(struct virtio_pci_common_cfg, device_feature_select): +return proxy-device_feature_select

Re: updated: kvm networking todo wiki

2013-05-30 Thread Rusty Russell
Stefan Hajnoczi stefa...@gmail.com writes: On Thu, May 30, 2013 at 7:23 AM, Rusty Russell ru...@rustcorp.com.au wrote: On the receive side, what can we do better than readv? If we need to return to userspace to tell the guest that we've got a new packet, we don't win on latency. We might

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-02 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, May 30, 2013 at 08:53:45AM -0500, Anthony Liguori wrote: Rusty Russell ru...@rustcorp.com.au writes: Anthony Liguori aligu...@us.ibm.com writes: Forcing a guest driver change is a really big deal and I see no reason to do that unless

Re: PATCH] virtio-spec: small English/punctuation corrections

2013-06-02 Thread Rusty Russell
Luiz Capitulino lcapitul...@redhat.com writes: 1. s/These are devices are/These devices are 2. s/Thefirst/The first 3. s/, Guest should/. Guest should Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- virtio-spec.lyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-02 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, May 30, 2013 at 01:28:26PM +0930, Rusty Russell wrote: Yet the structure definitions are descriptive, capturing layout, size and endianness in natural a format readable by any C programmer. From an API design point of view, here

Re: updated: kvm networking todo wiki

2013-06-02 Thread Rusty Russell
Anthony Liguori anth...@codemonkey.ws writes: Michael S. Tsirkin m...@redhat.com writes: On Thu, May 30, 2013 at 08:40:47AM -0500, Anthony Liguori wrote: Stefan Hajnoczi stefa...@gmail.com writes: On Thu, May 30, 2013 at 7:23 AM, Rusty Russell ru...@rustcorp.com.au wrote: Anthony

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-04 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Jun 03, 2013 at 09:56:15AM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Thu, May 30, 2013 at 08:53:45AM -0500, Anthony Liguori wrote: Rusty Russell ru...@rustcorp.com.au writes: Anthony Liguori aligu

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: By my count, net still has 7 feature bits left, so I don't think the feature bits are likely to be a limitation in the next 6 months? Yes but you wanted a generic transport feature bit for flexible SG layout. Are you happy with

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-05 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: 4) Do virtio-pcie, make it PCI-e friendly (drop the IO BAR completely), give it a new device/vendor ID. Continue to use virtio-pci for existing devices potentially adding virtio-{net,blk,...}-pcie variants for people that care to use them.

Re: [PATCH RFC] virtio-pci: new config layout: using memory BAR

2013-06-06 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: Hi Rusty, Rusty Russell ru...@rustcorp.com.au writes: Anthony Liguori aligu...@us.ibm.com writes: 4) Do virtio-pcie, make it PCI-e friendly (drop the IO BAR completely), give it a new device/vendor ID. Continue to use virtio-pci for existing

Re: mod filenames != modnames? (inconsistent name changing)

2013-06-15 Thread Rusty Russell
Linda Walsh l...@tlinx.org writes: Should we have any expectation that a module name and it's filename should be equivalent? I was writing an auto-complete script for modprobe so it wouldn't give me the option to double load a module (I'd have to manually type it in if I really wanted it).

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-18 Thread Rusty Russell
Alex Williamson alex.william...@redhat.com writes: On Mon, 2013-06-17 at 13:56 +1000, Benjamin Herrenschmidt wrote: On Sun, 2013-06-16 at 21:13 -0600, Alex Williamson wrote: IOMMU groups themselves don't provide security, they're accessed by interfaces like VFIO, which provide the

Re: kvm_intel: Could not allocate 42 bytes percpu data

2013-07-02 Thread Rusty Russell
Chegu Vinod chegu_vi...@hp.com writes: On 6/30/2013 11:22 PM, Rusty Russell wrote: Chegu Vinod chegu_vi...@hp.com writes: Hello, Lots (~700+) of the following messages are showing up in the dmesg of a 3.10-rc1 based kernel (Host OS is running on a large socket count box with HT

Re: kvm_intel: Could not allocate 42 bytes percpu data

2013-07-02 Thread Rusty Russell
Chegu Vinod chegu_vi...@hp.com writes: On 7/1/2013 10:49 PM, Rusty Russell wrote: Chegu Vinod chegu_vi...@hp.com writes: On 6/30/2013 11:22 PM, Rusty Russell wrote: module: do percpu allocation after uniqueness check. No, really! v3.8-rc1-5-g1fb9341 was supposed to stop parallel kvm loads

Re: [PATCH] virtio: include asm/barrier explicitly

2013-07-07 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio_ring.h uses mb() and friends, make it pull in asm/barrier.h itself, not rely on other headers to do it. Signed-off-by: Michael S. Tsirkin m...@redhat.com Applied. Thanks, Rusty. PS. I'll squeeze these into this merge window, since they're

Re: [PATCH] tools/virtio: move module license stub to module.h

2013-07-07 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: This fixes build for the vringh test: [linux]$ make -C tools/virtio/ make: Entering directory `/home/mst/scm/linux/tools/virtio' cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD

Re: [PATCH] virtio-scsi: Fix virtqueue affinity setup

2013-07-31 Thread Rusty Russell
Asias He as...@redhat.com writes: vscsi-num_queues counts the number of request virtqueue which does not include the control and event virtqueue. It is wrong to subtract VIRTIO_SCSI_VQ_BASE from vscsi-num_queues. This patch fixes the following panic. Applied. Thanks, Rusty. (qemu)

Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts

2013-10-14 Thread Rusty Russell
: virtio_config: introduce size-based accessors. This lets the us do endian conversion if necessary, and insulates the drivers from that change. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 29b9104..e62acdd 100644

Re: [PATCH 2/3] virtio: mmio: fix signature checking for BE guests

2013-10-14 Thread Rusty Russell
it by encoding the magic value as an integer instead of a string. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Cc: Pawel Moll pawel.m...@arm.com Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- drivers/virtio/virtio_mmio.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts

2013-10-14 Thread Rusty Russell
kvm-arm64/be-on-le-3.12-rc4 Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Cc: Pawel Moll pawel.m...@arm.com We are changing the spec to make everything LE instead of the native endian. I think that'll fix the issue in a cleaner way. While I agree

Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts

2013-10-14 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: On Mon, 2013-10-14 at 11:46 +0100, Michael S. Tsirkin wrote: What I meant is that under the proposed scheme, users with existing v1 drivers must configure a v1 device explicitly. According to the plan, drivers will be updated so they can work with both

Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts

2013-10-14 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Oct 14, 2013 at 06:50:48PM +0200, Paolo Bonzini wrote: Il 14/10/2013 17:36, Marc Zyngier ha scritto: Devices are fine in QEMU, it's only the generic parts (rings) that are missing AFAICT. So if I understand correctly how it works,

Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts

2013-10-16 Thread Rusty Russell
Marc Zyngier marc.zyng...@arm.com writes: On 14/10/13 09:21, Rusty Russell wrote: Marc Zyngier marc.zyng...@arm.com writes: This small patch series adds just enough kernel infrastructure and fixes to allow a BE guest to use virtio-mmio on a LE host, provided that the host actually supports

Re: [PATCH 2/3] virtio: mmio: fix signature checking for BE guests

2013-11-04 Thread Rusty Russell
Rusty Russell ru...@rustcorp.com.au writes: Pawel Moll pawel.m...@arm.com writes: On Fri, 2013-10-11 at 15:36 +0100, Marc Zyngier wrote: As virtio-mmio config registers are specified to be little-endian, using readl() to read the magic value and then memcmp() to check it fails on BE (as readl

Re: [PATCH 2/3] virtio: mmio: fix signature checking for BE guests

2013-11-06 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: On Tue, 2013-11-05 at 03:36 +, Rusty Russell wrote: This particular can is empty - all worms already escaped :-) I just thought that if you wait for 1.0, it will always be little-endian, and if the current qemu only supported little-endian your life

Re: [PATCH] virtio_balloon: update_balloon_size(): update correct field

2013-12-04 Thread Rusty Russell
Luiz Capitulino lcapitul...@redhat.com writes: According to the virtio spec, the device configuration field that should be updated after an inflation or deflation operation is the 'actual' field, not the 'num_pages' one. Commit 855e0c5288177bcb193f6f6316952d2490478e1c swapped them in

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-12-16 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On 10/28/2013 04:01 PM, Asias He wrote: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He

Re: [PATCH V2] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2014-01-14 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: From: Asias He asias.he...@gmail.com vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Fixes:

Re: [RFC PATCH 3/4] virtio_balloon: add pressure notification via a new virtqueue

2014-01-16 Thread Rusty Russell
Luiz Capitulino lcapitul...@redhat.com writes: From: Luiz capitulino lcapitul...@redhat.com This commit adds support to a new virtqueue called message virtqueue. OK, this needs a lot of thought (especially since reworking the virtio balloon is on the TODO list for the OASIS virtio technical

Re: [RFC PATCH 3/4] virtio_balloon: add pressure notification via a new virtqueue

2014-01-19 Thread Rusty Russell
Luiz Capitulino lcapitul...@redhat.com writes: On Fri, 17 Jan 2014 09:10:47 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Luiz Capitulino lcapitul...@redhat.com writes: From: Luiz capitulino lcapitul...@redhat.com This commit adds support to a new virtqueue called message virtqueue

Re: [PATCH] virtio: make udp more efficient by avoiding indirect desc

2014-02-12 Thread Rusty Russell
Qin Chuanyu qinchua...@huawei.com writes: udp packet use 2 buffers at least, one for vnet_hdr and one for skb-data. we could change the threshold from 2 to 3, so the udp packet which data buff only using single desc will gain from this. the guest would avoid from allocating memory

Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

2014-05-08 Thread Rusty Russell
Alexander Graf ag...@suse.de writes: On 05/07/2014 11:57 AM, Marc Zyngier wrote: How virtio implementations should determine their endianness is a spec question, I think; at any rate QEMU and kvmtool ought to agree on how it's done. I think the most recent suggestion on the QEMU mailing list

Re: virtio specification: OOO completion of the xmit buffers in the networking device

2014-06-03 Thread Rusty Russell
Vlad Zolotarov vl...@cloudius-systems.com writes: Rusty, hi! I'd like to ask for a small clarification about the virtio spec. The virtio specification is put the way that it allows the out-of-order completions in general. Although it states that it's mostly relevant to the virtio-blk it

Re: Using virtio for inter-VM communication

2014-06-11 Thread Rusty Russell
Henning Schild henning.sch...@siemens.com writes: Hi, i am working on the jailhouse[1] project and am currently looking at inter-VM communication. We want to connect guests directly with virtual consoles based on shared memory. The code complexity in the hypervisor should be minimal, it

Re: Using virtio for inter-VM communication

2014-06-12 Thread Rusty Russell
Jan Kiszka jan.kis...@siemens.com writes: On 2014-06-12 04:27, Rusty Russell wrote: Henning Schild henning.sch...@siemens.com writes: It was also never implemented, and remains a thought experiment. However, implementing it in lguest should be fairly easy. The reason why a trusted helper

<    1   2   3   4   5   6   7   >