[PATCH v1 24/28] tests/tcg/aarch64: add SVE iotcl test

2020-03-16 Thread Alex Bennée
This is a fairly bare-bones test of setting the various vector sizes for SVE which will only fail if the PR_SVE_SET_VL can't reduce the user-space vector length by powers of 2. However we will also be able to use it in a future test which exercises the GDB stub. Signed-off-by: Alex Bennée ---

[PATCH v1 23/28] tests/tcg/aarch64: add a gdbstub testcase for SVE registers

2020-03-16 Thread Alex Bennée
A very simple test case which sets and reads SVE registers while running a test case. We don't really need to compile a SVE binary for this case but we will later so keep it simple for now. Signed-off-by: Alex Bennée --- v5 - properly plumb in - skip if fails to connect ---

[PATCH v2 2/4] usb-serial: chunk data to wMaxPacketSize

2020-03-16 Thread Jason Andryuk
usb-serial has issues with xHCI controllers where data is lost in the VM. Inspecting the URBs in the guest, EHCI starts every 64 byte boundary (wMaxPacketSize) with a header. EHCI hands packets into usb_serial_token_in() with size 64, so these cannot cross the 64 byte boundary. The xHCI

[PATCH v6/v7 RESEND] qmp: constify QmpCommand and list

2020-03-16 Thread Marc-André Lureau
Since 0b69f6f72ce47a37a749b056b6d5ec64c61f11e8 "qapi: remove qmp_unregister_command()", the command list can be declared const. Signed-off-by: Marc-André Lureau Reviewed-by: Damien Hedde --- include/qapi/qmp/dispatch.h | 9 + monitor/monitor-internal.h | 2 +-

[PATCH v3 09/25] hw/pci-host: Use memory_region_init_rom() with read-only regions

2020-03-16 Thread Philippe Mathieu-Daudé
This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/prep.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/prep.c

Re: [PATCH v3 27/34] qemu-options: New -compat to set policy for deprecated interfaces

2020-03-16 Thread Marc-André Lureau
Hi On Sun, Mar 15, 2020 at 4:46 PM Markus Armbruster wrote: > > Policy is separate for input and output. > > Input policy can be "accept" (accept silently), or "reject" (reject > the request with an error). > > Output policy can be "accept" (pass on unchanged), or "hide" (filter > out the

[PATCH v2 4/4] usb-serial: Fix timeout closing the device

2020-03-16 Thread Jason Andryuk
Linux guests wait ~30 seconds when closing the emulated /dev/ttyUSB0. During that time, the kernel driver is sending many control URBs requesting GetModemStat (5). Real hardware returns a status with FTDI_THRE (Transmitter Holding Register) and FTDI_TEMT (Transmitter Empty) set. QEMU leaves them

Re: [PATCH 2/2] hw/rdma: avoid suspicious strncpy() use

2020-03-16 Thread Juan Quintela
Stefan Hajnoczi wrote: > gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) with sanitizers enabled > reports the following error: > > CC x86_64-softmmu/hw/rdma/vmw/pvrdma_dev_ring.o > In file included from /usr/include/string.h:495, > from include/qemu/osdep.h:101, >

Re: [PATCH v2 2/2] mmap-alloc: Include osdep.h before checking CONFIG_LINUX

2020-03-16 Thread Peter Maydell
On Mon, 16 Mar 2020 at 17:51, Eduardo Habkost wrote: > Yes, but both MAP_SYNC and MAP_SHARED_VALIDATE aren't available > if the host is not Linux. > > Defining MAP_SYNC to 0 on MIPS would restore the existing > behavior, so it seems like a reasonable step to fix the build > failure. But not even

[PATCH v3 20/25] hw/riscv: Let devices own the MemoryRegion they create

2020-03-16 Thread Philippe Mathieu-Daudé
Avoid orphan memory regions being added in the /unattached QOM container. This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/sifive_e.c | 6 +++--- hw/riscv/sifive_u.c | 2 +- 2 files

Re: [PATCH v2 5/8] ppc/spapr: Allow FWNMI on TCG

2020-03-16 Thread Greg Kurz
On Tue, 17 Mar 2020 00:26:10 +1000 Nicholas Piggin wrote: > There should no longer be a reason to prevent TCG providing FWNMI. > System Reset interrupts are generated to the guest with nmi monitor > command and H_SIGNAL_SYS_RESET. Machine Checks can not be injected > currently, but this could be

Re: [PATCH v2 4/8] ppc/spapr: Fix FWNMI machine check interrupt delivery

2020-03-16 Thread Cédric Le Goater
On 3/16/20 3:26 PM, Nicholas Piggin wrote: > FWNMI machine check delivery misses a few things that will make it fail > with TCG at least (which we would like to allow in future to improve > testing). I don't understand which issues are addressed in the patch. > It's not nice to scatter interrupt

Re: [PATCH 09/11] target/mips: Always enable CONFIG_SEMIHOSTING

2020-03-16 Thread Richard Henderson
On 3/16/20 5:00 AM, Philippe Mathieu-Daudé wrote: > On MIPS, the semihosting feature is always required on user-space. > > Signed-off-by: Philippe Mathieu-Daudé > --- > default-configs/mips-linux-user-common.mak | 4 > default-configs/mips-linux-user.mak| 2 ++ >

Re: [PATCH v2 8/9] hw/core: Add qdev stub for user-mode

2020-03-16 Thread Richard Henderson
On 3/15/20 5:11 PM, Philippe Mathieu-Daudé wrote: > While user-mode does not use peripherals (devices), it uses a > CPU which is a device. > In the next commit we will reduce the QAPI generated code for > user-mode. Since qdev.c calls qapi_event_send_device_deleted(), > let's add a stub for it. >

Re: [PATCH 1/2] migration: avoid suspicious strncpy() use

2020-03-16 Thread Eric Blake
On 3/16/20 1:09 PM, Philippe Mathieu-Daudé wrote: On 3/16/20 5:07 PM, Stefan Hajnoczi wrote: gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) with sanitizers enabled reports the following error: CC  migration/global_state.o    In file included from /usr/include/string.h:495,

Re: [PATCH v2 6/8] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector

2020-03-16 Thread Greg Kurz
On Tue, 17 Mar 2020 00:26:11 +1000 Nicholas Piggin wrote: > Provide for an alternate delivery location, -1 defaults to the > architected address. > > Signed-off-by: Nicholas Piggin > --- Reviewed-by: Greg Kurz > hw/ppc/spapr.c | 2 +- > target/ppc/cpu.h | 2 +- >

Re: [PATCH v3 01/34] qemu-doc: Belatedly document QMP command arg & result deprecation

2020-03-16 Thread Markus Armbruster
Eric Blake writes: > On 3/15/20 9:46 AM, Markus Armbruster wrote: >> A number of deprecated QMP arguments and results were missed in commit >> eb22aeca65 "docs: document deprecation policy & deprecated features in >> appendix" (v2.10.0): >> > >> >> Since then, we missed a few more: >> >> *

Re: [PATCH v13 Kernel 4/7] vfio iommu: Implementation of ioctl to for dirty pages tracking.

2020-03-16 Thread Kirti Wankhede
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1584384512; bh=doVOeLJvCHlyBrT5oFIdrSU0nDjHXrwn0mWTtTMPgy4=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:

Re: [PATCH 1/2] migration: avoid suspicious strncpy() use

2020-03-16 Thread Philippe Mathieu-Daudé
On 3/16/20 5:07 PM, Stefan Hajnoczi wrote: gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) with sanitizers enabled reports the following error: CC migration/global_state.o In file included from /usr/include/string.h:495, from

Re: [PATCH 05/11] Makefile: Write MINIKCONF variables as one entry per line

2020-03-16 Thread Richard Henderson
On 3/16/20 5:00 AM, Philippe Mathieu-Daudé wrote: > Having one entry per line helps reviews/refactors. As we are > going to modify the MINIKCONF variables, split them now to > ease further review. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Makefile | 6 -- > 1 file changed, 4

[PATCH v3 02/25] memory: Simplify memory_region_init_rom_nomigrate() to ease review

2020-03-16 Thread Philippe Mathieu-Daudé
memory_region_init_rom_nomigrate() has the same content than memory_region_init_ram_shared_nomigrate(), with setting the readonly mode. The code is easier to review as creating a readonly ram/shared/nomigrate region. Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v2 2/2] mmap-alloc: Include osdep.h before checking CONFIG_LINUX

2020-03-16 Thread Michael S. Tsirkin
On Mon, Mar 16, 2020 at 02:40:46PM -0400, Eduardo Habkost wrote: > On Mon, Mar 16, 2020 at 06:08:54PM +, Peter Maydell wrote: > > On Mon, 16 Mar 2020 at 17:51, Eduardo Habkost wrote: > > > Yes, but both MAP_SYNC and MAP_SHARED_VALIDATE aren't available > > > if the host is not Linux. > > > >

Re: [PATCH] qemu-deprecated: Remove text about Python 2

2020-03-16 Thread John Snow
On 1/30/20 5:09 PM, Philippe Mathieu-Daudé wrote: > On 1/15/20 6:16 PM, John Snow wrote: >> On 1/15/20 11:04 AM, Markus Armbruster wrote: >>> Daniel P. Berrangé writes: >>> On Tue, Jan 14, 2020 at 11:08:16AM +0100, Thomas Huth wrote: > On 13/01/2020 23.36, John Snow wrote: >>

[PATCH v3 08/25] hw/net: Use memory_region_init_rom() with read-only regions

2020-03-16 Thread Philippe Mathieu-Daudé
This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index

[PATCH v3 14/25] scripts/cocci: Patch to detect potential use of memory_region_init_rom

2020-03-16 Thread Philippe Mathieu-Daudé
Add a semantic patch to detect potential replacement of memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé --- .../memory-region-housekeeping.cocci | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v2] MAINTAINERS: Mark the LatticeMico32 target as orphan

2020-03-16 Thread Philippe Mathieu-Daudé
Michael Walle expressed his desire to orphan the lm32 target [*]: I guess it is time to pull the plug. Mainly, because I have no time for this anymore. I've always worked on this on my spare time and life changed. And secondly, I guess RISC-V is taking over ;) It has a far better

Re: [PATCH] MAINTAINERS: Mark the LatticeMico32 target as orphan

2020-03-16 Thread Michael Walle
Am 2020-03-16 13:26, schrieb Philippe Mathieu-Daudé: Michael Walle expressed his desire to orphan the lm32 target [*]: I guess it is time to pull the plug. Mainly, because I have no time for this anymore. I've always worked on this on my spare time and life changed. And secondly, I guess

[PATCH v2 0/8] FWNMI fixes / changes

2020-03-16 Thread Nicholas Piggin
Hi, Since v1, I fixed the intermediate compile error spotted by Greg, and rediffed the series on top of ppc-for-5.0, plus Alexey's patch ("spapr/rtas: Reserve space for RTAS blob and log"). The first 6 patches are otherwise unchanged since last posting. Patch 7 implements fwnim sreset

Re: [PATCH v3 02/34] qapi: Belatedly update doc comment for @wait deprecation

2020-03-16 Thread Marc-André Lureau
Hi On Sun, Mar 15, 2020 at 3:48 PM Markus Armbruster wrote: > > Commit a9b305ba29 "socket: allow wait=false for client socket" > deprecated use of @wait for client socket chardevs, but neglected to > update char.json's doc comment. Make up for that. > > Signed-off-by: Markus Armbruster

[PATCH v6 05/42] nvme: use constant for identify data size

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 40cb176dea3c..f716f690a594 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -679,7 +679,7 @@ static uint16_t

Re: [PULL 0/6] Audio 20200316 patches

2020-03-16 Thread Peter Maydell
are available in the Git repository at: > > git://git.kraxel.org/qemu tags/audio-20200316-pull-request > > for you to fetch changes up to 49f77e6faf36cddd84417f9080462413acdbcc27: > > audio: add audiodev format=f32 option d

[PATCH v6 00/42] nvme: support NVMe v1.3d, SGLs and multiple namespaces

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Hi, So this patchset kinda blew up in size (wrt. number of patches) after Maxim's comments (26 -> 42), but Maxim's comments about splitting up a bunch of the patches made a lot of sense. v6 primarily splits up the big nasty patches into more digestible parts. Specifically

[PATCH v2 8/8] ppc/spapr: Ignore common "ibm, nmi-interlock" Linux bug

2020-03-16 Thread Nicholas Piggin
Linux kernels call "ibm,nmi-interlock" in their system reset handlers contrary to PAPR. Returning an error because the CPU does not hold the interlock here causes Linux to print warning messages. PowerVM returns success in this case, so do the same for now. Signed-off-by: Nicholas Piggin ---

[PATCH v2 7/8] ppc/spapr: Implement FWNMI System Reset delivery

2020-03-16 Thread Nicholas Piggin
PAPR requires that if "ibm,nmi-register" succeeds, then the hypervisor delivers all system reset and machine check exceptions to the registered addresses. System Resets are delivered with registers set to the architected state, and with no interlock. Signed-off-by: Nicholas Piggin ---

Re: [PATCH v2 1/4] m25p80: Convert to support tracing

2020-03-16 Thread Cédric Le Goater
On 3/16/20 3:58 PM, Peter Maydell wrote: > On Mon, 16 Mar 2020 at 14:14, Cédric Le Goater wrote: >> >> Hello, >> >> On 2/17/20 4:47 PM, Cédric Le Goater wrote: >>> Hello all, >>> >>> On 2/6/20 7:32 PM, Guenter Roeck wrote: While at it, add some trace messages to help debug problems seen

[PATCH v6 28/42] nvme: verify validity of prp lists in the cmb

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Before this patch the device already supported this, but it did not check for the validity of it nor announced the support in the LISTS field. If some of the PRPs in a PRP list are in the CMB, then ALL entries must be there. This patch makes sure that is verified as well as

[PATCH v6 17/42] nvme: add log specific field to trace events

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen The LSP field is not used directly now, but include it in the trace. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 3 ++- hw/block/trace-events | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PATCH v6 37/42] nvme: refactor identify active namespace id list

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Prepare to support inactive namespaces. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index b89b96990f52..bf9fb500842a 100644 --- a/hw/block/nvme.c +++

[PATCH v6 27/42] nvme: add request mapping helper

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Introduce the nvme_map helper to remove some noise in the main nvme_rw function. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PATCH v6 21/42] nvme: bump supported version to v1.3

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 74061d08fd2e..26c4b6e69f72 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -44,6 +44,7 @@ #include "trace.h"

[PATCH v6 36/42] nvme: add support for scatter gather lists

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen For now, support the Data Block, Segment and Last Segment descriptor types. See NVM Express 1.3d, Section 4.4 ("Scatter Gather List (SGL)"). Signed-off-by: Klaus Jensen Acked-by: Keith Busch --- hw/block/nvme.c | 310 +++---

[PATCH v6 42/42] nvme: make lba data size configurable

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Acked-by: Keith Busch --- hw/block/nvme-ns.c | 7 ++- hw/block/nvme-ns.h | 4 +++- hw/block/nvme.c| 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index

[PATCH v6 33/42] nvme: use preallocated qsg/iov in nvme_dma_prp

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen Since clean up of the request qsg/iov has been moved to the common nvme_enqueue_req_completion function, there is no need to use a stack allocated qsg/iov in nvme_dma_prp. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by: Maxim Levitsky --- hw/block/nvme.c |

[PATCH v3 17/19] hw/arm: Automatically select the 'virt' machine on KVM

2020-03-16 Thread Philippe Mathieu-Daudé
When building a KVM-only QEMU, the 'virt' machine is a good default :) Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index d0903d8544..8e801cd15f 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@

Re: [PATCH 0/5] QEMU Gating CI

2020-03-16 Thread Peter Maydell
On Mon, 16 Mar 2020 at 12:26, Cleber Rosa wrote: > About the runners and the fact that the job is stuck without them, > the message seems straightforward enough, but I can't get to the > project configuration to look at the registered runners with my > current permissions (set as "developer").

[PULL 36/38] linux-user, aarch64: sync syscall numbers with kernel v5.5

2020-03-16 Thread Laurent Vivier
Use helper script scripts/gensyscalls.sh to generate the file. This change TARGET_NR_fstatat64 by TARGET_NR_newfstatat that is correct because definitions from linux are: arch/arm64/include/uapi/asm/unistd.h #define __ARCH_WANT_NEW_STAT include/uapi/asm-generic/unistd.h #if

[PATCH v6 38/42] nvme: support multiple namespaces

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen This adds support for multiple namespaces by introducing a new 'nvme-ns' device model. The nvme device creates a bus named from the device name ('id'). The nvme-ns devices then connect to this and registers themselves with the nvme device. This changes how an nvme device is

[PATCH v6 39/42] pci: allocate pci id for nvme

2020-03-16 Thread Klaus Jensen
From: Klaus Jensen The emulated nvme device (hw/block/nvme.c) is currently using an internal Intel device id. Prepare to change that by allocating a device id under the 1b36 (Red Hat, Inc.) vendor id. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by: Maxim Levitsky ---

[PULL 14/38] linux-user: introduce parameters to generate syscall_nr.h

2020-03-16 Thread Laurent Vivier
This will be used when we'll import syscall.tbl from the kernel Add a script to remove all the dependencies to syscall_nr.h that point to source directory and not to the build directory. The list of arch will be update while the generated files are added. Signed-off-by: Laurent Vivier

Re: [PATCH v3 09/34] tests/test-qmp-event: Use qobject_is_equal()

2020-03-16 Thread Marc-André Lureau
On Sun, Mar 15, 2020 at 3:48 PM Markus Armbruster wrote: > > Locally defined helper qdict_cmp_simple() implements just enough of a > comparison to serve here. Replace it by qobject_is_equal(), which > implements all of it. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau

[PULL 32/38] linux-user: update syscall.tbl from linux 0bf999f9c5e7

2020-03-16 Thread Laurent Vivier
Run scripts/update-syscalltbl.sh with linux commit 0bf999f9c5e7 Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-20-laur...@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/arm/syscall.tbl| 2 ++ linux-user/hppa/syscall.tbl | 2

[Bug 1866870] Re: KVM Guest pauses after upgrade to Ubuntu 20.04

2020-03-16 Thread Andreas Hasenack
Also crashed with the packages from the other ppa: ubuntu@f1:~$ qemu-system-x86_64 --help 2>&1|head -n 1 QEMU emulator version 4.2.0 (Debian 1:4.2-3ubuntu3~exp1) ubuntu@f1:~$ qemu-system-x86_64 --enable-kvm -cpu Penryn,vmx=on -m 512 --nodefaults --nographic qemu-system-x86_64: warning: host

Re: [PATCH v6 3/4] qcow2: add zstd cluster compression

2020-03-16 Thread Denis Plotnikov
On 16.03.2020 17:01, Eric Blake wrote: On 3/12/20 4:22 AM, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only

Re: [PATCH v2 1/4] m25p80: Convert to support tracing

2020-03-16 Thread Peter Maydell
On Mon, 16 Mar 2020 at 15:11, Cédric Le Goater wrote: > > On 3/16/20 3:58 PM, Peter Maydell wrote: > > On Mon, 16 Mar 2020 at 14:14, Cédric Le Goater wrote: > >> > >> Hello, > >> > >> On 2/17/20 4:47 PM, Cédric Le Goater wrote: > >>> Hello all, > >>> > >>> On 2/6/20 7:32 PM, Guenter Roeck wrote:

Re: [PATCH v3 08/34] tests/test-qmp-event: Simplify test data setup

2020-03-16 Thread Marc-André Lureau
On Sun, Mar 15, 2020 at 3:55 PM Markus Armbruster wrote: > > Building expected data with qdict_put() & friends is tedious to write > and hard to read. Parse them from string literals with > qdict_from_jsonf_nofail() instead. > > While there, use initializers instead of assignments for

[PATCH v3 08/19] target/arm: Add semihosting stub to allow building without TCG

2020-03-16 Thread Philippe Mathieu-Daudé
Semihosting requires TCG. When configured with --disable-tcg, the build fails because the 'do_arm_semihosting' is missing. Instead of adding more few more #ifdeffery to the helper code, add a stub. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/arm-semi-stub.c | 13 +

Re: [PATCH v3 04/34] docs/devel/qapi-code-gen: Document 'features' introspection

2020-03-16 Thread Eric Blake
On 3/15/20 9:46 AM, Markus Armbruster wrote: Commit 6a8c0b5102 "qapi: Add feature flags to struct types" neglected to update section "Client JSON Protocol introspection", and commit 23394b4c39 "qapi: Add feature flags to commands" didn't either. Make up for that. Signed-off-by: Markus

[PATCH v3 00/19] Support disabling TCG on ARM (part 2)

2020-03-16 Thread Philippe Mathieu-Daudé
Cover from Samuel Ortiz from (part 1) [1]: This patchset allows for building and running ARM targets with TCG disabled. [...] The rationale behind this work comes from the NEMU project where we're trying to only support x86 and ARM 64-bit architectures, without including the TCG code

Re: [PATCH v3 19/34] qapi/schema: Call QAPIDoc.connect_member() in just one place

2020-03-16 Thread Marc-André Lureau
On Sun, Mar 15, 2020 at 4:00 PM Markus Armbruster wrote: > > The .connect_doc() of classes that have QAPISchemaMember connect them > to their documentation. Change them to delegate the actual work to > new QAPISchemaMember.connect_doc(). Matches the .connect_doc() that > already exist. > >

[PULL 07/38] linux-user: do prlimit selectively

2020-03-16 Thread Laurent Vivier
From: Tobias Koch Analogous to what commit 5dfa88f7 did for setrlimit, this commit selectively ignores limits for memory-related resources in prlimit64 calls. This is to prevent too restrictive limits from causing QEMU itself to malfunction. Signed-off-by: Tobias Koch Reviewed-by: Laurent

[PATCH v3 10/19] target/arm: Restrict ARMv4 cpus to TCG accel

2020-03-16 Thread Philippe Mathieu-Daudé
KVM requires a cpu based on (at least) the ARMv7 architecture. Only enable the following ARMv4 CPUs when TCG is available: - StrongARM (SA1100/1110) - OMAP1510 (TI925T) Signed-off-by: Philippe Mathieu-Daudé --- default-configs/arm-softmmu.mak | 2 - target/arm/cpu.c| 33

Re: [PATCH v3 18/19] hw/arm: Do not build to 'virt' machine on Xen

2020-03-16 Thread Peter Maydell
On Mon, 16 Mar 2020 at 16:08, Philippe Mathieu-Daudé wrote: > > Xen on ARM does not use QEMU machines [*]. Disable the 'virt' > machine there to avoid odd errors such: > > CC i386-softmmu/hw/cpu/a15mpcore.o > hw/cpu/a15mpcore.c:28:10: fatal error: kvm_arm.h: No such file or directory >

[PULL 17/38] linux-user, m68k: add syscall table generation support

2020-03-16 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/m68k/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-5-laur...@vivier.eu> Signed-off-by: Laurent Vivier --- configure

Re: [PATCH] hw/arm/fsl-imx7: Instantiate apbh_dma and ocotp as unimplemented devices

2020-03-16 Thread Peter Maydell
On Fri, 13 Mar 2020 at 16:15, Guenter Roeck wrote: > > Instantiating apbh_dma and ocotp as unimplemented devices prevents crashes > when booting Linux. > > apbh_dma: > > [ 14.046518] Unhandled fault: external abort on non-linefetch (0x808) at > 0xd0852008 > [ 14.047287] pgd = (ptrval) > [

[PULL 15/38] linux-user, alpha: add syscall table generation support

2020-03-16 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/alpha/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-3-laur...@vivier.eu> Signed-off-by:

[PATCH v1 06/28] gdbstub: make GDBState static and have common init function

2020-03-16 Thread Alex Bennée
Instead of allocating make this entirely static. We shall reduce the size of the structure in later commits and dynamically allocate parts of it. We introduce an init and reset helper function to keep all the manipulation in one place. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson

[PULL 06/38] linux-user: Add AT_EXECFN auxval

2020-03-16 Thread Laurent Vivier
From: Lirong Yuan This change adds the support for AT_EXECFN auxval. Signed-off-by: Lirong Yuan Reviewed-by: Laurent Vivier Message-Id: <20200302193153.66415-1-yua...@google.com> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 2/2] hw/rdma: avoid suspicious strncpy() use

2020-03-16 Thread Stefan Hajnoczi
gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) with sanitizers enabled reports the following error: CC x86_64-softmmu/hw/rdma/vmw/pvrdma_dev_ring.o In file included from /usr/include/string.h:495, from include/qemu/osdep.h:101, from

Re: [PATCH v3 1/4] scripts: add a script to generate syscall_nr.h

2020-03-16 Thread Laurent Vivier
Le 16/03/2020 à 17:21, Taylor Simpson a écrit : > > >> -Original Message- >> From: Laurent Vivier >> Sent: Monday, March 16, 2020 3:56 AM >> To: qemu-devel@nongnu.org >> Cc: Laurent Vivier ; Richard Henderson >> ; Riku Voipio ; Taylor >> Simpson ; Alistair Francis >> >> Subject: [PATCH

[PATCH v3 14/19] target/arm: Restrict ARMv7 M-profile cpus to TCG accel

2020-03-16 Thread Philippe Mathieu-Daudé
A KVM-only build won't be able to run M-profile cpus. Only enable the following ARMv7 M-Profile CPUs when TCG is available: - Cortex-M3 - Cortex-M4 - Cortex-M33 Signed-off-by: Philippe Mathieu-Daudé --- default-configs/arm-softmmu.mak | 8 -- target/arm/cpu.c| 176

[PATCH v1 28/28] gdbstub: Fix single-step issue by confirming 'vContSupported+' feature to gdb

2020-03-16 Thread Alex Bennée
From: Changbin Du Recently when debugging an arm32 system on qemu, I found sometimes the single-step command (stepi) is not working. This can be reproduced by below steps: 1) start qemu-system-arm -s -S .. and wait for gdb connection. 2) start gdb and connect to qemu. In my case, gdb gets a

[PULL 29/38] linux-user, mips: add syscall table generation support

2020-03-16 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/mips/kernel/syscalls/syscall_o32.tbl v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Move the offset (4000) from the file to the Makefile.objs to be passed to syscallhdr.sh Rename on the fly fadvise64 to fadvise64_64. Signed-off-by:

[PULL 01/38] target/i386: Renumber EXCP_SYSCALL

2020-03-16 Thread Laurent Vivier
From: Richard Henderson We are not short of numbers for EXCP_*. There is no need to confuse things by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is only used for system mode and the latter is only used for user mode. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée

[PATCH v1 04/28] tests/docker: Update VirGL to v0.8.0

2020-03-16 Thread Alex Bennée
From: Philippe Mathieu-Daudé Building the qemu:debian-amd64 fails when building VirGL: make[2]: Entering directory '/usr/src/virglrenderer/src/gallium/auxiliary' CC cso_cache/cso_cache.lo CC cso_cache/cso_hash.lo CC os/os_misc.lo CC util/u_debug.lo

[PULL 37/38] linux-user, nios2: sync syscall numbers with kernel v5.5

2020-03-16 Thread Laurent Vivier
Use helper script scripts/gensyscalls.sh to generate the file. This adds TARGET_NR_llseek that was missing and remove syscalls 1024 to 1079. Add new syscalls from 288 (pkey_mprotect) to 434 (pidfd_open) Signed-off-by: Laurent Vivier Reviewed-by: Alistair Francis Message-Id:

[PATCH v1 05/28] travis.yml: Set G_MESSAGES_DEBUG do report GLib errors

2020-03-16 Thread Alex Bennée
From: Philippe Mathieu-Daudé Since commit f5852efa293 we can display GLib errors with the QEMU error reporting API. Set it to the 'error' level, as this helps understanding failures from QEMU calls to GLib on Travis-CI. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée

[PULL 05/38] linux-user: Flush out implementation of gettimeofday

2020-03-16 Thread Laurent Vivier
From: Richard Henderson The first argument, timeval, is allowed to be NULL. The second argument, timezone, was missing. While its use is deprecated, it is still present in the syscall. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id:

Re: [PATCH v2 3/8] ppc/spapr: Add FWNMI System Reset state

2020-03-16 Thread Cédric Le Goater
On 3/16/20 3:26 PM, Nicholas Piggin wrote: > The FWNMI option must deliver system reset interrupts to their > registered address, and there are a few constraints on the handler > addresses specified in PAPR. Add the system reset address state and > checks. > > Signed-off-by: Nicholas Piggin

[PULL 22/38] linux-user, ppc: add syscall table generation support

2020-03-16 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/ppc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h and to not generate the entry if entry point is sys_ni_syscall. Fix ppc/signal.c to define do_sigreturn() for TARGET_ABI32. Signed-off-by: Laurent Vivier Reviewed-by:

[PULL 34/38] linux-user,mips: update syscall-args-o32.c.inc

2020-03-16 Thread Laurent Vivier
Add a script to update the file from strace github and run it Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-22-laur...@vivier.eu> [lv: added file in MAINTAINERS] Signed-off-by: Laurent Vivier --- MAINTAINERS| 1 +

Re: [PULL 04/31] util/async: make bh_aio_poll() O(1)

2020-03-16 Thread Marc-André Lureau
Hi On Sat, Feb 22, 2020 at 9:51 AM Stefan Hajnoczi wrote: > > The ctx->first_bh list contains all created BHs, including those that > are not scheduled. The list is iterated by the event loop and therefore > has O(n) time complexity with respected to the number of created BHs. > > Rewrite BHs

[PATCH v2 3/4] usb-serial: Increase receive buffer to 496

2020-03-16 Thread Jason Andryuk
A FTDI USB adapter on an xHCI controller can send 512 byte USB packets. These are 8 * ( 2 bytes header + 62 bytes data). A 384 byte receive buffer is insufficient to fill a 512 byte packet, so bump the receive size to 496 ( 512 - 2 * 8 ). Signed-off-by: Jason Andryuk Reviewed-by: Samuel

[PATCH v1 13/28] target/i386: use gdb_get_reg helpers

2020-03-16 Thread Alex Bennée
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée --- v7 - remove stray space - fixup the floatx80 set/get routines --- target/i386/gdbstub.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff

Re: [PATCH v3 28/34] qapi: Implement deprecated-output=hide for QMP command results

2020-03-16 Thread Marc-André Lureau
Hi On Sun, Mar 15, 2020 at 4:11 PM Markus Armbruster wrote: > > This policy suppresses deprecated bits in output, and thus permits > "testing the future". Implement it for QMP command results. Example: > when QEMU is run with -compat deprecated-output=hide, then > > {"execute":

Re: [PATCH v3 11/34] qapi/schema: Clean up around QAPISchemaEntity.connect_doc()

2020-03-16 Thread Marc-André Lureau
On Sun, Mar 15, 2020 at 4:23 PM Markus Armbruster wrote: > > QAPISchemaEntity calls doc.connect_feature() in .check(). Improper > since commit ee1e6a1f6c8 split .connect_doc() off .check(). Move the > call. Requires making the children call super().connect_doc() as they > should. > >

Re: [PATCH v3 21/34] qapi: Inline do_qmp_dispatch() into qmp_dispatch()

2020-03-16 Thread Marc-André Lureau
On Sun, Mar 15, 2020 at 4:05 PM Markus Armbruster wrote: > > Both functions check @request is a QDict, and both have code for > QCO_NO_SUCCESS_RESP. This wasn't the case back when they were > created. It's a sign of muddled responsibilities. Inline. The next > commits will clean up some more.

[PULL 19/38] linux-user, sh4: add syscall table generation support

2020-03-16 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/sh/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier Reviewed-by: Taylor Simpson Message-Id: <20200310103403.3284090-7-laur...@vivier.eu> Signed-off-by: Laurent Vivier --- configure

Re: [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM

2020-03-16 Thread Halil Pasic
On Fri, 13 Mar 2020 12:31:22 -0400 Peter Xu wrote: > On Fri, Mar 13, 2020 at 11:29:59AM -0400, Michael S. Tsirkin wrote: > > On Fri, Mar 13, 2020 at 01:44:46PM +0100, Halil Pasic wrote: > > > [..] > > > > > > > > > > CCing Tom. @Tom does vhost-vsock work for you with SEV and current > > > > >

Re: [PATCH v2 2/8] ppc/spapr: Change FWNMI names

2020-03-16 Thread Greg Kurz
On Mon, 16 Mar 2020 22:48:45 +0530 Mahesh J Salgaonkar wrote: > On 2020-03-17 00:26:07 Tue, Nicholas Piggin wrote: > > The option is called "FWNMI", and it involves more than just machine > > checks, also machine checks can be delivered without the FWNMI option, > > so re-name various things to

[PATCH v1 18/28] target/arm: generate xml description of our SVE registers

2020-03-16 Thread Alex Bennée
We also expose a the helpers to read/write the the registers. Signed-off-by: Alex Bennée Acked-by: Richard Henderson --- v2 - instead of zNpM expose zN at sve_max_vq width - wrap union in union q(us), d(usf), s(usf), h(usf), b(us) v3 - add a vg pseudo register for current width -

[Bug 1866870] Re: KVM Guest pauses after upgrade to Ubuntu 20.04

2020-03-16 Thread Andreas Hasenack
Ok, upstream tag v4.2.0 and these configure options reproduced the crash: export LDFLAGS="-Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed" export CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g" Full configure output:

Re: [PATCH v3 13/34] qapi: Consistently put @features parameter right after @ifcond

2020-03-16 Thread Marc-André Lureau
On Sun, Mar 15, 2020 at 4:51 PM Markus Armbruster wrote: > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > scripts/qapi/commands.py | 6 +++--- > scripts/qapi/doc.py| 10 +- > scripts/qapi/introspect.py | 10 +- >

Re: [PATCH v3 17/34] qapi/schema: Reorder classes so related ones are together

2020-03-16 Thread Marc-André Lureau
Hi On Sun, Mar 15, 2020 at 4:05 PM Markus Armbruster wrote: > > Move QAPISchemaAlternateType up some, so that all QAPISchemaFOOType > are together. Move QAPISchemaObjectTypeVariants right behind its > users. not fond of churn, but ok Reviewed-by: Marc-André Lureau > > Signed-off-by: Markus

Re: [PATCH v1 21/28] configure: allow user to specify what gdb to use

2020-03-16 Thread Peter Maydell
On Mon, 16 Mar 2020 at 18:22, Alex Bennée wrote: > > This is useful, especially when testing relatively new gdbstub > features that might not be in distro packages yet. > > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson > --- > configure | 9 + > 1 file changed, 9

Re: [PATCH v2 2/8] ppc/spapr: Change FWNMI names

2020-03-16 Thread Greg Kurz
On Tue, 17 Mar 2020 00:26:07 +1000 Nicholas Piggin wrote: > The option is called "FWNMI", and it involves more than just machine > checks, also machine checks can be delivered without the FWNMI option, > so re-name various things to reflect that. > > Signed-off-by: Nicholas Piggin > ---

[PATCH v1 26/28] gdbstub: change GDBState.last_packet to GByteArray

2020-03-16 Thread Alex Bennée
From: Damien Hedde Remove the packet size upper limit by using a GByteArray instead of a statically allocated array for last_packet. Thus we can now send big packets. Also remove the last_packet_len field and use last_packet->len instead. Signed-off-by: Damien Hedde Reviewed-by: Philippe

Re: [PATCH 01/11] MAINTAINERS: Fix KVM path expansion glob

2020-03-16 Thread Richard Henderson
On 3/16/20 5:00 AM, Philippe Mathieu-Daudé wrote: > The KVM files has been moved from target-ARCH to the target/ARCH/ > folder in commit fcf5ef2a. Fix the pathname expansion. > > Fixes: fcf5ef2a ("Move target-* CPU file into a target/ folder") > Signed-off-by: Philippe Mathieu-Daudé > --- >

[PATCH v1 16/28] target/arm: explicitly encode regnum in our XML

2020-03-16 Thread Alex Bennée
This is described as optional but I'm not convinced of the numbering when multiple target fragments are sent. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - post inc param->n in place so we don't get out count wrong --- target/arm/cpu.h | 2 +- target/arm/gdbstub.c

Re: [PATCH 07/11] accel/Kconfig: Add the TCG selector

2020-03-16 Thread Richard Henderson
On 3/16/20 5:00 AM, Philippe Mathieu-Daudé wrote: > Expose the CONFIG_TCG selector to let minikconf.py uses it. > > When building with --disable-tcg build, this helps to deselect > devices that are TCG-dependent. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Makefile | 1 + >

[PATCH v1 14/28] gdbstub: extend GByteArray to read register helpers

2020-03-16 Thread Alex Bennée
Instead of passing a pointer to memory now just extend the GByteArray to all the read register helpers. They can then safely append their data through the normal way. We don't bother with this abstraction for write registers as we have already ensured the buffer being copied from is the correct

<    1   2   3   4   5   6   7   >