Re: [Qemu-devel] [PATCH V2] help: add docs for multiqueue tap options

2013-02-22 Thread Jason Wang
On 02/22/2013 06:36 PM, Markus Armbruster wrote: Jason Wang jasow...@redhat.com writes: Cc: Markus Armbruster arm...@redhat.com Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V1: - Add the missing docs for 'queues' (Markus) V1 got committed

Re: [Qemu-devel] [PATCH] net: reduce the unnecessary memory allocation of multiqueue

2013-02-22 Thread Jason Wang
On 02/22/2013 09:18 PM, Anthony Liguori wrote: Stefan Hajnoczi stefa...@redhat.com writes: On Thu, Feb 21, 2013 at 05:45:57PM +0800, Jason Wang wrote: @@ -1397,6 +1398,7 @@ void virtio_net_exit(VirtIODevice *vdev) g_free(n-mac_table.macs); g_free(n-vlans); +g_free(n-vqs

[Qemu-devel] [PATCH] help: add docs for missing 'queues' option of tap

2013-02-22 Thread Jason Wang
Cc: Markus Armbruster arm...@redhat.com Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- qapi-schema.json |2 ++ qemu-options.hx |3 ++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index cd7ea25..b3844e6

[Qemu-devel] [PATCH V2] net: reduce the unnecessary memory allocation of multiqueue

2013-02-22 Thread Jason Wang
and VirtIONetQueue array in VirtIONet. Tested by myself, with single virtio-net-pci device. The memory allocation is almost the same as when multiqueue is not merged. Cc: Edivaldo de Araujo Pereira edivaldoapere...@yahoo.com.br Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] scp during migration with vhost fails

2013-02-22 Thread Jason Wang
On 02/21/2013 07:23 PM, Michael S. Tsirkin wrote: On Thu, Feb 21, 2013 at 05:57:04PM +0800, Jason Wang wrote: On 02/21/2013 12:48 AM, Michael S. Tsirkin wrote: On Wed, Feb 20, 2013 at 04:23:52PM +0200, Michael S. Tsirkin wrote: On Fri, Feb 01, 2013 at 06:03:32PM +0800, Jason Wang wrote: Hello

Re: [Qemu-devel] scp during migration with vhost fails

2013-02-24 Thread Jason Wang
On 02/24/2013 05:54 AM, Michael S. Tsirkin wrote: On Sat, Feb 23, 2013 at 10:49:29PM +0200, Michael S. Tsirkin wrote: On Fri, Feb 22, 2013 at 11:33:53PM +0800, Jason Wang wrote: On 02/21/2013 07:23 PM, Michael S. Tsirkin wrote: On Thu, Feb 21, 2013 at 05:57:04PM +0800, Jason Wang wrote: On 02

Re: [Qemu-devel] scp during migration with vhost fails

2013-02-24 Thread Jason Wang
On 02/25/2013 01:57 PM, Jason Wang wrote: On 02/24/2013 05:54 AM, Michael S. Tsirkin wrote: On Sat, Feb 23, 2013 at 10:49:29PM +0200, Michael S. Tsirkin wrote: On Fri, Feb 22, 2013 at 11:33:53PM +0800, Jason Wang wrote: On 02/21/2013 07:23 PM, Michael S. Tsirkin wrote: On Thu, Feb 21, 2013

Re: [Qemu-devel] [PATCH V2 18/20] virtio-net: multiqueue support

2013-04-25 Thread Jason Wang
On 04/17/2013 04:42 PM, Aurelien Jarno wrote: On Wed, Apr 17, 2013 at 04:27:13PM +0800, Jason Wang wrote: On 04/17/2013 03:20 PM, Aurelien Jarno wrote: On Tue, Apr 16, 2013 at 11:08:59AM +0800, Jason Wang wrote: On 04/15/2013 04:28 PM, Aurelien Jarno wrote: On Mon, Apr 15, 2013 at 01:29:01PM

[Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
and VIRTIO_NET_F_MQ were disabled form command line. Then qemu will crash when user tries to read the config of virtio-net. Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least contains the mac address. Cc: Jesse Larrew jlar...@linux.vnet.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com

[Qemu-devel] [PATCH] virtio-net: unbreak the minix guest

2013-04-25 Thread Jason Wang
.net Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/virtio-net.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 4d2cdd2..1068f4e 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1045,7 +1045,7

Re: [Qemu-devel] [PATCH] virtio-net: unbreak the minix guest

2013-04-25 Thread Jason Wang
On 04/25/2013 02:57 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:19:53PM +0800, Jason Wang wrote: Multiqueue patchset conditionally add control vq only when guest negotiate the feature. Though the spec is not clear on this but it breaks the minix guest since it will identify

Re: [Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
On 04/25/2013 02:59 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set

[Qemu-devel] [PATCH v2] virtio-net: unbreak the minix guest

2013-04-25 Thread Jason Wang
If the VIRTIO_NET_F_CTRL_VQ feature bit is negotiated, identify the control virtqueue., to keep the backward compatibility, always add the ctrl vq at end of the queues. Reported-by: Aurelien Jarno aurel...@aurel32.net Cc: Aurelien Jarno aurel...@aurel32.net Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V1

[Qemu-devel] [PATCH v2] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
and VIRTIO_NET_F_MQ were disabled form command line. Then qemu will crash when user tries to read the config of virtio-net. Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least contains the mac address. Cc: Jesse Larrew jlar...@linux.vnet.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] [PATCH] virtio-net: count VIRTIO_NET_F_MAC when calculating config_len

2013-04-25 Thread Jason Wang
On 04/25/2013 03:06 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 03:02:44PM +0800, Jason Wang wrote: On 04/25/2013 02:59 PM, Michael S. Tsirkin wrote: On Thu, Apr 25, 2013 at 02:21:29PM +0800, Jason Wang wrote: Commit 14f9b664 (hw/virtio-net.c: set config size using host features

[Qemu-devel] [PATCH] virtio: abort on zero config length

2013-04-25 Thread Jason Wang
In fact we don't support zero length config length for virtio device. And it can lead outbound memory access. So abort on zero config length to catch the bug earlier. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio.c |7 ++- 1 files changed, 2 insertions(+), 5

Re: [Qemu-devel] [PATCH] virtio: abort on zero config length

2013-04-25 Thread Jason Wang
On 04/26/2013 06:27 AM, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Thu, Apr 25, 2013 at 03:20:20PM -0500, Anthony Liguori wrote: Jason Wang jasow...@redhat.com writes: In fact we don't support zero length config length for virtio device. virtio-rng? It has

[Qemu-devel] [PATCH 1/3] virtio-pci: properly validate address before accessing config

2013-04-26 Thread Jason Wang
in virtio_pci_config_{read|write}() before .{set|get}_config - Use addition instead minus to do the validation Cc: Michael S. Tsirkin m...@redhat.com Cc: Petr Matousek pmato...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio-pci.c |9 + hw/virtio/virtio.c | 18

[Qemu-devel] [PATCH 2/3] virtio-ccw: check config length before accessing it

2013-04-26 Thread Jason Wang
virtio-rng-ccw has zero config length, so we need validate the config length before trying to access it. Otherwise we may crash since vdev-config is NULL. Cc: Cornelia Huck cornelia.h...@de.ibm.com Cc: Richard Henderson r...@twiddle.net Cc: Alexander Graf ag...@suse.de Signed-off-by: Jason Wang

[Qemu-devel] [PATCH 3/3] s390-virtio-bus: sync config only when config_len is not zero

2013-04-26 Thread Jason Wang
virtio-rng-s390 has zero config length, so no need to sync its config otherwise qemu will crash since vdev-config is NULL. Cc: Alexander Graf ag...@suse.de Cc: Richard Henderson r...@twiddle.net Signed-off-by: Jason Wang jasow...@redhat.com --- hw/s390x/s390-virtio-bus.c |4 1 files

Re: [Qemu-devel] [PATCH] virtio: abort on zero config length

2013-04-26 Thread Jason Wang
On 04/26/2013 06:32 PM, Eric Blake wrote: On 04/25/2013 11:06 PM, Jason Wang wrote: if (addr (vdev-config_len - sizeof(val))) ^ quiz: spot a bug above if config_len is 0:) Then we need to fix these bugs and allocate a CVE. virtio-rng has shipped. This code is also dumb

[Qemu-devel] [PATCH] virtio-net: properly check the vhost status during status set

2013-04-26 Thread Jason Wang
a brace to make sure both the conditions were met then does the check. This fixes the crash when doing a savem after set the link off which let qemu crash and complains: virtio_net_save: Assertion `!n-vhost_started' failed. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow

Re: [Qemu-devel] [PATCH] virtio-net: properly check the vhost status during status set

2013-04-26 Thread Jason Wang
On 04/26/2013 08:26 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 06:27:40PM +0800, Jason Wang wrote: Commit 32993698 (vhost: disable on tap link down) tries to disable the vhost also when the peer's link is down. But the check was not done properly, the vhost were only started when

Re: [Qemu-devel] [PATCH 1/3] virtio-pci: properly validate address before accessing config

2013-04-26 Thread Jason Wang
On 04/26/2013 10:27 PM, Petr Matousek wrote: On Fri, Apr 26, 2013 at 04:34:02PM +0800, Jason Wang wrote: There are several several issues in the current checking: - The check was based on the minus of unsigned values which can overflow - It was done after .{set|get}_config() which can lead

Re: [Qemu-devel] [PATCH 3/3] s390-virtio-bus: sync config only when config_len is not zero

2013-04-26 Thread Jason Wang
On 04/27/2013 01:07 AM, Alexander Graf wrote: On 26.04.2013, at 10:34, Jason Wang wrote: virtio-rng-s390 has zero config length, so no need to sync its config otherwise qemu will crash since vdev-config is NULL. Why is it NULL? As far as I see, virtio-rng's config_len is zero, so in its

Re: [Qemu-devel] [PATCH] virtio-net: properly check the vhost status during status set

2013-04-28 Thread Jason Wang
On 04/28/2013 03:32 AM, Michael S. Tsirkin wrote: On Sat, Apr 27, 2013 at 01:11:16PM +0800, Jason Wang wrote: On 04/26/2013 08:26 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 06:27:40PM +0800, Jason Wang wrote: Commit 32993698 (vhost: disable on tap link down) tries to disable

Re: [Qemu-devel] [PATCH 1/3] virtio-pci: properly validate address before accessing config

2013-04-28 Thread Jason Wang
On 04/28/2013 03:26 AM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 04:34:02PM +0800, Jason Wang wrote: There are several several issues in the current checking: - The check was based on the minus of unsigned values which can overflow - It was done after .{set|get}_config() which can

Re: [Qemu-devel] [PATCH 3/3] s390-virtio-bus: sync config only when config_len is not zero

2013-04-28 Thread Jason Wang
On 04/28/2013 04:31 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 04:34:04PM +0800, Jason Wang wrote: virtio-rng-s390 has zero config length, so no need to sync its config otherwise qemu will crash since vdev-config is NULL. Cc: Alexander Graf ag...@suse.de Cc: Richard Henderson r

Re: [Qemu-devel] [PATCH 2/3] virtio-ccw: check config length before accessing it

2013-04-28 Thread Jason Wang
On 04/28/2013 04:32 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 04:34:03PM +0800, Jason Wang wrote: virtio-rng-ccw has zero config length, so we need validate the config length before trying to access it. Otherwise we may crash since vdev-config is NULL. Cc: Cornelia Huck

Re: [Qemu-devel] [PATCH] virtio-net: properly check the vhost status during status set

2013-04-28 Thread Jason Wang
On 04/28/2013 04:25 PM, Michael S. Tsirkin wrote: On Sun, Apr 28, 2013 at 03:51:32PM +0800, Jason Wang wrote: On 04/28/2013 03:32 AM, Michael S. Tsirkin wrote: On Sat, Apr 27, 2013 at 01:11:16PM +0800, Jason Wang wrote: On 04/26/2013 08:26 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013

Re: [Qemu-devel] [PATCH 1/3] virtio-pci: properly validate address before accessing config

2013-05-05 Thread Jason Wang
On 05/02/2013 10:35 PM, Andreas Färber wrote: Am 28.04.2013 10:35, schrieb Michael S. Tsirkin: On Sun, Apr 28, 2013 at 03:54:20PM +0800, Jason Wang wrote: On 04/28/2013 03:26 AM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 04:34:02PM +0800, Jason Wang wrote: There are several several

Re: [Qemu-devel] [PATCH 2/3] virtio-ccw: check config length before accessing it

2013-05-06 Thread Jason Wang
On 04/28/2013 04:40 PM, Jason Wang wrote: On 04/28/2013 04:32 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013 at 04:34:03PM +0800, Jason Wang wrote: virtio-rng-ccw has zero config length, so we need validate the config length before trying to access it. Otherwise we may crash since vdev

[Qemu-devel] [PATCH V2] virtio: properly validate address before accessing config

2013-05-06 Thread Jason Wang
in virtio_pci_config_{read|write}() before .{set|get}_config - Use addition instead minus to do the validation Cc: Michael S. Tsirkin m...@redhat.com Cc: Petr Matousek pmato...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V1: - Doing check in virtio.c instead of virtio-pci.c - Drop

Re: [Qemu-devel] [PATCH] virtio-net: properly check the vhost status during status set

2013-05-06 Thread Jason Wang
On 04/28/2013 04:25 PM, Michael S. Tsirkin wrote: On Sun, Apr 28, 2013 at 03:51:32PM +0800, Jason Wang wrote: On 04/28/2013 03:32 AM, Michael S. Tsirkin wrote: On Sat, Apr 27, 2013 at 01:11:16PM +0800, Jason Wang wrote: On 04/26/2013 08:26 PM, Michael S. Tsirkin wrote: On Fri, Apr 26, 2013

Re: [Qemu-devel] [PATCH] ps2: add support of auto-repeat

2013-05-16 Thread Jason Wang
On 05/16/2013 12:30 PM, Amos Kong wrote: Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, but ps2 backend doesn't process it and no auto-repeat implementation. This patch adds support of auto-repeat feature. Guest ps2 driver sets autorepeat to fastest possible in reset,

[Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2012-12-28 Thread Jason Wang
405.17 9695.12 310.54 9423.76 223.47 Jason Wang (12): tap: multiqueue support net: introduce qemu_get_queue() net: introduce qemu_get_nic() net: intorduce qemu_del_nic() net: multiqueue support vhost: multiqueue support virtio: introduce virtio_queue_del() virtio: add a queue_index

[Qemu-devel] [PATCH 09/12] virtio-net: separate virtqueue from VirtIONet

2012-12-28 Thread Jason Wang
To support multiqueue virtio-net, the first step is to separate the virtqueue related fields from VirtIONet to a new structure VirtIONetQueue. The following patches will add an array of VirtIONetQueue to VirtIONet based on this patch. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio

[Qemu-devel] [PATCH 02/12] net: introduce qemu_get_queue()

2012-12-28 Thread Jason Wang
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/cadence_gem.c|8 +++--- hw/dp8393x.c

[Qemu-devel] [PATCH 03/12] net: introduce qemu_get_nic()

2012-12-28 Thread Jason Wang
To support multiqueue , the patch introduce a helper qemu_get_nic() to get the NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/cadence_gem.c|8 hw/dp8393x.c

[Qemu-devel] [PATCH 11/12] virtio-net: migration support for multiqueue

2012-12-28 Thread Jason Wang
This patch add migration support for multiqueue virtio-net. The version were bumped to 12. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 45 +++-- 1 files changed, 35 insertions(+), 10 deletions(-) diff --git a/hw/virtio-net.c b/hw

[Qemu-devel] [PATCH 08/12] virtio: add a queue_index to VirtQueue

2012-12-28 Thread Jason Wang
Add a queue_index to VirtQueue and a helper to fetch it, this could be used by multiqueue supported device. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw

[Qemu-devel] [PATCH 01/12] tap: multiqueue support

2012-12-28 Thread Jason Wang
) to qemu. Each TAPState were still associated to a tap fd, which mean multiple TAPStates were created when user needs multiqueue taps. Only linux part were implemented now, since it's the only OS that support multiqueue tap. Signed-off-by: Jason Wang jasow...@redhat.com --- net/tap-aix.c

[Qemu-devel] [PATCH 12/12] virtio-net: compat multiqueue support

2012-12-28 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/pc_piix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 19e342a..0145370 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -295,6 +295,10

[Qemu-devel] [PATCH 05/12] net: multiqueue support

2012-12-28 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- hw/dp8393x.c |2 +- hw/mcf_fec.c |2 +- hw/qdev-properties.c | 46 +++-- hw/qdev-properties.h |6 +- net.c| 172 +- net.h| 27 +++- 6

[Qemu-devel] [PATCH 06/12] vhost: multiqueue support

2012-12-28 Thread Jason Wang
virtqueue which this vhost thread serves. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/vhost.c | 52 +--- hw/vhost.h |2 ++ hw/vhost_net.c |7 +-- hw/vhost_net.h |2 +- hw/virtio-net.c |3 ++- 5 files changed

[Qemu-devel] [PATCH 07/12] virtio: introduce virtio_queue_del()

2012-12-28 Thread Jason Wang
Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang jasowang --- hw/virtio.c |9 + hw/virtio.h |2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b

[Qemu-devel] [PATCH 04/12] net: intorduce qemu_del_nic()

2012-12-28 Thread Jason Wang
To support multiqueue nic, this patch separate the nic destructor from qemu_del_net_client() to a new helper qemu_del_nic(). The following patches would refactor this function to support multiqueue nic. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/e1000.c |2 +- hw/eepro100

[Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2012-12-28 Thread Jason Wang
This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 318

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-03 Thread Jason Wang
On 12/29/2012 01:52 AM, Blue Swirl wrote: On Fri, Dec 28, 2012 at 10:32 AM, Jason Wang jasow...@redhat.com wrote: This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet

Re: [Qemu-devel] [PATCH 1/2] e1000: no need auto-negotiation if link was down

2013-01-05 Thread Jason Wang
, link status should not be changed in auto-negotiation. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- hw/e1000.c |5 + 1 file changed, 5 insertions(+) diff --git a/hw/e1000.c b/hw/e1000.c index 92fb00a..eebcd1d 100644 --- a/hw/e1000.c

Re: [Qemu-devel] [PATCH 11/12] virtio-net: migration support for multiqueue

2013-01-08 Thread Jason Wang
On 01/08/2013 03:10 PM, Michael S. Tsirkin wrote: On Fri, Dec 28, 2012 at 06:32:03PM +0800, Jason Wang wrote: This patch add migration support for multiqueue virtio-net. The version were bumped to 12. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 45

Re: [Qemu-devel] [PATCH 07/12] virtio: introduce virtio_queue_del()

2013-01-08 Thread Jason Wang
On 01/08/2013 03:14 PM, Michael S. Tsirkin wrote: On Fri, Dec 28, 2012 at 06:31:59PM +0800, Jason Wang wrote: Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang jasowang Actually del_queue

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret = tap_detach(nc-peer); +} + +return ret; +} + +static void

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 07:24 PM, Wanlong Gao wrote: On 01/08/2013 06:14 PM, Jason Wang wrote: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On 01/09/2013 04:23 PM, Wanlong Gao wrote: On 01/08/2013 06:14 PM, Jason Wang wrote: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao

Re: [Qemu-devel] [PATCH 01/12] tap: multiqueue support

2013-01-09 Thread Jason Wang
On 01/09/2013 05:56 PM, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: diff --git a/qapi-schema.json b/qapi-schema.json index 5dfa052..583eb7c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2465,7 +2465,7 @@ { 'type': 'NetdevTapOptions

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On 01/09/2013 06:01 PM, Wanlong Gao wrote: On 01/09/2013 05:30 PM, Jason Wang wrote: On 01/09/2013 04:23 PM, Wanlong Gao wrote: On 01/08/2013 06:14 PM, Jason Wang wrote: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao

Re: [Qemu-devel] [PATCH] e1000: make ICS write-only

2013-01-09 Thread Jason Wang
On 01/09/2013 06:51 PM, Michael S. Tsirkin wrote: Since commit b1332393cdd7d023de8f1f8aa136ee7866a18968, qemu started updating ICS register when interrupt is sent, with the intent to match spec better (guests do not actually read this register). However, the function set_interrupt_cause where

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-09 Thread Jason Wang
On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:52PM +0800, Jason Wang wrote: Perf Numbers: Two Intel Xeon 5620 with direct connected intel 82599EB Host/Guest kernel: David net tree vhost

Re: [Qemu-devel] [PATCH] e1000: make ICS write-only

2013-01-09 Thread Jason Wang
On 01/09/2013 11:34 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 11:28:29PM +0800, Jason Wang wrote: On 01/09/2013 06:51 PM, Michael S. Tsirkin wrote: Since commit b1332393cdd7d023de8f1f8aa136ee7866a18968, qemu started updating ICS register when interrupt is sent, with the intent

Re: [Qemu-devel] vhost-net thread getting stuck ?

2013-01-09 Thread Jason Wang
On 01/10/2013 04:25 AM, Chegu Vinod wrote: Hello, 'am running into an issue with the latest bits. [ Pl. see below. The vhost thread seems to be getting stuck while trying to memcopy...perhaps a bad address?. ] Wondering if this is a known issue or some recent regression ? Hi: Looks like

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: On 01/09/2013 06:01 PM, Wanlong Gao wrote: On 01/09/2013 05:30 PM, Jason Wang wrote: On 01/09/2013 04:23 PM, Wanlong Gao wrote: On 01/08/2013 06:14 PM, Jason Wang wrote: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On Thursday, January 10, 2013 02:49:14 PM Wanlong Gao wrote: On 01/10/2013 02:43 PM, Jason Wang wrote: On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: On 01/09/2013 06:01 PM, Wanlong Gao wrote: On 01/09/2013 05:30 PM, Jason Wang wrote: On 01/09/2013 04:23 PM, Wanlong Gao

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Jason Wang
On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:52PM +0800, Jason Wang wrote: Perf

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-10 Thread Jason Wang
On 01/10/2013 05:06 PM, Wanlong Gao wrote: On 01/10/2013 03:16 PM, Jason Wang wrote: On Thursday, January 10, 2013 02:49:14 PM Wanlong Gao wrote: On 01/10/2013 02:43 PM, Jason Wang wrote: On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: On 01/09/2013 06:01 PM, Wanlong Gao wrote

Re: [Qemu-devel] [PATCH 01/12] tap: multiqueue support

2013-01-10 Thread Jason Wang
On 01/10/2013 06:28 PM, Stefan Hajnoczi wrote: On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: Mainly suggestions to make the code easier to understand, but see the comment about the 1:1 queue/NetClientState model for a general issue with this approach. Ok, thanks

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Jason Wang
On 01/10/2013 07:49 PM, Stefan Hajnoczi wrote: On Thu, Jan 10, 2013 at 05:34:14PM +0800, Jason Wang wrote: On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29

Re: [Qemu-devel] [RFC PATCH 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com We will send vq command to set mac address in virtnet_set_mac_address() a little fix of coding style Maybe what you need is just a forward declaration. Signed-off-by: Amos Kong ak...@redhat.com ---

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

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currently we write MAC address to pci config space 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.

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-15 Thread Jason Wang
On 01/15/2013 03:44 AM, Anthony Liguori wrote: Jason Wang jasow...@redhat.com writes: Hello all: This seires is an update of last version of multiqueue virtio-net support. Recently, linux tap gets multiqueue support. This series implements basic support for multiqueue tap, nic and vhost

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

2013-01-15 Thread Jason Wang
On Wednesday, January 16, 2013 01:57:01 PM ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Currently we write MAC address to pci config space 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

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

2013-01-15 Thread Jason Wang
On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com In virtio-net guest driver, currently we write MAC address to pci config space byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new

Re: [Qemu-devel] [PATCH] add fd limitations for avoiding a buffer overflow

2013-01-25 Thread Jason Wang
On 01/25/2013 04:14 PM, Amos Kong wrote: FD_SET() and FD_CLR() are used to add and remove one descriptor from a set, the 'fd' should be less than FD_SETSIZE. Glibc will give a warning and crash the qemu when we set a fd (1024) to a set. # qemu -device

[Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-25 Thread Jason Wang
286.18 9409.75 278.31 4096 4 9487.35 374.1 9556.91 288.81 9441.94 221.64 16384 1 9380.43 403.8 9379.78 399.13 9382.42 393.55 16384 2 9367.69 406.93 9415.04 312.68 9409.29 300.9 16384 4 9391.96 405.17 9695.12 310.54 9423.76 223.47 Jason Wang (20): net: introduce qemu_get_queue() net: introduce

[Qemu-devel] [PATCH V2 01/20] net: introduce qemu_get_queue()

2013-01-25 Thread Jason Wang
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/cadence_gem.c|9 +++-- hw/dp8393x.c

[Qemu-devel] [PATCH V2 07/20] net: multiqueue support

2013-01-25 Thread Jason Wang
is not allowed. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/dp8393x.c|2 +- hw/mcf_fec.c|2 +- hw/qdev-properties-system.c | 46 +++--- hw/qdev-properties.h|6 +- include/net/net.h | 18 +-- net/net.c

[Qemu-devel] [PATCH V2 13/20] tap: multiqueue support

2013-01-25 Thread Jason Wang
of NetClientState were built up. A new parameter, mq_required were introduce in tap_open() to create multiqueue tap fds. Signed-off-by: Jason Wang jasow...@redhat.com --- include/net/tap.h |1 - net/tap-aix.c |3 +- net/tap-bsd.c |3 +- net/tap-haiku.c |3 +- net/tap

[Qemu-devel] [PATCH V2 15/20] virtio: introduce virtio_del_queue()

2013-01-25 Thread Jason Wang
Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang jasowang --- hw/virtio.c |9 + hw/virtio.h |2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b

[Qemu-devel] [PATCH V2 14/20] vhost: multiqueue support

2013-01-25 Thread Jason Wang
out of the starting/stopping of a specific vhost thread. The vhost_net_{start|stop}() were renamed to vhost_net_{start|stop}_one(), and a new vhost_net_{start|stop}() were introduced to configure the guest notifiers and start/stop all vhost/vhost_net devices. Signed-off-by: Jason Wang jasow

[Qemu-devel] [PATCH V2 19/20] virtio-net: migration support for multiqueue

2013-01-25 Thread Jason Wang
This patch add migration support for multiqueue virtio-net. Instead of bumping the version, we conditionally send the info of multiqueue only when the device support more than one queue to maintain the backward compatibility. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c

[Qemu-devel] [PATCH V2 20/20] virtio-net: compat multiqueue support

2013-01-25 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/pc_piix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 0a6923d..7bc3563 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -297,6 +297,10

[Qemu-devel] [PATCH V2 18/20] virtio-net: multiqueue support

2013-01-25 Thread Jason Wang
This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 317

[Qemu-devel] [PATCH V2 04/20] net: introduce qemu_find_net_clients_except()

2013-01-25 Thread Jason Wang
In multiqueue, all NetClientState that belongs to the same netdev or nic has the same id. So this patches introduces an helper qemu_find_net_clients_except() which finds all NetClientState with the same id. This will be used by multiqueue networking. Signed-off-by: Jason Wang jasow...@redhat.com

[Qemu-devel] [PATCH V2 09/20] tap: factor out common tap initialization

2013-01-25 Thread Jason Wang
This patch factors out the common initialization of tap into a new helper net_init_tap_one(). This will be used by multiqueue tap patches. Signed-off-by: Jason Wang jasow...@redhat.com --- net/tap.c | 130 ++--- 1 files changed, 73

[Qemu-devel] [PATCH V2 05/20] net: introduce qemu_net_client_setup()

2013-01-25 Thread Jason Wang
This patch separates the setup of NetClientState from its allocation, this will allow allocating an arrays of NetClientState and does the initialization one by one which is what multiqueue needs. Signed-off-by: Jason Wang jasow...@redhat.com --- net/net.c | 29 +++-- 1

[Qemu-devel] [PATCH V2 16/20] virtio: add a queue_index to VirtQueue

2013-01-25 Thread Jason Wang
Add a queue_index to VirtQueue and a helper to fetch it, this could be used by multiqueue supported device. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw

[Qemu-devel] [PATCH V2 10/20] tap: add Linux multiqueue support

2013-01-25 Thread Jason Wang
is only supported in Linux, return error on other platforms. Signed-off-by: Jason Wang jasow...@redhat.com --- net/tap-aix.c | 10 ++ net/tap-bsd.c | 11 +++ net/tap-haiku.c | 11 +++ net/tap-linux.c | 52

[Qemu-devel] [PATCH V2 12/20] tap: introduce a helper to get the name of an interface

2013-01-25 Thread Jason Wang
its name after creating the first queue. Only linux has this support since it's the only platform that supports multiqueue tap. Signed-off-by: Jason Wang jasow...@redhat.com --- include/net/tap.h |1 + net/tap-aix.c |6 ++ net/tap-bsd.c |4 net/tap-haiku.c |4

[Qemu-devel] [PATCH V2 17/20] virtio-net: separate virtqueue from VirtIONet

2013-01-25 Thread Jason Wang
To support multiqueue virtio-net, the first step is to separate the virtqueue related fields from VirtIONet to a new structure VirtIONetQueue. The following patches will add an array of VirtIONetQueue to VirtIONet based on this patch. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio

[Qemu-devel] [PATCH V2 08/20] tap: import linux multiqueue constants

2013-01-25 Thread Jason Wang
with IFF_DETACH_QUEUE, the queue were disabled in the linux kernel. When doing this ioctl with IFF_ATTACH_QUEUE, the queue were enabled in the linux kernel. Signed-off-by: Jason Wang jasow...@redhat.com --- net/tap-linux.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/tap

[Qemu-devel] [PATCH V2 11/20] tap: support enabling or disabling a queue

2013-01-25 Thread Jason Wang
only done when the tap was enabled. Signed-off-by: Jason Wang jasow...@redhat.com --- include/net/tap.h |2 ++ net/tap-win32.c | 10 ++ net/tap.c | 43 --- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/include/net

[Qemu-devel] [PATCH V2 06/20] net: introduce NetClientState destructor

2013-01-25 Thread Jason Wang
To allow allocating an array of NetClientState and free it once, this patch introduces destructor of NetClientState. Which could do type specific free, which could be used by multiqueue to free the array once. Signed-off-by: Jason Wang jasow...@redhat.com --- include/net/net.h |2 ++ net

[Qemu-devel] [PATCH V2 02/20] net: introduce qemu_get_nic()

2013-01-25 Thread Jason Wang
To support multiqueue, this patch introduces a helper qemu_get_nic() to get NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/cadence_gem.c|8 hw/dp8393x.c

[Qemu-devel] [PATCH V2 03/20] net: intorduce qemu_del_nic()

2013-01-25 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- hw/e1000.c |2 +- hw/eepro100.c|2 +- hw/ne2000.c |2 +- hw/pcnet-pci.c |2 +- hw/rtl8139.c |2 +- hw/usb/dev-network.c |2 +- hw/virtio-net.c |2 +- hw/xen_nic.c |2

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-27 Thread Jason Wang
On 01/28/2013 11:27 AM, Wanlong Gao wrote: On 01/25/2013 06:35 PM, Jason Wang wrote: Hello all: This seires is an update of last version of multiqueue virtio-net support. This series tries to brings multiqueue support to virtio-net through a multiqueue support tap backend and multiple vhost

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-28 Thread Jason Wang
On 01/29/2013 01:36 PM, Wanlong Gao wrote: On 01/28/2013 12:24 PM, Jason Wang wrote: On 01/28/2013 11:27 AM, Wanlong Gao wrote: On 01/25/2013 06:35 PM, Jason Wang wrote: Hello all: This seires is an update of last version of multiqueue virtio-net support. This series tries to brings

Re: [Qemu-devel] [PATCH V2 11/20] tap: support enabling or disabling a queue

2013-01-29 Thread Jason Wang
On 01/26/2013 03:13 AM, Blue Swirl wrote: On Fri, Jan 25, 2013 at 10:35 AM, Jason Wang jasow...@redhat.com wrote: This patch introduce a new bit - enabled in TAPState which tracks whether a specific queue/fd is enabled. The tap/fd is enabled during initialization and could be enabled/disabled

[Qemu-devel] [PATCH V3 00/20] Multiqueue virtio-net

2013-01-29 Thread Jason Wang
2 9367.69 406.93 9415.04 312.68 9409.29 300.9 16384 4 9391.96 405.17 9695.12 310.54 9423.76 223.47 Jason Wang (20): net: introduce qemu_get_queue() net: introduce qemu_get_nic() net: intorduce qemu_del_nic() net: introduce qemu_find_net_clients_except() net: introduce

<    1   2   3   4   5   6   7   8   9   10   >