Re: [Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Markus Armbruster
Eric Blake writes: > On 5/14/19 8:15 AM, Yury Kotov wrote: >> monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() >> returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads to >> a bug with removing fd from fdset which id >= 2^32. >> So, fix return types for

[Qemu-devel] [PULL 14/16] migration: Fix use-after-free during process exit

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Yury Kotov It fixes heap-use-after-free which was found by clang's ASAN. Control flow of this use-after-free: main_thread: * Got SIGTERM and completes main loop * Calls migration_shutdown - migrate_fd_cancel (so, migration_thread begins to complete) -

[Qemu-devel] [PATCH v7 02/24] crypto: Reverse code blocks in random-platform.c

2019-05-14 Thread Richard Henderson
Use #ifdef _WIN32 instead of #ifndef _WIN32. This will make other tests easier to sequence. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- crypto/random-platform.c | 35 +--

[Qemu-devel] [PATCH v7 09/24] util: Add qemu_guest_getrandom and associated routines

2019-05-14 Thread Richard Henderson
This routine is intended to produce high-quality random numbers to the guest. Normally, such numbers are crypto quality from the host, but a command-line option can force the use of a fully deterministic sequence for use while debugging. Reviewed-by: Laurent Vivier Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH for-4.0.1] q35: Revert to kernel irqchip

2019-05-14 Thread Daniel P . Berrangé
On Tue, May 14, 2019 at 01:03:31PM -0600, Alex Williamson wrote: > Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed > the default for the pc-q35-4.0 machine type to use split irqchip, which > turned out to have disasterous effects on vfio-pci INTx support. KVM > resampling

[Qemu-devel] [PATCH v7 13/24] linux-user: Use qemu_guest_getrandom_nofail for AT_RANDOM

2019-05-14 Thread Richard Henderson
Use a better interface for random numbers than rand * 16. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/elfload.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c

Re: [Qemu-devel] [RFC PATCH 11/11] MAINTAINERS: update for semihostings new home

2019-05-14 Thread Philippe Mathieu-Daudé
On 5/14/19 5:53 PM, Alex Bennée wrote: > Seeing as I touched it I should at least keep an eye on it. Thanks for that. > > Signed-off-by: Alex Bennée FWIW: Reviewed-by: Philippe Mathieu-Daudé > --- > MAINTAINERS | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/MAINTAINERS

Re: [Qemu-devel] [PATCH v2 2/6] luks: Create block_crypto_co_create_generic()

2019-05-14 Thread Kevin Wolf
Am 14.05.2019 um 13:13 hat Daniel P. Berrangé geschrieben: > On Mon, Mar 12, 2018 at 04:02:14PM +0100, Kevin Wolf wrote: > > Everything that refers to the protocol layer or QemuOpts is moved out of > > block_crypto_create_generic(), so that the remaining function is > > suitable to be called by a

[Qemu-devel] [PATCH v2 6/6] cutils: Simplify how parse_uint() checks for whitespace

2019-05-14 Thread Markus Armbruster
Use qemu_isspace() so we don't have to cast to unsigned char. Signed-off-by: Markus Armbruster --- util/cutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cutils.c b/util/cutils.c index d682c90901..9aacc422ca 100644 --- a/util/cutils.c +++ b/util/cutils.c @@

Re: [Qemu-devel] [PATCH v2 2/6] tests/vhost-user-bridge: Fix misuse of isdigit()

2019-05-14 Thread Philippe Mathieu-Daudé
On 5/14/19 8:03 PM, Markus Armbruster wrote: > vubr_set_host() passes char values to isdigit(). Undefined behavior "happens"? > when the value is negative. > > Fix by using qemu_isdigit() instead. > > Signed-off-by: Markus Armbruster > --- > tests/vhost-user-bridge.c | 2 +- > 1 file

[Qemu-devel] [PULL 09/16] migration/ram.c: start of migration_bitmap_sync_range is always 0

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang We can eliminate to pass 0. Signed-off-by: Wei Yang Message-Id: <20190430034412.12935-2-richardw.y...@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[Qemu-devel] [PULL 05/16] migration: savevm: fix error code with migration blockers

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Cole Robinson The only caller that checks the error code is looking for != 0, so returning false is incorrect. Fixes: 5aaac467938 "migration: savevm: consult migration blockers" Signed-off-by: Cole Robinson Message-Id: Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PULL 12/16] migration/savevm: load_header before load_setup

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang In migration_thread() and qemu_savevm_state(), we savevm_state in following sequence: qemu_savevm_state_header(f); qemu_savevm_state_setup(f); Then it would be more proper to loadvm_state in the save sequence. Signed-off-by: Wei Yang Message-Id:

[Qemu-devel] [PATCH v7 18/24] hw/misc/bcm2835_rng: Use qemu_guest_getrandom_nofail

2019-05-14 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of rolling our own error handling locally. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH v7 21/24] target/arm: Implement ARMv8.5-RNG

2019-05-14 Thread Richard Henderson
Use the newly introduced infrastructure for guest random numbers. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h| 5 + target/arm/cpu64.c | 1 + target/arm/helper.c | 44 3 files changed, 50 insertions(+)

[Qemu-devel] [PATCH v7 20/24] target/arm: Put all PAC keys into a structure

2019-05-14 Thread Richard Henderson
This allows us to use a single syscall to initialize them all. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.h | 12 +++- linux-user/aarch64/cpu_loop.c | 6 +- linux-user/syscall.c | 10

Re: [Qemu-devel] [PATCH] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()

2019-05-14 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > hmp_gva2gpa() calls mon_get_cpu() twice, which is unnecessary. > Not an actual bug, but this is reported as a defect by Coverity > Scan (CID 1401346). > > Signed-off-by: Eduardo Habkost I'm going to sneak this onto the end of a migration pull I'm

[Qemu-devel] [PATCH v2 0/6] Fix misuse of ctype.h functions

2019-05-14 Thread Markus Armbruster
v2: * PATCH 1: Use g_ascii_isspace(), adapt commit message [Philippe] * PATCH 3: Add comment pointing to the GDB manual [Philippe] * PATCH 5: Improve commit message [Thomas] Markus Armbruster (6): qemu-bridge-helper: Fix misuse of isspace() tests/vhost-user-bridge: Fix misuse of isdigit()

[Qemu-devel] [PULL 11/16] migration/savevm: remove duplicate check of migration_is_blocked

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang Current call flow of save_snapshot is: save_snapshot migration_is_blocked qemu_savevm_state migration_is_blocked Since qemu_savevm_state is only called in save_snapshot, this means migration_is_blocked has been already checked. Signed-off-by: Wei Yang

Re: [Qemu-devel] [PATCH v2 2/6] tests/vhost-user-bridge: Fix misuse of isdigit()

2019-05-14 Thread Thomas Huth
On 14/05/2019 20.03, Markus Armbruster wrote: > vubr_set_host() passes char values to isdigit(). Undefined behavior > when the value is negative. > > Fix by using qemu_isdigit() instead. > > Signed-off-by: Markus Armbruster > --- > tests/vhost-user-bridge.c | 2 +- > 1 file changed, 1

Re: [Qemu-devel] [PATCH v9 02/27] gdbstub: Implement deatch (D pkt) with new infra

2019-05-14 Thread Alex Bennée
Jon Doron writes: > Signed-off-by: Jon Doron > --- > gdbstub.c | 90 ++- > 1 file changed, 50 insertions(+), 40 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index d5e0f3878a..621d689868 100644 > --- a/gdbstub.c > +++ b/gdbstub.c >

Re: [Qemu-devel] [PATCH] configure: Disable slirp if --disable-system

2019-05-14 Thread Aleksandar Markovic
On May 13, 2019 11:14 PM, "Richard Henderson" wrote: > > On 5/11/19 5:47 AM, Aleksandar Markovic wrote: > > > > On May 10, 2019 10:36 PM, "Richard Henderson" < richard.hender...@linaro.org > > > wrote: > >> > >> For linux-user, there is no need to add slirp to

[Qemu-devel] [PATCH v7 12/24] linux-user: Call qcrypto_random_init if not using -seed

2019-05-14 Thread Richard Henderson
When not using -seed, we will use the random part of the crypto subsystem. For softmmu, we initialize the full qcrypto_init, because we use crypto for reasons other than random numbers. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v7 07/24] ui/vnc: Split out authentication_failed

2019-05-14 Thread Richard Henderson
There were 3 copies of this code, one of which used the wrong data size for the failure indicator. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- ui/vnc.c | 37

[Qemu-devel] [PATCH v7 23/24] target/ppc: Use gen_io_start/end around DARN

2019-05-14 Thread Richard Henderson
Generating a random number counts as I/O, as it cannot be replayed and produce the same results. Acked-by: David Gibson Reviewed-by: Laurent Vivier Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- target/ppc/translate.c | 21 +++-- 1 file changed, 15

[Qemu-devel] [PATCH v7 04/24] crypto: Use O_CLOEXEC in qcrypto_random_init

2019-05-14 Thread Richard Henderson
Avoids leaking the /dev/urandom fd into any child processes. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- crypto/random-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v7 24/24] target/i386: Implement CPUID_EXT_RDRAND

2019-05-14 Thread Richard Henderson
We now have an interface for guest visible random numbers. Reviewed-by: Eduardo Habkost Signed-off-by: Richard Henderson --- target/i386/helper.h | 2 ++ target/i386/cpu.c| 5 ++-- target/i386/int_helper.c | 21 ++ target/i386/translate.c | 62

[Qemu-devel] [PATCH] linux-user: Pass through nanosecond timestamp components for stat syscalls

2019-05-14 Thread Chen-Yu Tsai
From: Chen-Yu Tsai Since Linux 2.6 the stat syscalls have mostly supported nanosecond components for each of the file-related timestamps. QEMU user mode emulation currently does not pass through the nanosecond portion of the timestamp, even when the host system fills in the value. This results

Re: [Qemu-devel] [PATCH v6 00/25] Add qemu_getrandom and ARMv8.5-RNG etc

2019-05-14 Thread Daniel P . Berrangé
On Tue, May 14, 2019 at 09:14:57AM -0700, Richard Henderson wrote: > On 5/14/19 8:23 AM, Daniel P. Berrangé wrote: > > On Tue, May 14, 2019 at 05:15:31PM +0200, Markus Armbruster wrote: > >> "make check-unit" fails for me: > >> > >> TESTcheck-unit: tests/test-crypto-tlscredsx509 > >>

Re: [Qemu-devel] [PATCH v5 4/4] virtio-rng: change default backend to rng-builtin

2019-05-14 Thread Markus Armbruster
Laurent Vivier writes: > Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [RFC PATCH 09/11] target/mips: only build mips-semi for softmmu

2019-05-14 Thread Philippe Mathieu-Daudé
On 5/14/19 5:52 PM, Alex Bennée wrote: > The is_uhi gates all semihosting calls and always returns false for > CONFIG_USER_ONLY builds. There is no reason to build and link > mips-semi for these builds so lets fix that. > > Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé > ---

Re: [Qemu-devel] [PATCH v9 01/27] gdbstub: Add infrastructure to parse cmd packets

2019-05-14 Thread Alex Bennée
Jon Doron writes: > Signed-off-by: Jon Doron > --- > + > +/* > + * cmd_startswith -> cmd is compared using startswith > + * > + * > + * schema definitions: > + * Each schema parameter entry consists of 2 chars, > + * the first char represents the parameter type handling > + * the second char

[Qemu-devel] [PULL 01/16] migration: comment VMSTATE_UNUSED*() properly

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It is error prone to use VMSTATE_UNUSED*() sometimes especially when the size of the migration stream of the field is not the same as the size of the structure (boolean is one example). Comment it well so people will be aware of this when people want to use it. Signed-off-by:

[Qemu-devel] [PULL 00/16] migration queue

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit e329ad2ab72c43b56df88b34954c2c7d839bb373: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190513' into staging (2019-05-14 10:08:47 +0100) are available in the Git repository at: git://github.com/dagrh/qemu.git

[Qemu-devel] [PULL 02/16] migration: not necessary to check ops again

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang During each iteration, se->ops is checked before each loop. So it is not necessary to check it again and simplify the following check a little. Signed-off-by: Wei Yang Message-Id: <20190327013130.26259-1-richardw.y...@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 16/16] monitor: Call mon_get_cpu() only once at hmp_gva2gpa()

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Eduardo Habkost hmp_gva2gpa() calls mon_get_cpu() twice, which is unnecessary. Not an actual bug, but this is reported as a defect by Coverity Scan (CID 1401346). Signed-off-by: Eduardo Habkost Message-Id: <20190510185620.15757-1-ehabk...@redhat.com> Reviewed-by: Richard Henderson

[Qemu-devel] [PATCH v7 05/24] crypto: Use getrandom for qcrypto_random_bytes

2019-05-14 Thread Richard Henderson
Prefer it to direct use of /dev/urandom. Reviewed-by: Laurent Vivier Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- crypto/random-platform.c | 37 - configure| 18 +- 2 files changed, 49 insertions(+), 6

[Qemu-devel] [PATCH v7 11/24] linux-user: Initialize pseudo-random seeds for all guest cpus

2019-05-14 Thread Richard Henderson
When the -seed option is given, call qemu_guest_random_seed_main, putting the subsystem into deterministic mode. Pass derived seeds to each cpu created during clone; which is a no-op unless the subsystem is in deterministic mode. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v7 06/24] crypto: Change the qcrypto_random_bytes buffer type to void*

2019-05-14 Thread Richard Henderson
Using uint8_t* merely requires useless casts for use with other types to be filled with randomness. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- include/crypto/random.h | 2 +- crypto/random-gcrypt.c |

[Qemu-devel] [PATCH for-4.1 v2] q35: Revert to kernel irqchip

2019-05-14 Thread Alex Williamson
Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed the default for the pc-q35-4.0 machine type to use split irqchip, which turned out to have disasterous effects on vfio-pci INTx support. KVM resampling irqfds are registered for handling these interrupts, but these are

Re: [Qemu-devel] [PATCH for-4.0.1] q35: Revert to kernel irqchip

2019-05-14 Thread Alex Williamson
On Tue, 14 May 2019 13:03:31 -0600 Alex Williamson wrote: > Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed > the default for the pc-q35-4.0 machine type to use split irqchip, which > turned out to have disasterous effects on vfio-pci INTx support. KVM > resampling

Re: [Qemu-devel] [PATCH v5 3/4] virtio-rng: Keep the default backend out of VirtIORNGConf

2019-05-14 Thread Laurent Vivier
On 14/05/2019 18:27, Laurent Vivier wrote: From: Markus Armbruster The default backend is only used within virtio_rng_device_realize(). Replace VirtIORNGConf member default_backend by a local variable. Adjust its type to reduce conversions. While there, pass _abort instead of NULL when

Re: [Qemu-devel] [RFC PATCH 08/11] target/arm: correct return values for WRITE/READ in arm-semi

2019-05-14 Thread Philippe Mathieu-Daudé
On 5/14/19 5:52 PM, Alex Bennée wrote: > The documentation says the write should return the number of bytes not > written on an error (0 means everything was written). Read provides a > buffer length and the return value should be the buffer length - bytes > actually read. Remove the incorrect

Re: [Qemu-devel] [PATCH] linux-user: Pass through nanosecond timestamp components for stat syscalls

2019-05-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190514145346.20758-1-w...@kernel.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190514145346.20758-1-w...@kernel.org Subject: [Qemu-devel] [PATCH] linux-user: Pass through

[Qemu-devel] [PULL 04/16] vmstate: check subsection_found is enough

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang subsection_found is true implies vmdesc is not NULL. This patch remove the additional check on vmdesc and rename subsection_found to vmdesc_has_subsections to make it more self-explain. Signed-off-by: Wei Yang Message-Id: <20190403011016.12549-1-richardw.y...@linux.intel.com>

[Qemu-devel] [PULL 07/16] migration/colo.h: Remove obsolete codes

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Zhang Chen Signed-off-by: Zhang Chen Message-Id: <20190426090730.2691-3-chen.zh...@intel.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- include/migration/colo.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/migration/colo.h

[Qemu-devel] [PULL 03/16] migration: remove not used field xfer_limit

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang MigrationState->xfer_limit is only set to 0 in migrate_init(). Remove this unnecessary field. Signed-off-by: Wei Yang Message-Id: <20190326055726.10539-1-richardw.y...@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert ---

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Allow machine to dump dtb after SLOF update

2019-05-14 Thread Daniel Henrique Barboza
On 5/6/19 5:09 AM, Greg Kurz wrote: Now that SLOF can update QEMU's device tree at runtime, it makes sense to be able to dump the resulting dtb, pretty much like it is already possible to dump the initial dtb with the dumpdtb machine option. Add a new dumpdtb-slof property to the pseries

[Qemu-devel] [PATCH v7 15/24] linux-user: Remove srand call

2019-05-14 Thread Richard Henderson
We no longer use rand() within linux-user. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 4c72f07555..5792c40ace

[Qemu-devel] [PATCH v7 16/24] aspeed/scu: Use qemu_guest_getrandom_nofail

2019-05-14 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of rolling our own error handling locally. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater

Re: [Qemu-devel] [PATCH v5 0/4] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190514162744.30398-1-lviv...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash time

[Qemu-devel] [PATCH v2 1/6] qemu-bridge-helper: Fix misuse of isspace()

2019-05-14 Thread Markus Armbruster
parse_acl_file() passes char values to isspace(). Undefined behavior when the value is negative. Not a security issue, because the characters come from trusted $prefix/etc/qemu/bridge.conf and the files it includes. Furthermore, isspace()'s locale-dependence means qemu-bridge-helper uses the

[Qemu-devel] [PATCH v2 2/6] tests/vhost-user-bridge: Fix misuse of isdigit()

2019-05-14 Thread Markus Armbruster
vubr_set_host() passes char values to isdigit(). Undefined behavior when the value is negative. Fix by using qemu_isdigit() instead. Signed-off-by: Markus Armbruster --- tests/vhost-user-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vhost-user-bridge.c

[Qemu-devel] [PULL 10/16] migration: update comments of migration bitmap

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Yi Wang Since the ram bitmap and the unsent bitmap are split by RAMBlock in commit 6b6712e, it's better to update the comments about them. Signed-off-by: Yi Wang Message-Id: <1555311089-18610-1-git-send-email-wang.y...@zte.com.cn> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr.

[Qemu-devel] [PULL 15/16] migration/ram.c: fix typos in comments

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang Signed-off-by: Wei Yang Message-Id: <20190510233729.15554-1-richardw.y...@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v7 10/24] cpus: Initialize pseudo-random seeds for all guest cpus

2019-05-14 Thread Richard Henderson
When the -seed option is given, call qemu_guest_random_seed_main, putting the subsystem into deterministic mode. Pass derived seeds to each cpu created; which is a no-op unless the subsystem is in deterministic mode. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [Qemu-devel] [PATCH for-4.1] q35: Revert to kernel irqchip

2019-05-14 Thread Alex Williamson
On Tue, 14 May 2019 12:46:47 -0600 Alex Williamson wrote: > Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed > the default for the pc-q35-4.0 machine type to use split irqchip, which > turned out to have disasterous effects on vfio-pci INTx support. KVM > resampling

[Qemu-devel] [PATCH v7 19/24] hw/misc/exynos4210_rng: Use qemu_guest_getrandom

2019-05-14 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/misc/exynos4210_rng.c | 11 --- 1 file changed, 4

Re: [Qemu-devel] [PATCH 00/13] target/arm/kvm: enable SVE in guests

2019-05-14 Thread Richard Henderson
On 5/14/19 9:03 AM, Andrea Bolognani wrote: > On Tue, 2019-05-14 at 14:53 +0200, Andrew Jones wrote: >> We already have sve-max-vq, so I'm not sure we want to rename it. > > Oh, I didn't realize that was the case. And of course it already > takes a number of quadwords as argument, I suppose?

[Qemu-devel] [PATCH v2] migration/dirty-bitmaps: change bitmap enumeration method

2019-05-14 Thread John Snow
Shift from looking at every root BDS to *every* BDS. This will migrate bitmaps that are attached to blockdev created nodes instead of just ones attached to emulated storage devices. Note that this will not migrate anonymous or internal-use bitmaps, as those are defined as having no name. This

Re: [Qemu-devel] [RFC PATCH 05/11] target/arm: fixup some of the commentary for arm-semi

2019-05-14 Thread Philippe Mathieu-Daudé
On 5/14/19 5:52 PM, Alex Bennée wrote: > This cleans up a number of the block comments to fit the proper style. > While we are at it we also reference the official specification and > document what the return register value can be. > > Signed-off-by: Alex Bennée Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH v6 00/25] Add qemu_getrandom and ARMv8.5-RNG etc

2019-05-14 Thread Richard Henderson
On 5/14/19 9:50 AM, Daniel P. Berrangé wrote: > On Tue, May 14, 2019 at 09:14:57AM -0700, Richard Henderson wrote: >> Yes, that would do it. We would need something in the test that forces the >> objects into the link. Without having yet looked at the test cases, any >> ideas? > > I don't

Re: [Qemu-devel] [PATCH v2 6/6] cutils: Simplify how parse_uint() checks for whitespace

2019-05-14 Thread Philippe Mathieu-Daudé
On 5/14/19 8:03 PM, Markus Armbruster wrote: > Use qemu_isspace() so we don't have to cast to unsigned char. > > Signed-off-by: Markus Armbruster > --- > util/cutils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/cutils.c b/util/cutils.c > index

[Qemu-devel] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()

2019-05-14 Thread Markus Armbruster
atoui() and get_index() pass char values to isdigit(). With a standard isdigit(), we'd get undefined behavior when the value is negative. Can't happen as char is unsigned on s390x. Even if it could, we're actually using isdigit() from pc-bios/s390-ccw/libc.h here, which works fine for negative

[Qemu-devel] [PULL 13/16] migration/savevm: wrap into qemu_loadvm_state_header()

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Wei Yang On source side, we have qemu_savevm_state_header() to send related data, while on the receiving side those steps are scattered in qemu_loadvm_state(). This patch wrap those related steps into qemu_loadvm_state_header() to make it friendly to read. Signed-off-by: Wei Yang

Re: [Qemu-devel] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()

2019-05-14 Thread Thomas Huth
On 14/05/2019 20.04, Christian Borntraeger wrote: > > > On 14.05.19 20:03, Markus Armbruster wrote: >> atoui() and get_index() pass char values to isdigit(). With a >> standard isdigit(), we'd get undefined behavior when the value is >> negative. Can't happen as char is unsigned on s390x.

[Qemu-devel] [PULL 06/16] migration/colo.c: Remove redundant input parameter

2019-05-14 Thread Dr. David Alan Gilbert (git)
From: Zhang Chen The colo_do_failover no need the input parameter. Signed-off-by: Zhang Chen Message-Id: <20190426090730.2691-2-chen.zh...@intel.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- include/migration/colo.h | 2 +- migration/colo-failover.c | 2

[Qemu-devel] [PATCH for-4.0.1] q35: Revert to kernel irqchip

2019-05-14 Thread Alex Williamson
Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed the default for the pc-q35-4.0 machine type to use split irqchip, which turned out to have disasterous effects on vfio-pci INTx support. KVM resampling irqfds are registered for handling these interrupts, but these are

[Qemu-devel] [PATCH v7 17/24] hw/misc/nrf51_rng: Use qemu_guest_getrandom_nofail

2019-05-14 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Use the *_nofail routine instead of error_abort directly. Reviewed-by: Laurent Vivier Reviewed-by: Joel Stanley Signed-off-by: Richard Henderson --- hw/misc/nrf51_rng.c | 4

[Qemu-devel] [PATCH v7 14/24] linux-user/aarch64: Use qemu_guest_getrandom for PAUTH keys

2019-05-14 Thread Richard Henderson
Use a better interface for random numbers than rand() * 3. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 2 -- linux-user/aarch64/cpu_loop.c | 29 ++-

[Qemu-devel] [PATCH v7 22/24] target/ppc: Use qemu_guest_getrandom for DARN

2019-05-14 Thread Richard Henderson
We now have an interface for guest visible random numbers. Acked-by: David Gibson Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git

Re: [Qemu-devel] [libvirt] QMP; unsigned 64-bit ints; JSON standards compliance

2019-05-14 Thread Markus Armbruster
Eric Blake writes: > On 5/13/19 8:53 AM, Markus Armbruster wrote: > >>> We have a few options >>> >>> 1. Use string format for values > 2^53-1, int format below that >>> 2. Use string format for all fields which are 64-bit ints whether >>> signed or unsigned >>> 3. Use string format for

[Qemu-devel] [PATCH v12 02/12] target/rx: TCG helper

2019-05-14 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- target/rx/helper.h| 31 target/rx/helper.c| 148 target/rx/op_helper.c | 481 ++ 3 files changed, 660 insertions(+) create mode 100644 target/rx/helper.h create mode 100644

[Qemu-devel] [PATCH v12 07/12] hw/char: RX62N serial communication interface (SCI)

2019-05-14 Thread Yoshinori Sato
This module supported only non FIFO type. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato --- include/hw/char/renesas_sci.h | 45 ++ hw/char/renesas_sci.c | 340

Re: [Qemu-devel] [PATCHv4 0/2] ui/curses: BSD portability fixes

2019-05-14 Thread Gerd Hoffmann
On Sat, Apr 27, 2019 at 08:33:05PM +0200, Samuel Thibault wrote: > BSD needs a few fixes for wide character manipulations. > > Difference with v1: > - Fix unitialized value in error message > > Difference with v2: > - Add cchar_t manipulation fix > > Difference with v3: > - use mbrtowc/wcrtomb

[Qemu-devel] [PULL 16/31] tcg/i386: Support vector variable shift opcodes

2019-05-14 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 2 +- tcg/i386/tcg-target.inc.c | 35 +++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index 241bf19413..b240633455 100644 ---

Re: [Qemu-devel] [PATCH v3] ui/console: Precautionary glBindTexture and surface->texture validation in surface_gl_update_texture

2019-05-14 Thread Gerd Hoffmann
On Tue, May 07, 2019 at 11:05:01AM +0300, Marcel Apfelbaum wrote: > From: HOU Qiming > > In a GVT-g setup with dmabuf and GTK GUI, the current 2D texture at > surface_gl_update_texture is not necessarily > surface->texture. Adding a glBindTexture fixes related crashes and > artifacts, and is

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-14 Thread Yan Zhao
On Mon, May 13, 2019 at 09:28:04PM +0800, Erik Skultety wrote: > On Fri, May 10, 2019 at 11:48:38AM +0200, Cornelia Huck wrote: > > On Fri, 10 May 2019 10:36:09 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Cornelia Huck (coh...@redhat.com) wrote: > > > > On Thu, 9 May 2019 17:48:26 +0100

[Qemu-devel] [PATCH v12 08/12] hw/rx: RX Target hardware definition

2019-05-14 Thread Yoshinori Sato
rx62n - RX62N cpu. rx-virt - RX QEMU virtual target. Signed-off-by: Yoshinori Sato --- include/hw/rx/rx.h| 7 ++ include/hw/rx/rx62n.h | 94 hw/rx/rx-virt.c | 105 ++ hw/rx/rx62n.c | 238

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-14 Thread Yan Zhao
On Tue, May 14, 2019 at 03:20:40PM +0800, Erik Skultety wrote: > On Tue, May 14, 2019 at 02:12:35AM -0400, Yan Zhao wrote: > > On Mon, May 13, 2019 at 09:28:04PM +0800, Erik Skultety wrote: > > > On Fri, May 10, 2019 at 11:48:38AM +0200, Cornelia Huck wrote: > > > > On Fri, 10 May 2019 10:36:09

Re: [Qemu-devel] [PATCH v4 1/3] VirtIO-RNG: Update default entropy source to `/dev/urandom`

2019-05-14 Thread Kashyap Chamarthy
On Tue, May 14, 2019 at 09:56:00AM +0200, Laurent Vivier wrote: > From: Kashyap Chamarthy > > When QEMU exposes a VirtIO-RNG device to the guest, that device needs a > source of entropy, and that source needs to be "non-blocking", like > `/dev/urandom`. However, currently QEMU defaults to the

Re: [Qemu-devel] [PATCH v4] s390: diagnose 318 info reset and migration support

2019-05-14 Thread Christian Borntraeger
On 14.05.19 10:50, David Hildenbrand wrote: > On 14.05.19 10:37, Christian Borntraeger wrote: >> >> >> On 14.05.19 09:28, David Hildenbrand wrote: >> But that can be tested using the runability information if I am not >> wrong. > > You mean the cpu level information, right? >>>

Re: [Qemu-devel] [PATCH v4] s390: diagnose 318 info reset and migration support

2019-05-14 Thread Christian Borntraeger
On 14.05.19 11:00, David Hildenbrand wrote: > On 14.05.19 10:56, Christian Borntraeger wrote: >> >> >> On 14.05.19 10:50, David Hildenbrand wrote: >>> On 14.05.19 10:37, Christian Borntraeger wrote: On 14.05.19 09:28, David Hildenbrand wrote: But that can be tested using

Re: [Qemu-devel] [PATCH 05/13] target/arm/kvm: Add kvm_arch_get/put_sve

2019-05-14 Thread Dave Martin
On Mon, May 13, 2019 at 05:58:59PM +0100, Richard Henderson wrote: > On 5/13/19 7:39 AM, Dave Martin wrote: > > On that point, could TCG easily be made to expose a larger vector length > > to the kernel? I'd be interested to see what happened. > > It would be easy enough to extend the maximum

Re: [Qemu-devel] [PATCH] nvme: add Get/Set Feature Timestamp support

2019-05-14 Thread Philippe Mathieu-Daudé
Hi Kenneth, On 4/5/19 11:41 PM, Kenneth Heitke wrote: > Signed-off-by: Kenneth Heitke > --- > hw/block/nvme.c | 120 +- > hw/block/nvme.h | 3 ++ > hw/block/trace-events | 2 + > include/block/nvme.h | 2 + > 4 files changed, 125

Re: [Qemu-devel] [PATCH] docs: provide documentation on the POWER9 XIVE interrupt controller

2019-05-14 Thread Peter Maydell
On Tue, 14 May 2019 at 07:46, Cédric Le Goater wrote: > > This documents the overall XIVE architecture and gives an overview of > the QEMU models. It also provides documentation on the 'info pic' > command. > > Signed-off-by: Cédric Le Goater > --- > docs/index.rst | 1 + >

[Qemu-devel] [PATCH] docs: provide documentation on the POWER9 XIVE interrupt controller

2019-05-14 Thread Cédric Le Goater
This documents the overall XIVE architecture and gives an overview of the QEMU models. It also provides documentation on the 'info pic' command. Signed-off-by: Cédric Le Goater --- docs/index.rst | 1 + docs/ppc/index.rst | 13 ++ docs/ppc/xive.rst | 344

[Qemu-devel] [PULL 04/31] tcg: Specify optional vector requirements with a list

2019-05-14 Thread Richard Henderson
Replace the single opcode in .opc with a null-terminated array in .opt_opc. We still require that all opcodes be used with the same .vece. Validate the contents of this list with CONFIG_DEBUG_TCG. All tcg_gen_*_vec functions will check any list active during .fniv expansion. Swap the active

Re: [Qemu-devel] [Bug 1826393] Re: QEMU 3.1.0 stuck waiting for 800ms (5 times slower) in pre-bios phase

2019-05-14 Thread Stefano Garzarella
On Mon, May 06, 2019 at 05:40:05PM -, Waldemar Kozaczuk wrote: > The last bios indeed helped. It knows runs under 200ms. > > Do you anticipate doing minor release of 3.1.0 with updated bios to address > this issue? Or users are expected to upgrade to QEMU 4.0.0? CCing Gerd I'm not sure we

Re: [Qemu-devel] [PATCH v8 2/6] virtio-pmem: Add virtio pmem driver

2019-05-14 Thread David Hildenbrand
On 10.05.19 17:51, Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_region object with the persistent memory > range information so that

Re: [Qemu-devel] [PATCH v4] s390: diagnose 318 info reset and migration support

2019-05-14 Thread Christian Borntraeger
On 14.05.19 09:28, David Hildenbrand wrote: But that can be tested using the runability information if I am not wrong. >>> >>> You mean the cpu level information, right? > > Yes, query-cpu-definition includes for each model runability information > via "unavailable-features" (valid under

Re: [Qemu-devel] [Bug 1826393] Re: QEMU 3.1.0 stuck waiting for 800ms (5 times slower) in pre-bios phase

2019-05-14 Thread Gerd Hoffmann
On Tue, May 14, 2019 at 10:04:14AM +0200, Stefano Garzarella wrote: > On Mon, May 06, 2019 at 05:40:05PM -, Waldemar Kozaczuk wrote: > > The last bios indeed helped. It knows runs under 200ms. > > > > Do you anticipate doing minor release of 3.1.0 with updated bios to address > > this issue?

Re: [Qemu-devel] How do we do user input bitmap properties?

2019-05-14 Thread Andrew Jones
On Tue, May 14, 2019 at 06:54:03AM +0200, Markus Armbruster wrote: > Andrew Jones writes: > > > On Thu, Apr 18, 2019 at 07:48:09PM +0200, Markus Armbruster wrote: > >> Daniel P. Berrangé writes: > >> > >> > On Thu, Apr 18, 2019 at 11:28:41AM +0200, Andrew Jones wrote: > >> >> Hi all, > >> >>

[Qemu-devel] [PATCH v12 06/12] hw/timer: RX62N internal timer modules

2019-05-14 Thread Yoshinori Sato
renesas_tmr: 8bit timer modules. renesas_cmt: 16bit compare match timer modules. This part use many renesas's CPU. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato --- include/hw/timer/renesas_cmt.h | 38

[Qemu-devel] [PATCH v12 09/12] Add rx-softmmu

2019-05-14 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- configure | 8 default-configs/rx-softmmu.mak | 3 +++ include/sysemu/arch_init.h | 1 + arch_init.c| 2 ++ hw/Kconfig | 1 + 5 files changed, 15 insertions(+) create mode 100644

[Qemu-devel] [PATCH v12 10/12] hw/registerfields.h: Add 8bit and 16bit register macros.

2019-05-14 Thread Yoshinori Sato
Some RX peripheral using 8bit and 16bit registers. Added 8bit and 16bit APIs. Signed-off-by: Yoshinori Sato --- include/hw/registerfields.h | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/include/hw/registerfields.h

[Qemu-devel] [PATCH v12 12/12] MAINTAINERS: Add RX

2019-05-14 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- MAINTAINERS | 19 +++ 1 file changed, 19 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a73a61a546..ef6a02702e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -272,6 +272,13 @@ F: include/hw/riscv/ F: linux-user/host/riscv32/ F:

Re: [Qemu-devel] [PATCH v3 3/3] contrib: add vhost-user-input

2019-05-14 Thread Gerd Hoffmann
On Mon, May 13, 2019 at 08:33:25PM +0200, Marc-André Lureau wrote: > Add a vhost-user input backend example, based on virtio-input-host > device. It takes an evdev path as argument, and can be associated with > a vhost-user-input device via a UNIX socket: > > $ vhost-user-input -p

Re: [Qemu-devel] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-14 Thread Cornelia Huck
On Tue, 14 May 2019 02:12:35 -0400 Yan Zhao wrote: > On Mon, May 13, 2019 at 09:28:04PM +0800, Erik Skultety wrote: > > In case of libvirt checking the compatibility, it won't matter how good the > > error message in the kernel log is and regardless of how many error states > > you > > want to

Re: [Qemu-devel] [PATCH v4] s390: diagnose 318 info reset and migration support

2019-05-14 Thread David Hildenbrand
>>> But that can be tested using the runability information if I am not wrong. >> >> You mean the cpu level information, right? Yes, query-cpu-definition includes for each model runability information via "unavailable-features" (valid under the started QEMU machine). >> >>> and others that

  1   2   3   4   >