Re: [Qemu-devel] MAINTAINERS: surprising get_maintainer.pl output for ./configure

2017-07-24 Thread Thomas Huth
On 25.07.2017 00:40, Philippe Mathieu-Daudé wrote: > Hi perl gurus :) > > after changing the ./configure I wanted to figure to whom email and got > this: > > $ ./scripts/get_maintainer.pl -f configure > Kamil Rytarowski (maintainer:NETBSD) > qemu-devel@nongnu.org (open

[Qemu-devel] [PULL 3/4] spapr: Fix QEMU abort during memory unplug

2017-07-24 Thread David Gibson
From: Bharata B Rao Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState) introduced a new way to track pending LMBs of DIMM device that is marked for removal. Since this commit we can hit the assert in spapr_pending_dimm_unplugs_add() in

[Qemu-devel] [PULL 1/4] spapr_pci: Fix obsolete comment about MSIX encoding in addr/data

2017-07-24 Thread David Gibson
From: Alexey Kardashevskiy f1c2dc7c866a "spapr-pci: rework MSI/MSIX" (07/2013) changed MSIX encoding but forgot to change the comment so this changes it. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 2/4] spapr/htab: fix savevm

2017-07-24 Thread David Gibson
From: Laurent Vivier Commit 3a38429 ("spapr: Add a "no HPT" encoding to HTAB migration stream") allows to migrate an empty HPT, but doesn't mark correctly the end of the migration stream. The end condition (value returned by htab_save_iterate()) should be 1, whereas in

[Qemu-devel] [PULL 0/4] ppc-for-2.10 queue 20170725

2017-07-24 Thread David Gibson
The following changes since commit b5a74cd81d76cb467552f38f2b39520d07c65ea2: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170724' into staging (2017-07-24 18:15:45 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.10

Re: [Qemu-devel] [RFC PATCH 08/26] ppc/xive: add flags to the XIVE interrupt source

2017-07-24 Thread David Gibson
On Mon, Jul 24, 2017 at 09:07:19PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2017-07-24 at 19:50 +1000, David Gibson wrote: > > On Mon, Jul 24, 2017 at 05:00:57PM +1000, Benjamin Herrenschmidt wrote: > > > On Mon, 2017-07-24 at 14:36 +1000, David Gibson wrote: > > > > On Wed, Jul 05, 2017 at

Re: [Qemu-devel] [RFC PATCH 14/26] ppc/xive: add MMIO handlers to the XIVE interrupt presenter model

2017-07-24 Thread David Gibson
On Mon, Jul 24, 2017 at 04:44:00PM +0200, Cédric Le Goater wrote: > On 07/24/2017 08:35 AM, David Gibson wrote: > > On Wed, Jul 05, 2017 at 07:13:27PM +0200, Cédric Le Goater wrote: > >> The Thread Interrupt Management Area for the OS is mostly used to > >> acknowledge interrupts and set the CPPR

Re: [Qemu-devel] [RFC PATCH 08/26] ppc/xive: add flags to the XIVE interrupt source

2017-07-24 Thread David Gibson
On Mon, Jul 24, 2017 at 01:47:28PM +0200, Cédric Le Goater wrote: > On 07/24/2017 01:07 PM, Benjamin Herrenschmidt wrote: > > On Mon, 2017-07-24 at 19:50 +1000, David Gibson wrote: > >> On Mon, Jul 24, 2017 at 05:00:57PM +1000, Benjamin Herrenschmidt wrote: > >>> On Mon, 2017-07-24 at 14:36 +1000,

Re: [Qemu-devel] [PATCH for 2.10 27/35] syscall: fix dereference of undefined pointer

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 04:33 PM, Laurent Vivier wrote: Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit : Clang's scan-build-5.0 reports: linux-user/syscall.c:5581:9: warning: Dereference of undefined pointer value if (*host_rt_dev_ptr != 0) { ^~~~ Reported-by: Clang

Re: [Qemu-devel] [PATCH 05/11] qemu.py: Use custom exceptions rather than Exception

2017-07-24 Thread Lukáš Doktor
Dne 24.7.2017 v 17:32 Eduardo Habkost napsal(a): > On Mon, Jul 24, 2017 at 02:13:09PM +0200, Lukáš Doktor wrote: >> Dne 21.7.2017 v 20:42 Eduardo Habkost napsal(a): >>> On Fri, Jul 21, 2017 at 08:37:34AM +0200, Lukáš Doktor wrote: Dne 20.7.2017 v 20:27 Eduardo Habkost napsal(a): > On Thu,

Re: [Qemu-devel] [PATCH 00/11] Make memory_region_init_ram() and friends handle migration

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/23/2017 04:58 PM, Peter Maydell wrote: On 22 July 2017 at 05:47, Philippe Mathieu-Daudé wrote: I'm seeing memleaks using the malta machine, they come from the smbus_eeprom_init() in hw/i2c/smbus_eeprom.c which does: uint8_t *eeprom_buf = g_malloc0(8 * 256); /* XXX:

Re: [Qemu-devel] [PATCH v2] hmp/(p)memsave: Allow >32bit file size

2017-07-24 Thread Thomas Huth
On 24.07.2017 17:08, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > memsave and pmemsave only take 32bit size arguments in HMP at the > moment; let them take 64bit values. > > Reported-by: Pierre Kim > Signed-off-by: Dr.

Re: [Qemu-devel] [PATCH for 2.10 11/35] i2c/exynos4210: correctly check i2c_recv() return value

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 06:13 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: i2c_recv() returns -1 on error, if the I2CCON_ACK_GEN bit was not set this code was setting i2cds = -1. i2c/exynos4210_i2c.c:117:20: warning: Loss of sign in implicit

Re: [Qemu-devel] [RFC PATCH for 2.10 1/3] docker: ensure NOUSER for travis images

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/20/2017 10:47 AM, Alex Bennée wrote: While adding the current user is a useful default behaviour for creating new images it is not appropriate for Travis which already has a default user. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 1 + 1

[Qemu-devel] Software breakpoints in QEMU

2017-07-24 Thread Anton Malyshenok
Hello QEMU developers, I'm trying to understand how QEMU software breakpoints work, but I get stuck in one use-case. Basically when you call kvm_insert_breakpoint for virtual_address1, it will look if there is already breakpoint descriptor in cpu->kvm_state->kvm_sw_breakpoints at virtual_address1.

Re: [Qemu-devel] Can I mount encrypt qcow2?

2017-07-24 Thread lampahome
I thought 2.9.0 is the latest and check to the wrong commit. Now it supports encryption. My cmd is: > qemu-nbd --object secret,id=sec0,file=passwd.txt,format=raw \ > --image-opts > driver=qcow2,file.filename=demo.qcow2,encrypt.format=luks,encrypt.key-secret=sec0 But it shows error

Re: [Qemu-devel] [PATCH V3] rtc: fix a infinite loop in windows vm startup

2017-07-24 Thread peng.hao2
>On 24/07/2017 20:35, Peng Hao wrote: >> When a windows vm starts, periodic timer of rtc will stop several times. >> windows kernel will check whether REG_A_UIP is changed. REG_C's interrupt >> flags will not be cleared when periodic timer stops and the update timer >> will switch to alarm

Re: [Qemu-devel] [RFC PATCH 06/26] ppc/xive: introduce a XIVE interrupt source model

2017-07-24 Thread Alexey Kardashevskiy
On 25/07/17 01:20, Cédric Le Goater wrote: > On 07/24/2017 08:00 AM, Alexey Kardashevskiy wrote: >> On 24/07/17 14:02, David Gibson wrote: >>> On Wed, Jul 05, 2017 at 07:13:19PM +0200, Cédric Le Goater wrote: This is very similar to the current ICS_SIMPLE model in XICS. We try to reuse

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 19/26] ppc/xive: introduce a helper to map the XIVE memory regions

2017-07-24 Thread Alexey Kardashevskiy
On 06/07/17 03:13, Cédric Le Goater wrote: > It will be used when the guest chooses the XIVE exploitation mode in > CAS. > > Signed-off-by: Cédric Le Goater > --- > hw/intc/xive.c| 11 +++ > include/hw/ppc/xive.h | 2 ++ > 2 files changed, 13 insertions(+) > >

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 26/26] spapr: force XIVE exploitation mode for POWER9 (HACK)

2017-07-24 Thread Alexey Kardashevskiy
On 06/07/17 03:13, Cédric Le Goater wrote: > The CAS negotiation process determines the interrupt controller model > to use in the guest but currently, the sPAPR machine make uses of the > controller very early in the initialization sequence. The interrupt > source is used to allocate IRQ numbers

[Qemu-devel] [PATCH 4/4] target/s390x: Use ilen from unwind in tlb_fill

2017-07-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 026189aefd..1141f1362b 100644 --- a/target/s390x/mem_helper.c +++

[Qemu-devel] [PATCH 3/4] target/s390x: Use unwind info in STSI

2017-07-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/misc_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 376dbd68c2..ab8551f605 100644 ---

[Qemu-devel] [PATCH 2/4] target/s390x: Use ILEN_UNWIND in trivial cases

2017-07-24 Thread Richard Henderson
All of these uses also have an immediately visible call to cpu_restore_state. Signed-off-by: Richard Henderson --- target/s390x/helper.c | 7 +++ target/s390x/mem_helper.c | 26 +- target/s390x/misc_helper.c | 2 +- 3 files changed, 17

[Qemu-devel] [PATCH 1/4] target/s390x: Add ilen to unwind data

2017-07-24 Thread Richard Henderson
Use ILEN_UNWIND to signal that we have in fact that cpu_restore_state will have been called by the time we arrive in do_program_interrupt. Signed-off-by: Richard Henderson --- target/s390x/cpu.h | 9 ++--- target/s390x/helper.c | 7 +--

[Qemu-devel] [PATCH 0/4] target/s390x ilen via unwinding

2017-07-24 Thread Richard Henderson
David Hildenbrand recently posted a series of patches correcting various mistakes in the computation of ILEN for various instructions in the respective helpers. I think a better approach is to include ilen in the set of unwind data for each insn. In this way we can fix these sorts of errors

Re: [Qemu-devel] [RFC PATCH 09/26] ppc/xive: add an overall memory region for the ESBs

2017-07-24 Thread David Gibson
On Mon, Jul 24, 2017 at 03:25:29PM +0200, Cédric Le Goater wrote: > On 07/24/2017 08:09 AM, Benjamin Herrenschmidt wrote: > > On Mon, 2017-07-24 at 14:49 +1000, David Gibson wrote: > >> On Wed, Jul 05, 2017 at 07:13:22PM +0200, Cédric Le Goater wrote: > >>> Each source adds its own ESB mempry

Re: [Qemu-devel] [RFC PATCH 05/26] ppc/xive: define XIVE internal tables

2017-07-24 Thread David Gibson
On Mon, Jul 24, 2017 at 02:52:29PM +0200, Cédric Le Goater wrote: > On 07/19/2017 05:24 AM, David Gibson wrote: > > On Wed, Jul 05, 2017 at 07:13:18PM +0200, Cédric Le Goater wrote: > >> The XIVE interrupt controller of the POWER9 uses a set of tables to > >> redirect exception from event sources

Re: [Qemu-devel] [RFC PATCH 09/26] ppc/xive: add an overall memory region for the ESBs

2017-07-24 Thread David Gibson
On Mon, Jul 24, 2017 at 03:27:18PM +0200, Cédric Le Goater wrote: > On 07/24/2017 08:39 AM, David Gibson wrote: > > On Mon, Jul 24, 2017 at 04:09:31PM +1000, Benjamin Herrenschmidt wrote: > >> On Mon, 2017-07-24 at 14:49 +1000, David Gibson wrote: > >>> On Wed, Jul 05, 2017 at 07:13:22PM +0200,

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 04/26] ppc/xive: introduce a skeleton for the XIVE interrupt controller model

2017-07-24 Thread David Gibson
On Tue, Jul 25, 2017 at 11:26:13AM +1000, Alexey Kardashevskiy wrote: > On 24/07/17 23:00, Cédric Le Goater wrote: > >>> +#include "qemu/osdep.h" > >>> +#include "qemu/log.h" > >>> +#include "qapi/error.h" > >>> +#include "target/ppc/cpu.h" > >>> +#include "sysemu/cpus.h" > >>> +#include

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 17/26] ppc/xive: add hcalls support

2017-07-24 Thread Alexey Kardashevskiy
On 25/07/17 00:55, Cédric Le Goater wrote: > On 07/24/2017 11:39 AM, Alexey Kardashevskiy wrote: >> On 06/07/17 03:13, Cédric Le Goater wrote: >>> A set of Hypervisor's call are used to configure the interrupt sources >>> and the event/notification queues of the guest: >>> >>>

Re: [Qemu-devel] [PATCH for 2.10 07/35] qcow2: fix null pointer dereference

2017-07-24 Thread Philippe Mathieu-Daudé
Hi Eric, On 07/24/2017 03:46 PM, Eric Blake wrote: On 07/24/2017 01:27 PM, Philippe Mathieu-Daudé wrote: If find_bitmap_by_name() fails we have bm=NULL and go to the 'fail' label, then call bitmap_free(bm) which does g_free(bm->name) with bm=NULL... Clang's scan-build-5.0 output:

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 04/26] ppc/xive: introduce a skeleton for the XIVE interrupt controller model

2017-07-24 Thread Alexey Kardashevskiy
On 24/07/17 23:00, Cédric Le Goater wrote: >>> +#include "qemu/osdep.h" >>> +#include "qemu/log.h" >>> +#include "qapi/error.h" >>> +#include "target/ppc/cpu.h" >>> +#include "sysemu/cpus.h" >>> +#include "sysemu/dma.h" >>> +#include "monitor/monitor.h" >>> +#include "hw/ppc/xive.h" >>> + >>>

Re: [Qemu-devel] [Qemu-block] [PATCH v3] util: remove the obsolete non-blocking connect

2017-07-24 Thread Mao Zhongyi
On 07/25/2017 06:07 AM, John Snow wrote: This was posted over a month ago with two R-Bs, did it get merged or dropped? --js Not yet, I hope that it will. Thanks, Mao On 06/16/2017 04:54 AM, Mao Zhongyi wrote: From: Cao jin The non-blocking connect mechanism

[Qemu-devel] [PATCH] configure: fix qemu-ga missing '.exe' extension on windows

2017-07-24 Thread Philippe Mathieu-Daudé
Reported-by: Sameeh Jubran Signed-off-by: Philippe Mathieu-Daudé --- original report from Sameeh Jubran: http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg00906.html Makefile | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2

Re: [Qemu-devel] [PATCHv2 02/04] colo-compare: Processpactkets in the IOThreadofthe primary

2017-07-24 Thread wang.yong155
>On 24/07/2017 12:38, wang.yong...@zte.com.cn wrote: >> finally use g_main_loop_run to replace aio_poll in the >> iothread_run function. > >That would make the performance of virtio-blk with iothreads worse, >unfortunately. aio_poll is much more optimized than g_main_loop_run. Hi Paolo,

Re: [Qemu-devel] [PATCH 1/1] s390x/css: fix ilen in IO instruction handlers

2017-07-24 Thread Dong Jia Shi
* Halil Pasic [2017-07-24 16:34:52 +0200]: > When initiating a program check interruption by calling program_interrupt > the instruction length (ilen) of the current instruction is supplied as > the third parameter. > > On s390x all the IO instructions are of

Re: [Qemu-devel] virtio-net-pci possible limitation on AArch64

2017-07-24 Thread Alexandru Avadanii
Hi, Andrew, I tried rebuilding virtinst (1.3.2), but that made no difference. However, changing "model=virtio-net-pci" to simply "model=virtio" (and letting the default kick in via libvirt) made a whole lot of difference (see domain xml at the end). The interfaces are now on separate buses,

Re: [Qemu-devel] [PATCH for-2.10] target/arm: Correct MPU trace handling of write vs execute

2017-07-24 Thread Richard Henderson
On 07/24/2017 07:33 AM, Peter Maydell wrote: Correct off-by-one bug in the PSMAv7 MPU tracing where it would print a write access as "reading", an insn fetch as "writing", and a read access as "execute". Since we have an MMUAccessType enum now, we can make the code clearer in the process by

Re: [Qemu-devel] [PATCH 1/4] target/i386: Use simple static property for "model-id"

2017-07-24 Thread Eduardo Habkost
On Mon, Jul 24, 2017 at 11:11:34PM +0200, Paolo Bonzini wrote: > On 18/07/2017 13:29, Igor Mammedov wrote: > >> It may add a few additional CPU cycles, but I really doubt we can > >> find a workload where CPUID speed has measurable impact. See, > >> for example, how expensive the kernel KVM CPUID

[Qemu-devel] MAINTAINERS: surprising get_maintainer.pl output for ./configure

2017-07-24 Thread Philippe Mathieu-Daudé
Hi perl gurus :) after changing the ./configure I wanted to figure to whom email and got this: $ ./scripts/get_maintainer.pl -f configure Kamil Rytarowski (maintainer:NETBSD) qemu-devel@nongnu.org (open list:All patches CC here) $ fgrep -A5 NETBSD MAINTAINERS NETBSD L:

Re: [Qemu-devel] [Qemu-block] [PATCH v3] util: remove the obsolete non-blocking connect

2017-07-24 Thread John Snow
This was posted over a month ago with two R-Bs, did it get merged or dropped? --js On 06/16/2017 04:54 AM, Mao Zhongyi wrote: From: Cao jin The non-blocking connect mechanism is obsolete, and it doesn't work well in inet connection, because it will call getaddrinfo

Re: [Qemu-devel] [PATCH 4/4] tests/pxe-test: add testcase using vhost-user-bridge

2017-07-24 Thread Michael S. Tsirkin
On Fri, Jul 21, 2017 at 11:55:53AM +0200, Jens Freimann wrote: > From: Jens Freimann > > Add a PXE testcase tunneling traffic through vhost-user-bridge process. > Create a vhost-user-bridge process and connect it to qemu via a socket. > > Signed-off-by: Jens Freimann

Re: [Qemu-devel] Torn read/write possible on aarch64/x86-64 MTTCG?

2017-07-24 Thread Richard Henderson
On 07/24/2017 02:23 PM, Emilio G. Cota wrote: (Adding some Cc's) On Mon, Jul 24, 2017 at 19:05:33 +, Andrew Baumann via Qemu-devel wrote: Hi all, I'm trying to track down what appears to be a translation bug in either the aarch64 target or x86_64 TCG (in multithreaded mode). The symptoms

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] iotests: Check dirty bitmap statistics in 124

2017-07-24 Thread John Snow
On 07/24/2017 11:39 AM, Eric Blake wrote: We had a bug for multiple releases where dirty-bitmap count was documented in bytes but reported in sectors; enhance the testsuite to add coverage of DirtyBitmapInfo to ensure we do not regress again. Signed-off-by: Eric Blake ---

Re: [Qemu-devel] [RFC PATCH v2 5/6] hw/pci: add bus_reserve property to pcie-root-port

2017-07-24 Thread Michael S. Tsirkin
On Tue, Jul 25, 2017 at 12:41:12AM +0300, Alexander Bezzubikov wrote: > 2017-07-24 23:46 GMT+03:00 Michael S. Tsirkin : > > On Sun, Jul 23, 2017 at 05:13:11PM +0300, Marcel Apfelbaum wrote: > >> On 23/07/2017 15:22, Michael S. Tsirkin wrote: > >> > On Sun, Jul 23, 2017 at

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2017-07-24 Thread Eric Blake
On 07/24/2017 04:52 PM, Eric Blake wrote: > On 07/24/2017 04:48 PM, Philippe Mathieu-Daudé wrote: >> On 07/24/2017 06:09 PM, Peter Maydell wrote: >>> On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: Use error_report() + exit() instead of error_setg(_fatal).

Re: [Qemu-devel] [RFC PATCH for 2.10 33/35] configure: clang does not support -Wexpansion-to-defined

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 06:22 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- configure | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index

[Qemu-devel] [PATCH] disas/arm: fix 'instuction' typo

2017-07-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- disas/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/arm.c b/disas/arm.c index 27396dd..a08bbbe 100644 --- a/disas/arm.c +++ b/disas/arm.c @@ -1651,7 +1651,7 @@ print_insn_coprocessor (bfd_vma pc, struct

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2017-07-24 Thread Eric Blake
On 07/24/2017 04:48 PM, Philippe Mathieu-Daudé wrote: > On 07/24/2017 06:09 PM, Peter Maydell wrote: >> On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: >>> Use error_report() + exit() instead of error_setg(_fatal). >>> >>> hw/arm/sysbus-fdt.c:322:9: warning: Array access

Re: [Qemu-devel] [PATCH for 2.10 32/35] timer/pxa2xx: silent warning about out-of-bound memory access

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 06:01 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: Unlikely to happen. hw/timer/pxa2xx_timer.c:145:19: warning: Out of bound memory access (accessed memory precedes memory block) counter = counters[n];

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-iotests: add a "how to" to ./README

2017-07-24 Thread John Snow
On 07/21/2017 11:51 AM, Stefan Hajnoczi wrote: On Fri, Jul 21, 2017 at 07:16:34AM -0500, Eric Blake wrote: On 07/21/2017 04:34 AM, Stefan Hajnoczi wrote: There is not much getting started documentation for qemu-iotests. This patch explains how to create a new test and covers the overall

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 06:09 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: Use error_report() + exit() instead of error_setg(_fatal). hw/arm/sysbus-fdt.c:322:9: warning: Array access (from variable 'node_path') results in a null pointer dereference

Re: [Qemu-devel] [RFC PATCH] tcg/softmmu: Increase size of TLB cache

2017-07-24 Thread Richard Henderson
On 07/24/2017 02:03 PM, Pranith Kumar wrote: +#ifndef CPU_TLB_BITS_MAX +# define CPU_TLB_BITS_MAX 8 You should simply require each backend to define this. +++ b/tcg/i386/tcg-target.h @@ -162,6 +162,8 @@ extern bool have_popcnt; # define TCG_AREG0 TCG_REG_EBP #endif +#define

Re: [Qemu-devel] [PATCH for 2.10 22/35] arm/vexpress: fix potential memory leak

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 06:11 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: Reorder to only allocate if required. hw/arm/vexpress.c:667:13: warning: Potential leak of memory pointed to by 'flashalias' Reported-by: Clang Static Analyzer

Re: [Qemu-devel] [RFC PATCH v2 6/6] hw/pci: add hint capabilty for additional bus reservation to pcie-root-port

2017-07-24 Thread Alexander Bezzubikov
2017-07-24 23:43 GMT+03:00 Michael S. Tsirkin : > On Sun, Jul 23, 2017 at 01:15:43AM +0300, Aleksandr Bezzubikov wrote: >> Signed-off-by: Aleksandr Bezzubikov >> --- >> hw/pci-bridge/pcie_root_port.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff

Re: [Qemu-devel] [RFC PATCH v2 5/6] hw/pci: add bus_reserve property to pcie-root-port

2017-07-24 Thread Alexander Bezzubikov
2017-07-24 23:46 GMT+03:00 Michael S. Tsirkin : > On Sun, Jul 23, 2017 at 05:13:11PM +0300, Marcel Apfelbaum wrote: >> On 23/07/2017 15:22, Michael S. Tsirkin wrote: >> > On Sun, Jul 23, 2017 at 01:15:42AM +0300, Aleksandr Bezzubikov wrote: >> > > To enable hotplugging of a newly

Re: [Qemu-devel] [PATCH for 2.10 00/35] fix bugs reported by Clang Static Analyzer

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Hi, > > This series is the result of having fun with Clang's Static Analyzer during > the week-end (see https://clang-analyzer.llvm.org/). > > No need to delay the first batch for -rc0. I had a quick look through the

Re: [Qemu-devel] [PATCH for 2.10 27/35] syscall: fix dereference of undefined pointer

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Clang's scan-build-5.0 reports: > > linux-user/syscall.c:5581:9: warning: Dereference of undefined pointer value > if (*host_rt_dev_ptr != 0) { > ^~~~ > > Reported-by: Clang Static Analyzer >

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 22:20, Philippe Mathieu-Daudé wrote: > On 07/24/2017 06:09 PM, Peter Maydell wrote: >> >> On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > > ... > >>> diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c >>> index

Re: [Qemu-devel] Torn read/write possible on aarch64/x86-64 MTTCG?

2017-07-24 Thread Emilio G. Cota
(Adding some Cc's) On Mon, Jul 24, 2017 at 19:05:33 +, Andrew Baumann via Qemu-devel wrote: > Hi all, > > I'm trying to track down what appears to be a translation bug in either > the aarch64 target or x86_64 TCG (in multithreaded mode). The symptoms > are entirely consistent with a torn

Re: [Qemu-devel] [PATCH] io: Always remove an old channel watch before adding a new one.

2017-07-24 Thread Paolo Bonzini
On 24/07/2017 20:15, Brandon Carpenter wrote: > Also set saved handle to zero when removing without adding a new watch. > > Signed-off-by: Brandon Carpenter > --- > ui/vnc-auth-vencrypt.c | 3 +++ > ui/vnc-ws.c| 6 ++ > ui/vnc.c |

Re: [Qemu-devel] [RFC PATCH for 2.10 33/35] configure: clang does not support -Wexpansion-to-defined

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > configure | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 6b52e19ee3..48295aa1e6 100755 > ---

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2017-07-24 Thread Philippe Mathieu-Daudé
On 07/24/2017 06:09 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: ... diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index d68e3dcdbd..ad0cc49b19 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/arm/sysbus-fdt.c @@ -315,15 +315,14 @@ static

Re: [Qemu-devel] [PATCH] hw/core/loader: do not check for regions overlap

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 21:03, Hua Yanghao wrote: > Sounds good PPM! currently I am working around this by > objcopy a pure binary and it looks like qemu-system-arm is > loading a binary at loader address + 0x1. From man page > it claims it also supports multiboot image which

Re: [Qemu-devel] [RFC PATCH] tcg/softmmu: Increase size of TLB cache

2017-07-24 Thread Paolo Bonzini
On 24/07/2017 23:03, Pranith Kumar wrote: > This patch increases the number of entries we allow in the TLB. I went > over a few architectures to see if increasing it is problematic. Only > armv6 seems to have a limitation that only 8 bits can be used for > indexing these entries. For other

Re: [Qemu-devel] [PATCH for 2.10 03/35] thunk: check nb_fields is valid before continuing

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > thunk.c:91:32: warning: Call to 'malloc' has an allocation size of 0 bytes > se->field_offsets[i] = malloc(nb_fields * sizeof(int)); >^~~ > > Reported-by:

Re: [Qemu-devel] [PATCH for 2.10 11/35] i2c/exynos4210: correctly check i2c_recv() return value

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > i2c_recv() returns -1 on error, if the I2CCON_ACK_GEN bit was not set this > code > was setting i2cds = -1. > > i2c/exynos4210_i2c.c:117:20: warning: Loss of sign in implicit conversion > s->i2cds = ret; >

Re: [Qemu-devel] [PATCH for 2.10 22/35] arm/vexpress: fix potential memory leak

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Reorder to only allocate if required. > > hw/arm/vexpress.c:667:13: warning: Potential leak of memory pointed to by > 'flashalias' > > Reported-by: Clang Static Analyzer > Signed-off-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH 1/4] target/i386: Use simple static property for "model-id"

2017-07-24 Thread Paolo Bonzini
On 18/07/2017 13:29, Igor Mammedov wrote: >> It may add a few additional CPU cycles, but I really doubt we can >> find a workload where CPUID speed has measurable impact. See, >> for example, how expensive the kernel KVM CPUID code >> (kvm_cpuid(), kvm_find_cpuid_entry()) is. > > I don't expect

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Use error_report() + exit() instead of error_setg(_fatal). > > hw/arm/sysbus-fdt.c:322:9: warning: Array access (from variable 'node_path') > results in a null pointer dereference > if (node_path[1]) { >

Re: [Qemu-devel] [PATCH for 2.10 20/35] arm/boot: fix undefined instruction on secondary smp cpu bootloader

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > In a ARM multicore system, write_secondary_boot() only initializes fixups for > FIXUP_GIC_CPU_IF and FIXUP_BOOTREG, while smpboot[] also uses FIXUP_DSB. > This results in write_bootloader() using uninitialized

[Qemu-devel] [RFC PATCH] tcg/softmmu: Increase size of TLB cache

2017-07-24 Thread Pranith Kumar
This patch increases the number of entries we allow in the TLB. I went over a few architectures to see if increasing it is problematic. Only armv6 seems to have a limitation that only 8 bits can be used for indexing these entries. For other architectures, I increased the number of TLB entries to a

Re: [Qemu-devel] [PATCH for 2.10 32/35] timer/pxa2xx: silent warning about out-of-bound memory access

2017-07-24 Thread Peter Maydell
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Unlikely to happen. > > hw/timer/pxa2xx_timer.c:145:19: warning: Out of bound memory access (accessed > memory precedes memory block) > counter = counters[n]; > ^~~ > > Reported-by: Clang

Re: [Qemu-devel] [PATCH v15 31/32] target/arm: Split out thumb_tr_translate_insn

2017-07-24 Thread Emilio G. Cota
On Mon, Jul 24, 2017 at 13:27:27 -0700, Richard Henderson wrote: > We need not check for ARM vs Thumb state in order to dispatch > disassembly of every instruction. > > Signed-off-by: Richard Henderson > --- > target/arm/translate.c | 121 >

Re: [Qemu-devel] [PATCH v15 28/32] target/arm: [tcg] Port to generic translation framework

2017-07-24 Thread Emilio G. Cota
On Mon, Jul 24, 2017 at 13:27:24 -0700, Richard Henderson wrote: > From: Lluís Vilanova > > Signed-off-by: Lluís Vilanova > Message-Id: <150002631325.22386.10348327185029496649.st...@frigg.lan> > Signed-off-by: Richard Henderson > ---

Re: [Qemu-devel] [PATCH for 2.10 02/35] loader: check get_image_size() return value

2017-07-24 Thread Alistair Francis
On Mon, Jul 24, 2017 at 11:38 AM, Eric Blake wrote: > On 07/24/2017 01:27 PM, Philippe Mathieu-Daudé wrote: >> since a negative value means it errored. >> >> hw/core/loader.c:149:9: warning: Loss of sign in implicit conversion >> if (size > max_sz) { >> ^~~~ >>

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-24 Thread Paolo Bonzini
On 24/07/2017 21:03, Dr. David Alan Gilbert wrote: >> I don't like having such a long-lived mutex (it seems like a recipe for >> deadlocks with the BQL), plus memory_region_transaction_commit (the >> expensive part of memory_global_dirty_log_stop) needs to be under the >> BQL itself because it

[Qemu-devel] [PATCH v15 32/32] target/arm: Perform per-insn cross-page check only for Thumb

2017-07-24 Thread Richard Henderson
ARM is a fixed-length ISA and we can compute the page crossing condition exactly once during init_disas_context. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/translate.c | 58 -- 1

[Qemu-devel] [PATCH v15 28/32] target/arm: [tcg] Port to generic translation framework

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Signed-off-by: Lluís Vilanova Message-Id: <150002631325.22386.10348327185029496649.st...@frigg.lan> Signed-off-by: Richard Henderson --- target/arm/translate.h | 8 +--- target/arm/translate-a64.c | 107

Re: [Qemu-devel] [PATCH V2] vhost: fix a migration failed becauseof vhost region merge

2017-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2017 at 01:53:33PM +0200, Igor Mammedov wrote: > On Mon, 24 Jul 2017 18:32:35 +0800 (CST) > wrote: > > > > On Sun, 23 Jul 2017 20:46:11 +0800 > > > > > > > > > > > > > Peng Hao wrote: > > > > > > When a guest that has several

[Qemu-devel] [PATCH v15 26/32] target/arm: [tcg] Port to disas_log

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Message-Id:

Re: [Qemu-devel] [RFC PATCH v2 6/6] hw/pci: add hint capabilty for additional bus reservation to pcie-root-port

2017-07-24 Thread Michael S. Tsirkin
On Sun, Jul 23, 2017 at 01:15:43AM +0300, Aleksandr Bezzubikov wrote: > Signed-off-by: Aleksandr Bezzubikov > --- > hw/pci-bridge/pcie_root_port.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c >

[Qemu-devel] [PATCH v15 22/32] target/arm: [tcg] Port to translate_insn

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Reviewed-by: Emilio G. Cota Signed-off-by: Lluís Vilanova Message-Id: <150002485863.22386.13949856269576226529.st...@frigg.lan>

Re: [Qemu-devel] [PATCH V2] vhost: fix a migration failed because of vhost region merge

2017-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2017 at 11:14:19AM +0200, Igor Mammedov wrote: > On Sun, 23 Jul 2017 20:46:11 +0800 > Peng Hao wrote: > > > When a guest that has several hotplugged dimms is migrated, on > > destination it will fail to resume. Because regions on source > > are merged and on

[Qemu-devel] [PATCH v15 23/32] target/arm: [tcg, a64] Port to translate_insn

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Reviewed-by: Emilio G. Cota Signed-off-by: Lluís Vilanova Message-Id: <150002510079.22386.10164419868911710218.st...@frigg.lan>

[Qemu-devel] [PATCH v15 31/32] target/arm: Split out thumb_tr_translate_insn

2017-07-24 Thread Richard Henderson
We need not check for ARM vs Thumb state in order to dispatch disassembly of every instruction. Signed-off-by: Richard Henderson --- target/arm/translate.c | 121 - 1 file changed, 80 insertions(+), 41 deletions(-) diff --git

Re: [Qemu-devel] [RFC PATCH v2 5/6] hw/pci: add bus_reserve property to pcie-root-port

2017-07-24 Thread Michael S. Tsirkin
On Sun, Jul 23, 2017 at 05:13:11PM +0300, Marcel Apfelbaum wrote: > On 23/07/2017 15:22, Michael S. Tsirkin wrote: > > On Sun, Jul 23, 2017 at 01:15:42AM +0300, Aleksandr Bezzubikov wrote: > > > To enable hotplugging of a newly created pcie-pci-bridge, > > > we need to tell firmware (SeaBIOS in

[Qemu-devel] [PATCH v15 21/32] target/arm: [tcg, a64] Port to breakpoint_check

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Lluís Vilanova Message-Id:

[Qemu-devel] [PATCH v15 29/32] target/arm: [a64] Move page and ss checks to init_disas_context

2017-07-24 Thread Richard Henderson
Since AArch64 uses a fixed-width ISA, we can pre-compute the number of insns remaining on the page. Also, we can check for single-step once. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 17 + 1

[Qemu-devel] [PATCH] io: Improve websocket support by becoming more RFC compliant.

2017-07-24 Thread Brandon Carpenter
Remembering the opcode is sufficient for handling fragmented frames from the client, which may be introduced by an intermediary server/proxy. Respond to pings and ignore pongs rather than close the connection as many browsers use ping/pong to test an idle connection. Close connections according to

[Qemu-devel] [PATCH v15 18/32] target/arm: [tcg] Port to tb_start

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Message-Id:

[Qemu-devel] [PATCH v15 30/32] target/arm: Move ss check to init_disas_context

2017-07-24 Thread Richard Henderson
We can check for single-step just once. Reviewed-by: Emilio G. Cota Reviewed-by: Lluís Vilanova Signed-off-by: Richard Henderson --- target/arm/translate.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v15 24/32] target/arm: [tcg] Port to tb_stop

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Reviewed-by: Emilio G. Cota Signed-off-by: Lluís Vilanova Message-Id: <150002534291.22386.13499916738708680298.st...@frigg.lan>

[Qemu-devel] [PATCH] io: Always remove an old channel watch before adding a new one.

2017-07-24 Thread Brandon Carpenter
Also set saved handle to zero when removing without adding a new watch. Signed-off-by: Brandon Carpenter --- ui/vnc-auth-vencrypt.c | 3 +++ ui/vnc-ws.c| 6 ++ ui/vnc.c | 4 3 files changed, 13 insertions(+) diff --git

[Qemu-devel] [PATCH v15 27/32] target/arm: [tcg, a64] Port to disas_log

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Lluís Vilanova Message-Id:

[Qemu-devel] [PATCH v15 16/32] target/arm: [tcg] Port to init_disas_context

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Message-Id:

[Qemu-devel] [PATCH v15 15/32] target/arm: [tcg] Port to DisasContextBase

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Message-Id:

[Qemu-devel] [PATCH v15 25/32] target/arm: [tcg, a64] Port to tb_stop

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Lluís Vilanova Message-Id:

[Qemu-devel] [PATCH v15 20/32] target/arm: [tcg, a64] Port to insn_start

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Message-Id:

[Qemu-devel] [PATCH v15 12/32] target/i386: [tcg] Port to tb_stop

2017-07-24 Thread Richard Henderson
From: Lluís Vilanova Incrementally paves the way towards using the generic instruction translation loop. Signed-off-by: Lluís Vilanova Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson Message-Id:

  1   2   3   4   5   >