Re: [Qemu-devel] [PATCH] vhost-user: set link down when the char device is closed

2015-11-23 Thread Jason Wang
On 11/20/2015 01:42 PM, Wen wrote: > To Jason Wang: > > I think this patch should be for qemu-2.5 > > Thanks > Wen Congyang Hi: I thought it was for vhost tree. Michael: Do you want to take this patch? > > On 11/11/2015 02:53 PM, Wen Congyang wrote: >&g

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Jason Wang
On 11/23/2015 04:06 PM, Michael S. Tsirkin wrote: > On Mon, Nov 23, 2015 at 03:41:11PM +0800, Jason Wang wrote: >> Currently, all virtio devices bypass IOMMU completely. This is because >> address_space_memory is assumed and used during DMA emulation. This >> patch convert

Re: [Qemu-devel] [RFC] virtio: convert to use DMA api

2015-11-23 Thread Jason Wang
On 11/23/2015 05:36 PM, Cornelia Huck wrote: > On Mon, 23 Nov 2015 15:41:11 +0800 > Jason Wang wrote: > >> Currently, all virtio devices bypass IOMMU completely. This is because >> address_space_memory is assumed and used during DMA emulation. This >> patch converts

Re: [Qemu-devel] [PATCH 1/4] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-11-24 Thread Jason Wang
On 11/19/2015 06:52 PM, Shmulik Ladkani wrote: > Report the 'express endpoint' capability if on a PCIE bus. > > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c > index 5e3a233..ed286cc 1006

Re: [Qemu-devel] [PATCH 2/4] vmxnet3: Change offsets of PCI capabilities

2015-11-24 Thread Jason Wang
On 11/19/2015 06:52 PM, Shmulik Ladkani wrote: > Place device reported PCI capabilities at the same offsets as placed by > the VMware virtual hardware: > Express Endpoint at [48], MSI at [84], MSI-X at [9c]. > > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c | 9 ++--- > 1 file c

Re: [Qemu-devel] [PATCH 3/4] vmxnet3: Change the offset of the MSIX PBA table

2015-11-24 Thread Jason Wang
On 11/19/2015 06:52 PM, Shmulik Ladkani wrote: > Place the PBA table at 0x1000, as placed by VMware virtual hardware. > > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c > index

Re: [Qemu-devel] [PATCH v2 0/2] net/tap-win32 bugfixes

2015-11-24 Thread Jason Wang
ed v1). Stefan, could you please review v2? >> -Original Message- >> From: Andrew Baumann >> Sent: Wednesday, 18 November 2015 11:45 >> To: qemu-devel@nongnu.org >> Cc: Jason Wang ; Stefan Weil ; >> Andrew Baumann >> Subject: [PATCH v2 0/2] net

Re: [Qemu-devel] [PATCH for-2.5] eepro100: Prevent two endless loops

2015-11-24 Thread Jason Wang
On 11/20/2015 07:27 PM, P J P wrote: > +-- On Fri, 20 Nov 2015, Stefan Weil wrote --+ > | include/hw/pci/pci.h:static inline uint##_bits##_t > | ld##_l##_pci_dma(PCIDevice *dev, \ > >I see. > > | Is there an ideal count? If it is too low, it might break some use cases. > | If it is

Re: [Qemu-devel] [PATCH v2 0/2] net/tap-win32 bugfixes

2015-11-25 Thread Jason Wang
On 11/25/2015 02:13 PM, Stefan Weil wrote: > Am 25.11.2015 um 04:01 schrieb Jason Wang: >> >> On 11/25/2015 07:36 AM, Andrew Baumann wrote: >>> Ping? >>> >>> Jason, I know you planned to leave this for a few days... I just wanted to >>> make su

Re: [Qemu-devel] [PATCH 1/4] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-11-25 Thread Jason Wang
On 11/25/2015 02:18 PM, Shmulik Ladkani wrote: > Thanks Jason, > > On Wed, 25 Nov 2015 10:38:51 +0800, jasow...@redhat.com wrote: >>> @@ -2568,6 +2572,7 @@ static void vmxnet3_class_init(ObjectClass *class, >>> void *data) >>> c->class_id = PCI_CLASS_NETWORK_ETHERNET; >>> c->subsystem_

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-04 Thread Jason Wang
On 02/01/2016 06:40 PM, Hailiang Zhang wrote: > On 2016/2/1 17:42, Jason Wang wrote: >> >> >> On 02/01/2016 05:22 PM, Hailiang Zhang wrote: >>> On 2016/2/1 17:04, Jason Wang wrote: >>>> >>>> >>>> On 02/01/2016 03:56 P

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-04 Thread Jason Wang
On 02/05/2016 03:01 PM, Hailiang Zhang wrote: > On 2016/2/5 14:19, Jason Wang wrote: >> >> >> On 02/01/2016 06:40 PM, Hailiang Zhang wrote: >>> On 2016/2/1 17:42, Jason Wang wrote: >>>> >>>> >>>> On 02/01/2016 05:22 P

Re: [Qemu-devel] [PATCH] net: ne2000: check ring buffer control registers

2016-02-05 Thread Jason Wang
On 02/02/2016 10:29 PM, P J P wrote: > From: Prasad J Pandit > > Ne2000 NIC uses ring buffer of NE2000_MEM_SIZE(49152) > bytes to process network packets. Four registers PSTART, > PSTOP, CURPAGE and BOUNDARY are used to control ring buffer > access. Setting these registers to invalid values coul

Re: [Qemu-devel] [PATCH V3 1/2] net/filter-mirror:Add filter-mirror

2016-02-14 Thread Jason Wang
On 02/04/2016 05:00 PM, Zhang Chen wrote: > > > On 02/04/2016 03:43 PM, Zhang Chen wrote: >> From: ZhangChen >> >> Filter-mirror is a netfilter plugin. >> It gives qemu the ability to copy and mirror guest's >> net packet. we output packet to chardev. To make it compact, how about "It gives qem

Re: [Qemu-devel] [PATCH V3 2/2] tests/test-filter-mirror:add filter-mirror unit test

2016-02-14 Thread Jason Wang
On 02/04/2016 03:43 PM, Zhang Chen wrote: > From: ZhangChen > > Using qtest qmp interface to implement following cases: > 1) add/remove filter-mirror > 2) add a filter-mirror then delete the netdev > 3) add/remove more than one filter-mirrors > 4) add more than one filter-mirrors and then delete

Re: [Qemu-devel] [PATCH] net/filter-redirector:Add filter-redirector

2016-02-17 Thread Jason Wang
On 02/05/2016 02:50 PM, Zhang Chen wrote: > From: ZhangChen > > Filter-redirector is a netfilter plugin. > It gives qemu the ability to redirect net packet. > redirector can redirect filter's net packet to outdev. > and redirect indev's packet to filter. > > filter >

Re: [Qemu-devel] [PATCH] net: netmap: probe netmap interface for virtio-net header

2016-02-17 Thread Jason Wang
On 02/05/2016 06:30 PM, Vincenzo Maffione wrote: > Previous implementation of has_ufo, has_vnet_hdr, has_vnet_hdr_len, etc. > did not really probe for virtio-net header support for the netmap > interface attached to the backend. These callbacks were correct for > VALE ports, but incorrect for har

Re: [Qemu-devel] [PATCH COLO-Frame v14 31/40] net/filter: Add a 'status' property for filter object

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > With this property, users can control if this filter is 'enable' > or 'disable'. The default behavior for filter is enabled. > > We will skip the disabled filter when delivering packets in net layer. > > Sig

Re: [Qemu-devel] [PATCH COLO-Frame v14 32/40] net/filter: Introduce a helper to add a filter to the netdev

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > We add a new helper function netdev_add_filter(), > this function can help adding a filter object to a netdev. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > include/net/filter.h | 7

Re: [Qemu-devel] [PATCH COLO-Frame v14 35/40] COLO/filter: add each netdev a buffer filter

2016-02-17 Thread Jason Wang
ed by default, and the packets will not pass > through these filters. If users don't enable COLO while configure > qemu, these buffer-filters will not be added. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > v14: > - New patch > -

Re: [Qemu-devel] [PATCH COLO-Frame v14 37/40] COLO: enable buffer filters for PVM

2016-02-17 Thread Jason Wang
On 02/06/2016 05:28 PM, zhanghailiang wrote: > Enable all buffer filters that added by COLO while > go into COLO process, and disable them while exit COLO. > > Signed-off-by: zhanghailiang > Cc: Jason Wang > Cc: Yang Hongyang > --- > v14: > - New patch >

[Qemu-devel] [PULL for-2.5 0/3] Net patches for 2.5

2015-11-26 Thread Jason Wang
The following changes since commit b04fc428356a540fdb9065fa8c3c71ee476c2031: Update version for v2.5.0-rc2 release (2015-11-26 17:50:12 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to b73c1849148da1229a

[Qemu-devel] [PULL for-2.5 3/3] tap-win32: disable broken async write path

2015-11-26 Thread Jason Wang
for that device. This change disables the asynchronous write path, while keeping most of the code around in case someone sees value in resurrecting it. It also adds some conditional debug output, similar to the read path. Signed-off-by: Andrew Baumann Acked-by: Stefan Weil Signed-off-by: Jason

[Qemu-devel] [PULL for-2.5 1/3] eepro100: Prevent two endless loops

2015-11-26 Thread Jason Wang
: Stefan Weil Signed-off-by: Jason Wang --- hw/net/eepro100.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index 60333b7..685a478 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -774,6 +774,11 @@ static void tx_command

[Qemu-devel] [PULL for-2.5 2/3] tap-win32: skip unexpected nodes during registry enumeration

2015-11-26 Thread Jason Wang
h for matching children rather than aborting the search. Signed-off-by: Andrew Baumann Reviewed-by: Stefan Weil Signed-off-by: Jason Wang --- net/tap-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tap-win32.c b/net/tap-win32.c index 4e2fa55..5e5d6db 100644 -

Re: [Qemu-devel] [PATCH 1/4] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-11-29 Thread Jason Wang
On 11/30/2015 05:07 AM, Shmulik Ladkani wrote: > Hi, > > On Wed, 25 Nov 2015 16:24:39 +0800 Jason Wang wrote: >>>>> @@ -2568,6 +2572,7 @@ static void vmxnet3_class_init(ObjectClass *class, >>>>> void *data) >>>>> c->class_id = PCI_

Re: [Qemu-devel] [PATCH for 2.5 1/1] e1000: fix hang of win2k12 shutdown with flood ping

2015-11-29 Thread Jason Wang
On 11/27/2015 07:42 PM, Denis V. Lunev wrote: > On 11/27/2015 09:50 AM, Denis V. Lunev wrote: >> On 11/27/2015 09:48 AM, Denis V. Lunev wrote: >>> e1000 driver in Win2k12 is really well rotten. It 100% hangs on >>> shutdown >>> of UP VM under flood ping. The guest checks card state and reinjects

[Qemu-devel] [PATCH for 2.5 1/2] net: pcnet: add check to validate receive data size(CVE-2015-7504)

2015-11-29 Thread Jason Wang
org Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/pcnet.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index 0eb3cc4..309c40b 100644 --- a/hw/net/pcnet.c +++ b/hw/net/pcnet.c @@ -1084,7 +1084,7 @@ ssiz

[Qemu-devel] [PATCH for 2.5 2/2] pcnet: fix rx buffer overflow(CVE-2015-7512)

2015-11-29 Thread Jason Wang
Backends could provide a packet whose length is greater than buffer size. Check for this and truncate the packet to avoid rx buffer overflow in this case. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- hw/net/pcnet.c | 6 ++ 1 file changed, 6 insertions

Re: [Qemu-devel] [PATCH for 2.5 1/1] e1000: fix hang of win2k12 shutdown with flood ping

2015-11-30 Thread Jason Wang
On 11/30/2015 02:22 PM, Denis V. Lunev wrote: > On 11/30/2015 08:58 AM, Jason Wang wrote: >> >> On 11/27/2015 07:42 PM, Denis V. Lunev wrote: >>> On 11/27/2015 09:50 AM, Denis V. Lunev wrote: >>>> On 11/27/2015 09:48 AM, Denis V. Lunev wrote: >>>>

Re: [Qemu-devel] [PATCH for 2.5 1/2] net: pcnet: add check to validate receive data size(CVE-2015-7504)

2015-11-30 Thread Jason Wang
On 11/30/2015 06:46 PM, Michael S. Tsirkin wrote: > On Mon, Nov 30, 2015 at 03:38:22PM +0800, Jason Wang wrote: >> From: Prasad J Pandit >> >> In loopback mode, pcnet_receive routine appends CRC code to the >> receive buffer. If the data size given is same as the b

Re: [Qemu-devel] [PATCH for 2.5 2/2] pcnet: fix rx buffer overflow(CVE-2015-7512)

2015-11-30 Thread Jason Wang
On 11/30/2015 06:46 PM, Michael S. Tsirkin wrote: > On Mon, Nov 30, 2015 at 03:38:23PM +0800, Jason Wang wrote: >> Backends could provide a packet whose length is greater than buffer >> size. Check for this and truncate the packet to avoid rx buffer >> overflow in this cas

Re: [Qemu-devel] [PATCH v3] vmxnet3: silence warning

2015-11-30 Thread Jason Wang
On 12/01/2015 12:26 AM, Michael S. Tsirkin wrote: > vmxnet3 always produces a warning under qtest. > > This is not a user error, don't warn. > > Suggested-by: Paolo Bonzini > Signed-off-by: Michael S. Tsirkin > --- > > Now for real. > > hw/net/vmxnet3.c | 1 - > 1 file changed, 1 deletion(-) >

Re: [Qemu-devel] [PATCH for 2.5 1/1] e1000: fix hang of win2k12 shutdown with flood ping

2015-12-01 Thread Jason Wang
On 12/01/2015 05:38 PM, Denis V. Lunev wrote: > On 12/01/2015 06:31 AM, Jason Wang wrote: >> >> On 11/30/2015 02:22 PM, Denis V. Lunev wrote: >>> On 11/30/2015 08:58 AM, Jason Wang wrote: >>>> On 11/27/2015 07:42 PM, Denis V. Lunev wrote: >>>&g

Re: [Qemu-devel] [2.5 issue] virtio-1 in virtio-net and old vhost

2015-12-01 Thread Jason Wang
On 12/01/2015 10:21 PM, Cornelia Huck wrote: > On Tue, 1 Dec 2015 13:10:40 +0100 > Cornelia Huck wrote: > >> On Tue, 1 Dec 2015 11:11:08 +0100 >> Cornelia Huck wrote: >> >>> Some of our test folks tried to run a recent-ish qemu (nearly 2.5) >>> combined with an old host kernel (and a virtio-1 c

Re: [Qemu-devel] [PATCH] vhost-user: verify that number of queues is non-zero

2015-12-01 Thread Jason Wang
s ? vhost_user_opts->queues : 1; > +if (queues < 1) { > +error_setg(errp, > + "vhost-user number of queues must be bigger than zero"); > +return -1; > +} > > return net_vhost_user_init(peer, "vhost_user", name, chr, queues); > } Acked-by: Jason Wang

Re: [Qemu-devel] [2.5 issue] virtio-1 in virtio-net and old vhost

2015-12-03 Thread Jason Wang
On 12/02/2015 06:11 PM, Cornelia Huck wrote: > On Wed, 2 Dec 2015 13:54:09 +0800 > Jason Wang wrote: > >> I wonder instead of rolling back in post_plugged(), maybe we could just >> delay the region setups to post_plugged(). > If this is the saner thing to do for pci,

Re: [Qemu-devel] [PATCH] vhost: drop dead code

2015-12-03 Thread Jason Wang
> int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev); Acked-by: Jason Wang

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-03 Thread Jason Wang
On 12/02/2015 08:17 PM, P J P wrote: > Hello Dmitry, all > > A memory leakage issue was reported by Mr Qinghao Tang, CC'd here. > > In that, the Qemu VMXNET3 paravirtual device emulator does not check > if the device is already active, before activating it. This leads to > host memory leakage v

Re: [Qemu-devel] [PATCH] net/vmxnet3.c: fix a build error when enabling debug output

2015-12-03 Thread Jason Wang
On 12/03/2015 03:24 PM, Dmitry Fleytman wrote: > Acked-by: Dmitry Fleytman mailto:dmi...@daynix.com>> Applied in my -net for 2.5. Thanks > >> On 3 Dec 2015, at 07:08 AM, Miao Yan > > wrote: >> >> Macro MAC_FMT and MAC_ARG are not defined, but used in >> vmxnet3_ne

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-03 Thread Jason Wang
On 12/03/2015 03:17 PM, Dmitry Fleytman wrote: > Hello Prasad, > > The patch is good. > Jason, would you apply is from attachment or should it be resent by > "git send-email”? Better with "git send-email". And I've a question for this patch which needs to be answered before merging this. What i

Re: [Qemu-devel] [PATCH v2 1/5] vmxnet3: Change offsets of msi/msix pci capabilities

2015-12-04 Thread Jason Wang
On 12/02/2015 11:26 PM, Shmulik Ladkani wrote: > Place device reported PCI capabilities at the same offsets as placed by > the VMware virtual hardware: MSI at [84], MSI-X at [9c]. > > For compatability, preserve old offsets using 'x-old-msi-offsets' toggle. > > Signed-off-by: Shmulik Ladkani > -

Re: [Qemu-devel] [PATCH v2 4/5] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-04 Thread Jason Wang
On 12/02/2015 11:26 PM, Shmulik Ladkani wrote: > Report the 'express endpoint' capability if on a PCIE bus. > > The 'x-disable-pcie' property is used for backwards compatability. > > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c| 55 > +

Re: [Qemu-devel] [PATCH 2/2] lan9118: log and ignore access to invalid registers, rather than aborting

2015-12-06 Thread Jason Wang
On 12/05/2015 02:58 AM, Andrew Baumann wrote: > With this change, access to invalid/unimplemented device registers are > logged as a "guest error" rather than aborting qemu with > hw_error. This enables drivers for similar devices (e.g. SMSC 9221), > by simply ignoring the unimplemented writes. I

Re: [Qemu-devel] [PATCH v2 1/5] vmxnet3: Change offsets of msi/msix pci capabilities

2015-12-06 Thread Jason Wang
On 12/05/2015 03:38 AM, Shmulik Ladkani wrote: > Thanks Jason, > > On Fri, 4 Dec 2015 16:49:23 +0800 Jason Wang wrote: >>> @@ -18,6 +18,10 @@ >>> .driver = "virtio-pci",\ >>> .property = "

Re: [Qemu-devel] [PATCH 1/2] lan9118: fix emulation of MAC address loaded bit in E2P_CMD register

2015-12-06 Thread Jason Wang
On 12/05/2015 02:58 AM, Andrew Baumann wrote: > There appears to have been a longstanding typo in the implementation > of the "MAC address loaded" bit in the E2P_CMD (EEPROM command) > register. The code was using 0x10, but the controller spec says it > should be bit 8 (0x100). > > Signed-off-by:

Re: [Qemu-devel] [PATCH v2 4/5] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-06 Thread Jason Wang
On 12/05/2015 03:57 AM, Shmulik Ladkani wrote: > Thanks Jason, > > On Fri, 4 Dec 2015 16:49:52 +0800 Jason Wang wrote: >>> @@ -2257,6 +2262,10 @@ static void vmxnet3_pci_realize(PCIDevice *pci_dev, >>> Error **errp) >>> >>> vmxnet3_net_init(

Re: [Qemu-devel] [PATCH v2 2/3] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-06 Thread Jason Wang
On 12/05/2015 04:55 PM, Miao Yan wrote: > Vmxnet3 uses the following debug macro style: > > #ifdef SOME_DEBUG > # define debug(...) do{ printf(...); } while (0) > # else > # define debug(...) do{ } while (0) > #endif > > If SOME_DEBUG is undefined, then format string inside the > debug mac

[Qemu-devel] [PULL for 2.5 2/9] net: pcnet: add check to validate receive data size(CVE-2015-7504)

2015-12-06 Thread Jason Wang
org Reviewed-by: Michael S. Tsirkin Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/pcnet.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index 0eb3cc4..309c40b 100644 --- a/hw/net/pcnet.c +++ b/hw/net/pcne

[Qemu-devel] [PULL for 2.5 1/9] e1000: fix hang of win2k12 shutdown with flood ping

2015-12-06 Thread Jason Wang
ffione CC: Stefan Hajnoczi Signed-off-by: Jason Wang --- hw/net/e1000.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index c877e06..bec06e9 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -447,6 +447,11 @@ static void e1000_reset(vo

[Qemu-devel] [PULL for 2.5 0/9] Net patches

2015-12-06 Thread Jason Wang
sue during win2k12 guest driver shutdown - Fix two pcnet buffer overflow CVEs - Fix lan9118 mac address loaded bit and warn instead of aborting when accessing unimplemented registers - Fix vmxnet3 compile issue when debug is enabled, and always complie and check for debug marcos. Signed-off-by:

[Qemu-devel] [PULL for 2.5 8/9] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-06 Thread Jason Wang
is likely to break in the future when SOME_DEBUG is enabled because of lack of testing. This patch changes this to the following: #define debug(...) \ do { if (SOME_DEBUG_ENABLED) printf(...); } while (0) Signed-off-by: Miao Yan Reviewed-by: Eric Blake Signed-off-by: Jason Wang --- hw/net

[Qemu-devel] [PULL for 2.5 9/9] net/vmxnet3: remove redundant VMW_SHPRN(...) definition

2015-12-06 Thread Jason Wang
From: Miao Yan Macro VMW_SHPRN(...) is already defined vmxnet3_debug.h, so remove the duplication Signed-off-by: Miao Yan Reviewed-by: Eric Blake Signed-off-by: Jason Wang --- hw/net/vmware_utils.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/net/vmware_utils.h

[Qemu-devel] [PULL for 2.5 3/9] pcnet: fix rx buffer overflow(CVE-2015-7512)

2015-12-06 Thread Jason Wang
Backends could provide a packet whose length is greater than buffer size. Check for this and truncate the packet to avoid rx buffer overflow in this case. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/pcnet.c | 6 ++ 1

[Qemu-devel] [PULL for 2.5 4/9] vmxnet3: silence warning

2015-12-06 Thread Jason Wang
From: "Michael S. Tsirkin" vmxnet3 always produces a warning under qtest. This is not a user error, don't warn. Suggested-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/

[Qemu-devel] [PULL for 2.5 5/9] net/vmxnet3.c: fix a build error when enabling debug output

2015-12-06 Thread Jason Wang
-off-by: Jason Wang --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 37373e5..b41a35c 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2043,7 +2043,7 @@ static void vmxnet3_net_init(VMXNET3State *s) s

[Qemu-devel] [PULL for 2.5 6/9] lan9118: fix emulation of MAC address loaded bit in E2P_CMD register

2015-12-06 Thread Jason Wang
ned-off-by: Jason Wang --- hw/net/lan9118.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 4f0e840..133fd3d 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -56,6 +56,8 @@ do { fprintf(stderr, "lan9118: error: " f

[Qemu-devel] [PULL for 2.5 7/9] lan9118: log and ignore access to invalid registers, rather than aborting

2015-12-06 Thread Jason Wang
er to what real hardware does. Signed-off-by: Andrew Baumann Signed-off-by: Jason Wang --- hw/net/lan9118.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 133fd3d..1734b52 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9

Re: [Qemu-devel] [PULL for 2.5 0/9] Net patches

2015-12-07 Thread Jason Wang
- Original Message - > On 7 December 2015 at 11:10, Peter Maydell wrote: > > On 7 December 2015 at 03:26, Jason Wang wrote: > >> The following changes since commit > >> 61e3aa25b129b48d8a8cb851aae2a787af7ca5e1: > >> > >> Merge remote-

[Qemu-devel] [PULL V2 for 2.5 0/6] Net patches

2015-12-07 Thread Jason Wang
e1000 hang issue during win2k12 guest driver shutdown - Fix two pcnet buffer overflow CVEs - Fix lan9118 mac address loaded bit and warn instead of aborting when accessing unimplemented registers Changes from V1: - Unbreak 32bit build by dropping the vmxnet3 debug printf fixes Signed-off-by:

[Qemu-devel] [PULL V2 for 2.5 1/6] e1000: fix hang of win2k12 shutdown with flood ping

2015-12-07 Thread Jason Wang
ffione CC: Stefan Hajnoczi Signed-off-by: Jason Wang --- hw/net/e1000.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 910de3a..1531244 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -426,6 +426,11 @@ static void e1000_reset(vo

[Qemu-devel] [PULL V2 for 2.5 4/6] vmxnet3: silence warning

2015-12-07 Thread Jason Wang
From: "Michael S. Tsirkin" vmxnet3 always produces a warning under qtest. This is not a user error, don't warn. Suggested-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/

[Qemu-devel] [PULL V2 for 2.5 2/6] net: pcnet: add check to validate receive data size(CVE-2015-7504)

2015-12-07 Thread Jason Wang
org Reviewed-by: Michael S. Tsirkin Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/pcnet.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index 0eb3cc4..309c40b 100644 --- a/hw/net/pcnet.c +++ b/hw/net/pcne

[Qemu-devel] [PULL V2 for 2.5 6/6] lan9118: log and ignore access to invalid registers, rather than aborting

2015-12-07 Thread Jason Wang
er to what real hardware does. Signed-off-by: Andrew Baumann Signed-off-by: Jason Wang --- hw/net/lan9118.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 133fd3d..1734b52 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9

[Qemu-devel] [PULL V2 for 2.5 5/6] lan9118: fix emulation of MAC address loaded bit in E2P_CMD register

2015-12-07 Thread Jason Wang
ned-off-by: Jason Wang --- hw/net/lan9118.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 4f0e840..133fd3d 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -56,6 +56,8 @@ do { fprintf(stderr, "lan9118: error: " f

[Qemu-devel] [PULL V2 for 2.5 3/6] pcnet: fix rx buffer overflow(CVE-2015-7512)

2015-12-07 Thread Jason Wang
Backends could provide a packet whose length is greater than buffer size. Check for this and truncate the packet to avoid rx buffer overflow in this case. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/pcnet.c | 6 ++ 1

Re: [Qemu-devel] [PATCH v2 2/3] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-10 Thread Jason Wang
On 12/08/2015 06:04 AM, Eric Blake wrote: > On 12/06/2015 07:47 PM, Jason Wang wrote: >> >> On 12/05/2015 04:55 PM, Miao Yan wrote: >>> Vmxnet3 uses the following debug macro style: >>> >>> #ifdef SOME_DEBUG >>> # define debug(...) do{ printf

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-11 Thread Jason Wang
On 12/09/2015 11:28 PM, P J P wrote: >Hello Jason, Dmitry, > > +-- On Tue, 8 Dec 2015, P J P wrote --+ > | |1) VMXNET3_CMD_QUIESCE_DEV > | > | IIUC, it is used to pause the device when the receiver end is unable to > | keee-up with the incoming flow. After a brief period, the operation co

Re: [Qemu-devel] [PATCH v3 0/4] fix debug macro pattern for vmxnet3

2015-12-13 Thread Jason Wang
On 12/08/2015 02:29 PM, Dmitry Fleytman wrote: > > Reviewed-by: Dmitry Fleytman > > >> On 8 Dec 2015, at 07:28 AM, Miao Yan > > wrote: >> >> This patchset fixes debug macro pattern for vmxnet3. The old style uses >> #ifdef...#else...#endif

Re: [Qemu-devel] [PATCH v3 3/7] vmxnet3: Introduce 'x-old-msi-offsets' backword compatability property

2015-12-13 Thread Jason Wang
On 12/12/2015 08:00 PM, Shmulik Ladkani wrote: > Following the previous patches, where vmxnet3's pci's msi/msix > capability offsets and msix's PBA table offsets have been changed, this > patch introduces a boolean property 'x-old-msi-offsets' to vmxnet3, > whose default is false. > > Setting 'x-

Re: [Qemu-devel] [PATCH v3 5/7] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-13 Thread Jason Wang
On 12/12/2015 08:00 PM, Shmulik Ladkani wrote: > Report the 'express endpoint' capability if on a PCIE bus. > > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c | 53 - > 1 file changed, 52 insertions(+), 1 deletion(-) > > diff --git a/

Re: [Qemu-devel] [PATCH v3 6/7] vmxnet3: Introduce 'x-disable-pcie' backword compatability property

2015-12-13 Thread Jason Wang
On 12/12/2015 08:00 PM, Shmulik Ladkani wrote: > Following the previous patch which changed vmxnet3 to be a pci express > device, this patch introduces a boolean property 'x-disable-pcie' whose > default is false. > > Setting 'x-disable-pcie' to 'on' preserves the old 'pci device' (non > express)

Re: [Qemu-devel] [PATCH v3 5/7] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-14 Thread Jason Wang
On 12/14/2015 03:32 PM, Shmulik Ladkani wrote: > Thanks Jason, > > On Mon, 14 Dec 2015 14:24:36 +0800, jasow...@redhat.com wrote: >>> +static void vmxnet3_realize(DeviceState *qdev, Error **errp) >>> +{ >>> +VMXNET3Class *vc = VMXNET3_DEVICE_GET_CLASS(qdev); >>> +PCIDevice *pci_dev = PCI_

Re: [Qemu-devel] [PATCH v3 5/7] vmxnet3: The vmxnet3 device is a PCIE endpoint

2015-12-15 Thread Jason Wang
On 12/15/2015 02:09 PM, Shmulik Ladkani wrote: > Hi Jason, > > On Tue, 15 Dec 2015 10:35:59 +0800 Jason Wang wrote: >>> Another attempt I've made is to indroduce a new type vmxnet3e (the >>> pcie variant of vmxnet3). >>> I dropped this approach sin

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread Jason Wang
On 12/15/2015 04:00 PM, P J P wrote: > +-- On Tue, 15 Dec 2015, Dmitry Fleytman wrote --+ > | Hello Prasad, > | > | Looks good. > | Reviewed-by: Dmitry Fleytman > > Great! Thank you. > -- > Prasad J Pandit / Red Hat Product Security Team > 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F > Pa

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add an entry for the net/slirp.c file

2015-12-15 Thread Jason Wang
On 12/15/2015 04:48 PM, Thomas Huth wrote: > The file net/slirp.c should be listed in the SLIRP section, too. > > Signed-off-by: Thomas Huth > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index e8cee1e..a87b113 100644 > --- a/MAINTAINERS

Re: [Qemu-devel] [PATCH] hw/arm/virt: Initialize NICs configured in PCI bus

2016-01-10 Thread Jason Wang
On 01/07/2016 11:21 PM, Paolo Bonzini wrote: > > On 07/01/2016 15:47, Peter Maydell wrote: >> I think my current inclination is to say that virt should >> support -net, because I would prefer to avoid having yet >> another speedbump in the path of people trying to move to >> using KVM-on-ARM base

Re: [Qemu-devel] [PATCH] ether/slirp: Avoid redefinition of the same constants

2016-01-10 Thread Jason Wang
On 01/09/2016 12:25 AM, Alex Bennée wrote: > Dr. David Alan Gilbert (git) writes: > >> From: "Dr. David Alan Gilbert" >> >> eth.h and slirp.h both define ETH_ALEN and ETH_P_IP >> rtl8139.c and eth.h both define ETH_HLEN >> >> Move the related constant (ETH_P_ARP) from slirp.h to eth.h, and >> r

[Qemu-devel] [PULL 00/24] Net patches

2016-01-10 Thread Jason Wang
The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging (2016-01-08 12:50:19 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

[Qemu-devel] [PULL 02/24] net/vmxnet3: use %zu for size_t in printf

2016-01-10 Thread Jason Wang
From: Miao Yan Use %zu specifier for size_t in printf, otherwise build would fail on platforms where size_t is not unsigned long Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[Qemu-devel] [PULL 03/24] net/vmxnet3: fix debug macro pattern for vmxnet3

2016-01-10 Thread Jason Wang
-off-by: Jason Wang --- hw/net/vmxnet_debug.h | 139 +++--- 1 file changed, 86 insertions(+), 53 deletions(-) diff --git a/hw/net/vmxnet_debug.h b/hw/net/vmxnet_debug.h index 96dae0f..96495db 100644 --- a/hw/net/vmxnet_debug.h +++ b/hw/net/vmxnet_debug.h

[Qemu-devel] [PULL 06/24] MAINTAINERS: Add an entry for the net/slirp.c file

2016-01-10 Thread Jason Wang
From: Thomas Huth The file net/slirp.c should be listed in the SLIRP section, too. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5a62ecd..ccfa34b 100644 --- a/MAINTAINERS +++ b

[Qemu-devel] [PULL 01/24] net/vmxnet3: fix a build error when enabling debug output

2016-01-10 Thread Jason Wang
: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 37373e5..b41a35c 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2043,7 +2043,7 @@ static void vmxnet3_net_init

[Qemu-devel] [PULL 07/24] net/vmxnet3: return 1 on device activation failure

2016-01-10 Thread Jason Wang
Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 9c1adfc..8a992d3 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1662,7 +166

[Qemu-devel] [PULL 04/24] net/vmxnet3: remove redundant VMW_SHPRN(...) definition

2016-01-10 Thread Jason Wang
From: Miao Yan Macro VMW_SHPRN(...) is already defined vmxnet3_debug.h, so remove the duplication Signed-off-by: Miao Yan Reviewed-by: Eric Blake Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmware_utils.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[Qemu-devel] [PULL 19/24] vmxnet3: Report the Device Serial Number capability

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Report the DSN extended PCI capability at 0x100. DSN value is a transformation of device MAC address, as calculated by VMware virtual hardware. DSN is reported only if device is pcie. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 28

[Qemu-devel] [PULL 10/24] net/vmxnet3: return 0 on unknown command

2016-01-10 Thread Jason Wang
From: Miao Yan Return 0 on unknown command, this is what esxi (5.x+) behaves. Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index

[Qemu-devel] [PULL 05/24] net: vmxnet3: avoid memory leakage in activate_device

2016-01-10 Thread Jason Wang
kage. Reported-by: Qinghao Tang Reviewed-by: Dmitry Fleytman Signed-off-by: Prasad J Pandit Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c i

[Qemu-devel] [PULL 08/24] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2016-01-10 Thread Jason Wang
0x%x, high: 0x%x\n", lo, high); The kernel log will have something like the following message: [ 7005.70] vmxnet3 DID lo: 0x7b0, high: 0x1 Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 16 1 file changed, 16

[Qemu-devel] [PULL 12/24] net/dump: fix nfds->filename leak

2016-01-10 Thread Jason Wang
From: Li Zhijian Cc: Jason Wang Signed-off-by: Li Zhijian Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- net/dump.c | 8 1 file changed, 8 insertions(+) diff --git a/net/dump.c b/net/dump.c index ce16a4b..347b5ca 100644 --- a/net/dump.c +++ b/net/dump.c @@ -329,6 +329,13

[Qemu-devel] [PULL 11/24] net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION

2016-01-10 Thread Jason Wang
From: Miao Yan VMXNET3_DEVICE_VERSION is used as return value for accessing UPT Revision Report and Selection register. So rename it to VMXNET3_UPT_REVISION. Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 4 ++-- 1 file changed, 2

[Qemu-devel] [PULL 09/24] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2016-01-10 Thread Jason Wang
ned-off-by: Jason Wang --- hw/net/vmxnet3.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 0aff0d4..da59d7d 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1658,6 +1658,10 @@ static void vmxnet3_handle_command(VMXNET3State *s, ui

[Qemu-devel] [PULL 22/24] net: ne2000: fix bounds check in ioport operations

2016-01-10 Thread Jason Wang
From: Prasad J Pandit While doing ioport r/w operations, ne2000 device emulation suffers from OOB r/w errors. Update respective array bounds check to avoid OOB access. Reported-by: Ling Liu Cc: qemu-sta...@nongnu.org Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/ne2000

[Qemu-devel] [PULL 15/24] vmxnet3: Change the offset of the MSIX PBA table

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Place the PBA table at 0x1000, as placed by VMware virtual hardware. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 0097f4b

[Qemu-devel] [PULL 13/24] net/filter: fix nf->netdev_id leak

2016-01-10 Thread Jason Wang
From: Li Zhijian Cc: Jason Wang Cc: qemu-sta...@nongnu.org Signed-off-by: Li Zhijian Signed-off-by: Jason Wang --- net/filter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/filter.c b/net/filter.c index 1365bad..f777ba2 100644 --- a/net/filter.c +++ b/net/filter.c @@ -204,6 +204,7

[Qemu-devel] [PULL 14/24] vmxnet3: Change offsets of msi/msix pci capabilities

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Place device reported PCI capabilities at the same offsets as placed by the VMware virtual hardware: MSI at [84], MSI-X at [9c]. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 18 +++--- 1 file changed, 15 insertions(+), 3

[Qemu-devel] [PULL 20/24] vmxnet3: Introduce 'x-disable-pcie' back-compat property

2016-01-10 Thread Jason Wang
ress) behavior. This allows migration to older versions. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c| 2 ++ include/hw/compat.h | 4 2 files changed, 6 insertions(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index aee218c..67abad3 100644 --- a

[Qemu-devel] [PULL 16/24] vmxnet3: Introduce 'x-old-msi-offsets' back-compat property

2016-01-10 Thread Jason Wang
msi-offsets' to 'on' preserves the old offsets behavior, which allows migration to older versions. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c| 2 ++ include/hw/compat.h | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --gi

[Qemu-devel] [PULL 23/24] l2tpv3: fix cookie decoding

2016-01-10 Thread Jason Wang
From: Alexis Dambricourt If a 32 bits l2tpv3 frame cookie MSB if set to 1, the cast to uint64_t cookie will spread 1 to the four most significant bytes. Then the condition (cookie != s->rx_cookie) becomes false. Signed-off-by: Alexis Dambricourt Signed-off-by: Jason Wang --- net/l2tpv3.c

[Qemu-devel] [PULL 24/24] ether/slirp: Avoid redefinition of the same constants

2016-01-10 Thread Jason Wang
eviewed-by: Alex Bennée Signed-off-by: Jason Wang --- hw/net/rtl8139.c | 1 - include/net/eth.h | 4 +++- slirp/slirp.h | 7 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 68e43f3..d192d57 100644 --- a/hw/net/rtl8139.c +++ b/hw/net

<    4   5   6   7   8   9   10   11   12   13   >