[Qemu-devel] [PATCH V2 2/3] migration: introduce self_announce_delay()

2014-05-20 Thread Jason Wang
This patch introduces self_announce_delay() to calculate the delay for the next announce round. This could be used by other device e.g virtio-net who wants to do announcing by itself. Signed-off-by: Jason Wang jasow...@redhat.com --- include/migration/vmstate.h |8 savevm.c

[Qemu-devel] [PATCH V2 1/3] migration: export SELF_ANNOUNCE_ROUNDS

2014-05-20 Thread Jason Wang
Export it for other users. Signed-off-by: Jason Wang jasow...@redhat.com --- include/migration/vmstate.h |2 ++ savevm.c|1 - 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 7e45048

[Qemu-devel] [PATCH V2 3/3] virtio-net: announce self by guest

2014-05-20 Thread Jason Wang
...@huawei.com Cc: Amos Kong ak...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/virtio-net.c| 42 include/hw/i386/pc.h |5 include/hw/virtio/virtio-net.h | 17 3 files changed, 64

Re: [Qemu-devel] question about patch send the gratuitous by guest

2014-02-17 Thread Jason Wang
On 02/15/2014 11:01 AM, Weidong Huang wrote: it configure vlan or alias on the virtio net. But bridge or bond do not send arp. what's your opinion? Do you mean bridge or bond in guest? BTW,this feature need modify the driver of virtio net. Only the newest linux kernel support it. So

Re: [Qemu-devel] question about patch send the gratuitous by guest

2014-02-17 Thread Jason Wang
On 02/18/2014 12:25 PM, Weidong Huang wrote: On 2014/2/18 10:48, Jason Wang wrote: On 02/15/2014 11:01 AM, Weidong Huang wrote: it configure vlan or alias on the virtio net. But bridge or bond do not send arp. what's your opinion? Do you mean bridge or bond in guest? yes. I'm

[Qemu-devel] [PATCH] virtio-net: calculate proper msix vectors on init

2014-02-20 Thread Jason Wang
...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio-pci.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7b91841..1dec491 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c

Re: [Qemu-devel] [PATCH] virtio-net: calculate proper msix vectors on init

2014-02-21 Thread Jason Wang
On 02/21/2014 01:00 PM, Jason Wang wrote: Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors parameter. In fact, we can simplifying this by calculate the number

[Qemu-devel] [PATCH V2] virtio-net: calculate proper msix vectors on init

2014-02-21 Thread Jason Wang
...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio-pci.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7b91841..3b3b0e2 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c

Re: [Qemu-devel] [PATCH] virtio-net: calculate proper msix vectors on init

2014-02-23 Thread Jason Wang
On 02/23/2014 02:34 PM, Michael S. Tsirkin wrote: On Fri, Feb 21, 2014 at 01:00:57PM +0800, Jason Wang wrote: Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors

Re: [Qemu-devel] [PATCH V2] virtio-net: calculate proper msix vectors on init

2014-03-04 Thread Jason Wang
On 03/04/2014 11:26 AM, Gonglei (Arei) wrote: -Original Message- From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On Behalf Of Jason Wang Sent: Friday, February 21, 2014 5:05 PM To: aligu...@amazon.com; m

Re: [Qemu-devel] [PATCH V2] virtio-net: calculate proper msix vectors on init

2014-03-04 Thread Jason Wang
On 03/04/2014 11:26 AM, Gonglei (Arei) wrote: -Original Message- From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On Behalf Of Jason Wang Sent: Friday, February 21, 2014 5:05 PM To: aligu...@amazon.com; m

Re: [Qemu-devel] [PATCH V7 0/5] Send the gratuitous by guest

2014-02-10 Thread Jason Wang
- Original Message - Hi, Has anybody here work on this subject and update a newer patch? Thanks in advance. Yongan Liu Hi, I will continue work on this. Just FYI, based on the discussions on past version, I plan to send a v8 just for virtio-net. Thanks

Re: [Qemu-devel] question about patch send the gratuitous by guest

2014-02-11 Thread Jason Wang
On 02/11/2014 03:43 PM, Huangweidong (C) wrote: Hi, I found the network was broken after migrating the vm, the same as you said in Send the gratuitous by guest.The vm modify the mac of network card.IN the scenario with vlan the network was broken too. The guest driver of virtio-net in

Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken

2014-04-22 Thread Jason Wang
On 04/22/2014 04:55 PM, Fam Zheng wrote: If guest driver behaves abnormally, emulation code could mark the device as broken. Once broken is set, device emulation will typically wait for a reset command and ignore any other operations, but it could also return error responds. In other words,

Re: [Qemu-devel] [PATCH 2/3] virtio-blk: Don't exit on invalid VQ data

2014-04-22 Thread Jason Wang
On 04/22/2014 04:55 PM, Fam Zheng wrote: Set vdev's broken flag, instead of exit, if the VQ has invalid data. Check VirtIODevice.broken in VQ output handler, and don't pop any more request if set, until the device is reset. Signed-off-by: Fam Zheng f...@redhat.com ---

Re: [Qemu-devel] [PATCH V2 3/3] virtio-net: announce self by guest

2014-06-10 Thread Jason Wang
On 06/10/2014 06:10 PM, Michael S. Tsirkin wrote: On Tue, Jun 10, 2014 at 11:50:33AM +0530, Amit Shah wrote: On (Tue) 20 May 2014 [14:01:44], Jason Wang wrote: It's hard to track all mac addresses and their configurations (e.g vlan or ipv6) in qemu. Without this information, it's impossible

[Qemu-devel] [PATCH V3] virtio-net: calculate proper msix vectors on init

2014-03-06 Thread Jason Wang
...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V2: - add compat flag to avoid breaking the migration Changes from V1: - remove the debug line --- hw/virtio/virtio-pci.c | 8 +++- include/hw/i386/pc.h | 5 + 2 files changed, 12 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH RFC] virtio-net: announce self by guest

2014-03-13 Thread Jason Wang
...@huawei.com Signed-off-by: Jason Wang jasow...@redhat.com --- --- hw/net/virtio-net.c| 47 ++ include/hw/virtio/virtio-net.h | 19 - 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c

Re: [Qemu-devel] [PATCH] Tap: fix vcpu long time io blocking on tap

2014-07-16 Thread Jason Wang
On 07/17/2014 11:43 AM, Wangkai (Kevin,C) wrote: -Original Message- From: Stefan Hajnoczi [mailto:stefa...@gmail.com] Sent: Tuesday, July 15, 2014 11:00 PM To: Wangkai (Kevin,C) Cc: Stefan Hajnoczi; Lee yang; qemu-devel@nongnu.org; aligu...@amazon.com Subject: Re: [Qemu-devel]

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-18 Thread Jason Wang
On 08/18/2014 04:32 PM, zhanghailiang wrote: On 2014/8/18 14:55, Jason Wang wrote: On 08/18/2014 12:46 PM, zhanghailiang wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running

[Qemu-devel] [PATCH] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
...@huawei.com Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com -- Zhang Jie, please test this patch to see if it fixes the issue. --- hw/net/vhost_net.c | 20 ++-- hw/virtio/vhost.c | 2 -- 2 files changed, 10 insertions(+), 12

Re: [Qemu-devel] [PATCH] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
On 08/18/2014 08:11 PM, Zhangjie (HZ) wrote: On 2014/8/18 17:51, Jason Wang wrote: commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue support changed the order of stopping the device. Previously vhost_dev_stop would disable backend and only afterwards, unset guest notifiers. We

Re: [Qemu-devel] [PATCH] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
On 08/18/2014 09:20 PM, William Dauchy wrote: On Mon, Aug 18, 2014 at 11:51 AM, Jason Wang jasow...@redhat.com wrote: err: @@ -254,16 +254,16 @@ void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs, VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus); int i, r; +for (i = 0

Re: [Qemu-devel] [PATCH] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
On 08/19/2014 03:53 AM, Michael S. Tsirkin wrote: On Mon, Aug 18, 2014 at 05:51:31PM +0800, Jason Wang wrote: commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue support changed the order of stopping the device. Previously vhost_dev_stop would disable backend and only

[Qemu-devel] [PATCH V2] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
...@huawei.com Cc: William Dauchy wdau...@gmail.com Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com -- Zhang Jie, please test this patch to see if it fixes the issue. --- hw/net/vhost_net.c | 20 ++-- hw/virtio/vhost.c | 2 -- 2 files

Re: [Qemu-devel] vhost-net issue with multiples interfaces using MQ

2014-08-18 Thread Jason Wang
On 08/18/2014 07:42 PM, William Dauchy wrote: Hello, Using qemu2.1.0, a linux v3.14.X x86_64 as host and a linux v3.12.X x86_64 as guest I'm starting a VM with these network interfaces: [netdev vifA.0] type = tap vhost = on ifname = vifA.0 downscript = no script = no

Re: [Qemu-devel] [PATCH V2] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
On 08/19/2014 11:02 AM, Jason Wang wrote: commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue support changed the order of stopping the device. Previously vhost_dev_stop would disable backend and only afterwards, unset guest notifiers. We now unset guest notifiers while vhost

[Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly

2014-08-18 Thread Jason Wang
. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com -- Changes from Michael's patch: - Remove the assertion Changes from V1: - Rebase to latest Changes from V2: - Introduce vhost_net_set_vq_index() to unbreak multiqueue Zhang Jie, please test this patch to see if it fixes the issue

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-19 Thread Jason Wang
On 08/19/2014 08:29 PM, Stefan Hajnoczi wrote: On Mon, Aug 18, 2014 at 04:32:42PM +0800, zhanghailiang wrote: On 2014/8/18 14:55, Jason Wang wrote: On 08/18/2014 12:46 PM, zhanghailiang wrote: diff --git a/net/net.c b/net/net.c index 6d930ea..21f0d48 100644 --- a/net/net.c +++ b/net/net.c

Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly

2014-08-20 Thread Jason Wang
On 08/20/2014 05:23 PM, Zhangjie (HZ) wrote: On 2014/8/19 12:56, Jason Wang wrote: commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue call it before setting Zhang Jie, please test this patch to see if it fixes the issue. +static void vhost_net_set_vq_index(struct vhost_net

Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly

2014-08-21 Thread Jason Wang
On 08/21/2014 02:28 PM, Zhangjie (HZ) wrote: On 2014/8/21 12:29, Jason Wang wrote: On 08/20/2014 05:23 PM, Zhangjie (HZ) wrote: On 2014/8/19 12:56, Jason Wang wrote: commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue call it before setting Zhang Jie, please test this patch

Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly

2014-08-21 Thread Jason Wang
On 08/21/2014 02:28 PM, Zhangjie (HZ) wrote: On 2014/8/21 12:29, Jason Wang wrote: On 08/20/2014 05:23 PM, Zhangjie (HZ) wrote: On 2014/8/19 12:56, Jason Wang wrote: commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 vhost: multiqueue call it before setting Zhang Jie, please test

Re: [Qemu-devel] [question] one vhost kthread servers mulitiple tx/rx queues which blong to one virtio-net device

2014-08-22 Thread Jason Wang
On 08/22/2014 10:30 AM, Zhang Haoyu wrote: Hi, Krishna, Shirley How got get the latest patch of M:N Implementation of mulitiqueue, I am going to test the the combination of M:N Implementation of mulitiqueue and vhost: add polling mode. Thanks, Zhang Haoyu Just FYI. You may refer

Re: [Qemu-devel] [PATCH V2] net: Fix dealing with packets when runstate changes

2014-08-22 Thread Jason Wang
On 08/21/2014 08:39 PM, zhanghailiang wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running. If this happened in *migration's* last PAUSE VM stage, The new dirty RAM related to the packets

Re: [Qemu-devel] [PATCH V2] net: Fix dealing with packets when runstate changes

2014-08-22 Thread Jason Wang
On 08/22/2014 05:21 PM, zhanghailiang wrote: On 2014/8/22 15:40, Jason Wang wrote: On 08/21/2014 08:39 PM, zhanghailiang wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running

Re: [Qemu-devel] [question] e1000 interrupt storm happened because of its corresponding ioapic-irr bit always set

2014-08-24 Thread Jason Wang
On 08/23/2014 06:36 PM, Zhang Haoyu wrote: Hi, all I use a qemu-1.4.1/qemu-2.0.0 to run win7 guest, and encounter e1000 NIC interrupt storm, because if (!ent-fields.mask (ioapic-irr (1 i))) is always true in __kvm_ioapic_update_eoi(). Any ideas? We meet this several times: search

Re: [Qemu-devel] [question] e1000 interrupt storm happened becauseof its corresponding ioapic-irr bit always set

2014-08-25 Thread Jason Wang
On 08/25/2014 03:17 PM, Zhang Haoyu wrote: Hi, all I use a qemu-1.4.1/qemu-2.0.0 to run win7 guest, and encounter e1000 NIC interrupt storm, because if (!ent-fields.mask (ioapic-irr (1 i))) is always true in __kvm_ioapic_update_eoi(). Any ideas? We meet this several times: search

Re: [Qemu-devel] [question] e1000 interrupt storm happened becauseof its corresponding ioapic-irr bit always set

2014-08-25 Thread Jason Wang
On 08/25/2014 03:17 PM, Zhang Haoyu wrote: Hi, all I use a qemu-1.4.1/qemu-2.0.0 to run win7 guest, and encounter e1000 NIC interrupt storm, because if (!ent-fields.mask (ioapic-irr (1 i))) is always true in __kvm_ioapic_update_eoi(). Any ideas? We meet this several times:

Re: [Qemu-devel] [PATCH V3] net: Fix dealing with packets when runstate changes

2014-08-25 Thread Jason Wang
On 08/25/2014 06:47 PM, zhanghailiang wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running. If this happened in *migration's* last PAUSE VM stage, The new dirty RAM related to the packets

Re: [Qemu-devel] [question] e1000 interrupt storm happened becauseof its correspondingioapic-irr bit always set

2014-08-26 Thread Jason Wang
On 08/26/2014 05:28 PM, Zhang Haoyu wrote: Hi, all I use a qemu-1.4.1/qemu-2.0.0 to run win7 guest, and encounter e1000 NIC interrupt storm, because if (!ent-fields.mask (ioapic-irr (1 i))) is always true in __kvm_ioapic_update_eoi(). Any ideas? We meet this several times: search

Re: [Qemu-devel] [PATCH V4] net: Forbid dealing with packets when VM is not running

2014-08-26 Thread Jason Wang
will stay unavailable unless you run 'service network restart' Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com --- v4: - The action of flush queued packets is unnecessary, remove this. (Thanks for the help of Jason Wang and Stefan). v3: - change the 'vmstate' to 'vm_running

Re: [Qemu-devel] [question] e1000 interrupt storm happened becauseofits correspondingioapic-irr bit always set

2014-08-28 Thread Jason Wang
On 08/27/2014 05:31 PM, Zhang Haoyu wrote: Hi, all I use a qemu-1.4.1/qemu-2.0.0 to run win7 guest, and encounter e1000 NIC interrupt storm, because if (!ent-fields.mask (ioapic-irr (1 i))) is always true in __kvm_ioapic_update_eoi(). Any ideas? We meet this several times:

[Qemu-devel] [PATCH] net: don't use set/get_pointer() in set/get_netdev()

2014-08-28 Thread Jason Wang
...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/core/qdev-properties-system.c | 71 ++-- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index ae0900f..b3753ce 100644

Re: [Qemu-devel] [question] e1000 interrupt storm happenedbecauseofits correspondingioapic-irr bit always set

2014-08-28 Thread Jason Wang
routine ( such as note_interrupt() in linux ), this bad irq would be recognized soon as in the past. Signed-off-by: Jason Wang jasowang at redhat.com --- virt/kvm/ioapic.c | 47 +-- virt/kvm/ioapic.h |2 ++ 2 files changed, 47 insertions

Re: [Qemu-devel] [question] e1000 interrupt storm happenedbecauseofitscorrespondingioapic-irr bit always set

2014-08-28 Thread Jason Wang
On 08/29/2014 12:07 PM, Zhang, Yang Z wrote: Zhang Haoyu wrote on 2014-08-29: Hi, Yang, Gleb, Michael, Could you help review below patch please? I don't quite understand the background. Why ioacpi-irr is setting before EOI? It should be driver's responsibility to clear the interrupt before

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-02 Thread Jason Wang
+0400, Andrey Korolyov wrote: On Wed, Sep 3, 2014 at 1:03 AM, Michael S. Tsirkin m...@redhat.com wrote: bad one is the Author: Jason Wang jasow...@redhat.com Date: Tue Sep 2 18:07:46 2014 +0300 vhost_net: start/stop guest notifiers properly upstream has this (pull request sent

[Qemu-devel] [PATCH] vhost_net: initialize acked_features to a safe value during ack

2014-09-03 Thread Jason Wang
it by recover this step. Cc: Nikolay Nikolaev n.nikol...@virtualopensystems.com Cc: Andrey Korolyov and...@xdel.ru Cc: Michael S. Tsirkin m...@redhat.com Cc: Michael Roth mdr...@linux.vnet.ibm.com Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/vhost_net.c | 1 + 1

Re: [Qemu-devel] [PATCH] vhost-scsi: init backend features earlier

2014-09-03 Thread Jason Wang
On 09/03/2014 05:02 PM, Michael S. Tsirkin wrote: As vhost core uses backend_features during init, clear it earlier to avoid using uninitialized memory. This is harmless since vhost scsi ignores the result anyway, but it avoids valgrind errors. Cc: qemu-sta...@nongnu.org Cc: Jason Wang

Re: [Qemu-devel] [PATCH] vhost_net: init acked_features to backend_features

2014-09-03 Thread Jason Wang
will sometimes fail. To fix, initialize field in core vhost code. As the next step, cleanup vhost scsi code as well. Reported-by: Jason Wang jasow...@redhat.com Reported-by: Andrey Korolyov and...@xdel.ru Cc: Nikolay Nikolaev n.nikol...@virtualopensystems.com Cc: qemu-sta...@nongnu.org Signed-off

Re: [Qemu-devel] [PATCH] vhost_net: cleanup recovery

2014-09-03 Thread Jason Wang
: Andrey Korolyov and...@xdel.ru Cc: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/vhost_net.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index ba5d544..1fe18c7 100644

Re: [Qemu-devel] [PATCH v3] vhost_net: cleanup recovery

2014-09-03 Thread Jason Wang
: Andrey Korolyov and...@xdel.ru Cc: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/vhost_net.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index ba5d544..3819044 100644

Re: [Qemu-devel] [PATCH] net: prevent sending packets while guest is stopped

2014-09-03 Thread Jason Wang
On 09/02/2014 10:23 PM, Stefan Hajnoczi wrote: Do not modify guest memory or devices when the guest is stopped. Currently the netdevs still send packets while the guest is stopped if their file descriptor was being monitored for write (e.g. the socket write buffer filled before the guest was

Re: [Qemu-devel] [question] e1000 interrupt stormhappenedbecauseofits correspondingioapic-irr bit always set

2014-09-03 Thread Jason Wang
and for guest who has a bad irq detection routine ( such as note_interrupt() in linux ), this bad irq would be recognized soon as in the past. Signed-off-by: Jason Wang jasowang at redhat.com --- virt/kvm/ioapic.c | 47 +-- virt

Re: [Qemu-devel] [PATCH 1/3] net: invoke callback when purging queue

2014-09-04 Thread Jason Wang
if necessary. Cc: qemu-sta...@nongnu.org Cc: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/queue.c b/net/queue.c index 859d02a..f948318 100644 --- a/net/queue.c +++ b/net/queue.c

Re: [Qemu-devel] [PATCH 2/3] net: complete all queued packets on VM stop

2014-09-04 Thread Jason Wang
On 09/04/2014 04:39 PM, Michael S. Tsirkin wrote: This completes all packets, ensuring that callbacks will not run when VM is stopped. Cc: qemu-sta...@nongnu.org Cc: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/net.c | 33

Re: [Qemu-devel] [PATCH] net: don't use set/get_pointer() in set/get_netdev()

2014-09-08 Thread Jason Wang
On 09/05/2014 12:21 AM, Stefan Hajnoczi wrote: Unfortunately this patch breaks aarch64-softmmu qtests: GTESTER check-qtest-aarch64 Broken pipe GTester: last random seed: R02S6d8ab263ca56f8ae7a4b47bdf93fbc73 Please take a look at what is causing this. Dropped from the net branch. Stefan

Re: [Qemu-devel] [PATCH] net: don't use set/get_pointer() in set/get_netdev()

2014-09-08 Thread Jason Wang
On 09/05/2014 12:40 AM, Peter Maydell wrote: On 4 September 2014 17:21, Stefan Hajnoczi stefa...@gmail.com wrote: Unfortunately this patch breaks aarch64-softmmu qtests: GTESTER check-qtest-aarch64 Broken pipe GTester: last random seed: R02S6d8ab263ca56f8ae7a4b47bdf93fbc73 Please take a

[Qemu-devel] [PATCH V2] net: don't use set/get_pointer() in set/get_netdev()

2014-09-08 Thread Jason Wang
...@redhat.com Cc: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V1: - validate ncs pointer before accessing them, this fixes the qtest failure on arm. --- hw/core/qdev-properties-system.c | 71 ++-- 1 file changed

Re: [Qemu-devel] [PULL 6/7] net: complete all queued packets on VM stop

2014-09-09 Thread Jason Wang
On 09/04/2014 11:50 PM, Stefan Hajnoczi wrote: From: Michael S. Tsirkin m...@redhat.com This completes all packets, ensuring that callbacks will not run when VM is stopped. Cc: qemu-sta...@nongnu.org Cc: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [Qemu-devel] [PATCH 1/2] virtio-net: drop assert on vm stop

2014-09-11 Thread Jason Wang
the issue of qemu crashing when stop during transmission. Acked-by: Jason Wang jasow...@redhat.com Cc: qemu-sta...@nongnu.org Cc: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/net/virtio-net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/net

Re: [Qemu-devel] [PATCH 2/2] Revert virtio: don't call device on !vm_running

2014-09-11 Thread Jason Wang
to asserts. Previous commit fixes the root issue that motivated a1bc7b827e422e1ff065640d8ec5347c4aadfcd8 differently, so there's no longer a need for this change. In the future, we might be able to drop checking vm_running completely, and check vm state directly. Acked-by: Jason Wang jasow

Re: [Qemu-devel] [PATCH v5] virtio-pci: enable bus master for old guests

2014-09-15 Thread Jason Wang
On 09/12/2014 02:20 AM, Michael S. Tsirkin wrote: commit cc943c36faa192cd4b32af8fe5edb31894017d35 pci: Use bus master address space for delivering MSI/MSI-X messages breaks virtio-net for rhel6.[56] x86 guests because they don't enable bus mastering for virtio PCI devices. For the same

Re: [Qemu-devel] [PATCH V2] net: don't use set/get_pointer() in set/get_netdev()

2014-10-12 Thread Jason Wang
On 10/10/2014 09:03 PM, Markus Armbruster wrote: Jason Wang jasow...@redhat.com writes: Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV

Re: [Qemu-devel] [PATCH V2] net: don't use set/get_pointer() in set/get_netdev()

2014-10-12 Thread Jason Wang
On 10/13/2014 11:31 AM, Jason Wang wrote: On 10/10/2014 09:03 PM, Markus Armbruster wrote: Jason Wang jasow...@redhat.com writes: Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers which

[Qemu-devel] [PATCH V3] net: don't use set/get_pointer() in set/get_netdev()

2014-10-12 Thread Jason Wang
...@redhat.com Cc: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V2: - Use error_setg() instead of error_set_from_qdev_prop_error() for E2BIG error. - Clean the return part of the set_netdev() since eror_set_from_qdev_prop_error() does nothing when

[Qemu-devel] [PATCH] virtio-net: correctly advertise host features

2014-11-12 Thread Jason Wang
We should not advertise the feature that depends on ctrl vq is it was not enabled. And not advertise the VIRTIO_NET_F_CTRL_RX_EXTRA is VIRTIO_NET_F_CTRL_RX is not enabled. Otherwise, this may confuse guest driver and lead unexpected bugs. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net

Re: [Qemu-devel] [PATCH 1/4] net/slirp: fix memory leak

2014-11-19 Thread Jason Wang
)); fwd-hd = qemu_chr_new(buf, p, NULL); if (!fwd-hd) { error_report(could not open guest forwarding device '%s', buf); Reviewed-by: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] [PATCH 2/4] net/socket: fix Uninitialized scalar variable

2014-11-19 Thread Jason Wang
=%d, fd); } return s; Reviewed-by: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] [PATCH 3/4] pcnet: fix Negative array index read

2014-11-19 Thread Jason Wang
), s-buffer + s-xmit_pos, bcnt, CSR_BSWP(s)); Reviewed-by: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-19 Thread Jason Wang
On 11/20/2014 02:29 PM, Paolo Bonzini wrote: On 20/11/2014 06:57, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Coverity spot: Assigning: iov = struct iovec [3]({{buf, 12UL}, {(void *)dot1q_buf, 4UL}, {buf + 12, size -

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-19 Thread Jason Wang
On 11/20/2014 03:12 PM, Gonglei wrote: On 2014/11/20 14:55, Jason Wang wrote: On 11/20/2014 02:29 PM, Paolo Bonzini wrote: On 20/11/2014 06:57, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Coverity spot: Assigning: iov = struct iovec [3]({{buf, 12UL

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Jason Wang
On 11/20/2014 04:05 PM, Gonglei wrote: On 2014/11/20 15:50, Jason Wang wrote: Maybe just initialize iov unconditionally at the beginning and check dot1q_buf instead of iov for the rest of the functions. (Need deal with size ETHER_ADDR_LEN * 2) More complicated, because we can't initialize

Re: [Qemu-devel] [PATCH 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Jason Wang
On 11/20/2014 04:18 PM, Gonglei wrote: On 2014/11/20 16:11, Jason Wang wrote: On 11/20/2014 04:05 PM, Gonglei wrote: On 2014/11/20 15:50, Jason Wang wrote: Maybe just initialize iov unconditionally at the beginning and check dot1q_buf instead of iov for the rest of the functions. (Need deal

Re: [Qemu-devel] [PATCH v2 for-2.2 3/4] pcnet: fix Negative array index read

2014-11-20 Thread Jason Wang
...@huawei.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com --- hw/net/pcnet.c | 55 ++- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index d344c15

Re: [Qemu-devel] [PATCH v2 for-2.2 4/4] rtl8139: fix Pointer to local outside scope

2014-11-20 Thread Jason Wang
, { .iov_base = buf + ETHER_ADDR_LEN * 2, .iov_len = size - ETHER_ADDR_LEN * 2 }, }; + +memcpy(vlan_iov, iov, sizeof(vlan_iov)); +iov = vlan_iov; } if (TxLoopBack == (s-TxConfig TxLoopBack)) Reviewed-by: Jason Wang jasow

Re: [Qemu-devel] [Xen-devel] virtio leaks cpu mappings, was: qemu crash with virtio on Xen domUs (backtrace included)

2014-11-24 Thread Jason Wang
On 11/25/2014 02:44 AM, Stefano Stabellini wrote: On Mon, 24 Nov 2014, Stefano Stabellini wrote: On Mon, 24 Nov 2014, Stefano Stabellini wrote: CC'ing Paolo. Wen, thanks for the logs. I investigated a little bit and it seems to me that the bug occurs when QEMU tries to unmap only a

Re: [Qemu-devel] [Xen-devel] virtio leaks cpu mappings, was: qemu crash with virtio on Xen domUs (backtrace included)

2014-11-25 Thread Jason Wang
On 11/25/2014 09:53 PM, Stefano Stabellini wrote: On Tue, 25 Nov 2014, Jason Wang wrote: On 11/25/2014 02:44 AM, Stefano Stabellini wrote: On Mon, 24 Nov 2014, Stefano Stabellini wrote: On Mon, 24 Nov 2014, Stefano Stabellini wrote: CC'ing Paolo. Wen, thanks for the logs. I investigated

Re: [Qemu-devel] [Xen-devel] virtio leaks cpu mappings, was: qemu crash with virtio on Xen domUs (backtrace included)

2014-11-26 Thread Jason Wang
On 11/26/2014 06:53 PM, Stefano Stabellini wrote: On Wed, 26 Nov 2014, Jason Wang wrote: On 11/25/2014 09:53 PM, Stefano Stabellini wrote: On Tue, 25 Nov 2014, Jason Wang wrote: On 11/25/2014 02:44 AM, Stefano Stabellini wrote: On Mon, 24 Nov 2014, Stefano Stabellini wrote: On Mon, 24

[Qemu-devel] [2.2 PATCH] virtio-net: fix unmap leak

2014-11-26 Thread Jason Wang
Congyang we...@cn.fujitsu.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/virtio-net.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c

Re: [Qemu-devel] [Qemu-stable] [2.2 PATCH] virtio-net: fix unmap leak

2014-11-27 Thread Jason Wang
On Thu, Nov 27, 2014 at 3:45 PM, Fam Zheng f...@redhat.com wrote: On Thu, 11/27 13:59, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks

Re: [Qemu-devel] [Qemu-stable] [2.2 PATCH] virtio-net: fix unmap leak

2014-11-27 Thread Jason Wang
On 11/27/2014 05:08 PM, Fam Zheng wrote: On Thu, 11/27 13:59, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes

[Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Jason Wang
Congyang we...@cn.fujitsu.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V1: - Use g_memdup() to simplify codes --- hw/net/virtio-net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-27 Thread Jason Wang
On Fri, Nov 28, 2014 at 9:16 AM, Fam Zheng f...@redhat.com wrote: On Thu, 11/27 23:13, Michael S. Tsirkin wrote: On Thu, Nov 27, 2014 at 07:21:35PM +, Stefan Hajnoczi wrote: On Thu, Nov 27, 2014 at 4:33 PM, Michael S. Tsirkin m...@redhat.com wrote: We leak cpu mappings when 1st

Re: [Qemu-devel] [PATCH] vhost: Fix vhostfd leak in error branch

2014-11-30 Thread Jason Wang
On Fri, Nov 28, 2014 at 5:26 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/scsi/vhost-scsi.c | 1 + hw/virtio/vhost.c| 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/scsi/vhost-scsi.c

Re: [Qemu-devel] [PATCH] vhost: Fix vhostfd leak in error branch

2014-11-30 Thread Jason Wang
On Mon, Dec 1, 2014 at 2:27 PM, Gonglei arei.gong...@huawei.com wrote: On 2014/12/1 13:03, Jason Wang wrote: On Fri, Nov 28, 2014 at 5:26 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/scsi/vhost

Re: [Qemu-devel] [PATCH v2] e1000: defer packets until BM enabled

2014-12-02 Thread Jason Wang
should be 0, PCI spec 6.2.4 */ -- MST Reviewed-by: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] [PATCH v2 2/2] e1000: decrement RDT if equal to RDH

2014-12-17 Thread Jason Wang
- Original Message - Some drivers set RDT=RDH. Oddly, this works on real hardware. To work around this, autodecrement RDT when this happens. Signed-off-by: Richard Tollerton rich.toller...@ni.com Signed-off-by: Jeff Westfahl jeff.westf...@ni.com --- hw/net/e1000.c | 6 ++ 1

Re: [Qemu-devel] [PATCH v2 1/2] e1000: Clear MDIC register when PHY addr is invalid

2014-12-17 Thread Jason Wang
-by: Richard Tollerton rich.toller...@ni.com Signed-off-by: Jeff Westfahl jeff.westf...@ni.com --- Looks correct. Reviewed-by: Jason Wang jasow...@redhat.com hw/net/e1000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index e33a4da

Re: [Qemu-devel] [PATCH 2/2] e1000: unconditionally enable bus mastering

2014-12-18 Thread Jason Wang
On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong ak...@redhat.com wrote: After enabled network debug of e1000 in Win2012-64r2 guest, Bus mastering of e1000 can't be enabled by e1000 driver. It caused guest can't get IP address. # bcdedit /debug on # bcdedit /dbgsettings net

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Jason Wang
On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong ak...@redhat.com wrote: Win2012-64r2 guest doesn't set bus mastering correctly, it caused guest network down, this patch ignored it for e1000 nic for workarounding the guest issue. Patch 1 is an update version of:

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Jason Wang
On Thu, Dec 18, 2014 at 7:11 PM, Denis V. Lunev den-li...@parallels.com wrote: On 18/12/14 14:01, Denis V. Lunev wrote: On 18/12/14 13:05, Jason Wang wrote: On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong ak...@redhat.com wrote: Win2012-64r2 guest doesn't set bus mastering correctly

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Jason Wang
On Fri, Dec 19, 2014 at 11:09 AM, Amos Kong ak...@redhat.com wrote: On Thu, Dec 18, 2014 at 10:13:07AM +0008, Jason Wang wrote: On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong ak...@redhat.com wrote: Win2012-64r2 guest doesn't set bus mastering correctly, it caused guest network down

Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-21 Thread Jason Wang
On 12/19/2014 09:25 PM, Amos Kong wrote: Passing some invalid fds in QEMU commandline, the fds don't exist. QEMU will get error TUNGETIFF ioctl() failed: Bad file descriptor, and coredump in setting queues. This patch checked return value of first operate to fd, QEMU will report error and

Re: [Qemu-devel] [PATCH] check return value of fcntl() to detect invalid fd

2014-12-21 Thread Jason Wang
On 12/22/2014 01:28 PM, Amos Kong wrote: On Mon, Dec 22, 2014 at 11:48:29AM +0800, Jason Wang wrote: On 12/19/2014 09:25 PM, Amos Kong wrote: Passing some invalid fds in QEMU commandline, the fds don't exist. QEMU will get error TUNGETIFF ioctl() failed: Bad file descriptor, and coredump

Re: [Qemu-devel] [PATCH] net: Add persistent flag to -net tap option

2014-12-21 Thread Jason Wang
On 12/21/2014 03:48 PM, Roy Vardi wrote: From: Roy Vardi r...@ezchip.com Add 'persistent' boolean flag to -net tap option. When set to off - tap interface will be released on shutdown When set to on\not specified - tap interface will remain I'm interested of the user cases in

Re: [Qemu-devel] [PATCH] net: Add persistent flag to -net tap option

2014-12-23 Thread Jason Wang
On Tue, Dec 23, 2014 at 4:44 PM, Roy Vardi r...@ezchip.com wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Monday, December 22, 2014 8:33 AM To: Roy Vardi; qemu-devel@nongnu.org Cc: aligu...@amazon.com; arm...@redhat.com; lcapitul...@redhat.com

[Qemu-devel] [PATCH 3/5] virtio-net: fix the upper bound when trying to delete queues

2015-02-05 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n-max_queues * 2 + 1. Cc: Anthony Liguori aligu...@amazon.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Qemu-devel] [PATCH 0/5] Support more virtio queues

2015-02-05 Thread Jason Wang
have about 80 queue pairs has their private MSI-X interrupt vectors. With sharing IRQ with queue pairs (RFC posted in https://lkml.org/lkml/2014/12/25/169), Linux driver can have up to about 186 queue pairs has their private MSI-X interrupt vectors. Thanks Jason Wang (5): virtio: rename

[Qemu-devel] [PATCH 2/5] virtio: increase VIRITO_QUEUE_MAX to 513

2015-02-05 Thread Jason Wang
Recent linux kernel supports up to 256 tap queues. Increase the limit to 513 (256 * 2 + 1(ctrl vq)). Signed-off-by: Jason Wang jasow...@redhat.com --- include/hw/virtio/virtio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio

[Qemu-devel] [PATCH 1/5] virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX

2015-02-05 Thread Jason Wang
...@de.ibm.com Cc: Christian Borntraeger borntrae...@de.ibm.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/char/virtio-serial-bus.c | 2 +- hw/s390x/s390-virtio-bus.c | 4 ++-- hw/s390x/s390-virtio-ccw.c | 2 +- hw/s390x/virtio-ccw.c| 10

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