[Qemu-devel] [PATCH] net: Fix a potential segfault

2018-06-10 Thread Lin Ma
Signed-off-by: Lin Ma --- net/net.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/net.c b/net/net.c index efb9eaf779..f89790be4a 100644 --- a/net/net.c +++ b/net/net.c @@ -1093,9 +1093,12 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error

[Qemu-devel] [PATCH] hw/i386: Deprecate the machine types pc-0.10 and pc-0.11

2018-06-10 Thread Thomas Huth
The oldest machine type which is still used in a maintained distribution is a pc-0.12 based machine type in RHEL6, so everything that is older than pc-0.12 should not be used anymore. Thus let's deprecate pc-0.10 and pc-0.11 so that we can finally remove them in a future release. Signed-off-by:

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-10 Thread l00284672
I tried your patch with my modification below can slove this problem. void blk_set_aio_context(BlockBackend *blk, AioContext *new_context) {     BlockDriverState *bs = blk_bs(blk);     ThrottleGroupMember *tgm = >public.throttle_group_member;     if (bs) {     if (tgm->throttle_state) {

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-10 Thread l00284672
Thanks for your reply. I tried your patch but it didn't work for qemu crashed.  The qemu crash bt is below: (gdb) bt #0  bdrv_detach_aio_context (bs=bs@entry=0x55a96b79ca30) #1  0x55a9688249ae in bdrv_set_aio_context (bs=bs@entry=0x55a96b79ca30,    

Re: [Qemu-devel] [PATCH] pc: Remove PC_COMPAT_2_12 from 3.0 machine-types

2018-06-10 Thread Xiao Guangrong
On 06/09/2018 03:29 AM, Eduardo Habkost wrote: commit f548222c added PC_COMPAT_2_12 to the 3.0 PC machine-types. I believe this happened during manual conflict resolution when applying the patch. Indeed! Reviewed-by: Xiao Guangrong

Re: [Qemu-devel] [PATCH v3 1/3] util: remove redundant include of glib.h and add osdep.h

2018-06-10 Thread Peter Xu
On Fri, Jun 08, 2018 at 02:16:02PM +0100, Daniel P. Berrangé wrote: > Code must only ever include glib.h indirectly via the glib-compat.h > header file, because we will need some macros set before glib.h is > pulled in. Adding extra includes of glib.h will (soon) cause compile > failures such as:

Re: [Qemu-devel] [PATCH v10 5/7] monitor: remove event_clock_type

2018-06-10 Thread Peter Xu
On Fri, Jun 08, 2018 at 09:09:57AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Fri, Jun 08, 2018 at 07:38:11AM +0200, Markus Armbruster wrote: > > > > [...] > > > >> > +/* > >> > + * This should never be called before configure_accelerator() since > >> > + * only until then could

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 00/40] Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/10/2018 11:22 PM, Michael S. Tsirkin wrote: > On Sun, Jun 10, 2018 at 10:14:21PM -0300, Philippe Mathieu-Daudé wrote: >> Hi, >> >> This series: >> >> - split the byte-based definitions from "qemu/cutils.h" to "qemu/units.h" >> (this now triggers WARNING: 1 added file, does MAINTAINERS need

Re: [Qemu-devel] [PATCH v4 33/40] hw/i386: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/10/2018 11:18 PM, Michael S. Tsirkin wrote: > On Sun, Jun 10, 2018 at 10:14:54PM -0300, Philippe Mathieu-Daudé wrote: >> @@ -1392,11 +1393,11 @@ void pc_memory_init(PCMachineState *pcms, >> } >> >> machine->device_memory->base = >> -ROUND_UP(0x1ULL +

Re: [Qemu-devel] [PATCH v6 00/49] fix building of tests/tcg

2018-06-10 Thread Philippe Mathieu-Daudé
Hi Alex, On 06/08/2018 09:32 AM, Alex Bennée wrote: > Hi, > > Not a super amount has changed since the last version but review > comments and review tags have been added. The new patches at the end > enable a .travis.yml run and try and make the image building part of > check-tcg -j safe.

Re: [Qemu-devel] [PATCH v4 05/40] hw: Use IEC binary prefix definitions from "qemu/units.h"

2018-06-10 Thread David Gibson
On Sun, Jun 10, 2018 at 10:14:26PM -0300, Philippe Mathieu-Daudé wrote: > Code change produced with: > > $ git ls-files | egrep '\.[ch]$' | \ > xargs sed -i -e 's/\(\W[KMGTPE]\)_BYTE/\1iB/g' > > Suggested-by: Stefan Weil > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David

Re: [Qemu-devel] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h"

2018-06-10 Thread David Gibson
On Sun, Jun 10, 2018 at 10:14:27PM -0300, Philippe Mathieu-Daudé wrote: > These files don't use anything exposed by "qemu/cutils.h", > simplify preprocessing including directly "qemu/units.h". > > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- >

Re: [Qemu-devel] [PATCH v4 00/40] Use the IEC binary prefix definitions

2018-06-10 Thread Michael S. Tsirkin
On Sun, Jun 10, 2018 at 10:14:21PM -0300, Philippe Mathieu-Daudé wrote: > Hi, > > This series: > > - split the byte-based definitions from "qemu/cutils.h" to "qemu/units.h" > (this now triggers WARNING: 1 added file, does MAINTAINERS need updating?) > - clean hw/ includes; > - replace

Re: [Qemu-devel] [PATCH v6 17/49] tests/tcg/i386: add runner for test-i386-fprem

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:32 AM, Alex Bennée wrote: > The runner needs to compare against a reference run. We also only run > this test when SPEED=slow as it takes a while. > > Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé > > --- > v5 > - include

Re: [Qemu-devel] [PATCH v4 33/40] hw/i386: Use the IEC binary prefix definitions

2018-06-10 Thread Michael S. Tsirkin
On Sun, Jun 10, 2018 at 10:14:54PM -0300, Philippe Mathieu-Daudé wrote: > @@ -1392,11 +1393,11 @@ void pc_memory_init(PCMachineState *pcms, > } > > machine->device_memory->base = > -ROUND_UP(0x1ULL + pcms->above_4g_mem_size, 1ULL << 30); > +

Re: [Qemu-devel] [PATCH v6 44/49] tests/tcg: add run, diff, and skip helper macros

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:33 AM, Alex Bennée wrote: > As we aren't using the default runners for all the test cases it is > easy to miss out things like timeouts. To help with this we add some > helpers and use them so we only need to make core changes in one > place. Thanks, much nicer now :) >

[Qemu-devel] [RFC PATCH 1/1] nvdimm: let qemu requiring section alignment of pmem resource.

2018-06-10 Thread Zhang Yi
Nvdimm driver use Memory hot-plug APIs to map it's pmem resource, which at a section granularity. When QEMU emulated the vNVDIMM device, decrease the label-storage, QEMU will put the vNVDIMMs directly next to one another in physical address space, which means that the boundary between them won't

Re: [Qemu-devel] [PATCH v6 42/49] Makefile.target: add (clean-/build-)guest-tests targets

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:33 AM, Alex Bennée wrote: > Now all the build infrastructure is in place we can build tests for > each guest that we support. That support mainly depends on having > cross compilers installed or docker setup. To keep all the logic for > that together we put the rules in

Re: [Qemu-devel] [PATCH v6 49/49] .travis.yml: add check-tcg test

2018-06-10 Thread Philippe Mathieu-Daudé
Hi Alex, On 06/08/2018 09:33 AM, Alex Bennée wrote: > Signed-off-by: Alex Bennée > --- > .travis.yml | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/.travis.yml b/.travis.yml > index 814be151f4..f1d2d9edec 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -152,3 +152,9 @@

Re: [Qemu-devel] storing machine data in qcow images?

2018-06-10 Thread Michael S. Tsirkin
On Sat, Jun 09, 2018 at 11:34:03PM +0200, Max Reitz wrote: > qemu would be very easy to use if it didn't offer any configuration > options. The problem is that is offers a huge load of configuration > options and it is not reasonable to expect every user to know all of them. Right but once one

Re: [Qemu-devel] [PATCH v6 00/49] fix building of tests/tcg

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:32 AM, Alex Bennée wrote: > Hi, > > Not a super amount has changed since the last version but review > comments and review tags have been added. The new patches at the end > enable a .travis.yml run and try and make the image building part of > check-tcg -j safe. Essentially the

Re: [Qemu-devel] [PATCH v6 45/49] tests/tcg: override runners for broken tests

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:33 AM, Alex Bennée wrote: > To get a clean run of check-tcg these tests are currently skipped: > > - hello-mips for mips > - linux-test for sparc > > Signed-off-by: Alex Bennée > > --- > v4 > - document broken tests in commit > - temporarily demote fcvt while fixes

Re: [Qemu-devel] [PATCH v6 47/49] tests: add top-level make dependency for docker builds

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:33 AM, Alex Bennée wrote: > One problem with satisfying your docker dependencies in a sub-make it > you might end up trying to satisfy the dependency multiple times. This > is especially a problem with debian-sid based cross compilers and CI > setups. We solve this by doing a

Re: [Qemu-devel] [PATCH V8 14/17] filter: Add handle_event method for NetFilterClass

2018-06-10 Thread Jason Wang
On 2018年06月10日 22:09, Zhang Chen wrote: I think when COLO is enabled, qemu should reject all other types of backends. Yes, you are right. May be we should add a assert here? Because we can not get backend info when colo-compare start up. Have any idea? Is there a global variable or

Re: [Qemu-devel] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix definitions

2018-06-10 Thread Michael Clark
On Mon, Jun 11, 2018 at 1:14 PM, Philippe Mathieu-Daudé wrote: > It eases code review, unit is explicit. > > Patch generated using: > > $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ > include/hw/ > > and modified manually. > > Signed-off-by: Philippe Mathieu-Daudé >

Re: [Qemu-devel] [PATCH v6 40/49] tests/tcg: enable building for PowerPC

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:32 AM, Alex Bennée wrote: > Now we have restored debian-image-powerpc-cross using Debian SID > compilers we can build for 32 bit powerpc. Although PPC32 supports a > range of pages sizes currently only 4k works so the others are > commented out for now. > > We can also merge the

[Qemu-devel] [PATCH v4 40/40] cutils: Do not include "qemu/units.h" directly

2018-06-10 Thread Philippe Mathieu-Daudé
All files using "qemu/units.h" definitions already include it directly, we can now remove it from "qemu/cutils.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marcel Apfelbaum --- include/qemu/cutils.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/qemu/cutils.h

[Qemu-devel] [PATCH v4 32/40] hw/ppc: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson --- hw/ppc/mac.h | 3 ++- include/hw/ppc/spapr.h | 5

Re: [Qemu-devel] [PATCH v6 41/49] tests/tcg/Makefile: update to be called from Makefile.target

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:32 AM, Alex Bennée wrote: > This make is now invoked from each individual target make with the > appropriate CC and EXTRA_CFLAGS set for each guest. It then includes > additional Makefile.targets from: > > - tests/tcg/multiarch (always) > - tests/tcg/$(TARGET_BASE_ARCH) (if

[Qemu-devel] [PATCH v4 27/40] hw/lm32: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Michael Walle --- hw/lm32/lm32_boards.c | 13 +++-- hw/lm32/milkymist.c

[Qemu-devel] [PATCH v4 38/40] hw/virtio: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio-net.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v4 25/40] hw/nios2: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/nios2/boot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH v4 36/40] hw/sd: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c| 4 ++-- hw/sd/sdhci.c | 4 ++-- 2 files changed, 4 insertions(+), 4

[Qemu-devel] [PATCH v4 22/40] hw/alpha: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/alpha/typhoon.c | 17 - 1 file changed, 8 insertions(+), 9

[Qemu-devel] [PATCH v4 30/40] hw/mips: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- include/hw/intc/mips_gic.h | 3 ++-

[Qemu-devel] [PATCH v4 21/40] hw/xtensa: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Max Filippov --- hw/xtensa/xtfpga.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[Qemu-devel] [PATCH v4 28/40] hw/sh4: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/sh4/r2d.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH v6 39/49] docker: move debian-powerpc-cross to sid based build

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/08/2018 09:32 AM, Alex Bennée wrote: > The original Jessie based cross builder hasn't worked for a while. The > state of the libraries is still perilous for cross-building QEMU but > we can use it for building TCG tests. > > The debian-apt-fake.sh script can also be dropped as it is no

[Qemu-devel] [PATCH v4 39/40] hw/rdma: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marcel Apfelbaum Reviewed-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 3 ++- 1

[Qemu-devel] [PATCH v4 19/40] hw/s390x: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Acked-by: Cornelia Huck --- hw/s390x/s390-skeys.c| 3 ++-

[Qemu-devel] [PATCH v4 26/40] hw/cris: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/cris/axis_dev88.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v4 37/40] hw/vfio: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/pci-quirks.c | 9 + hw/vfio/pci.c| 3 ++- 2 files changed, 7

[Qemu-devel] [PATCH v4 17/40] hw/m68k: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- hw/m68k/mcf5208.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PATCH v4 34/40] hw/net: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Weil --- hw/net/ne2000.h | 5 +++--

[Qemu-devel] [PATCH v4 23/40] hw/tricore: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Bastian Koppelmann --- hw/tricore/tricore_testboard.c | 13 +++-- 1 file

[Qemu-devel] [PATCH v4 24/40] hw/microblaze: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/microblaze/petalogix_ml605_mmu.c | 7 ---

[Qemu-devel] [PATCH v4 35/40] hw/usb: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 5 +++-- hw/usb/combined-packet.c | 3 ++-

[Qemu-devel] [PATCH v4 16/40] hw/riscv: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v4 20/40] hw/hppa: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/hppa/dino.c| 3 ++- hw/hppa/machine.c | 10 +- 2 files changed, 7

[Qemu-devel] [PATCH v4 29/40] hw/mips/r4k: Constify params_size

2018-06-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_r4k.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index e5cf8ed1a3..fc38b4bf99 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -79,8 +79,9 @@ typedef struct

[Qemu-devel] [PATCH v4 14/40] hw/display: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Alistair Francis --- include/hw/display/xlnx_dp.h

[Qemu-devel] [PATCH v4 18/40] hw/sparc: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 9 + hw/sparc/sun4m.c | 9 -

[Qemu-devel] [PATCH v4 12/40] hw/tpm: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau --- include/hw/acpi/tpm.h | 3 ++- 1 file changed, 2

[Qemu-devel] [PATCH v4 15/40] hw/misc: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/auxbus.c | 3 ++- hw/misc/edu.c| 3 ++- 2 files changed, 4 insertions(+), 2

[Qemu-devel] [PATCH v4 09/40] hw/scsi: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-disk.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH v4 08/40] hw/ipack: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alberto Garcia --- hw/ipack/tpci200.c | 5 +++-- 1 file changed, 3

[Qemu-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alan Robinson --- hw/block/xen_disk.c| 5 +++--

[Qemu-devel] [PATCH v4 13/40] hw/block: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/m25p80.c | 5 +++-- hw/block/nvme.c| 3 ++- hw/block/tc58128.c | 3 ++- 3

[Qemu-devel] [PATCH v4 07/40] hw/ivshmem: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau --- hw/misc/ivshmem.c | 3 ++- 1 file changed, 2

[Qemu-devel] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h"

2018-06-10 Thread Philippe Mathieu-Daudé
These files don't use anything exposed by "qemu/cutils.h", simplify preprocessing including directly "qemu/units.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/msf2-soc.c | 2 +- hw/arm/msf2-som.c | 2 +- hw/core/machine.c | 2 +- hw/display/sm501.c | 2 +- hw/mips/boston.c | 2 +-

[Qemu-devel] [PATCH v4 10/40] hw/smbios: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé --- hw/smbios/smbios.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCH v4 04/40] checkpatch: Recognize IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
This fixes: ERROR: "foo * bar" should be "foo *bar" #310: FILE: hw/ppc/ppc440_uc.c:564: +size = 8 * MiB * sh; total: 1 errors, 0 warnings, 433 lines checked Signed-off-by: Philippe Mathieu-Daudé --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --git

[Qemu-devel] [PATCH v4 00/40] Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
Hi, This series: - split the byte-based definitions from "qemu/cutils.h" to "qemu/units.h" (this now triggers WARNING: 1 added file, does MAINTAINERS need updating?) - clean hw/ includes; - replace different constants used for byte size with their corresponding IEC binary prefix definitions.

[Qemu-devel] [PATCH v4 05/40] hw: Use IEC binary prefix definitions from "qemu/units.h"

2018-06-10 Thread Philippe Mathieu-Daudé
Code change produced with: $ git ls-files | egrep '\.[ch]$' | \ xargs sed -i -e 's/\(\W[KMGTPE]\)_BYTE/\1iB/g' Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/cutils.h | 8 +--- hw/arm/msf2-soc.c | 4 ++-- hw/arm/msf2-som.c | 6 +++---

[Qemu-devel] [PATCH v4 02/40] vdi: Use definitions from "qemu/units.h"

2018-06-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- block/vdi.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 668af0a828..35b51dc5c5 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -50,6 +50,7 @@ */ #include "qemu/osdep.h" +#include

[Qemu-devel] [PATCH v4 03/40] x86/cpu: Use definitions from "qemu/units.h"

2018-06-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 94260412e2..56c63615fe 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -18,6 +18,7 @@ */ #include

[Qemu-devel] [PATCH v4 01/40] include: Add IEC binary prefixes in "qemu/units.h"

2018-06-10 Thread Philippe Mathieu-Daudé
Loosely based on 076b35b5a56. Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé --- I suppose the following warning is irrelevant: WARNING: 1 added file, does MAINTAINERS need updating include/qemu/units.h | 20 1 file changed, 20 insertions(+) create

Re: [Qemu-devel] [PATCH v6 47/49] tests: add top-level make dependency for docker builds

2018-06-10 Thread Philippe Mathieu-Daudé
Hi Alex, On 06/08/2018 09:33 AM, Alex Bennée wrote: > One problem with satisfying your docker dependencies in a sub-make it > you might end up trying to satisfy the dependency multiple times. This > is especially a problem with debian-sid based cross compilers and CI > setups. We solve this by

Re: [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: ignore the OS/ABI field

2018-06-10 Thread Richard Henderson
On 06/05/2018 09:47 AM, Laurent Vivier wrote: > Most of the binaries have a value of "UNIX - System V" for the OS/ABI. > > But cc1 has a value of "UNIX - GNU", and if we don't update the binfmt > mask to ignore the OS/ABI field, gcc fails to execute it: > > gcc: error trying to exec

Re: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall

2018-06-10 Thread Richard Henderson
On 06/09/2018 05:00 PM, Richard Henderson wrote: > * Changed the table into a switch, for the reason documented. > Use macros to actually enter the syscall into the switch. > * Finish the split. > * Fix some bugs along the way. I forgot to mention, this is based on

Re: [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure for table-izing syscalls

2018-06-10 Thread Richard Henderson
On 06/10/2018 02:39 AM, Peter Maydell wrote: > It would be cleaner to have a single > #if something > static foo_impl(..) { ... } > static syscall_impl foo = { > .name = "foo", > .impl = foo_impl, > .strace_stuff = ..., > }; > register_syscall(foo); > #endif > > Hash table? It would

Re: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall

2018-06-10 Thread Richard Henderson
On 06/10/2018 02:34 AM, Peter Maydell wrote: > It's still a stupidly large source file -- is it worth taking > advantage of the split into multiple implementation functions > to break it up into multiple source files? (We could group > related syscalls together.) It's possible. Any suggestions

[Qemu-devel] [PATCH] i386/kvm: add support for Hyper-V TLB flush

2018-06-10 Thread Vitaly Kuznetsov
Add support for Hyper-V TLB flush which recently got added to KVM. Just like regular Hyper-V we announce HV_EX_PROCESSOR_MASKS_RECOMMENDED regardless of how many vCPUs we have. Windows is 'smart' and uses less expensive non-EX Hypercall whenever possible (when it wants to flush TLB for all vCPUs

[Qemu-devel] [Bug 1776096] [NEW] qemu 2.12.0 qemu-system-ppc illegal instruction on ppc64le, crashes emulator

2018-06-10 Thread Cameron Kaiser
Public bug reported: % uname -a Linux tim.floodgap.com 4.16.14-300.fc28.ppc64le #1 SMP Tue Jun 5 15:59:48 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux STR: Start QEMU and boot Mac OS X 10.4.11. Download the current version of TenFourFox (I used G3 so that AltiVec was not a confounder). Try to

[Qemu-devel] [Bug 1776096] Re: qemu 2.12.0 qemu-system-ppc illegal instruction on ppc64le, crashes emulator

2018-06-10 Thread Cameron Kaiser
Sorry, more complete disassembly of the apparent actual fault: 0x7fffd4ed8b64 : mtctr r3 0x7fffd4ed8b68 : mr r31,r3 0x7fffd4ed8b6c : li r3,0 0x7fffd4ed8b70 : bctr -- You received this bug notification because you are a member of qemu-

[Qemu-devel] [PATCH v4] cutils: Provide strchrnul

2018-06-10 Thread Keno Fischer
strchrnul is a GNU extension and thus unavailable on a number of targets. In the review for a commit removing strchrnul from 9p, I was asked to create a qemu_strchrnul helper to factor out this functionality. Do so, and use it in a number of other places in the code base that inlined the

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-10 Thread Zhang Chen
On Mon, Jun 11, 2018 at 1:42 AM, Zhang Chen wrote: > > > On Tue, Jun 5, 2018 at 6:23 AM, Eric Blake wrote: > >> On 06/03/2018 12:05 AM, Zhang Chen wrote: >> >>> Libvirt or other high level software can use this command query colo >>> status. >>> You can test this command like that: >>>

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-10 Thread Zhang Chen
On Tue, Jun 5, 2018 at 6:23 AM, Eric Blake wrote: > On 06/03/2018 12:05 AM, Zhang Chen wrote: > >> Libvirt or other high level software can use this command query colo >> status. >> You can test this command like that: >> {'execute':'query-colo-status'} >> >> Signed-off-by: Zhang Chen >> --- >>

Re: [Qemu-devel] [PATCH V8 11/17] qapi: Add new command to query colo status

2018-06-10 Thread Zhang Chen
On Thu, Jun 7, 2018 at 8:59 PM, Markus Armbruster wrote: > Zhang Chen writes: > > > Libvirt or other high level software can use this command query colo > status. > > You can test this command like that: > > {'execute':'query-colo-status'} > > > > Signed-off-by: Zhang Chen > > --- > >

Re: [Qemu-devel] [PATCH V8 10/17] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-06-10 Thread Zhang Chen
On Thu, Jun 7, 2018 at 8:54 PM, Markus Armbruster wrote: > Eric Blake writes: > > > On 06/03/2018 12:05 AM, Zhang Chen wrote: > >> From: zhanghailiang > >> > >> If some errors happen during VM's COLO FT stage, it's important to > >> notify the users of this event. Together with

Re: [Qemu-devel] [PATCH V8 15/17] filter-rewriter: handle checkpoint and failover event

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 3:42 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> After one round of checkpoint, the states between PVM and SVM >> become consistent, so it is unnecessary to adjust the sequence >> of net packets for old connections, besides, while failover >>

Re: [Qemu-devel] [PATCH v2 001/108] linux-user: Remove DEBUG

2018-06-10 Thread Philippe Mathieu-Daudé
On 06/10/2018 12:00 AM, Richard Henderson wrote: > This is redundant with both -strace and actual tracing. > > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > linux-user/syscall.c | 10 -- > 1 file changed, 10 deletions(-) > > diff --git

[Qemu-devel] [RFC] target/arm: add ARMv6-M UNDEFINED 32-bit instruction test

2018-06-10 Thread Stefan Hajnoczi
Test that 32-bit instructions declared UNDEFINED in the ARMv6-M Reference Manual really do raise an exception. The Intel HEX (.hex) file is included to save people the trouble of installing a cross-compiler toolchain. To run the test (make sure qemu-system-arm is in your $PATH): $ cd

Re: [Qemu-devel] [PATCH V8 14/17] filter: Add handle_event method for NetFilterClass

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 2:57 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> Filter needs to process the event of checkpoint/failover or >> other event passed by COLO frame. >> >> Signed-off-by: zhanghailiang >> --- >> include/net/filter.h | 5 + >> net/filter.c

Re: [Qemu-devel] [PATCH V8 03/17] colo-compare: use notifier to notify packets comparing result

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 2:36 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> It's a good idea to use notifier to notify COLO frame of >> inconsistent packets comparing. >> >> Signed-off-by: Zhang Chen >> Signed-off-by: zhanghailiang >> --- >> net/colo-compare.c | 32

Re: [Qemu-devel] [PATCH V8 02/17] colo-compare: implement the process of checkpoint

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 2:31 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> While do checkpoint, we need to flush all the unhandled packets, >> By using the filter notifier mechanism, we can easily to notify >> every compare object to do this process, which runs inside

Re: [Qemu-devel] [PATCH V8 01/17] filter-rewriter: fix memory leak for connection in connection_track_table

2018-06-10 Thread Zhang Chen
On Mon, Jun 4, 2018 at 1:51 PM, Jason Wang wrote: > > > On 2018年06月03日 13:05, Zhang Chen wrote: > >> After a net connection is closed, we didn't clear its releated resources >> in connection_track_table, which will lead to memory leak. >> >> Let't track the state of net connection, if it is

[Qemu-devel] [PATCH] hw/s390x/ipl: Fix crash that occurs when -kernel is used with small images

2018-06-10 Thread Thomas Huth
Add a sanity check to fix the following crash: $ echo "Insane in the mainframe" > /tmp/test.txt $ s390x-softmmu/qemu-system-s390x -nographic -kernel /tmp/test.txt Segmentation fault (core dumped) Signed-off-by: Thomas Huth --- hw/s390x/ipl.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure for table-izing syscalls

2018-06-10 Thread Peter Maydell
On 10 June 2018 at 13:32, Peter Maydell wrote: > On 10 June 2018 at 04:00, Richard Henderson > wrote: >> At the same time, split out set_robust_list and get_robust_list. >> Put them together, along with their block comment, at the top >> of syscall_table. >> >> Signed-off-by: Richard Henderson

Re: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall

2018-06-10 Thread Peter Maydell
On 10 June 2018 at 04:00, Richard Henderson wrote: > * Changed the table into a switch, for the reason documented. > Use macros to actually enter the syscall into the switch. > * Finish the split. > * Fix some bugs along the way. > > I know it's a huge patch set, but I guess it was always going

Re: [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure for table-izing syscalls

2018-06-10 Thread Peter Maydell
On 10 June 2018 at 04:00, Richard Henderson wrote: > At the same time, split out set_robust_list and get_robust_list. > Put them together, along with their block comment, at the top > of syscall_table. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall.c | 87

Re: [Qemu-devel] [PATCH] pc: Remove PC_COMPAT_2_12 from 3.0 machine-types

2018-06-10 Thread Marcel Apfelbaum
On 06/08/2018 10:29 PM, Eduardo Habkost wrote: commit f548222c added PC_COMPAT_2_12 to the 3.0 PC machine-types. I believe this happened during manual conflict resolution when applying the patch. Cc: Xiao Guangrong Cc: Juan Quintela Fixes: f548222c24342ca74689de7794f9006b43f86a54

Re: [Qemu-devel] [PATCH] hw/pvrdma: Bugfix - provide the correct attr_mask to query_qp

2018-06-10 Thread Marcel Apfelbaum
On 06/08/2018 05:37 PM, Yuval Shaia wrote: Calling rdma_rm_query_qp with attr_mask equals to -1 leads to error where backend query_qp fails to retrieve the needed QP attributes. Fix it by providing the attr_mask we got from driver. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c |

[Qemu-devel] [Bug 1341032] Re: no-shutdown does not fire SHUTDOWN event for some guests

2018-06-10 Thread md_5
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1341032 Title: no-shutdown does not fire SHUTDOWN event for some guests Status in QEMU: Invalid

Re: [Qemu-devel] [PATCH v2 001/108] linux-user: Remove DEBUG

2018-06-10 Thread Laurent Vivier
Le 10/06/2018 à 05:00, Richard Henderson a écrit : > This is redundant with both -strace and actual tracing. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall.c | 10 -- > 1 file changed, 10 deletions(-) Reviewed-by: Laurent Vivier

Re: [Qemu-devel] [RFC 01/13] hw/m68k: add via support

2018-06-10 Thread Laurent Vivier
Le 09/06/2018 à 17:48, Mark Cave-Ayland a écrit : > On 09/06/18 11:01, Mark Cave-Ayland wrote: > >> Yeah, we can certainly remove a huge chunk of this by converting over >> to the mos6522 device. My last set of updates to CUDA a couple of days >> ago are probably the best reference, but I can

Re: [Qemu-devel] question: a dead loop in qemu when do blockJobAbort and vm suspend coinstantaneously

2018-06-10 Thread Fam Zheng
On Sat, 06/09 17:10, l00284672 wrote: > Hi, I found a dead loop in qemu when do blockJobAbort and vm suspend > coinstantaneously. > > The qemu bt is below: > > #0  0x7ff58b53af1f in ppoll () from /lib64/libc.so.6 > #1  0x007fdbd9 in ppoll (__ss=0x0, __timeout=0x7ffcf7055390, >

Re: [Qemu-devel] [PATCH] loader: implement START_SEG_ADDR_RECORD

2018-06-10 Thread Su Hang
Sure, Thanks for remind me of this. One thing I must point out, in current code logic, if "START_SEG_ADDR_RECORD" occured multiple times, only the last one works. I don't know whether GNU binutils would emit 'The Record' many times. Best, SU Hang > -Original Messages- > From: "Stefan