[Qemu-devel] [PATCH] qga: unset frozen state if no mount points are frozen

2017-12-15 Thread Chen Hanxiao
From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. Call ga_unset_frozen in this senario. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- qga/commands-posix.c | 6 ++ 1 file changed, 6 insertions(+) d

Re: [Qemu-devel] [RFC v5 19/26] qapi: introduce new cmd option "allow-oob"

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 05:51:04PM +0800, Fam Zheng wrote: > On Tue, 12/05 13:51, Peter Xu wrote: > > --- a/qapi/introspect.json > > +++ b/qapi/introspect.json > > @@ -259,12 +259,16 @@ > > # > > # @ret-type: the name of the command's result type. > > # > > +# @allow-oob: whether the command all

Re: [Qemu-devel] [RFC v5 18/26] monitor: send event when request queue full

2017-12-15 Thread Peter Xu
On Thu, Dec 14, 2017 at 11:41:36AM +, Stefan Hajnoczi wrote: > On Tue, Dec 05, 2017 at 01:51:52PM +0800, Peter Xu wrote: > > Set maximum QMP request queue length to 8. If queue full, instead of > > queue the command, we directly return a "request-dropped" event, telling > > client that specifi

Re: [Qemu-devel] [RFC v5 17/26] qmp: add new event "request-dropped"

2017-12-15 Thread Peter Xu
On Thu, Dec 14, 2017 at 11:16:02AM +, Stefan Hajnoczi wrote: > On Tue, Dec 05, 2017 at 01:51:51PM +0800, Peter Xu wrote: > > +## > > +# @RequestDropReason: > > +# > > +# Reasons that caused one command to be dropped. > > +# > > +# @queue-full: the queue of request is full. > > +# > > +# Since:

Re: [Qemu-devel] [RFC v5 16/26] monitor: separate QMP parser and dispatcher

2017-12-15 Thread Peter Xu
On Sat, Dec 16, 2017 at 02:37:03PM +0800, Peter Xu wrote: > On Wed, Dec 13, 2017 at 08:09:38PM +, Stefan Hajnoczi wrote: > > On Tue, Dec 05, 2017 at 01:51:50PM +0800, Peter Xu wrote: > > > @@ -3956,12 +3968,122 @@ static void handle_qmp_command(JSONMessageParser > > > *parser, GQueue *tokens,

Re: [Qemu-devel] [RFC v5 16/26] monitor: separate QMP parser and dispatcher

2017-12-15 Thread Peter Xu
On Wed, Dec 13, 2017 at 08:09:38PM +, Stefan Hajnoczi wrote: > On Tue, Dec 05, 2017 at 01:51:50PM +0800, Peter Xu wrote: > > @@ -3956,12 +3968,122 @@ static void handle_qmp_command(JSONMessageParser > > *parser, GQueue *tokens, > > } > > } > > > > -err_out: > > -monitor_qmp

Re: [Qemu-devel] [RFC v5 15/26] monitor: let suspend_cnt be thread safe

2017-12-15 Thread Peter Xu
On Wed, Dec 13, 2017 at 06:43:58PM +, Stefan Hajnoczi wrote: > On Tue, Dec 05, 2017 at 01:51:49PM +0800, Peter Xu wrote: > > Monitor code now can be run in more than one thread. Let it be thread > > safe when accessing suspend_cnt counter. > > Please add doc comments to the functions explaini

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Tetsuo Handa
Matthew Wilcox wrote: > On Sat, Dec 16, 2017 at 01:31:24PM +0900, Tetsuo Handa wrote: > > Michael S. Tsirkin wrote: > > > On Sat, Dec 16, 2017 at 01:21:52AM +0900, Tetsuo Handa wrote: > > > > My understanding is that virtio-balloon wants to handle sparsely > > > > spreaded > > > > unsigned long va

Re: [Qemu-devel] [RFC v5 14/26] monitor: introduce monitor_qmp_respond()

2017-12-15 Thread Peter Xu
On Wed, Dec 13, 2017 at 05:35:33PM +, Stefan Hajnoczi wrote: > On Tue, Dec 05, 2017 at 01:51:48PM +0800, Peter Xu wrote: > > A tiny refactoring, preparing to split the QMP dispatcher away. > > > > Reviewed-by: Fam Zheng > > Signed-off-by: Peter Xu > > --- > > monitor.c | 48

Re: [Qemu-devel] [RFC v5 13/26] qmp: introduce some capability helpers

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 05:42:55PM +0800, Fam Zheng wrote: > On Tue, 12/05 13:51, Peter Xu wrote: > > Introduce qmp_cap_enabled() and qmp_oob_enabled() helpers. > > > > Signed-off-by: Peter Xu > > --- > > monitor.c | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/monit

Re: [Qemu-devel] [RFC v5 12/26] qmp: negociate QMP capabilities

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 09:53:53PM +0800, Fam Zheng wrote: > On Fri, 12/15 13:26, Stefan Hajnoczi wrote: > > > > QEMU always offers the 'oob' capability, even if the monitor does not > > > > support it. Should it send 'oob' only when mon->use_io_thr to make > > > > things easier for clients? Agre

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Matthew Wilcox
On Sat, Dec 16, 2017 at 01:31:24PM +0900, Tetsuo Handa wrote: > Michael S. Tsirkin wrote: > > On Sat, Dec 16, 2017 at 01:21:52AM +0900, Tetsuo Handa wrote: > > > My understanding is that virtio-balloon wants to handle sparsely spreaded > > > unsigned long values (which is PATCH 4/7) and wants to fi

Re: [Qemu-devel] [RFC v5 09/26] monitor: create monitor dedicate iothread

2017-12-15 Thread Peter Xu
On Sat, Dec 16, 2017 at 12:42:00PM +0800, Peter Xu wrote: > On Fri, Dec 15, 2017 at 01:21:42PM +, Stefan Hajnoczi wrote: > > On Fri, Dec 15, 2017 at 04:31:08PM +0800, Peter Xu wrote: > > > On Wed, Dec 13, 2017 at 04:20:22PM +, Stefan Hajnoczi wrote: > > > > On Tue, Dec 05, 2017 at 01:51:43P

Re: [Qemu-devel] [RFC v5 09/26] monitor: create monitor dedicate iothread

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 01:21:42PM +, Stefan Hajnoczi wrote: > On Fri, Dec 15, 2017 at 04:31:08PM +0800, Peter Xu wrote: > > On Wed, Dec 13, 2017 at 04:20:22PM +, Stefan Hajnoczi wrote: > > > On Tue, Dec 05, 2017 at 01:51:43PM +0800, Peter Xu wrote: > > > > @@ -208,6 +209,12 @@ struct Monit

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Tetsuo Handa
Michael S. Tsirkin wrote: > On Sat, Dec 16, 2017 at 01:21:52AM +0900, Tetsuo Handa wrote: > > My understanding is that virtio-balloon wants to handle sparsely spreaded > > unsigned long values (which is PATCH 4/7) and wants to find all chunks of > > consecutive "1" bits efficiently. Therefore, I gu

Re: [Qemu-devel] [RFC v5 11/26] qmp: introduce QMPCapability

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 05:38:03PM +0800, Fam Zheng wrote: > On Fri, 12/15 17:14, Peter Xu wrote: > > On Wed, Dec 13, 2017 at 04:56:51PM +, Stefan Hajnoczi wrote: > > > On Tue, Dec 05, 2017 at 01:51:45PM +0800, Peter Xu wrote: > > > > There was no QMP capabilities defined. Define the first "oo

Re: [Qemu-devel] [RFC v5 07/26] monitor: unify global init

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 12:47:11PM +, Stefan Hajnoczi wrote: > On Fri, Dec 15, 2017 at 04:11:41PM +0800, Peter Xu wrote: > > On Wed, Dec 13, 2017 at 03:48:06PM +, Stefan Hajnoczi wrote: > > > On Tue, Dec 05, 2017 at 01:51:41PM +0800, Peter Xu wrote: > > > > diff --git a/vl.c b/vl.c > > > >

Re: [Qemu-devel] [RFC v5 05/26] qjson: add "opaque" field to JSONMessageParser

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 12:45:24PM +, Stefan Hajnoczi wrote: > On Fri, Dec 15, 2017 at 03:55:06PM +0800, Peter Xu wrote: > > On Wed, Dec 13, 2017 at 03:37:02PM +, Stefan Hajnoczi wrote: > > > On Tue, Dec 05, 2017 at 01:51:39PM +0800, Peter Xu wrote: > > > > diff --git a/qga/main.c b/qga/mai

Re: [Qemu-devel] [PATCH 3/5] i8259: generalize statistics into common code

2017-12-15 Thread Peter Xu
On Fri, Dec 15, 2017 at 08:28:07AM -0300, Philippe Mathieu-Daudé wrote: [...] > > diff --git a/include/hw/isa/i8259_internal.h > > b/include/hw/isa/i8259_internal.h > > index 6954b6ec5f..f742c2a726 100644 > > --- a/include/hw/isa/i8259_internal.h > > +++ b/include/hw/isa/i8259_internal.h > > @@

[Qemu-devel] [PATCH v2] block: Fix qemu crash when using scsi-block

2017-12-15 Thread Deepa Srinivasan
Starting qemu with the following arguments causes qemu to segfault: ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name= iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1 This patch fixes blk_aio_ioctl() so it does not pass stack addresses to blk_aio_ioctl_entry()

Re: [Qemu-devel] [PATCH 00/26] SDCard housekeeping

2017-12-15 Thread Alistair Francis
On Wed, Dec 13, 2017 at 3:19 PM, Philippe Mathieu-Daudé wrote: > Now that we have a way to write qtest in Python, lets start with a simple test > to perform basic card identification, covering many functions of the sd/sd.c > file. > > [patch 1] > When a device is not MMIO-connected but rather plug

Re: [Qemu-devel] [PATCH 4/8] sdhci: fix CAPAB/MAXCURR registers, both are 64bit and read-only

2017-12-15 Thread Alistair Francis
On Wed, Dec 13, 2017 at 6:00 PM, Philippe Mathieu-Daudé wrote: > running qtests: > > $ make check-qtest-arm > GTESTER check-qtest-arm > SDHC rd_4b @0x44 not implemented > SDHC wr_4b @0x40 <- 0x89abcdef not implemented > SDHC wr_4b @0x44 <- 0x01234567 not implemented > > Signed-off-by:

Re: [Qemu-devel] [PATCH 2/8] sdhci: some ARM boards do support SD_HOST_SPECv3_VERS

2017-12-15 Thread Alistair Francis
On Wed, Dec 13, 2017 at 6:00 PM, Philippe Mathieu-Daudé wrote: > set the property with object_property_set_uint() or qdev_prop_set_uint8(). > > [Zynq part based on a patch from Alistair Francis > > from qemu/xilinx tag xilinx-v2015.2] > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alist

Re: [Qemu-devel] [PATCH 1/8] sdhci: add a "sd-spec-version" property

2017-12-15 Thread Alistair Francis
On Wed, Dec 13, 2017 at 6:00 PM, Philippe Mathieu-Daudé wrote: > default to SDHCI v2 > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > I am not sure which real VENDOR is HCVER=0x24, we probably don't care. > > hw/sd/sdhci-internal.h | 4 ++-- > include

[Qemu-devel] [Bug 1738283] Re: 'Less than' (<), 'more than' (>), and 'pipe' (|) can't be typed via VNC

2017-12-15 Thread Michal Nowak
If I start QEMU with `-k en-gb` at least '<' and '>' work, '|' doesn't (and obviously 'Shift-2' produces '"' not '@'). My host `locale` is 'en_US.UTF-8' top to bottom. I tried to update TigerVNC to 1.8 but no change. I run `vncviewer` with '-Log *:stderr:100' and QEMU without '-k' option and at l

Re: [Qemu-devel] [PATCH] checkpatch: warn when using volatile with a comment

2017-12-15 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171215181810.4122-1-marcandre.lur...@redhat.com Subject: [Qemu-devel] [PATCH] checkpatch: warn when using volatile with a comment === TEST SCRIPT BEGIN === #!/bin/bash BA

[Qemu-devel] [PATCH] 9pfs: make pdu_marshal() and pdu_unmarshal() static functions

2017-12-15 Thread Greg Kurz
They're only used by the 9p core code. Signed-off-by: Greg Kurz --- hw/9pfs/9p.c |4 ++-- hw/9pfs/9p.h |2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 558efb41defd..1e4ebbe57687 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -41,7

[Qemu-devel] [Bug 1738283] Re: 'Less than' (<), 'more than' (>), and 'pipe' (|) can't be typed via VNC

2017-12-15 Thread Miguel Castellanos
Hello, I confirm the same problem on Fedora 27 Server using Source code release 2.11.0 The problem remains no matter if I use the "-k en-us" parameter or not. Worked fine up to 2.10.1 If the guess is Windows, then when trying to type the "<" character then the pipe ("|") appears. If the guess

[Qemu-devel] [PATCH RFC 1/1] tests: Add migration test for aarch64

2017-12-15 Thread Wei Huang
This patch adds the migration test support for aarch64. The test code, which implements the same functionality as x86, is compiled into a binary and booted as a kernel to qemu. Here are the design ideas: * We choose this -kernel design because aarch64 QEMU doesn't provide a built-in fw like x86

Re: [Qemu-devel] [PATCH v2 12/15] sdhci: Add i.MX specific subtype of SDHCI

2017-12-15 Thread Philippe Mathieu-Daudé
Hi Andrey, >> I rather disagree with this patch, however I applied it on top of my >> current tree and plan to refactor it. But if it is applied before, I can >> survive :) Not a strong NACK. >> > > Umm, Philippe, I didn't really ask you to refactor my code and I'd > really appreciate if you'd en

Re: [Qemu-devel] Key code conflict in keycodemapdb

2017-12-15 Thread Miika S
Ok, I don't know if there is a separate place where to send patches for keycodemapdb but I will put it in this reply. I will send a new set of patches for the QEMU changes that were in the first mail (hopefully in a better format than this one) and also a fix for mouse wheel event being sent twice.

Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus

2017-12-15 Thread Eric Blake
On 12/14/2017 03:06 AM, Kevin Wolf wrote: > Am 14.12.2017 um 00:20 hat Philippe Mathieu-Daudé geschrieben: >> Use Base64 to serialize the binary blobs in JSON. >> So far at most 512 bytes will be transfered, which result s/transfered/transferred/ >> in a 684 bytes payload. >> Since this command i

Re: [Qemu-devel] [PATCH 0/2] block: Fix qemu-img creating overlay when guest running

2017-12-15 Thread Eric Blake
On 12/15/2017 02:04 AM, Fam Zheng wrote: > Shared write lock is not strictly necessary for creating the overlay image, if > all what we want is to probe the size. Theoretically, the size could be changing due to a resize operation. But realistically, even if that happens, we will (hopefully) see e

Re: [Qemu-devel] [PATCH 2/2] iotests: Test creating overlay when guest running

2017-12-15 Thread Eric Blake
On 12/15/2017 02:04 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/153 | 4 > tests/qemu-iotests/153.out | 3 +++ > 2 files changed, 7 insertions(+) > > diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 > index fa25eb24bd..22cb9c69a7 100755 > --- a

Re: [Qemu-devel] [PATCHv3 06/13] sungem: fix multicast filter CRC calculation

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 03:41 PM, Mark Cave-Ayland wrote: > From the Linux sungem driver, we know that the multicast filter CRC is > implemented using ether_crc_le() which isn't the same as calling zlib's > crc32() function (the zlib implementation requires a complemented initial > value > and also returns

Re: [Qemu-devel] [PATCHv3 04/13] eepro100: switch eepro100 e100_compute_mcast_idx() over to use net_crc32()

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 03:41 PM, Mark Cave-Ayland wrote: > Instead of e100_compute_mcast_idx() using its own implementation, we can > simply call net_crc32() directly and apply the bit shift inline. > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé > --

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Matthew Wilcox
On Fri, Dec 15, 2017 at 10:49:15AM -0800, Matthew Wilcox wrote: > Here's the API I'm looking at right now. The user need take no lock; > the locking (spinlock) is handled internally to the implementation. I looked at the API some more and found some flaws: - how does xbit_alloc communicate back

Re: [Qemu-devel] [PATCH] hw/misc: Add code to emulate PFUZE3000 PMIC

2017-12-15 Thread Andrey Smirnov
On Fri, Dec 15, 2017 at 6:56 AM, Peter Maydell wrote: > On 14 December 2017 at 15:19, Andrey Smirnov wrote: >> Add trivial code to emulate PFUZE3000 PMIC. >> >> Cc: qemu-devel@nongnu.org >> Cc: qemu-...@nongnu.orgn >> Cc: yurov...@gmail.com >> Cc: Peter Maydell >> Signed-off-by: Andrey Smirnov

Re: [Qemu-devel] [PATCH 0/7] TCG misc patches

2017-12-15 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171215170732.31125-1-richard.hender...@linaro.org Subject: [Qemu-devel] [PATCH 0/7] TCG misc patches === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --

Re: [Qemu-devel] [PATCH v1 1/2] qmp.c: (re)implement qmp_cpu

2017-12-15 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (danie...@linux.vnet.ibm.com) wrote: > > > On 12/14/2017 01:21 PM, Markus Armbruster wrote: > > Eric Blake writes: > > > > > On 12/13/2017 12:15 PM, Daniel Henrique Barboza wrote: > > > > Commit 755f196898 ("qapi: Convert the cpu command") added the qmp_cpu > > > > fun

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Matthew Wilcox
On Sat, Dec 16, 2017 at 01:21:52AM +0900, Tetsuo Handa wrote: > My understanding is that virtio-balloon wants to handle sparsely spreaded > unsigned long values (which is PATCH 4/7) and wants to find all chunks of > consecutive "1" bits efficiently. Therefore, I guess that holding the values > in a

[Qemu-devel] [PATCHv3 10/13] ftgmac100: use inline net_crc32() and bitshift instead of compute_mcast_idx()

2017-12-15 Thread Mark Cave-Ayland
This makes it much easier to compare the multicast CRC calculation endian and bitshift against the Linux driver implementation. Signed-off-by: Mark Cave-Ayland --- hw/net/ftgmac100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index

[Qemu-devel] [PATCHv3 13/13] net: remove unused compute_mcast_idx() function

2017-12-15 Thread Mark Cave-Ayland
Now that all of the callers have been converted to compute the multicast index inline using new net CRC functions, this function can now be dropped. Signed-off-by: Mark Cave-Ayland --- net/net.c | 5 - 1 file changed, 5 deletions(-) diff --git a/net/net.c b/net/net.c index 4ecaf80bd1..5bc0a

[Qemu-devel] [PATCHv3 12/13] rtl8139: use inline net_crc32() and bitshift instead of compute_mcast_idx()

2017-12-15 Thread Mark Cave-Ayland
This makes it much easier to compare the multicast CRC calculation endian and bitshift against the Linux driver implementation. Signed-off-by: Mark Cave-Ayland --- hw/net/rtl8139.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index a6b2a

Re: [Qemu-devel] [PATCH v2 12/15] sdhci: Add i.MX specific subtype of SDHCI

2017-12-15 Thread Andrey Smirnov
On Thu, Dec 14, 2017 at 6:31 PM, Philippe Mathieu-Daudé wrote: > Hi Andrey, Peter. > > I rather disagree with this patch, however I applied it on top of my > current tree and plan to refactor it. But if it is applied before, I can > survive :) Not a strong NACK. > Umm, Philippe, I didn't really a

[Qemu-devel] [PATCHv3 05/13] sunhme: switch sunhme over to use net_crc32_le()

2017-12-15 Thread Mark Cave-Ayland
Instead of sunhme_crc32_le() using its own implementation, we can simply call net_crc32_le() directly and apply the bit shift inline. Signed-off-by: Mark Cave-Ayland Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- hw/net/sunhme.c | 25 + 1 file changed,

[Qemu-devel] [PATCHv3 04/13] eepro100: switch eepro100 e100_compute_mcast_idx() over to use net_crc32()

2017-12-15 Thread Mark Cave-Ayland
Instead of e100_compute_mcast_idx() using its own implementation, we can simply call net_crc32() directly and apply the bit shift inline. Signed-off-by: Mark Cave-Ayland Reviewed-by: Stefan Weil --- hw/net/eepro100.c | 28 1 file changed, 4 insertions(+), 24 deletio

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Matthew Wilcox
On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote: > +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp); I'm struggling to understand when one would use this. The xb_ API requires you to handle your own locking. But specifying GFP flags here implies you can sleep. S

[Qemu-devel] [PATCHv3 11/13] ne2000: use inline net_crc32() and bitshift instead of compute_mcast_idx()

2017-12-15 Thread Mark Cave-Ayland
This makes it much easier to compare the multicast CRC calculation endian and bitshift against the Linux driver implementation. Signed-off-by: Mark Cave-Ayland --- hw/net/ne2000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 3938e6

[Qemu-devel] [PATCHv3 08/13] opencores_eth: use inline net_crc32() and bitshift instead of compute_mcast_idx()

2017-12-15 Thread Mark Cave-Ayland
This makes it much easier to compare the multicast CRC calculation endian and bitshift against the Linux driver implementation. Signed-off-by: Mark Cave-Ayland --- hw/net/opencores_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/opencores_eth.c b/hw/net/opencor

[Qemu-devel] [PATCHv3 03/13] pcnet: switch pcnet over to use net_crc32_le()

2017-12-15 Thread Mark Cave-Ayland
Instead of lnc_mchash() using its own implementation, we can simply call net_crc32_le() directly and apply the bit shift inline. Signed-off-by: Mark Cave-Ayland Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- hw/net/pcnet.c | 22 ++ 1 file changed, 2 inserti

[Qemu-devel] [PATCHv3 01/13] net: move CRC32 calculation from compute_mcast_idx() into its own net_crc32() function

2017-12-15 Thread Mark Cave-Ayland
Separate out the standard ethernet CRC32 calculation into a new net_crc32() function, renaming the constant POLYNOMIAL to POLYNOMIAL_BE to make it clear that this is a big-endian CRC32 calculation. As part of the constant rename, remove the duplicate definition of POLYNOMIAL from eepro100.c and us

[Qemu-devel] [PATCHv3 07/13] eepro100: use inline net_crc32() and bitshift instead of compute_mcast_idx()

2017-12-15 Thread Mark Cave-Ayland
This makes it much easier to compare the multicast CRC calculation endian and bitshift against the Linux driver implementation. Signed-off-by: Mark Cave-Ayland --- hw/net/eepro100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index e3

[Qemu-devel] [PATCHv3 00/13] net: introduce common net_crc32() and net_crc32_le() functions

2017-12-15 Thread Mark Cave-Ayland
Whilst trying to debug a CRC32 endian issue for NIC multicast hash lookups, it struck me that it would make sense to have a common set of standard ethernet CRC32 functions (both little and big endian variants) in net.c. Patches 1 and 2 introduce the new net_crc32() and net_crc32_le() functions for

[Qemu-devel] [PATCHv3 02/13] net: introduce net_crc32_le() function

2017-12-15 Thread Mark Cave-Ayland
This provides a standard ethernet CRC32 little-endian implementation. Signed-off-by: Mark Cave-Ayland Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- include/net/net.h | 2 ++ net/net.c | 22 ++ 2 files changed, 24 insertions(+) diff --git a/includ

[Qemu-devel] [PATCHv3 06/13] sungem: fix multicast filter CRC calculation

2017-12-15 Thread Mark Cave-Ayland
>From the Linux sungem driver, we know that the multicast filter CRC is implemented using ether_crc_le() which isn't the same as calling zlib's crc32() function (the zlib implementation requires a complemented initial value and also returns the complemented result). Fix the multicast filter by sim

[Qemu-devel] [PATCHv3 09/13] lan9118: use inline net_crc32() and bitshift instead of compute_mcast_idx()

2017-12-15 Thread Mark Cave-Ayland
This makes it much easier to compare the multicast CRC calculation endian and bitshift against the Linux driver implementation. Signed-off-by: Mark Cave-Ayland --- hw/net/lan9118.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 3db

Re: [Qemu-devel] [PATCH v2 12/13] ucontext: annotate coroutine stack for ASAN

2017-12-15 Thread Eric Blake
On 12/15/2017 09:06 AM, Marc-André Lureau wrote: > It helps ASAN to detect more leaks on coroutine stacks, as found in > the following patch. > > A similar work would need to be done for sigaltstack & windows fibers > to have similar coverage. Since ucontext is prefered, I didn't bother s/prefere

Re: [Qemu-devel] [PATCH v2] docs: Convert migration.txt to rst

2017-12-15 Thread Kashyap Chamarthy
On Fri, Dec 15, 2017 at 03:45:07PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Mostly just manual conversion with very minor fixes. > > Signed-off-by: Dr. David Alan Gilbert > --- > > v2 > Fixed issues found by Peter and Kashyap. > Remove the detailed QE

Re: [Qemu-devel] [PATCH v2 10/13] qemu-config: fix leak in query-command-line-options

2017-12-15 Thread Eric Blake
On 12/15/2017 09:06 AM, Marc-André Lureau wrote: > Direct leak of 160 byte(s) in 4 object(s) allocated from: > #0 0x55ed7678cda8 in calloc > (/home/elmarco/src/qq/build/x86_64-softmmu/qemu-system-x86_64+0x797da8) > #1 0x7f3f5e725f75 in g_malloc0 > /home/elmarco/src/gnome/glib/builddir/../

Re: [Qemu-devel] MTTCG and atomicity of loads and stores from QEMU C helper functions

2017-12-15 Thread Richard Henderson
On 12/15/2017 12:14 PM, Peter Maydell wrote: > We have a fair amount of code in QEMU which is helper functions > written in C which make guest memory accesses -- the most common > case being page table walk code. > > Generally in CPU architectures the accesses by things like the > page table walke

Re: [Qemu-devel] [PULL v1 0/1] Merge qio 2017/12/15

2017-12-15 Thread Peter Maydell
On 15 December 2017 at 17:04, Daniel P. Berrange wrote: > The following changes since commit 5705b536b597de00d82807bf14bb38f542aa4491: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20171213' into staging (2017-12-14 > 14:22:18 +) > > are available in the Git rep

Re: [Qemu-devel] [PATCH v2 01/13] build-sys: fix qemu-ga -pthread linking

2017-12-15 Thread Peter Maydell
On 15 December 2017 at 18:21, Philippe Mathieu-Daudé wrote: > Hi Marc-André, > > On 12/15/2017 12:06 PM, Marc-André Lureau wrote: >> When linking qemu-ga under some configuration (when gthread-2.0.pc >> doesn't have -pthread, as happening atm with meson build), you may >> have this linking issue:

Re: [Qemu-devel] [PATCH v2 06/13] vl: fix direct firmware directories leak

2017-12-15 Thread Eric Blake
On 12/15/2017 09:06 AM, Marc-André Lureau wrote: > Note that data_dir[] will now point to allocated strings. > > Fixes: > Direct leak of 16 byte(s) in 1 object(s) allocated from: > #0 0x7f1448181850 in malloc (/lib64/libasan.so.4+0xde850) > #1 0x7f1446ed8f0c in g_malloc ../glib/gmem.c:94 >

Re: [Qemu-devel] [PATCH v2 03/13] build-sys: add a rule to print a variable

2017-12-15 Thread Eric Blake
On 12/15/2017 09:06 AM, Marc-André Lureau wrote: > $ make print-CFLAGS > CFLAGS=-fsanitize=address -Og -g > > Trick from various sources: > https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile > https://www.cmcrossroads.com/article/printing-value-makefile-variable >

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-15 Thread Michael S. Tsirkin
On Sat, Dec 16, 2017 at 01:21:52AM +0900, Tetsuo Handa wrote: > My understanding is that virtio-balloon wants to handle sparsely spreaded > unsigned long values (which is PATCH 4/7) and wants to find all chunks of > consecutive "1" bits efficiently. Therefore, I guess that holding the values > in a

Re: [Qemu-devel] [Qemu-arm] [PATCH] target/arm: Handle page table walk load failures correctly

2017-12-15 Thread Peter Maydell
On 15 December 2017 at 16:24, Peter Maydell wrote: > Instead of ignoring the response from address_space_ld*() > (indicating an attempt to read a page table descriptor from > an invalid physical address), use it to report the failure > correctly. > > Since this is another couple of locations where

Re: [Qemu-devel] [PATCH v2 01/13] build-sys: fix qemu-ga -pthread linking

2017-12-15 Thread Philippe Mathieu-Daudé
Hi Marc-André, On 12/15/2017 12:06 PM, Marc-André Lureau wrote: > When linking qemu-ga under some configuration (when gthread-2.0.pc > doesn't have -pthread, as happening atm with meson build), you may > have this linking issue: > > /usr/bin/ld: libqemuutil.a(qemu-thread-posix.o): undefined refer

[Qemu-devel] [PATCH] checkpatch: warn when using volatile with a comment

2017-12-15 Thread Marc-André Lureau
Instead of an error, lower to a warning message, assuming the comment gives some justification. Discussed in: '[Qemu-devel] [PATCH] dump-guest-memory.py: fix "You can't do that without a process to debug"' Suggested-by: Fam Zheng Signed-off-by: Marc-André Lureau --- scripts/checkpatch.pl | 7

Re: [Qemu-devel] [PATCH v2 05/13] tests: fix check-qobject leak:

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 12:06 PM, Marc-André Lureau wrote: > /public/qobject_is_equal_conversion: OK > > = > ==14396==ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 56 byte(s) in 1 object(s) allocated from: > #0 0x7f07682c5

Re: [Qemu-devel] [PATCH v2 07/13] readline: add a free function

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 12:06 PM, Marc-André Lureau wrote: > Fixes leaks such as: > > Direct leak of 2 byte(s) in 1 object(s) allocated from: > #0 0x7eff58beb850 in malloc (/lib64/libasan.so.4+0xde850) > #1 0x7eff57942f0c in g_malloc ../glib/gmem.c:94 > #2 0x7eff579431cf in g_malloc_n ../glib/gm

[Qemu-devel] MTTCG and atomicity of loads and stores from QEMU C helper functions

2017-12-15 Thread Peter Maydell
We have a fair amount of code in QEMU which is helper functions written in C which make guest memory accesses -- the most common case being page table walk code. Generally in CPU architectures the accesses by things like the page table walker have some atomicity guarantees. For instance Arm requir

Re: [Qemu-devel] [PATCH v2 11/13] tests: fix qmp-test leak

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 12:06 PM, Marc-André Lureau wrote: > Direct leak of 913 byte(s) in 43 object(s) allocated from: > #0 0x55880a15df60 in __interceptor_malloc > (/home/elmarco/src/qq/build/tests/qmp-test+0x110f60) > #1 0x7f3f20fd098f in _IO_vasprintf (/lib64/libc.so.6+0x8098f) > > Signed-off-b

Re: [Qemu-devel] [PATCH v1 1/2] qmp.c: (re)implement qmp_cpu

2017-12-15 Thread Paolo Bonzini
On 15/12/2017 14:56, Markus Armbruster wrote: > > Paolo, we have numerous Features/ pages, and I suspect many of them are > too outdated to serve any purpose but confusing readers. In theory, > "somebody" could go through them to identify stale ones. In practice, > "somebody" doesn't exist, I'm

Re: [Qemu-devel] [PATCH v2 12/13] ucontext: annotate coroutine stack for ASAN

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 12:06 PM, Marc-André Lureau wrote: > It helps ASAN to detect more leaks on coroutine stacks, as found in > the following patch. Nice! > A similar work would need to be done for sigaltstack & windows fibers > to have similar coverage. Since ucontext is prefered, I didn't bother > che

Re: [Qemu-devel] [PATCH v2 08/13] tests: fix migration-test leak

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 12:06 PM, Marc-André Lureau wrote: > Direct leak of 12 byte(s) in 2 object(s) allocated from: > #0 0x7f50d403c850 in malloc (/lib64/libasan.so.4+0xde850) > #1 0x7f50d1ddf98f in vasprintf (/lib64/libc.so.6+0x8098f) > > Signed-off-by: Marc-André Lureau > Reviewed-by: Dr. David

Re: [Qemu-devel] [PATCH 7/7] tcg: Allow 6 arguments to TCG helpers

2017-12-15 Thread Philippe Mathieu-Daudé
Hi Richard, On 12/15/2017 02:07 PM, Richard Henderson wrote: > We already handle this in the backends, and the lifetime datum > for the TCGOp is already large enough. > > Signed-off-by: Richard Henderson > --- > include/exec/helper-gen.h | 11 +++ > include/exec/helper-head.h | 2 ++

Re: [Qemu-devel] [PATCH 5/7] tcg: Generalize TCGOp parameters

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 02:07 PM, Richard Henderson wrote: > We had two fields specific to INDEX_op_call. Rename these and > add some macros so that the fields may be reused for other opcodes. > > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > tcg/tcg.h | 10 ++--

Re: [Qemu-devel] [PATCH 3/7] tcg: Remove TCGV_UNUSED* and TCGV_IS_UNUSED*

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 02:07 PM, Richard Henderson wrote: > These are now trivial sets and tests against NULL. Unwrap. Finally :) > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > tcg/tcg-op.h | 4 --- > tcg/tcg.h| 9 --- > targe

Re: [Qemu-devel] [PATCH 2/7] target/moxie: Fix tlb_fill

2017-12-15 Thread Peter Maydell
On 15 December 2017 at 17:07, Richard Henderson wrote: > We should not exit unless moxie_cpu_handle_mmu_fault has failed. > > Signed-off-by: Richard Henderson > --- > target/moxie/helper.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/target/moxie/helper.c b/target/m

[Qemu-devel] [Bug 1128935] Re: MIPS r4k "TLB modified exception" generated for TLB entries that are not visible to the TLBP instruction

2017-12-15 Thread Jakub Jermar
** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1128935 Title: MIPS r4k "TLB modified exception" generated for TLB entries that are not visible

[Qemu-devel] [PATCH 0/2] migration/channel errors and cancelling

2017-12-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, Where a channel fails asynchronously during connect, call back through the migration code so it can clean up. In particular this causes the transition of a 'cancelling' state to 'cancelled' in the case of: migrate -d tcp:deadhost:port migrate_

[Qemu-devel] [PATCH 2/2] migration: Route errors down through migration_channel_connect

2017-12-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Route async errors (especially from sockets) down through migration_channel_connect and on to migrate_fd_connect where they can be cleaned up. Signed-off-by: Dr. David Alan Gilbert --- migration/channel.c| 32 migration/channe

[Qemu-devel] [PATCH 1/2] migration: Allow migrate_fd_connect to take an Error *

2017-12-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow whatever is performing the connection to pass migrate_fd_connect an error to indicate there was a problem during connection, an allow us to clean up. The caller must free the error. Signed-off-by: Dr. David Alan Gilbert --- migration/channel.c | 2 +- mi

[Qemu-devel] [PATCH 7/7] tcg: Allow 6 arguments to TCG helpers

2017-12-15 Thread Richard Henderson
We already handle this in the backends, and the lifetime datum for the TCGOp is already large enough. Signed-off-by: Richard Henderson --- include/exec/helper-gen.h | 11 +++ include/exec/helper-head.h | 2 ++ include/exec/helper-proto.h | 5 + include/exec/helper-tcg.h | 7 +

Re: [Qemu-devel] [RFC virtio-dev] vhost-user-slave: add vhost-user slave device type

2017-12-15 Thread Stefan Hajnoczi
On Fri, Dec 15, 2017 at 05:05:19PM +, Stefan Hajnoczi wrote: > The vhost-user slave device facilitates vhost-user device emulation > through vhost-user protocol exchanges and access to shared memory. > Software-defined networking, storage, and other I/O appliances can > provide services through

[Qemu-devel] [PATCH 6/7] tcg: Add tcg_signed_cond

2017-12-15 Thread Richard Henderson
Complimenting the existing tcg_unsigned_cond. Signed-off-by: Richard Henderson --- tcg/tcg.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index f25efa9795..8c45f7edbc 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -488,6 +488,12 @@ static inline TCGCond tcg_unsigned

[Qemu-devel] [PATCH 1/7] target/*helper: don't check retaddr before calling cpu_restore_state

2017-12-15 Thread Richard Henderson
From: Alex Bennée cpu_restore_state officially supports being passed an address it can't resolve the state for. As a result the checks in the helpers are superfluous and can be removed. This makes the code consistent with other users of cpu_restore_state. Of course this does nothing to address w

[Qemu-devel] [PULL v1 1/1] io: introduce a network socket listener API

2017-12-15 Thread Daniel P. Berrange
The existing QIOChannelSocket class provides the ability to listen on a single socket at a time. This patch introduces a QIONetListener class that provides a higher level API concept around listening for network services, allowing for listening on multiple sockets. Reviewed-by: Eric Blake Signed-

[Qemu-devel] [PATCH 4/7] tcg: Dynamically allocate TCGOps

2017-12-15 Thread Richard Henderson
With no fixed array allocation, we can't overflow a buffer. This will be important as optimizations related to host vectors may expand the number of ops used. Use QTAILQ to link the ops together. Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 9 ++-- include/qemu/queue.h

[Qemu-devel] [PATCH 2/7] target/moxie: Fix tlb_fill

2017-12-15 Thread Richard Henderson
We should not exit unless moxie_cpu_handle_mmu_fault has failed. Signed-off-by: Richard Henderson --- target/moxie/helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/moxie/helper.c b/target/moxie/helper.c index 2ecee89f11..6890ffd71c 100644 --- a/target/moxie/h

[Qemu-devel] [PULL v1 0/1] Merge qio 2017/12/15

2017-12-15 Thread Daniel P. Berrange
The following changes since commit 5705b536b597de00d82807bf14bb38f542aa4491: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171213' into staging (2017-12-14 14:22:18 +) are available in the Git repository at: git://github.com/berrange/qemu tags/pull-qio-201712151

[Qemu-devel] [PATCH 5/7] tcg: Generalize TCGOp parameters

2017-12-15 Thread Richard Henderson
We had two fields specific to INDEX_op_call. Rename these and add some macros so that the fields may be reused for other opcodes. Signed-off-by: Richard Henderson --- tcg/tcg.h | 10 ++ tcg/optimize.c | 4 ++-- tcg/tcg.c | 22 +++--- 3 files changed, 19 insert

[Qemu-devel] [PATCH 3/7] tcg: Remove TCGV_UNUSED* and TCGV_IS_UNUSED*

2017-12-15 Thread Richard Henderson
These are now trivial sets and tests against NULL. Unwrap. Signed-off-by: Richard Henderson --- tcg/tcg-op.h | 4 --- tcg/tcg.h| 9 --- target/alpha/translate.c | 22 target/arm/translate-a64.c | 35 +++- targe

[Qemu-devel] [PATCH 0/7] TCG misc patches

2017-12-15 Thread Richard Henderson
Two reviewed patches from the 2.11 soft-freeze era, and five preparatory patches extract from my host vector patch set. One more post for review... r~ Alex Bennée (1): target/*helper: don't check retaddr before calling cpu_restore_state Richard Henderson (6): target/moxie: Fix tlb_fill

[Qemu-devel] [Bug 1128935] Re: MIPS r4k "TLB modified exception" generated for TLB entries that are not visible to the TLBP instruction

2017-12-15 Thread Jakub Jermar
A shorter command line to reproduce this with QEMU 2.11.0 and HelenOS 0.7.1 would be: $ qemu-system-mips -cpu 4Kc -kernel HelenOS-0.7.1-mips32-malta-be.boot -nographic -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.laun

[Qemu-devel] [RFC virtio-dev] vhost-user-slave: add vhost-user slave device type

2017-12-15 Thread Stefan Hajnoczi
The vhost-user slave device facilitates vhost-user device emulation through vhost-user protocol exchanges and access to shared memory. Software-defined networking, storage, and other I/O appliances can provide services through this device. This device is based on Wei Wang's vhost-pci work. The vh

[Qemu-devel] [Bug 1128935] Re: MIPS r4k "TLB modified exception" generated for TLB entries that are not visible to the TLBP instruction

2017-12-15 Thread Jakub Jermar
Yes, running the following command line with QEMU 2.11.0 on the HelenOS 0.7.1 image downloaded from http://www.helenos.org/releases/HelenOS-0.7.1-mips32-malta-be.boot will result in occasional "failures" of the TLBP instruction as described in this bug and as evidenced by a warning printed by Helen

Re: [Qemu-devel] [PATCH] target/arm: Handle page table walk load failures correctly

2017-12-15 Thread Philippe Mathieu-Daudé
On 12/15/2017 01:24 PM, Peter Maydell wrote: > Instead of ignoring the response from address_space_ld*() > (indicating an attempt to read a page table descriptor from > an invalid physical address), use it to report the failure > correctly. > > Since this is another couple of locations where we ne

Re: [Qemu-devel] [PATCH] sparc: Make sure we mmap at SHMLBA alignment

2017-12-15 Thread Peter Maydell
On 12 December 2017 at 05:53, Richard Henderson wrote: > On 12/08/2017 08:57 AM, Peter Maydell wrote: >> SPARC Linux has an oddity that it insists that mmap() >> of MAP_FIXED memory must be at an alignment defined by >> SHMLBA, which is more aligned than the page size >> (typically, SHMLBA alignme

  1   2   3   4   >