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 af

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 wrote: >> err: >> @@ -254,16 +254,16 @@ void vhost_net_stop(VirtIODevice *dev, NetClientState >> *ncs, >> VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus); >> i

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_

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

2014-08-18 Thread Jason Wang
HZ)" Cc: William Dauchy Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang -- 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 deletions(-) diff -

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" >

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

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

2014-08-18 Thread Jason Wang
ped. - introduce the vhost_net_set_vq_index() and call it before setting guest notifiers. This is used to guarantee vhost_net has the correct virtqueue index when setting guest notifiers. Reported-by: "Zhangjie (HZ)" Cc: William Dauchy Signed-off-by: Michael S. Tsirkin Signed-off-b

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 6d

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

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

2014-08-20 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 i

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

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

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 re

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

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

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(). >>> >> >>>

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(). > > A

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

2014-08-26 Thread Jason Wang
y likely fail with message: > 'Destination HOST Unreachable', the NIC in VM will stay unavailable unless you > run 'service network restart' > > Signed-off-by: zhanghailiang > --- > v4: > - The action of flush queued packets is unnecessary, remove this. &

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 t

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

2014-08-28 Thread Jason Wang
). This patch solves this issue by not using set/get_pinter() and set and get netdev directly in set_netdev() and get_netdev(). After this the parse_netdev() and print_netdev() were no longer used and dropped from the source. Cc: Markus Armbruster Cc: Stefan Hajnoczi Signed-off-by: Jason Wang

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

2014-08-28 Thread Jason Wang
alue. After this patch, the guest >> can >> move a little forward when there's no suitable irq handler in case it may >> register one very soon and for guest who has a bad irq detection routine ( >> such >> as note_interrupt() in linux ), this bad irq would be reco

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 interru

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

2014-05-14 Thread Jason Wang
On 05/12/2014 03:22 PM, Michael S. Tsirkin wrote: > On Fri, Apr 11, 2014 at 10:54:47AM +0800, Jason Wang wrote: >> > It's hard to track all mac addresses and their configurations (e.g >> > vlan or ipv6) in qemu. Without those informations, it's impossible to >

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

2014-05-15 Thread Jason Wang
ring reset - free announce timer during clean - make announce work for non-vhost case Changes from V7: - Instead of introducing a global method for each kind of nic, this version limits the changes to virtio-net itself. Cc: Liuyongan Cc: Amos Kong Signed-off-by: Jason Wang --- hw/net/vi

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

2014-05-15 Thread Jason Wang
On 05/15/2014 04:28 PM, Michael S. Tsirkin wrote: > Thanks, looks good. > Some minor comments below, > > On Thu, May 15, 2014 at 03:16:47PM +0800, Jason Wang wrote: >> It's hard to track all mac addresses and their configurations (e.g >> vlan or ipv6) in qemu. Wit

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

2014-05-15 Thread Jason Wang
On 05/15/2014 05:45 PM, Michael S. Tsirkin wrote: > On Thu, May 15, 2014 at 05:22:28PM +0800, Jason Wang wrote: >> On 05/15/2014 04:28 PM, Michael S. Tsirkin wrote: >>> Thanks, looks good. >>> Some minor comments below, >>> >>> On Thu, May 15, 2014 at

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

2014-05-19 Thread Jason Wang
On 05/18/2014 05:04 PM, Michael S. Tsirkin wrote: > On Fri, May 16, 2014 at 01:02:51PM +0800, Jason Wang wrote: >> On 05/15/2014 05:45 PM, Michael S. Tsirkin wrote: >>> On Thu, May 15, 2014 at 05:22:28PM +0800, Jason Wang wrote: >>>> On 05/15/2014 04:28 PM, Michael

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

2014-05-19 Thread Jason Wang
On 05/19/2014 06:06 PM, Michael S. Tsirkin wrote: > On Mon, May 19, 2014 at 05:34:38PM +0800, Jason Wang wrote: >> > On 05/18/2014 05:04 PM, Michael S. Tsirkin wrote: >>> > > On Fri, May 16, 2014 at 01:02:51PM +0800, Jason Wang wrote: >>>> > >>

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

2014-05-19 Thread Jason Wang
: - clean VIRTIO_NET_S_ANNOUNCE bit during reset - free announce timer during clean - make announce work for non-vhost case Changes from V7: - Instead of introducing a global method for each kind of nic, this version limits the changes to virtio-net itself. Jason Wang (3): migration: export

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

2014-05-19 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 --- include/migration/vmstate.h |8 savevm.c|2

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

2014-05-19 Thread Jason Wang
Export it for other users. Signed-off-by: Jason Wang --- 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..6edce98 100644 --- a

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

2014-05-19 Thread Jason Wang
yongan Cc: Amos Kong Signed-off-by: Jason Wang --- hw/net/virtio-net.c| 42 include/hw/i386/pc.h |5 include/hw/virtio/virtio-net.h | 17 3 files changed, 64 insertions(+), 0 deletions(-) diff --git a/hw/

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 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_NET

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 writes: >> >>> Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue >>> support) tries to use set_pointer() and get_pointer() to set and get &g

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

2014-10-12 Thread Jason Wang
-by: Jason Wang --- 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 err is 0. Changes from V1: - validate ncs pointer before accessing them, this

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

2014-09-02 Thread Jason Wang
14 at 01:29:29AM +0400, Andrey Korolyov wrote: >>>>> On Wed, Sep 3, 2014 at 1:03 AM, Michael S. Tsirkin >>>>> wrote: >>>>>>> bad one is the >>>>>>> >>>>>>> Author: Jason Wang >>>>>>> Date:

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

2014-09-02 Thread Jason Wang
by recover this step. Cc: Nikolay Nikolaev Cc: Andrey Korolyov Cc: Michael S. Tsirkin Cc: Michael Roth Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f87c798..b1d4b1f

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

2014-09-03 Thread Jason Wang
**errp) > strerror(-ret)); > return; > } > -s->dev.backend_features = 0; > > error_setg(&s->migration_blocker, > "vhost-scsi does not support migration"); Acked-by: Jason Wang

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

2014-09-03 Thread Jason Wang
ialization 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 > Reported-by: Andrey Korolyov > Cc: Nikolay Nikolaev > Cc: qemu-sta...@nongnu.org > Signed-off-b

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

2014-09-03 Thread Jason Wang
. > > Cc: qemu-sta...@nongnu.org > Cc: Andrey Korolyov > Cc: Jason Wang > Signed-off-by: Michael S. Tsirkin > --- > 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

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

2014-09-03 Thread Jason Wang
. > > Cc: qemu-sta...@nongnu.org > Cc: Andrey Korolyov > Cc: Jason Wang > Signed-off-by: Michael S. Tsirkin > --- > 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

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 wa

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

2014-09-03 Thread Jason Wang
;> >> >this patch >>>> >> >solve this problems by scheduling a delayed work when the count of irq >>>> >> >injected >>>> >> >during eoi broadcast exceeds a threshold value. After this patch, the >>>> >>

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

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

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 > Signed-off-by: Michael S. Tsirkin > --- > 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. > >

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 wrote: >> Unfortunately this patch breaks aarch64-softmmu qtests: >> GTESTER check-qtest-aarch64 >> Broken pipe >> GTester: last random seed: R02S6d8ab263ca56f8ae7a4b47bdf93fbc73 >> >> Please take a look at w

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

2014-09-08 Thread Jason Wang
-by: Jason Wang --- 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, 39 insertions(+), 32 deletions(-) diff --git a/hw/core/qdev-properties

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

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

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

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

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

2014-09-11 Thread Jason Wang
so this change leads 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 che

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] 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: [Qe

[Qemu-devel] [V4 PATCH 0/5] Send the gratuitous packets by guest

2012-03-13 Thread Jason Wang
when needed. --- Jason Wang (5): net: reset the count after rounds of announcing net: announce self after vm start net: model specific announcing support virtio-net: notify guest to annouce itself virtio-net: compat guest announce support. gdbstub.c |2 +

[Qemu-devel] [V4 PATCH 2/5] net: announce self after vm start

2012-03-13 Thread Jason Wang
may be done through co-operation with guest, so this work should be done after vm is started. Signed-off-by: Jason Wang --- gdbstub.c |2 +- migration.c |5 ++--- monitor.c |2 +- qmp.c |2 +- savevm.c|2 +- sysemu.h|2 +- vl.c|7 +-- 7

[Qemu-devel] [V4 PATCH 1/5] net: reset the count after rounds of announcing

2012-03-13 Thread Jason Wang
As it would be called after continue a stopped guest. Signed-off-by: Jason Wang --- savevm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 80be1ff..5b59826 100644 --- a/savevm.c +++ b/savevm.c @@ -144,6 +144,7 @@ static void

[Qemu-devel] [V4 PATCH 3/5] net: model specific announcing support

2012-03-13 Thread Jason Wang
. Signed-off-by: Jason Wang --- net.h|2 ++ savevm.c |8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net.h b/net.h index 75a8c15..7195bfc 100644 --- a/net.h +++ b/net.h @@ -48,6 +48,7 @@ typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t *, size_t

[Qemu-devel] [V4 PATCH 5/5] virtio-net: compat guest announce support.

2012-03-13 Thread Jason Wang
Disable guest announce for compat machine types. Signed-off-by: Jason Wang --- hw/pc_piix.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 6c5c40f..780b607 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[Qemu-devel] [V4 PATCH 4/5] virtio-net: notify guest to annouce itself

2012-03-13 Thread Jason Wang
ounce presence of its link through config update interrupt. When gust have done the announcement, it should clear that bit. The feature is negotiated by a new feature bit VIRTIO_NET_F_ANNOUNCE. Signed-off-by: Jason Wang --- hw/virtio-net.c | 19 ++- hw/virtio-net.h |3 +

Re: [Qemu-devel] [V4 PATCH 2/5] net: announce self after vm start

2012-03-14 Thread Jason Wang
On 03/13/2012 05:18 PM, Paolo Bonzini wrote: Il 13/03/2012 09:56, Jason Wang ha scritto: This patch moves qemu_announce_self() to vm_start() and add a new parameters to control whether sending gratuitous packet is needed. There are several reasons to do this: - Gratuitous packet is also needed

Re: [Qemu-devel] [V4 PATCH 2/5] net: announce self after vm start

2012-03-14 Thread Jason Wang
On 03/13/2012 10:23 PM, Michael S. Tsirkin wrote: On Tue, Mar 13, 2012 at 04:56:22PM +0800, Jason Wang wrote: This patch moves qemu_announce_self() to vm_start() and add a new parameters to control whether sending gratuitous packet is needed. There are several reasons to do this: - Gratuitous

[Qemu-devel] [V5 PATCH 1/4] net: announce self after vm start

2012-03-16 Thread Jason Wang
qemu_announce_self() were moved to vm_start(). This is because we may want to let guest to send the gratuitous packets. After this change, we need to check the previous run state (RUN_STATE_INMIGRATE) to decide whether an announcement is needed. Signed-off-by: Jason Wang --- migration.c |1

[Qemu-devel] [V5 PATCH 0/4] Send gratuitous packets by guest

2012-03-16 Thread Jason Wang
pdate interrupt - move VIRTIO_NET_S_ANNOUNCE to 0x100 and supress guest config write to RO bits - cleanups suggested by Michael --- Jason Wang (4): net: announce self after vm start net: model specific announcing support virtio-net: notify guest to annouce itself virti

[Qemu-devel] [V5 PATCH 2/4] net: model specific announcing support

2012-03-16 Thread Jason Wang
. Signed-off-by: Jason Wang --- net.h|2 ++ savevm.c |8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net.h b/net.h index 75a8c15..7195bfc 100644 --- a/net.h +++ b/net.h @@ -48,6 +48,7 @@ typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t *, size_t

[Qemu-devel] [V5 PATCH 3/4] virtio-net: notify guest to annouce itself

2012-03-16 Thread Jason Wang
ounce presence of its link through config update interrupt. When gust have done the announcement, it should clear that bit. The feature is negotiated by a new feature bit VIRTIO_NET_F_ANNOUNCE. Signed-off-by: Jason Wang --- hw/virtio-net.c | 19 +++ hw/virtio-net.h |3 +

[Qemu-devel] [V5 PATCH 4/4] virtio-net: compat guest announce support.

2012-03-16 Thread Jason Wang
Disable guest announce for compat machine types. Signed-off-by: Jason Wang --- hw/pc_piix.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 6c5c40f..780b607 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[Qemu-devel] [RESEND PATCH] ioapic: fix build with DEBUG_IOAPIC

2012-03-16 Thread Jason Wang
ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ Signed-off-by: Jason Wang --- hw/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 3fee011..1ff31a1 100644 --- a/hw/ioapic.c +++ b

Re: [Qemu-devel] [V5 PATCH 1/4] net: announce self after vm start

2012-03-16 Thread Jason Wang
On 03/16/2012 05:43 PM, Paolo Bonzini wrote: Il 16/03/2012 09:54, Jason Wang ha scritto: qemu_announce_self() were moved to vm_start(). This is because we may want to let guest to send the gratuitous packets. After this change, we need to check the previous run state (RUN_STATE_INMIGRATE) to

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

2012-03-16 Thread Jason Wang
ds on VIRTIO_NET_S_ANNOUNCE, so the move is safe. Signed-off-by: Jason Wang --- virtio-0.9.4.lyx | 20 +++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/virtio-0.9.4.lyx b/virtio-0.9.4.lyx index 6c7bab1..ef3951c 100644 --- a/virtio-0.9.4.lyx +++ b/virtio-0.9.

Re: [Qemu-devel] [V5 PATCH 1/4] net: announce self after vm start

2012-03-16 Thread Jason Wang
On 03/16/2012 06:45 PM, Paolo Bonzini wrote: Il 16/03/2012 11:13, Jason Wang ha scritto: > The problem with staying in the INMIGRATE is that we can not figure out > when the migration is completed when using '-S', so this kind of > transition were forbidden by qmp_cont()

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

2012-03-18 Thread Jason Wang
On 03/18/2012 08:22 PM, Michael S. Tsirkin wrote: On Fri, Mar 16, 2012 at 11:20:26PM +0800, Jason Wang wrote: This patch splits the device status field of virtio-net into ro and rw byte. This would simplify the implementation of both host and guest and make the layout more clean. As

Re: [Qemu-devel] [V5 PATCH 1/4] net: announce self after vm start

2012-03-18 Thread Jason Wang
On 03/17/2012 12:31 AM, Paolo Bonzini wrote: Il 16/03/2012 16:23, Jason Wang ha scritto: Or just a global need_announce instead of looking at the runstate. Paolo Then I think it's better for us introduce a parameter for vm_start() like what we've done in V4. But that didn't w

Re: [Qemu-devel] [RESEND PATCH] ioapic: fix build with DEBUG_IOAPIC

2012-03-18 Thread Jason Wang
On 03/16/2012 06:32 PM, Andreas Färber wrote: Am 16.03.2012 10:10, schrieb Jason Wang: ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ Signed-off-by: Jason Wang PRIx64 is indeed needed here. However, this drops the 08 without mention in the

[Qemu-devel] [REPOST PATCH] ioapic: fix build with DEBUG_IOAPIC

2012-03-18 Thread Jason Wang
ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ Signed-off-by: Jason Wang --- hw/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 3fee011..e2e4796 100644 --- a/hw/ioapic.c +++ b

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

2012-03-19 Thread Jason Wang
also simplify the implementation. Signed-off-by: Jason Wang --- virtio-0.9.4.lyx | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/virtio-0.9.4.lyx b/virtio-0.9.4.lyx index 6c7bab1..614ab55 100644 --- a/virtio-0.9.4.lyx +++ b/virtio-0.9.4.lyx

[Qemu-devel] [PATCH 1/7] e1000: introduce bits of PHY control register

2012-03-22 Thread Jason Wang
This would be used be following patches. Signed-off-by: Jason Wang --- hw/e1000_hw.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/e1000_hw.h b/hw/e1000_hw.h index 9e29af8..c9cb79e 100644 --- a/hw/e1000_hw.h +++ b/hw/e1000_hw.h @@ -349,6 +349,18

[Qemu-devel] [PATCH 2/7] e1000: conditionally raise irq at the end of MDI cycle

2012-03-22 Thread Jason Wang
According to the spec: "When set to 1b by software, it causes an Interrupt to be asserted to indicate the end of an MDI cycle." We need check the Interrupt Enable bit and raise irq only when it is set. Signed-off-by: Jason Wang --- hw/e1000.c |5 - 1 files changed, 4 insert

[Qemu-devel] [PATCH 3/7] e1000: PHY loopback mode support

2012-03-22 Thread Jason Wang
The missing of loopback mode prevent the running of self diagnosis program in guest. This patch adds this support. After this patch, loopback test of ethtool were passed in guest. Signed-off-by: Jason Wang --- hw/e1000.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions

[Qemu-devel] [PATCH 5/7] e1000: introduce bit for debugging PHY emulation

2012-03-22 Thread Jason Wang
Signed-off-by: Jason Wang --- hw/e1000.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index fc30361..4eb95be 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -42,7 +42,7 @@ enum { DEBUG_GENERAL, DEBUG_IO, DEBUG_MMIO

[Qemu-devel] [PATCH 4/7] e1000: introduce helpers to manipulate link status

2012-03-22 Thread Jason Wang
This patch introduces helpers to change link status bit for phy/mac register. This would help to reduce code duplication and would be used by following patches. Signed-off-by: Jason Wang --- hw/e1000.c | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 6/7] e1000: link auto-negotiation emulation

2012-03-22 Thread Jason Wang
ss in PHY_STATUS register. After time, a timer with 500 ms ( which is the minimum timeout of auto-negotation specified in 802.3 spec). The link would be up when timer expired. Test with resuming windows guest plus flood ping and linux ethtool linkstatus test. Signed-off-by: Jason Wang --- hw/e1000.c |

[Qemu-devel] [PATCH 7/7] e1000: set E1000_ICR_INT_ASSERTED only for 8257x

2012-03-22 Thread Jason Wang
E1000_ICR_INT_ASSERTED were introduced only for 8257x, so we need to check the E1000_DEVID before setting this bit in ICS. Signed-off-by: Jason Wang --- hw/e1000.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 921f0cc..5584cc6 100644

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

2012-03-22 Thread Jason Wang
On 03/22/2012 12:30 PM, Rusty Russell wrote: On Wed, 21 Mar 2012 08:37:46 +0200, "Michael S. Tsirkin" wrote: Ah. Right, we need to trap for host to clear the bit. OK, so let's make the bit RO, and add VIRTIO_NET_CTRL_ANNOUNCED to acknowledge that we've seen VIRTIO_NET_S_ANNOUNCE using the cont

Re: [Qemu-devel] [V5 PATCH 0/4] Send gratuitous packets by guest

2012-03-26 Thread Jason Wang
On 03/27/2012 06:10 AM, Anthony Liguori wrote: On 03/16/2012 03:54 AM, Jason Wang wrote: This an update of series that let guest and qemu to be co-operated to send gratuitous packets when needed such as after migration, loadvm and continuing. As it's hard for qemu to track the ne

[Qemu-devel] [V6 PATCH 0/4] Send gratuitous packets by guest

2012-03-27 Thread Jason Wang
ad of VIRTIO_NET_S_LINK_UP before issue the config update interrupt - move VIRTIO_NET_S_ANNOUNCE to 0x100 and supress guest config write to RO bits - cleanups suggested by Michael --- Jason Wang (4): net: announce self after vm start net: model specific announcing support virtio-net: n

[Qemu-devel] [V6 PATCH 1/4] net: announce self after vm start

2012-03-27 Thread Jason Wang
qemu_announce_self() were moved to vm_start(). This is because we may want to let guest to send the gratuitous packets. A global variable need_announce were introduced to record the pending announcement, and vm_start() would send gratuitous packet depends on this value. Signed-off-by: Jason Wang

[Qemu-devel] [V6 PATCH] virtio-net: send gratuitous packets when needed

2012-03-27 Thread Jason Wang
OUNCE to bit 8 to separate rw bits from ro bits Changes from v3: - cancel the workqueue during freeze Changes from v2: - fix the race between unregister_dev() and workqueue Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 32 +++- include/linux/virtio_

[Qemu-devel] [V6 PATCH 3/4] virtio-net: notify guest to annouce itself

2012-03-27 Thread Jason Wang
ounce presence of its link through config update interrupt. When gust have done the announcement, it should ack the notification through VIRTIO_NET_CTRL_ANNOUNCE_ACK cmd. This feature is negotiated by a new feature bit VIRTIO_NET_F_ANNOUNCE. Signed-off-by: Jason Wang --- hw/virtio-net.c |

[Qemu-devel] [V6 PATCH 4/4] virtio-net: compat guest announce support.

2012-03-27 Thread Jason Wang
Disable guest announce for compat machine types. Signed-off-by: Jason Wang --- hw/pc_piix.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 6c5c40f..780b607 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[Qemu-devel] [V6 PATCH 2/4] net: model specific announcing support

2012-03-27 Thread Jason Wang
. Signed-off-by: Jason Wang --- net.h|2 ++ savevm.c |8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net.h b/net.h index 75a8c15..7195bfc 100644 --- a/net.h +++ b/net.h @@ -48,6 +48,7 @@ typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t *, size_t

[Qemu-devel] [PATCH] virtio: correctly initialize vm_running

2011-05-17 Thread Jason Wang
(). Signed-off-by: Jason Wang --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 6e8814c..27d7e50 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -789,6 +789,7 @@ VirtIODevice *virtio_common_init(const char *name, uint16_t device_id, vdev

Re: [Qemu-devel] [PATCH] virtio: correctly initialize vm_running

2011-05-22 Thread Jason Wang
On 05/18/2011 04:54 PM, Michael S. Tsirkin wrote: On Wed, May 18, 2011 at 01:57:37PM +0800, Jason Wang wrote: Current vm_running was not explicitly initialized and its value was changed by vm state notifier, this may confuse the virtio device being hotplugged such as virtio-net with vhost

[Qemu-devel] [net-next RFC PATCH 0/7] multiqueue support for tun/tap

2011-08-11 Thread Jason Wang
ket transmission of small packets. - addressing the comments of virtio-net driver - performance tunning Please review and comment it, Thanks. --- Jason Wang (5): tuntap: move socket/sock related structures to tun_file tuntap: categorize ioctl tuntap: introduce multiqueue r

[Qemu-devel] [net-next RFC PATCH 1/7] tuntap: move socket/sock related structures to tun_file

2011-08-11 Thread Jason Wang
to be attached to a single tap device. Signed-off-by: Jason Wang --- drivers/net/tun.c | 349 +++-- 1 files changed, 180 insertions(+), 169 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 71f3d1a..2739887 100644 --- a

[Qemu-devel] [net-next RFC PATCH 2/7] tuntap: categorize ioctl

2011-08-11 Thread Jason Wang
As we've moved socket related structure to file->private_data, we can separate system calls that only touch tfile from others as they don't need hold rtnl lock. Signed-off-by: Jason Wang --- drivers/net/tun.c | 52 ++-- 1 file

[Qemu-devel] [net-next RFC PATCH 3/7] tuntap: introduce multiqueue related flags

2011-08-11 Thread Jason Wang
Signed-off-by: Jason Wang --- include/linux/if_tun.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 06b1829..c92a291 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h @@ -34,6 +34,7 @@ #define

[Qemu-devel] [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-11 Thread Jason Wang
for multiqueue tap device. And RCU is used for doing synchronization between packet handling and system calls such as removing queues. Currently, multiqueue support is limited for tap , but it's easy also enable it for tun if we find it was also helpful. Signed-off-by: Jason Wang --- dr

[Qemu-devel] [net-next RFC PATCH 6/7] Change virtqueue structure

2011-08-11 Thread Jason Wang
From: Krishna Kumar Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2 file

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