Re: [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid

2019-05-09 Thread Markus Armbruster
Stefano Garzarella writes: > On Thu, May 09, 2019 at 04:54:35PM +0200, Markus Armbruster wrote: >> Stefano Garzarella writes: >> >> > Add a missing parentheses at the end of the error message, >> > when we have an invalid prefix len. >> > >> > Signed-off-by: Stefano Garzarella >> > --- >> >

[Qemu-devel] [PATCH] tests/libqtest: Remove unused global_qtest-related wrapper functions

2019-05-09 Thread Thomas Huth
A bunch of the wrapper functions that use global_qtest are not used anymore. Remove them to avoid that they are used in new code again. Signed-off-by: Thomas Huth --- tests/libqtest.c | 11 + tests/libqtest.h | 108 --- 2 files changed, 1

Re: [Qemu-devel] [PATCH 3/3] ramfb enhancement

2019-05-09 Thread Gerd Hoffmann
> --- a/hw/vfio/pci.c > +++ b/hw/vfio/pci.c > @@ -3080,8 +3080,10 @@ static void vfio_realize(PCIDevice *pdev, Error > **errp) > error_setg(errp, "xres and yres properties require > display=on"); > goto out_teardown; > } > -if (vdev->dpy->edid_regs ==

Re: [Qemu-devel] [PATCH 2/3] ramfb enhancement

2019-05-09 Thread Gerd Hoffmann
On Thu, May 09, 2019 at 03:58:02PM +0800, Hou Qiming wrote: > Only allow one resolution change per guest boot, which prevents a > crash when the guest writes garbage to the configuration space (e.g. > when rebooting). Hmm? Did you see that happen in practice? It is not easy to write to fw_cfg by

Re: [Qemu-devel] [PATCH 1/3] ramfb enhancement

2019-05-09 Thread Gerd Hoffmann
On Thu, May 09, 2019 at 03:57:24PM +0800, Hou Qiming wrote: > Pulled back the `qemu_create_displaysurface_guestmem` function to create > the display surface so that the guest memory gets properly unmaped. > > Signed-off-by: HOU Qiming > --- > hw/display/ramfb.c | 53

Re: [Qemu-devel] [PATCH v1 22/23] tests/qemu-iotests: re-format output to for make check-block

2019-05-09 Thread Thomas Huth
On 09/05/2019 18.59, Alex Bennée wrote: > This attempts to clean-up the output to better match the output of the > rest of the QEMU check system. This includes: > > - formatting as " TESTiotest: nnn" > - calculating time diff at the end > - only dumping config on failure > >

Re: [Qemu-devel] [PATCH v3 7/7] tests: Run the iotests during "make check" again

2019-05-09 Thread Thomas Huth
On 09/05/2019 20.08, Max Reitz wrote: > On 02.05.19 10:45, Thomas Huth wrote: >> People often forget to run the iotests before submitting patches or >> pull requests - this is likely due to the fact that we do not run the >> tests during our mandatory "make check" tests yet. Now that we've got >>

Re: [Qemu-devel] [PATCH 00/13] tests/vm: serial console autoinstall, misc fixes.

2019-05-09 Thread Gerd Hoffmann
On Thu, May 09, 2019 at 08:52:23PM +0200, Kamil Rytarowski wrote: > On 08.05.2019 10:56, Gerd Hoffmann wrote: > > This patch series changes the way virtual machines for test builds are > > managed. They are created locally on the developer machine now. The > > installer is booted on the serial

[Qemu-devel] [PATCH v2 8/8] scripts/qemu-binfmt-conf: Update for sparc64

2019-05-09 Thread Richard Henderson
Also note that we were missing the qemu_target_list entry for plain sparc; fix that at the same time. Signed-off-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh

[Qemu-devel] [PATCH v2 7/8] linux-user/sparc: Flush register windows before clone

2019-05-09 Thread Richard Henderson
As seen as the very first instruction of sys_clone in the kernel. Ideally this would be done in or before cpu_copy, and not with a separate explicit test vs the syscall number, but this is a more minimal solution. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 3 +++ 1 file

[Qemu-devel] [PATCH v2 2/8] linux-user: Pass the parent env to cpu_clone_regs

2019-05-09 Thread Richard Henderson
Implementing clone for sparc requires that we make modifications to both the parent and child cpu state. In all other cases, the new argument can be ignored. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- linux-user/aarch64/target_cpu.h| 3 ++- linux-user/alpha/target_cpu.h

[Qemu-devel] [PATCH v2 4/8] linux-user/sparc: Use WREG constants in sparc/target_cpu.h

2019-05-09 Thread Richard Henderson
This fixes a naming bug wherein we used "UREG_FP" to access the stack pointer. OTOH, the "UREG_FP" constant was also defined incorrectly such that it *did* reference the stack pointer. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 10 ++ 1 file changed, 2

[Qemu-devel] [PATCH v2 5/8] linux-user/sparc: Use WREG constants in sparc/signal.c

2019-05-09 Thread Richard Henderson
Remove the incorrectly defined UREG constants. Maddeningly, in some cases we used the correct constant getting the env register wrong, and in other cases we used the incorrect constant getting the env register right. In the case of getcontext/setcontext, we are aided by the fact that the "other"

[Qemu-devel] [PATCH v2 3/8] target/sparc: Define an enumeration for accessing env->regwptr

2019-05-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 33 + 1 file changed, 33 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 85b9665ccc..08f7d1a3c6 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -31,6 +31,39 @@

[Qemu-devel] [PATCH v2 0/8] linux-user sparc fixes

2019-05-09 Thread Richard Henderson
Version 1 was posted back in July 2018. Oops. ;-) https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg05788.html --- v1 cover letter There are at least 4 separate bugs preventing clone from working. (1) cpu_copy left both cpus sharing the same register window (!) (2) cpu_clone_regs did

[Qemu-devel] [PATCH v2 6/8] linux-user/sparc: Fix cpu_clone_regs

2019-05-09 Thread Richard Henderson
We failed to set the secondary return value in %o1 we failed to advance the PC past the syscall, we failed to adjust regwptr into the new structure, we stored the stack pointer into the wrong register. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 28

[Qemu-devel] [PATCH v2 1/8] linux-user: Disallow setting newsp for fork

2019-05-09 Thread Richard Henderson
Or really, just clone devolving into fork. This should not ever happen in practice. We do want to reserve calling cpu_clone_regs for the case in which we are actually performing a clone. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- linux-user/syscall.c | 7 +-- 1 file

Re: [Qemu-devel] [QEMU-PPC] [PATCH 05/13] target/ppc: Add privileged message send facilities

2019-05-09 Thread David Gibson
On Fri, May 03, 2019 at 03:53:08PM +1000, Suraj Jitindar Singh wrote: > Privileged message send facilities exist on POWER8 processors and later > and include a register and instructions which can be used to generate, > observe/modify the state of and clear privileged doorbell exceptions as >

Re: [Qemu-devel] [QEMU-PPC] [PATCH 08/13] target/ppc: Implement hcall H_SET_PARTITION_TABLE

2019-05-09 Thread David Gibson
On Fri, May 03, 2019 at 03:53:11PM +1000, Suraj Jitindar Singh wrote: > The hcall H_SET_PARTITION_TABLE is used by a guest acting as a nested > hypervisor to register the partition table entry for one of its guests > with the real hypervisor. > > Implement this hcall for a spapr guest. > >

Re: [Qemu-devel] [QEMU-PPC] [PATCH 07/13] target/ppc: Handle partition scoped radix tree translation

2019-05-09 Thread David Gibson
On Fri, May 03, 2019 at 03:53:10PM +1000, Suraj Jitindar Singh wrote: > Radix tree translation is a 2 step process: > > Process Scoped Translation: > Effective Address (EA) -> Virtual Address (VA) > > Paritition Scoped Translation: > Virtual Address (VA) -> Real Address (RA) > > Performed based

Re: [Qemu-devel] [PATCH v3 16/27] target/ppc: Convert to CPUClass::tlb_fill

2019-05-09 Thread David Gibson
On Thu, May 09, 2019 at 03:26:20PM -0700, Richard Henderson wrote: > Cc: qemu-...@nongnu.org > Cc: David Gibson > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/cpu.h| 7 +++ > target/ppc/mmu_helper.c | 22

Re: [Qemu-devel] [PATCH] Fix typo on "info pic" monitor cmd output for xive

2019-05-09 Thread David Gibson
On Thu, May 09, 2019 at 01:37:50PM +0530, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > Instead of LISN i.e "Logical Interrupt Source Number" as per > Xive PAPR document "info pic" prints as LSIN, let's fix it. > > Signed-off-by: Satheesh Rajendran Applied to ppc-for-4.1,

Re: [Qemu-devel] [QEMU-PPC] [PATCH 09/13] target/ppc: Implement hcall H_ENTER_NESTED

2019-05-09 Thread David Gibson
On Fri, May 03, 2019 at 03:53:12PM +1000, Suraj Jitindar Singh wrote: > The hcall H_ENTER_NESTED is used by a guest acting as a nested > hypervisor to provide the state of one of its guests which it would > like the real hypervisor to load onto the cpu and execute on its behalf. > > The hcall

Re: [Qemu-devel] [QEMU-PPC] [PATCH 06/13] target/ppc: Enforce that the root page directory size must be at least 5

2019-05-09 Thread David Gibson
On Fri, May 03, 2019 at 03:53:09PM +1000, Suraj Jitindar Singh wrote: > According to the ISA the root page directory size of a radix tree for > either process or partition scoped translation must be >= 5. > > Thus add this to the list of conditions checked when validating the > partition table

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

2019-05-09 Thread Yan Zhao
On Thu, May 09, 2019 at 11:24:49PM +0800, Cornelia Huck wrote: > On Wed, 8 May 2019 07:57:05 -0400 > Yan Zhao wrote: > > > On Tue, May 07, 2019 at 05:19:54PM +0800, Cornelia Huck wrote: > > > On Sun, 5 May 2019 21:49:04 -0400 > > > Yan Zhao wrote: > > > > > > > version attribute is used to

Re: [Qemu-devel] [PATCH 3/3] ramfb enhancement

2019-05-09 Thread Hou Qiming
> Please format the commit subject with a prefix and do not use the same > subject for all the pacthes > in the series, for this patch it can be something like: I'll resend the patches with improved title lines after other issues are cleared. Thanks for the advice. > Will this result in a silent

Re: [Qemu-devel] [PATCH 0/3] Optimize COLO related codes and description

2019-05-09 Thread Zhang, Chen
Hi Dave, I noticed that you have reviewed all the patches in this series, can you queue it? Thanks Zhang Chen > -Original Message- > From: Zhang, Chen > Sent: Friday, April 26, 2019 5:07 PM > To: Laurent Vivier ; Dr. David Alan Gilbert > ; Juan Quintela ; zhanghailiang > ; Markus

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

2019-05-09 Thread Richard Henderson
Cc: qemu-...@nongnu.org Cc: Peter Maydell Signed-off-by: Richard Henderson --- v3: Log errors with -d unimp, for lack of a better flag. --- target/arm/cpu.h| 5 + target/arm/cpu64.c | 1 + target/arm/helper.c | 44 3 files changed, 50

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

2019-05-09 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 v5 01/24] configure: Link test before auto-enabling crypto libraries

2019-05-09 Thread Richard Henderson
At least ubuntu 18.04 does not package static gnutls libraries. At least Fedora 30 does not ship static nettle and gcrypt libraries. Signed-off-by: Richard Henderson --- v5: Include nettle, gcrypt. --- configure | 72 +-- 1 file changed, 44

[Qemu-devel] [PATCH v5 10/24] util: Add qemu_guest_getrandom and associated routines

2019-05-09 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

[Qemu-devel] [PATCH v5 16/24] linux-user: Remove srand call

2019-05-09 Thread Richard Henderson
We no longer use rand() within linux-user. Cc: 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 e455bff1b7..5d1c6a115b 100644

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

2019-05-09 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

[Qemu-devel] [PATCH v5 17/24] aspeed/scu: Use qemu_guest_getrandom_nofail

2019-05-09 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. Cc: qemu-...@nongnu.org Cc: Andrew Jeffery Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[Qemu-devel] [PATCH v5 19/24] hw/misc/bcm2835_rng: Use qemu_guest_getrandom_nofail

2019-05-09 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. Cc: qemu-...@nongnu.org Cc: Andrew Baumann Reviewed-by: Laurent Vivier Reviewed-by: Philippe

[Qemu-devel] [PATCH v5 08/24] ui/vnc: Split out authentication_failed

2019-05-09 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 v5 18/24] hw/misc/nrf51_rng: Use qemu_guest_getrandom_nofail

2019-05-09 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. Cc: qemu-...@nongnu.org Reviewed-by: Laurent Vivier Reviewed-by: Joel Stanley Signed-off-by: Richard Henderson ---

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

2019-05-09 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 v5 11/24] cpus: Initialize pseudo-random seeds for all guest cpus

2019-05-09 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:

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

2019-05-09 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 v5 24/24] target/i386: Implement CPUID_EXT_RDRAND

2019-05-09 Thread Richard Henderson
We now have an interface for guest visible random numbers. Cc: Paolo Bonzini 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 | 55

[Qemu-devel] [PATCH v5 14/24] linux-user: Use qemu_guest_getrandom_nofail for AT_RANDOM

2019-05-09 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

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

2019-05-09 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. Cc: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v5 13/24] linux-user: Call qcrypto_init if not using -seed

2019-05-09 Thread Richard Henderson
Cc: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 7e704845c0..e455bff1b7 100644 ---

[Qemu-devel] [PATCH v5 04/24] crypto: Do not fail for EINTR during qcrypto_random_bytes

2019-05-09 Thread Richard Henderson
We can always get EINTR for read; /dev/urandom is no exception. Rearrange the order of tests for likelihood; allow degenerate buflen==0 case to perform a no-op zero-length read. This means that the normal success path is a straight line with a single test for success. Reviewed-by: Laurent

[Qemu-devel] [PATCH v5 05/24] crypto: Use O_CLOEXEC in qcrypto_random_init

2019-05-09 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 v5 23/24] target/ppc: Use qemu_guest_getrandom for DARN

2019-05-09 Thread Richard Henderson
We now have an interface for guest visible random numbers. Acked-by: David Gibson Signed-off-by: Richard Henderson --- v5: Do not loop for darn64; use sizeof. --- target/ppc/int_helper.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH v5 06/24] crypto: Use getrandom for qcrypto_random_bytes

2019-05-09 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 --- v3: If getrandom is not present, fall back on /dev/(u)random. --- crypto/random-platform.c | 37 - configure

[Qemu-devel] [PATCH v5 20/24] hw/misc/exynos4210_rng: Use qemu_guest_getrandom

2019-05-09 Thread Richard Henderson
The random number is intended for use by the guest. As such, we should honor the -seed argument for reproducibility. Cc: qemu-...@nongnu.org Cc: Igor Mitsyanko Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/misc/exynos4210_rng.c | 11

[Qemu-devel] [PATCH v5 02/24] crypto: Merge crypto-obj-y into libqemuutil.a

2019-05-09 Thread Richard Henderson
We will shortly need this in the user-only binaries, so drop the split into system and tools binaries. This also means that crypto-aes-obj-y can be merged back into crypto-obj-y. Cc: Daniel P. Berrangé Signed-off-by: Richard Henderson --- Makefile | 12 +--- Makefile.objs

[Qemu-devel] [PATCH v5 00/24] Add qemu_getrandom and ARMv8.5-RNG etc

2019-05-09 Thread Richard Henderson
Patches without review/ack: 0001-configure-Link-test-before-auto-enabling-crypto-l.patch 0002-crypto-Merge-crypto-obj-y-into-libqemuutil.a.patch 0022-target-arm-Implement-ARMv8.5-RNG.patch Changes since v4: * Do not autoenable nettle or gcrypt if linking is broken. Fixes --static on fedora

[Qemu-devel] [PATCH v5 09/24] ui/vnc: Use gcrypto_random_bytes for start_auth_vnc

2019-05-09 Thread Richard Henderson
Use a better interface for random numbers than rand(). Fail gracefully if for some reason we cannot use the crypto system. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Signed-off-by: Richard Henderson --- v2: Use qcrypto_random_bytes, not

Re: [Qemu-devel] [PATCH v3 2/2] docs: add Security chapter to the documentation

2019-05-09 Thread Li Qiang
Stefan Hajnoczi 于2019年5月9日周四 下午8:20写道: > This new chapter in the QEMU documentation covers the security > requirements that QEMU is designed to meet and principles for securely > deploying QEMU. > > It is just a starting point that can be extended in the future with more > information. > >

Re: [Qemu-devel] [PATCH v3 1/2] docs: add Secure Coding Practices to developer docs

2019-05-09 Thread Li Qiang
Stefan Hajnoczi 于2019年5月9日周四 下午8:20写道: > At KVM Forum 2018 I gave a presentation on security in QEMU: > https://www.youtube.com/watch?v=YAdRf_hwxU8 (video) > https://vmsplice.net/~stefan/stefanha-kvm-forum-2018.pdf (slides) > > This patch adds a guide to secure coding practices. This document >

Re: [Qemu-devel] [PATCH v2 00/10] refactor cpu topo into machine properties

2019-05-09 Thread Like Xu
On 2019/5/6 16:33, Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global smp_* variables they use currently. The purpose of getting rid of globals is disentangle layer violations and let's do it one step at a time by replacing the

Re: [Qemu-devel] [PATCH v1 16/23] tests/qemu-iotests/005: Add a sanity check for large sparse file support

2019-05-09 Thread Richard Henderson
On 5/9/19 9:59 AM, Alex Bennée wrote: > From: Thomas Huth > > "check -raw 005" fails when running on certain filesystems - these do not > support such large sparse files. Use the same check as in test 220 to > skip the test in this case. > > Suggested-by: Eric Blake > Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH v1 12/23] .travis.yml: enable aarch64-softmmu and alpha-softmmu tcg tests

2019-05-09 Thread Richard Henderson
On 5/9/19 9:59 AM, Alex Bennée wrote: > Signed-off-by: Alex Bennée > --- > .travis.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v1 06/23] editorconfig: add settings for .s/.S files

2019-05-09 Thread Richard Henderson
On 5/9/19 9:58 AM, Alex Bennée wrote: > We are starting to add assembler foe tests/tcg so lets make sure we > get the mode right. > > Signed-off-by: Alex Bennée > --- > .editorconfig | 5 + > 1 file changed, 5 insertions(+) Yay, thanks! Reviewed-by: Richard Henderson r~

[Qemu-devel] [PATCH v3 20/27] target/sparc: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Artyom Tarasenko Cc: Mark Cave-Ayland Signed-off-by: Richard Henderson --- v2: Keep user-only, sparc32, and sparc64 tlb_fill separate. v3: Assert !probe for sparc32. --- target/sparc/cpu.h | 5 ++-- target/sparc/cpu.c | 5 ++-- target/sparc/ldst_helper.c | 11 +---

[Qemu-devel] [PATCH v3 21/27] target/tilegx: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/tilegx/cpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/tilegx/cpu.c b/target/tilegx/cpu.c index b9d37105fa..b209c55387 100644 --- a/target/tilegx/cpu.c +++ b/target/tilegx/cpu.c @@

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-09 Thread Richard Henderson
On 5/9/19 9:58 AM, Alex Bennée wrote: > @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) > { > return NULL; > } > + > +static inline Chardev *semihosting_get_chardev(void) > +{ > +return NULL; > +} Isn't the point of this function to avoid... > -

[Qemu-devel] [PATCH v3 18/27] target/s390x: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: qemu-s3...@nongnu.org Cc: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/s390x/internal.h| 5 +-- target/s390x/cpu.c | 5 ++- target/s390x/excp_helper.c | 73

[Qemu-devel] [PATCH v3 16/27] target/ppc: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: qemu-...@nongnu.org Cc: David Gibson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/ppc/cpu.h| 7 +++ target/ppc/mmu_helper.c | 22 +- target/ppc/translate_init.inc.c | 5 ++--- target/ppc/user_only_helper.c | 14

[Qemu-devel] [PATCH v3 09/27] target/microblaze: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Edgar E. Iglesias Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/microblaze/cpu.h | 5 +- target/microblaze/cpu.c | 5 +- target/microblaze/helper.c| 107 ++

[Qemu-devel] [PATCH v3 25/27] tcg: Use CPUClass::tlb_fill in cputlb.c

2019-05-09 Thread Richard Henderson
We can now use the CPUClass hook instead of a named function. Create a static tlb_fill function to avoid other changes within cputlb.c. This also isolates the asserts within. Remove the named tlb_fill function from all of the targets. Reviewed-by: Peter Maydell Reviewed-by: Philippe

[Qemu-devel] [PATCH v3 23/27] target/unicore32: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Remove the user-only functions, as we no longer have a user-only config. Cc: Guan Xuetao Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/unicore32/cpu.h | 5 +++-- target/unicore32/cpu.c | 5 + target/unicore32/helper.c| 23 ---

[Qemu-devel] [PATCH v3 08/27] target/m68k: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/m68k/cpu.h | 5 ++- target/m68k/cpu.c | 2 +- target/m68k/helper.c| 87 ++--- target/m68k/op_helper.c | 15 --- 4 files changed, 50 insertions(+),

[Qemu-devel] [PATCH v3 27/27] tcg: Use tlb_fill probe from tlb_vaddr_to_host

2019-05-09 Thread Richard Henderson
Most of the existing users would continue around a loop which would fault the tlb entry in via a normal load/store. But for AArch64 SVE we have an existing emulation bug wherein we would mark the first element of a no-fault vector load as faulted (within the FFR, not via exception) just because

[Qemu-devel] [PATCH v3 24/27] target/xtensa: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Max Filippov Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/xtensa/cpu.h| 5 +++-- target/xtensa/cpu.c| 5 ++--- target/xtensa/helper.c | 39 ++- 3 files changed, 31

[Qemu-devel] [PATCH v3 07/27] target/lm32: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Michael Walle Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/lm32/cpu.h | 5 +++-- target/lm32/cpu.c | 5 ++--- target/lm32/helper.c| 12 +--- target/lm32/op_helper.c | 16 4 files changed, 14 insertions(+), 24 deletions(-)

[Qemu-devel] [PATCH v3 17/27] target/riscv: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Note that env->pc is removed from the qemu_log as that value is garbage. The PC isn't recovered until cpu_restore_state, called from cpu_loop_exit_restore, called from riscv_raise_exception. Cc: qemu-ri...@nongnu.org Cc: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Richard

[Qemu-devel] [PATCH v3 05/27] target/hppa: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 8 target/hppa/cpu.c| 5 ++--- target/hppa/mem_helper.c | 22 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH v3 26/27] tcg: Remove CPUClass::handle_mmu_fault

2019-05-09 Thread Richard Henderson
This hook is now completely replaced by tlb_fill. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qom/cpu.h | 3 --- accel/tcg/user-exec.c | 13 +++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git

[Qemu-devel] [PATCH v3 11/27] target/mips: Tidy control flow in mips_cpu_handle_mmu_fault

2019-05-09 Thread Richard Henderson
Since the only non-negative TLBRET_* value is TLBRET_MATCH, the subsequent test for ret < 0 is useless. Use early return to allow subsequent blocks to be unindented. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/helper.c | 54

[Qemu-devel] [PATCH v3 14/27] target/nios2: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Remove the leftover debugging cpu_dump_state. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/nios2/cpu.h| 5 +- target/nios2/cpu.c| 5 +- target/nios2/helper.c | 176

[Qemu-devel] [PATCH v3 19/27] target/sh4: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/sh4/cpu.h | 5 +- target/sh4/cpu.c | 5 +- target/sh4/helper.c| 197 - target/sh4/op_helper.c | 12 --- 4 files changed, 101 insertions(+), 118

[Qemu-devel] [PATCH v3 15/27] target/openrisc: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: Stafford Horne Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/openrisc/cpu.h | 5 ++-- target/openrisc/cpu.c | 5 ++-- target/openrisc/mmu.c | 65 ++- 3 files changed, 39 insertions(+), 36 deletions(-) diff --git

[Qemu-devel] [PATCH v3 12/27] target/mips: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Note that env->active_tc.PC is removed from the qemu_log as that value is garbage. The PC isn't recovered until cpu_restore_state, called from cpu_loop_exit_restore, called from do_raise_exception_err. Cc: Aleksandar Markovic Cc: Aleksandar Rikalo Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v3 22/27] target/tricore: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Acked-by: Bastian Koppelmann Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/tricore/cpu.h | 6 +++--- target/tricore/cpu.c | 1 + target/tricore/helper.c| 27 +++ target/tricore/op_helper.c | 26 -- 4

[Qemu-devel] [PATCH v3 01/27] tcg: Add CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
This hook will replace the (user-only mode specific) handle_mmu_fault hook, and the (system mode specific) tlb_fill function. The handle_mmu_fault hook was written as if there was a valid way to recover from an mmu fault, and had 3 possible return states. In reality, the only valid action is to

[Qemu-devel] [PATCH v3 06/27] target/i386: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
We do not support probing, but we do not need it yet either. Cc: Paolo Bonzini Cc: Eduardo Habkost Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/i386/cpu.h | 5 ++-- target/i386/cpu.c | 5 ++-- target/i386/excp_helper.c | 61

[Qemu-devel] [PATCH v3 04/27] target/cris: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Remove dumping of cpu state. Remove logging of PC, as that value is garbage until cpu_restore_state. Cc: Edgar E. Iglesias Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/cris/cpu.h | 5 +-- target/cris/cpu.c | 5 ++- target/cris/helper.c| 67

[Qemu-devel] [PATCH v3 02/27] target/alpha: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Keep user-only and system tlb_fill separate. --- target/alpha/cpu.h| 5 +++-- target/alpha/cpu.c| 5 ++--- target/alpha/helper.c | 30 +-

[Qemu-devel] [PATCH v3 10/27] target/mips: Pass a valid error to raise_mmu_exception for user-only

2019-05-09 Thread Richard Henderson
At present we give ret = 0, or TLBRET_MATCH. This gets matched by the default case, which falls through to TLBRET_BADADDR. However, it makes more sense to use a proper value. All of the tlb-related exceptions are handled identically in cpu_loop.c, so TLBRET_BADADDR is as good as any other.

[Qemu-devel] [PATCH v3 03/27] target/arm: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Cc: qemu-...@nongnu.org Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Reword a comment to match the new interface. --- target/arm/internals.h | 10 +++-- target/arm/cpu.c | 22 +- target/arm/helper.c| 98 ++

[Qemu-devel] [PATCH v3 13/27] target/moxie: Convert to CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Remove the user-only functions, as we don't have a user-only config. Fix the unconditional call to tlb_set_page, even if the translation failed. Cc: Anthony Green Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/moxie/cpu.h| 5 ++-- target/moxie/cpu.c| 5 ++--

[Qemu-devel] [PATCH v3 00/27] tcg: Add CPUClass::tlb_fill

2019-05-09 Thread Richard Henderson
Changes from v2: * Re-remove the cpu_dump_state from nios-linux-user. * Assert !probe for sparc32, undoing other mmureg changes. * Better describe the SVE bug fixed by the final patch. Patches without review: 0014-target-nios2-Convert-to-CPUClass-tlb_fill.patch

Re: [Qemu-devel] [PATCH 26/26] tcg: Use tlb_fill probe from tlb_vaddr_to_host

2019-05-09 Thread Richard Henderson
On 5/9/19 1:56 AM, Peter Maydell wrote: > On Thu, 9 May 2019 at 06:24, Richard Henderson > wrote: >> >> On 4/29/19 10:41 AM, Peter Maydell wrote: >>> On Wed, 3 Apr 2019 at 05:05, Richard Henderson >>> wrote: Most of the existing users would continue around a loop which would fault

Re: [Qemu-devel] [Question] Memory hotplug clarification for Qemu ARM/virt

2019-05-09 Thread Laszlo Ersek
On 05/09/19 18:35, Igor Mammedov wrote: > On Wed, 8 May 2019 22:26:12 +0200 > Laszlo Ersek wrote: > >> On 05/08/19 14:50, Robin Murphy wrote: >>> Hi Shameer, >>> >>> On 08/05/2019 11:15, Shameerali Kolothum Thodi wrote: Hi, This series here[0] attempts to add support for PCDIMM in

Re: [Qemu-devel] [PATCH v3 18/39] target/mips: Use env_cpu, env_archcpu

2019-05-09 Thread Aleksandar Markovic
On May 8, 2019 11:53 PM, "Philippe Mathieu-Daudé" wrote: > > Hi Richard, Aleksandar. > > On 5/8/19 4:32 PM, Richard Henderson wrote: > > On 5/8/19 1:15 AM, Aleksandar Markovic wrote: > >> > >> On May 8, 2019 2:19 AM, "Richard Henderson" < richard.hender...@linaro.org > >>

Re: [Qemu-devel] [PATCH v2 04/16] hw/arm/bcm2835: Use TYPE_PL011 instead of hardcoded string

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 9:41 AM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/arm/bcm2835_peripherals.c | 2 +- > include/hw/arm/bcm2835_peripherals.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH v2 05/16] hw/arm/bcm2835: Use object_initialize() on PL011State

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 9:42 AM Philippe Mathieu-Daudé wrote: > > To be coherent with the other peripherals contained in the > BCM2835PeripheralState structure, directly allocate the PL011State > (instead of using the pl011 uart as a pointer to a SysBusDevice). > > Initialize the PL011State with

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

2019-05-09 Thread Collin Walling
On 5/9/19 5:58 AM, Christian Borntraeger wrote: On 02.05.19 00:31, Collin Walling wrote: DIAGNOSE 0x318 (diag318) is a privileged s390x instruction that must be intercepted by SIE and handled via KVM. Let's introduce some functions to communicate between QEMU and KVM via ioctls. These will be

Re: [Qemu-devel] [PATCH v1 22/23] tests/qemu-iotests: re-format output to for make check-block

2019-05-09 Thread Eric Blake
On 5/9/19 3:38 PM, Alex Bennée wrote: >> Hm, this makes every iotest print two lines: >> >> $ ./check -T -qcow2 >> [...] >> 001 [20:06:27] -> [20:06:27] >> 001 0s (last 1s) > > Yes - it was a compromise to ensure we printed a start and end > timestamp but I guess we can fix it up with a bit more

Re: [Qemu-devel] [PATCH v3 32/39] cpu: Introduce cpu_set_cpustate_pointers

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 5:37 PM Richard Henderson wrote: > > Consolidate some boilerplate from foo_cpu_initfn. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > include/exec/cpu-all.h | 11 +++ >

Re: [Qemu-devel] [PATCH v1 22/23] tests/qemu-iotests: re-format output to for make check-block

2019-05-09 Thread Alex Bennée
Max Reitz writes: > On 09.05.19 18:59, Alex Bennée wrote: >> This attempts to clean-up the output to better match the output of the >> rest of the QEMU check system. This includes: >> >> - formatting as " TESTiotest: nnn" >> - calculating time diff at the end >> - only dumping

Re: [Qemu-devel] [PATCH v3 33/39] cpu: Introduce CPUNegativeOffsetState

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 5:26 PM Richard Henderson wrote: > > Nothing in there so far, but all of the plumbing done > within the target ArchCPU state. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > include/exec/cpu-all.h | 24

Re: [Qemu-devel] [PATCH v3 34/39] cpu: Move icount_decr to CPUNegativeOffsetState

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 5:35 PM Richard Henderson wrote: > > Amusingly, we had already ignored the comment to keep this value at the > end of CPUState. This restores the minimum negative offset from TCG_AREG0 > for code generation. > > For the couple of uses within qom/cpu.c, add a pointer from

Re: [Qemu-devel] [PATCH v3 30/39] target/xtensa: Use env_cpu, env_archcpu

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 5:37 PM Richard Henderson wrote: > > Move cpu_get_tb_cpu_state below the include of "exec/cpu-all.h" > so that the definition of env_cpu is available. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- >

Re: [Qemu-devel] [PATCH v3 29/39] target/unicore32: Use env_cpu, env_archcpu

2019-05-09 Thread Alistair Francis
On Tue, May 7, 2019 at 5:30 PM Richard Henderson wrote: > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/unicore32/cpu.h | 5 - > hw/unicore32/puv3.c | 2 +- > target/unicore32/helper.c

  1   2   3   4   >