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

2014-11-20 Thread Jason Wang
id rtl8139_transfer_frame(RTL8139State *s, > uint8_t *buf, int size, > { .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

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 t

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

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

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

2014-11-26 Thread Jason Wang
Congyang Cc: Stefano Stabellini Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- 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 index 9b88775..fdb4edd 100644 --- a/hw/net/virtio-net.c +++ b/hw/net

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

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

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

2014-11-27 Thread Jason Wang
Congyang Cc: Stefano Stabellini Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- Changes from V1: - Use g_memdup() to simplify codes --- hw/net/virtio-net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 9b88775

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 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 wrote: > > We leak cpu mappings when 1st s/g is not exactly the > > he

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 Signed-off-by: Gonglei --- hw/scsi/vhost-scsi.c | 1 + hw/virtio/vhost.c| 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 308b393..dcb2bc5 100644 --- a/hw

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 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 Signed-off-by: Gonglei --- hw/scsi/vhost-scsi.c | 1 + hw/virtio/vhost.c| 2 ++ 2 files changed, 3 insertions

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

2014-12-02 Thread Jason Wang
r; +pci_dev->config_write = e1000_write_config; + pci_conf = pci_dev->config; /* TODO: RST# value should be 0, PCI spec 6.2.4 */ -- MST Reviewed-by: Jason Wang

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 > Signed-off-by: Jeff Westfahl > --- > hw/net/e1000.c | 6 ++ > 1 file changed, 6 insertions(+) Pl

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

2014-12-17 Thread Jason Wang
e set to precisely > MDIC_ERROR|MDIC_READY. > > Signed-off-by: Richard Tollerton > Signed-off-by: Jeff Westfahl > --- Looks correct. Reviewed-by: Jason Wang > hw/net/e1000.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/net/e1000.c b/hw/net/e

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 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 hostip:192.168.122.100 port:5 (

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 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: http://lists.gnu.org/archive/html/qemu-devel/2014-12/

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 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 wrote: Win2012-64r2 guest doesn't set bus mastering correctly, it caused guest network down, this

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 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 wrote: >Win2012-64r2 guest doesn't set bus mastering correctly, >it caused guest network down, this patch ignored it

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 erro

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

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 > > 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 the case. Usu

Re: [Qemu-devel] [PATCH] Fix crash with illegal "-net nic, model=xxx" option

2015-04-12 Thread Jason Wang
default_devaddr, &err); if (!res) { -error_report_err(err); +if (err) { +error_report_err(err); +} exit(1); } return res; -- 1.8.3.1 Reviewed-by: Jason Wang

[Qemu-devel] [PATCH v6 03/16] spapr: add machine type specific instance init function

2015-04-16 Thread Jason Wang
This patches adds machine type specific instance initialization functions. Those functions will be used by following patches to compat class properties for legacy machine types. Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr.c | 23

[Qemu-devel] [PATCH v6 02/16] pc: add 2.4 machine types

2015-04-16 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Paolo Bonzini Cc: Richard Henderson Cc: Michael S. Tsirkin Signed-off-by: Jason

[Qemu-devel] [PATCH v6 01/16] virtio-net: fix the upper bound when trying to delete queues

2015-04-16 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Michael S. Tsirkin Cc: qemu-stable Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/ne

[Qemu-devel] [PATCH v6 00/16] Support more virtio queues

2015-04-16 Thread Jason Wang
l one, this will allow us to just increase the limit of one transport without disturbing others. - only increase the queue limit of virtio-pci - limit the maximum number of virtio queues to 64 for legacy machine types Jason Wang (16): virtio-net: fix the upper bound when trying to delete qu

[Qemu-devel] [PATCH v6 05/16] monitor: replace the magic number 255 with MAX_QUEUE_NUM

2015-04-16 Thread Jason Wang
This patch replace the magic number 255, and increase it to MAX_QUEUE_NUM which is maximum number of queues supported by a nic. Cc: Luiz Capitulino Signed-off-by: Jason Wang --- monitor.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/monitor.c b

[Qemu-devel] [PATCH v6 04/16] ppc: spapr: add 2.4 machine type

2015-04-16 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc

[Qemu-devel] [PATCH v6 09/16] virtio-ccw: introduce ccw specific queue limit

2015-04-16 Thread Jason Wang
Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-ccw.c | 7 +-- hw/s390x/virtio-ccw.c| 19 --- include/hw/s390x/s390_flic.h | 4 +++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index

[Qemu-devel] [PATCH v6 06/16] monitor: check return value of qemu_find_net_clients_except()

2015-04-16 Thread Jason Wang
255 queues. Cc: Luiz Capitulino Signed-off-by: Jason Wang --- monitor.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index a039edf..2b5643d 100644 --- a/monitor.c +++ b/monitor.c @@ -4477,7 +4477,7 @@ void set_link_completion(ReadLineState

[Qemu-devel] [PATCH v6 14/16] virtio-pci: speedup MSI-X masking and unmasking

2015-04-16 Thread Jason Wang
. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c38f33f..7d01500 100644 --- a/hw/virtio/virtio-pci.c +++

[Qemu-devel] [PATCH v6 15/16] virtio-pci: increase the maximum number of virtqueues to 513

2015-04-16 Thread Jason Wang
qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/i386/pc_piix.c | 5 + hw/i386/pc_q35.c | 5 + hw/ppc/spapr.c | 5 + hw/virtio/virtio-pci.c | 3 ++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 212e263..6e

[Qemu-devel] [PATCH v6 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue

2015-04-16 Thread Jason Wang
There's no need to use vector 0 for invalid virtqueue. So this patch changes to use VIRTIO_NO_VECTOR instead. Cc: Michael S. Tsirkin Cc: Cornelia Huck CC: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang --- hw/s390x/virtio-ccw.c | 2 +- 1

[Qemu-devel] [PATCH v6 16/16] pci: remove hard-coded bar size in msix_init_exclusive_bar()

2015-04-16 Thread Jason Wang
S. Tsirkin Signed-off-by: Jason Wang --- hw/pci/msix.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 24de260..f8748cf 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@ -295,29 +295,37 @@ int msix_init_ex

[Qemu-devel] [PATCH v6 11/16] virtio-mmio: switch to bus specific queue limit

2015-04-16 Thread Jason Wang
Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-mmio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 2ae6942..dbd44b6 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c

[Qemu-devel] [PATCH v6 12/16] virtio-pci: switch to use bus specific queue limit

2015-04-16 Thread Jason Wang
Instead of depending on a macro, switch to use a bus specific queue limit. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 12 +++- include/hw/virtio/virtio.h | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio

[Qemu-devel] [PATCH v6 13/16] virtio: introduce vector to virtqueues mapping

2015-04-16 Thread Jason Wang
unmasking handling. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 8 hw/virtio/virtio.c | 36 ++-- include/hw/virtio/virtio-bus.h | 1 + include/hw/virtio/virtio.h | 3 +++ 4 files changed, 46

[Qemu-devel] [PATCH v6 10/16] virtio-s390: switch to bus specific queue limit

2015-04-16 Thread Jason Wang
Instead of depending on marco, switch to use a bus specific queue limit. Cc: Alexander Graf Cc: Richard Henderson Cc: Christian Borntraeger Cc: Cornelia Huck Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-bus.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a

[Qemu-devel] [PATCH v6 08/16] virtio: introduce bus specific queue limit

2015-04-16 Thread Jason Wang
: Jason Wang --- hw/char/virtio-serial-bus.c| 2 +- hw/net/virtio-net.c| 4 ++-- hw/s390x/s390-virtio-bus.c | 1 + hw/s390x/virtio-ccw.c | 1 + hw/scsi/virtio-scsi.c | 4 ++-- hw/virtio/virtio-mmio.c| 1 + hw/virtio/virtio-pci.c | 1 + hw

Re: [Qemu-devel] [PATCH v6 09/16] virtio-ccw: introduce ccw specific queue limit

2015-04-19 Thread Jason Wang
On 04/17/2015 07:46 PM, Cornelia Huck wrote: > On Fri, 17 Apr 2015 12:48:33 +0800 > Jason Wang wrote: > >> Instead of depending on marco, using a bus specific limit. Also make >> it clear that the number of gsis per I/O adapter is not directly >> depending on the n

Re: [Qemu-devel] [PATCH v6 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue

2015-04-19 Thread Jason Wang
On 04/17/2015 07:31 PM, Cornelia Huck wrote: > On Fri, 17 Apr 2015 12:48:31 +0800 > Jason Wang wrote: > >> There's no need to use vector 0 for invalid virtqueue. So this patch > s/There's no need/It's a bad idea/ > >> changes to use VIRTIO_NO_VECTOR

Re: [Qemu-devel] [PATCH v6 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue

2015-04-19 Thread Jason Wang
On 04/17/2015 07:31 PM, Cornelia Huck wrote: > On Fri, 17 Apr 2015 12:48:31 +0800 > Jason Wang wrote: > >> There's no need to use vector 0 for invalid virtqueue. So this patch > s/There's no need/It's a bad idea/ > >> changes to use VIRTIO_NO_VECTOR

[Qemu-devel] [PATCH V7 03/16] spapr: add machine type specific instance init function

2015-04-22 Thread Jason Wang
This patches adds machine type specific instance initialization functions. Those functions will be used by following patches to compat class properties for legacy machine types. Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr.c | 23

[Qemu-devel] [PATCH V7 00/16] Support more virtio queues

2015-04-22 Thread Jason Wang
io-pci - limit the maximum number of virtio queues to 64 for legacy machine types Jason Wang (16): virtio-net: fix the upper bound when trying to delete queues pc: add 2.4 machine types spapr: add machine type specific instance init function ppc: spapr: add 2.4 machine type monitor: replac

[Qemu-devel] [PATCH V7 01/16] virtio-net: fix the upper bound when trying to delete queues

2015-04-22 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Michael S. Tsirkin Cc: qemu-stable Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/ne

[Qemu-devel] [PATCH V7 04/16] ppc: spapr: add 2.4 machine type

2015-04-22 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr.c | 31 +-- 1 file changed, 29

[Qemu-devel] [PATCH V7 02/16] pc: add 2.4 machine types

2015-04-22 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Paolo Bonzini Cc: Richard Henderson Cc: Michael S. Tsirkin Signed-off-by: Jason

[Qemu-devel] [PATCH V7 08/16] virtio: introduce bus specific queue limit

2015-04-22 Thread Jason Wang
: Jason Wang Reviewed-by: Cornelia Huck --- hw/char/virtio-serial-bus.c| 2 +- hw/net/virtio-net.c| 4 ++-- hw/s390x/s390-virtio-bus.c | 1 + hw/s390x/virtio-ccw.c | 1 + hw/scsi/virtio-scsi.c | 4 ++-- hw/virtio/virtio-mmio.c| 1 + hw/virtio

[Qemu-devel] [PATCH V7 05/16] monitor: replace the magic number 255 with MAX_QUEUE_NUM

2015-04-22 Thread Jason Wang
This patch replace the magic number 255, and increase it to MAX_QUEUE_NUM which is maximum number of queues supported by a nic. Cc: Luiz Capitulino Signed-off-by: Jason Wang --- monitor.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/monitor.c b

[Qemu-devel] [PATCH V7 16/16] pci: remove hard-coded bar size in msix_init_exclusive_bar()

2015-04-22 Thread Jason Wang
S. Tsirkin Signed-off-by: Jason Wang --- hw/pci/msix.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 24de260..f8748cf 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@ -295,29 +295,37 @@ int msix_init_ex

[Qemu-devel] [PATCH V7 06/16] monitor: check return value of qemu_find_net_clients_except()

2015-04-22 Thread Jason Wang
255 queues. Cc: Luiz Capitulino Signed-off-by: Jason Wang --- monitor.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index a039edf..2b5643d 100644 --- a/monitor.c +++ b/monitor.c @@ -4477,7 +4477,7 @@ void set_link_completion(ReadLineState

[Qemu-devel] [PATCH V7 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue

2015-04-22 Thread Jason Wang
It's a bad idea to need to use vector 0 for invalid virtqueue. So this patch changes to using VIRTIO_NO_VECTOR instead. Cc: Michael S. Tsirkin Cc: Cornelia Huck CC: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang Acked-by: Cornelia Huck --

[Qemu-devel] [PATCH V7 11/16] virtio-mmio: switch to bus specific queue limit

2015-04-22 Thread Jason Wang
Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-mmio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 2ae6942..dbd44b6 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c

[Qemu-devel] [PATCH V7 09/16] virtio-ccw: introduce ccw specific queue limit

2015-04-22 Thread Jason Wang
Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-ccw.c | 7 +-- hw/s390x/virtio-ccw.c| 21 + include/hw/s390x/s390_flic.h | 4 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index

[Qemu-devel] [PATCH V7 10/16] virtio-s390: switch to bus specific queue limit

2015-04-22 Thread Jason Wang
Instead of depending on macro, switch to use a bus specific queue limit. Cc: Alexander Graf Cc: Richard Henderson Cc: Christian Borntraeger Cc: Cornelia Huck Signed-off-by: Jason Wang Reviewed-by: Cornelia Huck --- hw/s390x/s390-virtio-bus.c | 8 +--- 1 file changed, 5 insertions(+), 3

[Qemu-devel] [PATCH V7 13/16] virtio: introduce vector to virtqueues mapping

2015-04-22 Thread Jason Wang
unmasking handling. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 8 hw/virtio/virtio.c | 36 ++-- include/hw/virtio/virtio-bus.h | 1 + include/hw/virtio/virtio.h | 3 +++ 4 files changed, 46

[Qemu-devel] [PATCH V7 12/16] virtio-pci: switch to use bus specific queue limit

2015-04-22 Thread Jason Wang
Instead of depending on a macro, switch to use a bus specific queue limit. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 12 +++- include/hw/virtio/virtio.h | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio

[Qemu-devel] [PATCH V7 14/16] virtio-pci: speedup MSI-X masking and unmasking

2015-04-22 Thread Jason Wang
. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c38f33f..7d01500 100644 --- a/hw/virtio/virtio-pci.c +++

[Qemu-devel] [PATCH V7 15/16] virtio-pci: increase the maximum number of virtqueues to 513

2015-04-22 Thread Jason Wang
qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/i386/pc_piix.c | 5 + hw/i386/pc_q35.c | 5 + hw/ppc/spapr.c | 5 + hw/virtio/virtio-pci.c | 6 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 21

Re: [Qemu-devel] [PATCH V7 15/16] virtio-pci: increase the maximum number of virtqueues to 513

2015-04-27 Thread Jason Wang
On Thu, Apr 23, 2015 at 7:24 PM, Cornelia Huck wrote: On Thu, 23 Apr 2015 14:21:48 +0800 Jason Wang wrote: This patch increases the maximum number of virtqueues for pci from 64 to 513. This will allow booting a virtio-net-pci device with 256 queue ^^^ pairs on recent Linux host

Re: [Qemu-devel] [PATCH V7 02/16] pc: add 2.4 machine types

2015-04-27 Thread Jason Wang
On Mon, Apr 27, 2015 at 7:03 PM, Michael S. Tsirkin wrote: On Thu, Apr 23, 2015 at 02:21:35PM +0800, Jason Wang wrote: The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size

Re: [Qemu-devel] [PATCH V7 15/16] virtio-pci: increase the maximum number of virtqueues to 513

2015-04-27 Thread Jason Wang
On Mon, Apr 27, 2015 at 7:02 PM, Michael S. Tsirkin wrote: On Thu, Apr 23, 2015 at 02:21:48PM +0800, Jason Wang wrote: This patch increases the maximum number of virtqueues for pci from 64 to 513. This will allow booting a virtio-net-pci device with 256 queue pairs on recent Linux host

Re: [Qemu-devel] [PATCH V7 08/16] virtio: introduce bus specific queue limit

2015-04-27 Thread Jason Wang
On Mon, Apr 27, 2015 at 7:05 PM, Michael S. Tsirkin wrote: On Thu, Apr 23, 2015 at 02:21:41PM +0800, Jason Wang wrote: This patch introduces a bus specific queue limitation. It will be useful for increasing the limit for one of the bus without disturbing other buses. Cc: Michael S

Re: [Qemu-devel] [PATCH V7 00/16] Support more virtio queues

2015-04-27 Thread Jason Wang
On Thu, Apr 23, 2015 at 7:27 PM, Cornelia Huck wrote: On Thu, 23 Apr 2015 14:21:33 +0800 Jason Wang wrote: Stress/migration test on virtio-pci, compile test on other targets. And make check on s390x-softmmu and ppc64-softmmu. This passes my smoke tests on the s390-ccw-virtio and s390

Re: [Qemu-devel] [PATCH V7 08/16] virtio: introduce bus specific queue limit

2015-04-27 Thread Jason Wang
On Tue, Apr 28, 2015 at 1:13 PM, Michael S. Tsirkin wrote: On Tue, Apr 28, 2015 at 11:14:04AM +0800, Jason Wang wrote: On Mon, Apr 27, 2015 at 7:05 PM, Michael S. Tsirkin wrote: >On Thu, Apr 23, 2015 at 02:21:41PM +0800, Jason Wang wrote: >> This patch introduces a bus

Re: [Qemu-devel] [PATCH V2] vhost: logs sharing

2015-04-28 Thread Jason Wang
On Tue, Apr 28, 2015 at 5:37 PM, Michael S. Tsirkin wrote: On Fri, Apr 10, 2015 at 05:33:35PM +0800, Jason Wang wrote: Currently we allocate one vhost log per vhost device. This is sub optimal when: - Guest has several device with vhost as backend - Guest has multiqueue devices In

Re: [Qemu-devel] [PATCH V2] vhost: logs sharing

2015-04-30 Thread Jason Wang
On Tue, Apr 28, 2015 at 6:30 PM, Michael S. Tsirkin wrote: On Tue, Apr 28, 2015 at 05:58:28PM +0800, Jason Wang wrote: On Tue, Apr 28, 2015 at 5:37 PM, Michael S. Tsirkin wrote: >On Fri, Apr 10, 2015 at 05:33:35PM +0800, Jason Wang wrote: >> Currently we allocate one vhos

Re: [Qemu-devel] [RFC PATCH 6/8] tap: Drop tap_can_send

2015-04-30 Thread Jason Wang
On Wed, Apr 29, 2015 at 6:37 PM, Fam Zheng wrote: This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be sent to peer when it arrives.

Re: [Qemu-devel] [PATCH V2] vhost: logs sharing

2015-04-30 Thread Jason Wang
On Thu, Apr 30, 2015 at 4:09 PM, Michael S. Tsirkin wrote: On Thu, Apr 30, 2015 at 04:05:09PM +0800, Jason Wang wrote: On Tue, Apr 28, 2015 at 6:30 PM, Michael S. Tsirkin wrote: >On Tue, Apr 28, 2015 at 05:58:28PM +0800, Jason Wang wrote: >> On Tue, Apr 28, 2015 a

[Qemu-devel] [Bug 1456804] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed.

2015-05-20 Thread Jason Wang
qemu.git eba05e922e8e7f307bc5d4104a78797e55124e97, kernel 4.1-rc4, I get the following assert: qemu-system-x86_64: /net/gimli/home/alwillia/Work/qemu.git/kvm- all.c:1033: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. Bisected to: commit 851c2a75a6e80c8aa5e713864d98cfb512e7229b Author: Jason Wang Da

[Qemu-devel] [Bug 1456804] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed.

2015-05-20 Thread Jason Wang
a/Work/qemu.git/kvm- all.c:1033: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. Bisected to: commit 851c2a75a6e80c8aa5e713864d98cfb512e7229b Author: Jason Wang Date: Thu Apr 23 14:21:47 2015 +0800 virtio-pci: speedup MSI-X masking and unmasking This

[Qemu-devel] [PATCH V3] vhost: logs sharing

2015-05-25 Thread Jason Wang
ll be allocated and each vhost device will use the new log then drop the refcnt of old log. - The old log will be synced and freed when reference count drops to zero. Tested by doing scp during migration for a 2 queues virtio-net-pci. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- Changes

[Qemu-devel] [PATCH] virtio-pci: don't try to mask or unmask vqs without notifiers

2015-05-27 Thread Jason Wang
irtio-pci: speedup MSI-X masking and unmasking") Reported-by: Alex Williamson Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 867c9d1..4f7f

Re: [Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-05-27 Thread Jason Wang
On 05/27/2015 02:26 PM, Pankaj Gupta wrote: > Ping. > > Can I get any suggestions on this patch. > > Best regards, > Pankaj > >> vhostforce was added to enable vhost when >> guest don't have MSI-X support. >> Now, we have scenarios like DPDK in Guest which dont use >> interrupts and still use

Re: [Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-05-27 Thread Jason Wang
On 05/27/2015 07:57 PM, Michael S. Tsirkin wrote: > On Wed, May 27, 2015 at 04:45:34PM +0800, Jason Wang wrote: >> > >> > >> > On 05/27/2015 02:26 PM, Pankaj Gupta wrote: >>> > > Ping. >>> > > >>> > > Can I get

Re: [Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-05-27 Thread Jason Wang
On 05/28/2015 11:21 AM, Jason Wang wrote: > > On 05/27/2015 07:57 PM, Michael S. Tsirkin wrote: >> On Wed, May 27, 2015 at 04:45:34PM +0800, Jason Wang wrote: >>>> >>>> On 05/27/2015 02:26 PM, Pankaj Gupta wrote: >>>>>> Ping.

Re: [Qemu-devel] [PATCH] net: Remove vhostforce option in addition to vhost parameter

2015-05-27 Thread Jason Wang
On 05/28/2015 02:28 PM, Michal Privoznik wrote: > On 28.05.2015 05:36, Jason Wang wrote: >> >> On 05/28/2015 11:21 AM, Jason Wang wrote: >>> On 05/27/2015 07:57 PM, Michael S. Tsirkin wrote: >>>> On Wed, May 27, 2015 at 04:45:34PM +0800, Jason Wang wrote: &

[Qemu-devel] [PATCH] vhost: correctly pass error to caller in vhost_dev_enable_notifiers()

2015-05-28 Thread Jason Wang
Fixes b0b3db79559e57db340b292621c397e7a6cdbdc5 ("vhost-net: cleanup host notifiers at last step") Cc: qemu-sta...@nongnu.org Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/vhost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virti

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

2015-05-28 Thread Jason Wang
ncrease the queue limit of virtio-pci - limit the maximum number of virtio queues to 64 for legacy machine types Jason Wang (9): virtio-net: adding all queues in .realize() virtio: device_plugged() can fail virtio: introduce virtio_get_num_queues() virtio-ccw: introduce ccw specific queue

[Qemu-devel] [PATCH V8 7/9] virtio-s390: introduce virtio_s390_device_plugged()

2015-05-28 Thread Jason Wang
This patch introduce a virtio-s390 specific device_plugged() function and doing the number of virtqueue validation inside. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-bus.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH V8 5/9] virtio-ccw: validate the number of queues against bus limitation

2015-05-28 Thread Jason Wang
Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang --- hw/s390x/virtio-ccw.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index aaa9833..18fc697 100644 --- a/hw/s390x

[Qemu-devel] [PATCH V8 1/9] virtio-net: adding all queues in .realize()

2015-05-28 Thread Jason Wang
Instead of adding queues for multiqueue during feature set. This patch did this in .realize(), this will help the following patches that count the number of virtqueues used in .device_plugged() callback. Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 59

[Qemu-devel] [PATCH V8 9/9] virtio: increase the queue limit to 1024

2015-05-28 Thread Jason Wang
Increase the queue limit to 1024. But virtio-ccw and s390-virtio won't support this, this is done through failing device_plugged() for those two transports if the number of virtqueues is greater than 64. Signed-off-by: Jason Wang --- include/hw/virtio/virtio.h | 2 +- 1 file chang

[Qemu-devel] [PATCH V8 4/9] virtio-ccw: introduce ccw specific queue limit

2015-05-28 Thread Jason Wang
Cc: Alexander Graf Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Richard Henderson Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-ccw.c | 2 +- hw/s390x/virtio-ccw.c| 12 ++-- include/hw/s390x/s390_flic.h | 5 - 3 files changed, 11 insertions(+), 8 deletions

[Qemu-devel] [PATCH V8 2/9] virtio: device_plugged() can fail

2015-05-28 Thread Jason Wang
: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang --- hw/s390x/virtio-ccw.c | 2 +- hw/virtio/virtio-bus.c | 6 ++ hw/virtio/virtio-mmio.c| 2 +- hw/virtio/virtio-pci.c | 2 +- hw/virtio/virtio.c | 7

[Qemu-devel] [PATCH V8 8/9] virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX

2015-05-28 Thread Jason Wang
VIRTIO_PCI_QUEUE_MAX is not only used for pci, so rename it be generic. Cc: Amit Shah Cc: Paolo Bonzini Signed-off-by: Jason Wang --- hw/char/virtio-serial-bus.c | 2 +- hw/net/virtio-net.c | 4 ++-- hw/scsi/virtio-scsi.c | 4 ++-- hw/virtio/virtio-mmio.c | 4 ++-- hw

[Qemu-devel] [PATCH V8 3/9] virtio: introduce virtio_get_num_queues()

2015-05-28 Thread Jason Wang
This patch introduces virtio_get_num_queues() which iterates the vqs array and return the number of virtqueues used by device. Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 13 + include/hw/virtio/virtio.h | 1 + 2 files changed, 14 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH V8 6/9] virtio-s390: introduce virito s390 queue limit

2015-05-28 Thread Jason Wang
Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-bus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 0e35ac9..3801c73 100644 --- a/hw/s390x/s390-virtio-bus.c

Re: [Qemu-devel] [PATCH V2 03/11] virito: introduce bus specific queue limit

2015-02-27 Thread Jason Wang
On Fri, Feb 27, 2015 at 5:34 PM, Cornelia Huck wrote: On Fri, 27 Feb 2015 03:42:00 +0008 Jason Wang wrote: On Thu, Feb 26, 2015 at 8:57 PM, Cornelia Huck wrote: > On Thu, 26 Feb 2015 15:04:38 +0800 > Jason Wang wrote: > >> This patch introduces a bus specific q

Re: [Qemu-devel] [PATCH V2 04/11] virtio-ccw: introduce ccw specific queue limit

2015-02-27 Thread Jason Wang
On Fri, Feb 27, 2015 at 5:41 PM, Cornelia Huck wrote: On Fri, 27 Feb 2015 03:46:25 +0008 Jason Wang wrote: On Thu, Feb 26, 2015 at 9:02 PM, Cornelia Huck wrote: > On Thu, 26 Feb 2015 15:04:39 +0800 > Jason Wang wrote: > >> Instead of depending on marco, using

Re: [Qemu-devel] [PATCH V2 06/11] virtio-s390: switch to bus specific queue limit

2015-02-27 Thread Jason Wang
On Fri, Feb 27, 2015 at 5:49 PM, Cornelia Huck wrote: On Fri, 27 Feb 2015 06:42:57 +0008 Jason Wang wrote: On Thu, Feb 26, 2015 at 9:05 PM, Cornelia Huck wrote: > On Thu, 26 Feb 2015 15:04:41 +0800 > Jason Wang wrote: > >> typedef struc

[Qemu-devel] [PATCH V3 01/14] virtio-net: validate backend queue numbers against bus limitation

2015-03-04 Thread Jason Wang
We don't validate the backend queue numbers against bus limitation, this will easily crash qemu if it exceeds the limitation. Fixing this by doing the validation and fail early. Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/h

[Qemu-devel] [PATCH V3 02/14] virtio-net: fix the upper bound when trying to delete queues

2015-03-04 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c

[Qemu-devel] [PATCH V3 03/14] virito: introduce bus specific queue limit

2015-03-04 Thread Jason Wang
Bonzini Signed-off-by: Jason Wang --- hw/net/virtio-net.c| 4 ++-- hw/s390x/s390-virtio-bus.c | 1 + hw/s390x/virtio-ccw.c | 1 + hw/scsi/virtio-scsi.c | 4 ++-- hw/virtio/virtio-mmio.c| 1 + hw/virtio/virtio-pci.c | 1 + hw/virtio/virtio.c

[Qemu-devel] [PATCH V3 05/14] virtio-s390: switch to bus specific queue limit

2015-03-04 Thread Jason Wang
Instead of depending on marco, switch to use a bus specific queue limit. Left is AdapterRouters->gsi[], this could be done in the future if we want to increase s390's queue limit really. Cc: Alexander Graf Cc: Richard Henderson Cc: Christian Borntraeger Cc: Cornelia Huck Signed-off-b

[Qemu-devel] [PATCH V3 00/14] Support more virtio queues

2015-03-04 Thread Jason Wang
queues to 64 for legacy machine types Jason Wang (14): virtio-net: validate backend queue numbers against bus limitation virtio-net: fix the upper bound when trying to delete queues virito: introduce bus specific queue limit virtio-ccw: introduce ccw specific queue limit virtio-s390

[Qemu-devel] [PATCH V3 09/14] virtio: introduce vector to virtqueues mapping

2015-03-04 Thread Jason Wang
unmasking handling. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 8 hw/virtio/virtio.c | 32 ++-- include/hw/virtio/virtio-bus.h | 1 + include/hw/virtio/virtio.h | 3 +++ 4 files

[Qemu-devel] [PATCH V3 04/14] virtio-ccw: introduce ccw specific queue limit

2015-03-04 Thread Jason Wang
Instead of depending on marco, using a bus specific limit. Cc: Alexander Graf Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Richard Henderson Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-ccw.c | 7 +-- hw/s390x/virtio-ccw.c| 13 +++-- include/hw/s390x

[Qemu-devel] [PATCH V3 12/14] virtio-pci: increase the maximum number of virtqueues to 513

2015-03-04 Thread Jason Wang
. Tsirkin Signed-off-by: Jason Wang --- hw/i386/pc_piix.c | 6 ++ hw/i386/pc_q35.c | 5 + hw/virtio/virtio-pci.c | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 38b42b0..821d44c 100644 --- a/hw/i386/pc_piix.c

[Qemu-devel] [PATCH V3 11/14] virtio-pci: speedup MSI-X masking and unmasking

2015-03-04 Thread Jason Wang
. Cc: Anthony Liguori Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 280bba2..327a3fc 100644 --- a/hw/v

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