[PATCH-for-5.2 v3] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Philippe Mathieu-Daudé
We deprecated the support for the 'r4k' machine for the 5.0 release (commit d32dc61421), which means that our deprecation policy allows us to drop it in release 5.2. Remove the code. To repeat the rationale from the deprecation note: - this virtual machine has no specification - the Linux kernel d

Re: linux-user/elfload.c: Seeing a segfault in qemu with a binary with no data section

2020-11-02 Thread Stephen Long
Ahh whoops, I see the actual intended change was to replace "eppnt->p_filesz != 0" with "vaddr_len != 0", which isn't on master. Thanks, Stephen

[PATCH V1] vfio-pci: improved tracing

2020-11-02 Thread Steve Sistare
Print more info for existing trace points: trace_kvm_irqchip_add_msi_route trace_pci_update_mappings_del trace_pci_update_mappings_add Add new trace points: trace_kvm_irqchip_assign_irqfd trace_msix_table_mmio_write trace_vfio_dma_unmap trace_vfio_dma_map trace_vfio_region trace_

[PULL 09/12] virtiofsd: Add mount ID to the lo_inode key

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Using st_dev is not sufficient to uniquely identify a mount: You can mount the same device twice, but those are still separate trees, and e.g. by mounting something else inside one of them, they may differ. Using statx(), we can get a mount ID that uniquely identifies a mount. If

[PULL 11/12] tests/acceptance/boot_linux: Accept SSH pubkey

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Let download_cloudinit() take an optional pubkey, which subclasses of BootLinux can pass through setUp(). Signed-off-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Reviewed-by: Stefan Hajnoczi Message-Id: <20201102161859.156603-7-mre...@redhat

[PULL 08/12] meson.build: Check for statx()

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Check whether the glibc provides statx() and if so, define CONFIG_STATX. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Message-Id: <20201102161859.156603-4-mre...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- meson.build | 16 1 file changed,

[PULL 06/12] virtiofsd: Check FUSE_SUBMOUNTS

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz FUSE_SUBMOUNTS is a pure indicator by the kernel to signal that it supports submounts. It does not check its state in the init reply, so there is nothing for fuse_lowlevel.c to do but to check its existence and copy it into fuse_conn_info.capable. Signed-off-by: Max Reitz Revie

[PULL 01/12] migration: Unify reset of last_rb on destination node when recover

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu When postcopy recover happens, we need to reset last_rb after each return of postcopy_pause_fault_thread() because that means we just got the postcopy migration continued. Unify this reset to the place right before we want to kick the fault thread again, when we get the command MI

[PULL 07/12] virtiofsd: Add attr_flags to fuse_entry_param

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz fuse_entry_param is converted to fuse_attr on the line (by fill_entry()), so it should have a member that mirrors fuse_attr.flags. fill_entry() should then copy this fuse_entry_param.attr_flags to fuse_attr.flags. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Message-I

[PULL 02/12] migration: Postpone the kick of the fault thread after recover

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Peter Xu The new migrate_send_rp_req_pages_pending() call should greatly improve destination responsiveness because it will resync faulted address after postcopy recovery. However it is also the 1st place to initiate the page request from the main thread. One thing is overlooked on that m

[PULL 12/12] tests/acceptance: Add virtiofs_submounts.py

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz This test invokes several shell scripts to create a random directory tree full of submounts, and then check in the VM whether every submount has its own ID and the structure looks as expected. (Note that the test scripts must be non-executable, so Avocado will not try to execute

[PULL 05/12] virtiofsd: Fix the help message of posix lock

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Jiachen Zhang The commit 88fc107956a5812649e5918e0c092d3f78bb28ad disabled remote posix locks by default. But the --help message still says it is enabled by default. So fix it to output no_posix_lock. Signed-off-by: Jiachen Zhang Message-Id: <20201027081558.29904-1-zhangjiachen.jay...@byt

[PULL 10/12] virtiofsd: Announce sub-mount points

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Max Reitz Whenever we encounter a directory with an st_dev or mount ID that differs from that of its parent, we set the FUSE_ATTR_SUBMOUNT flag so the guest can create a submount for it. We only need to do so in lo_do_lookup(). The following functions return a fuse_attr object: - lo_creat

Re: [PATCH RFC] memory: pause all vCPUs for the duration of memory transactions

2020-11-02 Thread Peter Xu
Vitaly, On Mon, Oct 26, 2020 at 09:49:16AM +0100, Vitaly Kuznetsov wrote: > Currently, KVM doesn't provide an API to make atomic updates to memmap when > the change touches more than one memory slot, e.g. in case we'd like to > punch a hole in an existing slot. > > Reports are that multi-CPU Q35

[PULL 03/12] virtiofsd: Seccomp: Add 'send' for syslog

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On ppc, and some other archs, it looks like syslog ends up using 'send' rather than 'sendto'. Reference: https://github.com/kata-containers/kata-containers/issues/1050 Reported-by: amulm...@in.ibm.com Signed-off-by: Dr. David Alan Gilbert Message-Id: <20201102150

[PULL 00/12] migration queue

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit b139d11ae198aba0e009daddf7a3370ce84b2d09: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201102' into staging (2020-11-02 16:05:47 +) are available in the Git repository at: gi

[PULL 04/12] tools/virtiofsd: Check vu_init() return value (CID 1435958)

2020-11-02 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé Since commit 6f5fd837889, vu_init() can fail if malloc() returns NULL. This fixes the following Coverity warning: CID 1435958 (#1 of 1): Unchecked return value (CHECKED_RETURN) Fixes: 6f5fd837889 ("libvhost-user: support many virtqueues") Reviewed-by: Dr. David A

Does QEMU's coverity-scan run need to track coverity issues in dtb or slirp ?

2020-11-02 Thread Peter Maydell
Currently QEMU's Coverity-Scan project has a bunch of unresolved issues in code in dtc/ and also in slirp/. (I suspect most of them are actually false-positives that got re-reported when we switched to Meson and the filenames changed, or some similar event.) Do dtc and slirp as upstream projects a

Re: linux-user/elfload.c: Seeing a segfault in qemu with a binary with no data section

2020-11-02 Thread Stephen Long
I think that a variant of that patch made it into master: /* * Some segments may be completely empty without any backing file * segment, in that case just let zero_bss allocate an empty buffer * for it. */ if (eppnt->p_fil

[PATCH 1/1] pvpanic: Advertise the PVPANIC_CRASHLOADED event support

2020-11-02 Thread Alejandro Jimenez
Advertise both types of events supported when the guest OS queries the pvpanic device. Currently only PVPANIC_PANICKED is exposed; PVPANIC_CRASHLOADED must also be advertised. Fixes: 7dc58deea79a ("pvpanic: implement crashloaded event handling") Signed-off-by: Alejandro Jimenez Acked-by: Mark Kan

Re: VFIO Migration

2020-11-02 Thread Alex Williamson
Cc+ Intel folks as this really bumps into the migration compatibility discussion[1][2][3] On Mon, 2 Nov 2020 11:11:53 + Stefan Hajnoczi wrote: > There is discussion about VFIO migration in the "Re: Out-of-Process > Device Emulation session at KVM Forum 2020" thread. The current status > is

Re: [PATCH] qtest: add a reproducer for LP#1878642

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 7:23 PM, Paolo Bonzini wrote: > On 02/11/20 17:33, Alexander Bulekov wrote: >> https://bugs.launchpad.net/qemu/+bug/1878642 >> >> Suggested-by: Paolo Bonzini >> Signed-off-by: Alexander Bulekov >> --- >> >> Based-on: <20200717151705.18611-1-f4...@amsat.org> >> >> The added testcase wil

Re: [PATCH] cutils: replace strdup with g_strdup

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 7:22 PM, Paolo Bonzini wrote: > Memory returned by get_relocated_path must be freed with > free or g_free depending on the path that the function > took; Coverity takes exception to this practice. The > fix lets caller use g_free as is standard in QEMU. > > While at it, mention the req

Re: linux-user/elfload.c: Seeing a segfault in qemu with a binary with no data section

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 7:30 PM, Stephen Long wrote: > Hi, we are seeing a segfault in qemu in the following code snippet in > zero_bss(): > > if (host_start < host_map_start) { > memset((void *)host_start, 0, host_map_start - host_start); > } > > The elf doesn't have a data section, so host_start isn't ma

Re: [PATCH v3 7/7] tests/acceptance: Add virtiofs_submounts.py

2020-11-02 Thread Eduardo Habkost
On Mon, Nov 02, 2020 at 05:18:59PM +0100, Max Reitz wrote: > This test invokes several shell scripts to create a random directory > tree full of submounts, and then check in the VM whether every submount > has its own ID and the structure looks as expected. > > (Note that the test scripts must be

Re: [PATCH-for-5.2] hw/virtio/vhost-vdpa: Fix Coverity CID 1432864

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 6:31 PM, Peter Maydell wrote: > On Wed, 28 Oct 2020 at 15:45, Philippe Mathieu-Daudé > wrote: >> >> Fix uninitialized value issues reported by Coverity: >> >> Field 'msg.reserved' is uninitialized when calling write(). >> >> Fixes: a5bd05800f8 ("vhost-vdpa: batch updating IOTLB mappi

[PATCH-for-5.2 v2] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Philippe Mathieu-Daudé
We deprecated the support for the 'r4k' machine for the 5.0 release (commit d32dc61421), which means that our deprecation policy allows us to drop it in release 5.2. Remove the code. To repeat the rationale from the deprecation note: - this virtual machine has no specification - the Linux kernel d

Re: [PATCH-for-5.2] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 5:00 PM, Richard Henderson wrote: > On 11/2/20 2:26 AM, Philippe Mathieu-Daudé wrote: >> -mips ``r4k`` platform (since 5.0) >> +mips ``r4k`` platform (removed in 5.2) >> ' > > Header underline needs adjustment. Otherwise, Indeed: Warning, treated as e

Re: [PATCH] virtiofsd: Fix the help message of posix lock

2020-11-02 Thread Dr. David Alan Gilbert
* Jiachen Zhang (zhangjiachen.jay...@bytedance.com) wrote: > The commit 88fc107956a5812649e5918e0c092d3f78bb28ad disabled remote > posix locks by default. But the --help message still says it is enabled > by default. So fix it to output no_posix_lock. > > Signed-off-by: Jiachen Zhang Thanks, Qu

Re: [PATCH-for-5.2 v2] tools/virtiofsd: Check vu_init() return value (CID 1435958)

2020-11-02 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > Since commit 6f5fd837889, vu_init() can fail if malloc() returns NULL. > > This fixes the following Coverity warning: > > CID 1435958 (#1 of 1): Unchecked return value (CHECKED_RETURN) > > Fixes: 6f5fd837889 ("libvhost-user: support many v

linux-user/elfload.c: Seeing a segfault in qemu with a binary with no data section

2020-11-02 Thread Stephen Long
Hi, we are seeing a segfault in qemu in the following code snippet in zero_bss(): if (host_start < host_map_start) { memset((void *)host_start, 0, host_map_start - host_start); } The elf doesn't have a data section, so host_start isn't mapped. I'm not sure whether this is a qemu issue or the

Re: [PATCH] virtiofsd: Seccomp: Add 'send' for syslog

2020-11-02 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, Nov 02, 2020 at 03:07:50PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > On ppc it looks like syslog ends up using 'send' rather than 'sendto'. > > > > Reference: https://github.com/kata-containe

Re: [PATCH] qtest: add a reproducer for LP#1878642

2020-11-02 Thread Paolo Bonzini
On 02/11/20 17:33, Alexander Bulekov wrote: > https://bugs.launchpad.net/qemu/+bug/1878642 > > Suggested-by: Paolo Bonzini > Signed-off-by: Alexander Bulekov > --- > > Based-on: <20200717151705.18611-1-f4...@amsat.org> > > The added testcase will fail, unless this ^^^ patch is applied. > > t

Re: [PATCH 0/2] migration: Two extra fixes

2020-11-02 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This should fix intermittent hang of migration-test due to the latest update > to > postcopy recovery. > > Thanks, Queued > > Peter Xu (2): > migration: Unify reset of last_rb on destination node when recover > migration: Postpone the kick of the fau

[PATCH] cutils: replace strdup with g_strdup

2020-11-02 Thread Paolo Bonzini
Memory returned by get_relocated_path must be freed with free or g_free depending on the path that the function took; Coverity takes exception to this practice. The fix lets caller use g_free as is standard in QEMU. While at it, mention the requirements on the caller in the doc comment. Suggeste

Re: [PATCH 2/2] migration: Postpone the kick of the fault thread after recover

2020-11-02 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The new migrate_send_rp_req_pages_pending() call should greatly improve > destination responsiveness because it will resync faulted address after > postcopy recovery. However it is also the 1st place to initiate the page > request from the main thread. > >

Re: [PATCH 0/2] migration: Two extra fixes

2020-11-02 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This should fix intermittent hang of migration-test due to the latest update > to > postcopy recovery. > > Thanks, Queued > > Peter Xu (2): > migration: Unify reset of last_rb on destination node when recover > migration: Postpone the kick of the fau

[RFC PATCH 2/6] ebpf: Added basic eBPF API.

2020-11-02 Thread Andrew Melnychenko
From: Andrew Added basic functions for creating eBPF maps and loading programs. Also added helper function to 'fix' eBPF map descriptors in programs. During runtime, different values of eBPF map file descriptors created, and it required to place them into eBPF instructions for proper work. It's s

Re: [PATCH 1/2] migration: Unify reset of last_rb on destination node when recover

2020-11-02 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > When postcopy recover happens, we need to reset last_rb after each return of > postcopy_pause_fault_thread() because that means we just got the postcopy > migration continued. > > Unify this reset to the place right before we want to kick the fault thread >

[RFC PATCH 4/6] ebpf: Added eBPF RSS loader.

2020-11-02 Thread Andrew Melnychenko
From: Andrew Added function that loads RSS eBPF program. Added stub functions for RSS eBPF. Added meson and configuration options. Signed-off-by: Sameeh Jubran Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- configure| 36 ++ ebpf/ebpf-stub.c | 28

[RFC PATCH 6/6] docs: Added eBPF documentation.

2020-11-02 Thread Andrew Melnychenko
From: Andrew Also, added maintainers information. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- MAINTAINERS | 6 +++ docs/ebpf.rst | 29 +++ docs/ebpf_rss.rst | 129 ++ 3 files changed, 164 insertions(+)

Re: [PATCH v3 4/6] hw/misc: Add npcm7xx random number generator

2020-11-02 Thread Havard Skinnemoen
On Mon, Nov 2, 2020 at 9:14 AM Peter Maydell wrote: > > On Mon, 2 Nov 2020 at 16:50, Havard Skinnemoen wrote: > > But none of this is really specific to the RNG test, so I can remove > > it if you prefer for consistency. > > I would prefer us to be consistent. If you want to propose > don't-stop-

[RFC PATCH 3/6] ebpf: Added eBPF RSS program.

2020-11-02 Thread Andrew Melnychenko
From: Andrew RSS program and Makefile to build it. Also, added a python script that would generate '.h' file. The data in that file may be loaded by eBPF API. EBPF compilation is not required for building qemu. You can use Makefile if you need to regenerate tun_rss_steering.h. Signed-off-by: Yur

[RFC PATCH 1/6] net: Added SetSteeringEBPF method for NetClientState.

2020-11-02 Thread Andrew Melnychenko
From: Andrew For now, that method supported only by Linux TAP. Linux TAP uses TUNSETSTEERINGEBPF ioctl. TUNSETSTEERINGBPF was added 3 years ago. Qemu checks if it was defined before using. Signed-off-by: Andrew Melnychenko --- include/net/net.h | 2 ++ net/tap-bsd.c | 5 + net/tap-li

[RFC PATCH 5/6] virtio-net: Added eBPF RSS to virtio-net.

2020-11-02 Thread Andrew Melnychenko
From: Andrew When RSS is enabled the device tries to load the eBPF program to select RX virtqueue in the TUN. If eBPF can be loaded the RSS will function also with vhost (works with kernel 5.8 and later). Software RSS is used as a fallback with vhost=off when eBPF can't be loaded or when hash pop

[RFC PATCH 0/6] eBPF RSS support for virtio-net

2020-11-02 Thread Andrew Melnychenko
Basic idea is to use eBPF to calculate and steer packets in TAP. RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash. eBPF RSS allows us to use RSS with vhost TAP. This set of patches introduces the usage of eBPF for packet steering and R

Re: [PULL 1/1] linux-user: Support futex_time64

2020-11-02 Thread Peter Maydell
On Mon, 30 Mar 2020 at 11:31, Laurent Vivier wrote: > > From: Alistair Francis > > Add support for host and target futex_time64. If futex_time64 exists on > the host we try that first before falling back to the standard futex > syscall. Hi; I dunno why Coverity's only just noticed this, but in C

Re: [PULL 42/92] cutils: introduce get_relocated_path

2020-11-02 Thread Peter Maydell
On Mon, 2 Nov 2020 at 18:05, Peter Maydell wrote: > > On Thu, 24 Sep 2020 at 10:48, Paolo Bonzini wrote: > > > > Add the function that will compute a relocated version of the > > directories in CONFIG_QEMU_*DIR and CONFIG_QEMU_*PATH. > > > > Signed-off-by: Paolo Bonzini > > Hi; Coverity (CID 143

Re: [PULL 42/92] cutils: introduce get_relocated_path

2020-11-02 Thread Peter Maydell
On Thu, 24 Sep 2020 at 10:48, Paolo Bonzini wrote: > > Add the function that will compute a relocated version of the > directories in CONFIG_QEMU_*DIR and CONFIG_QEMU_*PATH. > > Signed-off-by: Paolo Bonzini Hi; Coverity (CID 1432882) points out a bug in this code: > include/qemu/cutils.h | 12

Re: [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap

2020-11-02 Thread Alex Williamson
On Mon, 2 Nov 2020 18:44:11 +0100 Paolo Bonzini wrote: > On 02/11/20 18:37, Alex Williamson wrote: > > I think we still have the issue at the vfio ioctl which takes __u64 iova > > and size parameters, in bytes. Therefore we cannot unmap an entire > > 64-bit address space with a single ioctl call

Re: [PULL v3 06/28] block/export: vhost-user block device backend server

2020-11-02 Thread Peter Maydell
On Fri, 23 Oct 2020 at 16:22, Stefan Hajnoczi wrote: > > From: Coiby Xu > > By making use of libvhost-user, block device drive can be shared to > the connected vhost-user client. Only one client can connect to the > server one time. > > Since vhost-user-server needs a block drive to be created fi

Re: [PATCH] target/riscv/csr.c : add space before the open parenthesis '('

2020-11-02 Thread Alistair Francis
On Thu, Oct 29, 2020 at 5:56 PM Xinhao Zhang wrote: > > Fix code style. Space required before the open parenthesis '('. > > Signed-off-by: Xinhao Zhang > Signed-off-by: Kai Deng > Reported-by: Euler Robot Reviewed-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 2 +- > 1 file ch

Re: [PATCH v4] hw/riscv: microchip_pfsoc: Correct DDR memory map

2020-11-02 Thread Alistair Francis
On Sun, Nov 1, 2020 at 9:06 AM Bin Meng wrote: > > From: Bin Meng > > When system memory is larger than 1 GiB (high memory), PolarFire SoC > maps it at address 0x10__. Address 0xC000_ and above is > aliased to the same 1 GiB low memory with different cache attributes. > > At present Q

Re: [PULL 12/12] hw/misc/sifive_u_otp: Add backend drive support

2020-11-02 Thread Peter Maydell
On Fri, 23 Oct 2020 at 16:27, Alistair Francis wrote: > > From: Green Wan > > Add '-drive' support to OTP device. Allow users to assign a raw file > as OTP image. Hi; Coverity reports some issues with this code (CID 1435959, CID 1435960, CID 1435961). They're all basically the same thing: in rea

Re: [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap

2020-11-02 Thread Paolo Bonzini
On 02/11/20 18:37, Alex Williamson wrote: > I think we still have the issue at the vfio ioctl which takes __u64 iova > and size parameters, in bytes. Therefore we cannot unmap an entire > 64-bit address space with a single ioctl call. We'd need to make use > of a flag to modify the ioctl behavior

Re: [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap

2020-11-02 Thread Alex Williamson
On Fri, 30 Oct 2020 19:19:14 +0100 Paolo Bonzini wrote: > On 30/10/20 18:26, Alex Williamson wrote: > >> > >> if (try_unmap) { > >> +if (llsize == int128_2_64()) { > >> +/* The unmap ioctl doesn't accept a full 64-bit span. */ > >> +llsize = int128_rshift(ll

Re: [PULL 0/1] xen queue 2020-11-02

2020-11-02 Thread Peter Maydell
available in the Git repository at: > > https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git > tags/pull-xen-20201102 > > for you to fetch changes up to 045b1d4dbb44da67f1f86efa75b02843c0e951ef: > > xen: rework

Re: [PATCH-for-5.2] hw/virtio/vhost-vdpa: Fix Coverity CID 1432864

2020-11-02 Thread Peter Maydell
On Wed, 28 Oct 2020 at 15:45, Philippe Mathieu-Daudé wrote: > > Fix uninitialized value issues reported by Coverity: > > Field 'msg.reserved' is uninitialized when calling write(). > > Fixes: a5bd05800f8 ("vhost-vdpa: batch updating IOTLB mappings") > Reported-by: Coverity (CID 1432864: UNINIT)

[PULL 24/26] scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments

2020-11-02 Thread Peter Maydell
The kerneldoc script currently emits Sphinx markup for a macro with arguments that uses the c:function directive. This is correct for Sphinx versions earlier than Sphinx 3, where c:macro doesn't allow documentation of macros with arguments and c:function is not picky about the syntax of what it is

Re: [PATCH v3 4/6] hw/misc: Add npcm7xx random number generator

2020-11-02 Thread Peter Maydell
On Mon, 2 Nov 2020 at 16:50, Havard Skinnemoen wrote: > But none of this is really specific to the RNG test, so I can remove > it if you prefer for consistency. I would prefer us to be consistent. If you want to propose don't-stop-on-asserts then we should set that consistently at some higher lev

[PULL 22/26] configure: Test that gio libs from pkg-config work

2020-11-02 Thread Peter Maydell
On some hosts (eg Ubuntu Bionic) pkg-config returns a set of libraries for gio-2.0 which don't actually work when compiling statically. (Specifically, the returned library string includes -lmount, but not -lblkid which -lmount depends upon, so linking fails due to missing symbols.) Check that the

[PULL 23/26] hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work

2020-11-02 Thread Peter Maydell
In gicv3_init_cpuif() we copy the ARMCPU gicv3_maintenance_interrupt into the GICv3CPUState struct's maintenance_irq field. This will only work if the board happens to have already wired up the CPU maintenance IRQ before the GIC was realized. Unfortunately this is not the case for the 'virt' boar

[PULL 20/26] hw/display/exynos4210_fimd: Fix potential NULL pointer dereference

2020-11-02 Thread Peter Maydell
From: AlexChen In exynos4210_fimd_update(), the pointer s is dereferinced before being check if it is valid, which may lead to NULL pointer dereference. So move the assignment to global_width after checking that the s is valid. Reported-by: Euler Robot Signed-off-by: Alex Chen Reviewed-by: Phi

[PULL 25/26] qemu-option-trace.rst.inc: Don't use option:: markup

2020-11-02 Thread Peter Maydell
Sphinx 3.2 is pickier than earlier versions about the option:: markup, and complains about our usage in qemu-option-trace.rst: ../../docs/qemu-option-trace.rst.inc:4:Malformed option description '[enable=]PATTERN', should look like "opt", "-opt args", "--opt args", "/opt args" or "+opt args"

[PULL 16/26] disas/capstone: Fix monitor disassembly of >32 bytes

2020-11-02 Thread Peter Maydell
If we're using the capstone disassembler, disassembly of a run of instructions more than 32 bytes long disassembles the wrong data for instructions beyond the 32 byte mark: (qemu) xp /16x 0x100 0100: 0x0005 0x54410001 0x0001 0x1000 0110: 0x 0x0004 0x

[PULL 21/26] target/arm: Get correct MMU index for other-security-state

2020-11-02 Thread Peter Maydell
In arm_v7m_mmu_idx_for_secstate() we get the 'priv' level to pass to armv7m_mmu_idx_for_secstate_and_priv() by calling arm_current_el(). This is incorrect when the security state being queried is not the current one, because arm_current_el() uses the current security state to determine which of the

[PULL 18/26] hw/arm/boot: fix SVE for EL3 direct kernel boot

2020-11-02 Thread Peter Maydell
From: Rémi Denis-Courmont When booting a CPU with EL3 using the -kernel flag, set up CPTR_EL3 so that SVE will not trap to EL3. Signed-off-by: Rémi Denis-Courmont Reviewed-by: Richard Henderson Message-id: 20201030151541.11976-1-r...@remlab.net Signed-off-by: Peter Maydell --- hw/arm/boot.c

[PULL 09/26] target/arm: Rename neon_load_reg64 to vfp_load_reg64

2020-11-02 Thread Peter Maydell
From: Richard Henderson The only uses of this function are for loading VFP double-precision values, and nothing to do with NEON. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-10-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- targ

[PULL 12/26] target/arm: Fix float16 pairwise Neon ops on big-endian hosts

2020-11-02 Thread Peter Maydell
In the neon_padd/pmax/pmin helpers for float16, a cut-and-paste error meant we were using the H4() address swizzler macro rather than the H2() which is required for 2-byte data. This had no effect on little-endian hosts but meant we put the result data into the destination Dreg in the wrong order

[PULL 19/26] hw/display/omap_lcdc: Fix potential NULL pointer dereference

2020-11-02 Thread Peter Maydell
From: AlexChen In omap_lcd_interrupts(), the pointer omap_lcd is dereferinced before being check if it is valid, which may lead to NULL pointer dereference. So move the assignment to surface after checking that the omap_lcd is valid and move surface_bits_per_pixel(surface) to after the surface as

[PULL 10/26] target/arm: Simplify do_long_3d and do_2scalar_long

2020-11-02 Thread Peter Maydell
From: Richard Henderson In both cases, we can sink the write-back and perform the accumulate into the normal destination temps. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-11-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- targe

[PULL 26/26] tests/qtest/npcm7xx_rng-test: Disable randomness tests

2020-11-02 Thread Peter Maydell
The randomness tests in the NPCM7xx RNG test fail intermittently but fairly frequently. On my machine running the test in a loop: while QTEST_QEMU_BINARY=./qemu-system-aarch64 ./tests/qtest/npcm7xx_rng-test; do true; done will fail in less than a minute with an error like: ERROR:../../tests/qtes

[PULL 17/26] hw/arm/smmuv3: Fix potential integer overflow (CID 1432363)

2020-11-02 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use the BIT_ULL() macro to ensure we use 64-bit arithmetic. This fixes the following Coverity issue (OVERFLOW_BEFORE_WIDEN): CID 1432363 (#1 of 1): Unintentional integer overflow: overflow_before_widen: Potentially overflowing expression 1 << scale with type

[PULL 08/26] target/arm: Add read/write_neon_element64

2020-11-02 Thread Peter Maydell
From: Richard Henderson Replace all uses of neon_load/store_reg64 within translate-neon.c.inc. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-9-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 26 ++

[PULL 15/26] target/arm: fix LORID_EL1 access check

2020-11-02 Thread Peter Maydell
From: Rémi Denis-Courmont Secure mode is not exempted from checking SCR_EL3.TLOR, and in the future HCR_EL2.TLOR when S-EL2 is enabled. Signed-off-by: Rémi Denis-Courmont Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/helper.c | 19 +-- 1 file changed,

[PULL 05/26] target/arm: Add read/write_neon_element32

2020-11-02 Thread Peter Maydell
From: Richard Henderson Model these off the aa64 read/write_vec_element functions. Use it within translate-neon.c.inc. The new functions do not allocate or free temps, so this rearranges the calling code a bit. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-6-richard.hender

[PULL 14/26] target/arm: fix handling of HCR.FB

2020-11-02 Thread Peter Maydell
From: Rémi Denis-Courmont HCR should be applied when NS is set, not when it is cleared. Signed-off-by: Rémi Denis-Courmont Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/arm/helpe

[PULL 03/26] target/arm: Use neon_element_offset in neon_load/store_reg

2020-11-02 Thread Peter Maydell
From: Richard Henderson These are the only users of neon_reg_offset, so remove that. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-4-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 14 ++ 1 fil

[PULL 13/26] target/arm: Fix VUDOT/VSDOT (scalar) on big-endian hosts

2020-11-02 Thread Peter Maydell
The helper functions for performing the udot/sdot operations against a scalar were not using an address-swizzling macro when converting the index of the scalar element into a pointer into the vm array. This had no effect on little-endian hosts but meant we generated incorrect results on big-endian

[PULL 06/26] target/arm: Expand read/write_neon_element32 to all MemOp

2020-11-02 Thread Peter Maydell
From: Richard Henderson We can then use this to improve VMOV (scalar to gp) and VMOV (gp to scalar) so that we simply perform the memory operation that we wanted, rather than inserting or extracting from a 32-bit quantity. These were the last uses of neon_load/store_reg, so remove them. Signed-

[PULL 07/26] target/arm: Rename neon_load_reg32 to vfp_load_reg32

2020-11-02 Thread Peter Maydell
From: Richard Henderson The only uses of this function are for loading VFP single-precision values, and nothing to do with NEON. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-8-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- targe

[PULL 01/26] target/arm: Introduce neon_full_reg_offset

2020-11-02 Thread Peter Maydell
From: Richard Henderson This function makes it clear that we're talking about the whole register, and not the 32-bit piece at index 0. This fixes a bug when running on a big-endian host. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-2-richard.hender...@linaro.org Reviewed-

[PULL 04/26] target/arm: Use neon_element_offset in vfp_reg_offset

2020-11-02 Thread Peter Maydell
From: Richard Henderson This seems a bit more readable than using offsetof CPU_DoubleU. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-5-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 13 - 1 f

[PULL 02/26] target/arm: Move neon_element_offset to translate.c

2020-11-02 Thread Peter Maydell
From: Richard Henderson This will shortly have users outside of translate-neon.c.inc. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-3-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 20 +++

[PULL 11/26] target/arm: Improve do_prewiden_3d

2020-11-02 Thread Peter Maydell
From: Richard Henderson We can use proper widening loads to extend 32-bit inputs, and skip the "widenfn" step. Signed-off-by: Richard Henderson Message-id: 20201030022618.785675-12-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c

[PULL 00/26] target-arm queue

2020-11-02 Thread Peter Maydell
Small pile of bug fixes for rc1. I've included my patches to get our docs building with Sphinx 3, just for convenience... -- PMM The following changes since commit b149dea55cce97cb226683d06af61984a1c11e96: Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20201

Re: [PATCH 00/12] block/export: vhost-user-blk server cleanups and tests

2020-11-02 Thread Stefan Hajnoczi
On Mon, Nov 02, 2020 at 05:43:19AM -0500, Michael S. Tsirkin wrote: > On Fri, Oct 30, 2020 at 08:42:22AM -0400, Michael S. Tsirkin wrote: > > On Tue, Oct 27, 2020 at 05:35:16PM +, Stefan Hajnoczi wrote: > > > This patch series solves some issues with the new vhost-user-blk-server > > > and > >

[PATCH V1] gdbstub: gdb support for suspended state

2020-11-02 Thread Steve Sistare
Modify the gdb server so a continue command appears to resume execution when in RUN_STATE_SUSPENDED. Do not print the next gdb prompt, but do not actually resume instruction fetch. While in this "fake" running mode, a ctrl-C returns the user to the gdb prompt. Signed-off-by: Steve Sistare ---

[PATCH] Revert "vhost-blk: set features before setting inflight feature"

2020-11-02 Thread Stefan Hajnoczi
This reverts commit adb29c027341ba095a3ef4beef6aaef86d3a520e. The commit broke -device vhost-user-blk-pci because the vhost_dev_prepare_inflight() function it introduced segfaults in vhost_dev_set_features() when attempting to access struct vhost_dev's vdev pointer before it has been assigned. To

Re: [PATCH 2/2] qapi: Fix missing headers in QMP Reference Manual

2020-11-02 Thread Daniel P . Berrangé
On Mon, Nov 02, 2020 at 09:15:50AM +0100, Markus Armbruster wrote: > Audio stuff is under "Miscellanea", and authorization stuff is under > "Input". Add suitable header doc comments to correct that. > > Cc: Gerd Hoffmann > Cc: Daniel P. Berrange > Signed-off-by: Markus Armbruster > --- > qapi

Re: [PATCH v4] hw/riscv: microchip_pfsoc: Correct DDR memory map

2020-11-02 Thread Alistair Francis
On Sun, Nov 1, 2020 at 9:06 AM Bin Meng wrote: > > From: Bin Meng > > When system memory is larger than 1 GiB (high memory), PolarFire SoC > maps it at address 0x10__. Address 0xC000_ and above is > aliased to the same 1 GiB low memory with different cache attributes. > > At present Q

Re: [PATCH v3 4/6] hw/misc: Add npcm7xx random number generator

2020-11-02 Thread Havard Skinnemoen
On Mon, Nov 2, 2020 at 3:36 AM Peter Maydell wrote: > > On Fri, 23 Oct 2020 at 22:06, Havard Skinnemoen > wrote: > > > > The RNG module returns a byte of randomness when the Data Valid bit is > > set. > > > > This implementation ignores the prescaler setting, and loads a new value > > into RNGD

Re: [PATCH 1/2] MAINTAINERS: Add QAPI schema modules to their subsystems

2020-11-02 Thread Daniel P . Berrangé
On Mon, Nov 02, 2020 at 09:15:49AM +0100, Markus Armbruster wrote: > Add the relevant QAPI schema modules to section Audio, QMP, Tracing, > Cryptography. > > Cc: Gerd Hoffmann > Cc: Stefan Hajnoczi > Cc: Daniel P. Berrange > Signed-off-by: Markus Armbruster > --- > MAINTAINERS | 6 ++ > 1

Re: [PATCH] virtiofsd: Seccomp: Add 'send' for syslog

2020-11-02 Thread Stefan Hajnoczi
On Mon, Nov 02, 2020 at 03:18:24PM +, Daniel P. Berrangé wrote: > On Mon, Nov 02, 2020 at 04:11:44PM +0100, Philippe Mathieu-Daudé wrote: > > On 11/2/20 4:07 PM, Dr. David Alan Gilbert (git) wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > On ppc it looks like syslog ends up using 'sen

Re: [PATCH 1/2] MAINTAINERS: Add QAPI schema modules to their subsystems

2020-11-02 Thread Stefan Hajnoczi
On Mon, Nov 02, 2020 at 09:15:49AM +0100, Markus Armbruster wrote: > Add the relevant QAPI schema modules to section Audio, QMP, Tracing, > Cryptography. > > Cc: Gerd Hoffmann > Cc: Stefan Hajnoczi > Cc: Daniel P. Berrange > Signed-off-by: Markus Armbruster > --- > MAINTAINERS | 6 ++ > 1

Re: [PATCH] tests/qtest/npcm7xx_rng-test: Disable randomness tests

2020-11-02 Thread Havard Skinnemoen
On Mon, Nov 2, 2020 at 7:24 AM Peter Maydell wrote: > > The randomness tests in the NPCM7xx RNG test fail intermittently > but fairly frequently. On my machine running the test in a loop: > while QTEST_QEMU_BINARY=./qemu-system-aarch64 > ./tests/qtest/npcm7xx_rng-test; do true; done > > will fai

Re: [RFC PATCH v2 00/37] cleanup qemu_init and make sense of command line processing

2020-11-02 Thread Paolo Bonzini
On 02/11/20 16:57, Igor Mammedov wrote: >> The main improvements with respect to v1 are: > series no longer applies to master > what commit if was based on? > It's based on 20201026143028.3034018-1-pbonz...@redhat.com (which you should be able to get through patchew). Paolo

[PATCH] qtest: add a reproducer for LP#1878642

2020-11-02 Thread Alexander Bulekov
https://bugs.launchpad.net/qemu/+bug/1878642 Suggested-by: Paolo Bonzini Signed-off-by: Alexander Bulekov --- Based-on: <20200717151705.18611-1-f4...@amsat.org> The added testcase will fail, unless this ^^^ patch is applied. tests/qtest/fuzz-test.c | 15 +++ 1 file changed, 15 in

Re: [PATCH 05/29] vl: split various early command line options to a separate function

2020-11-02 Thread Paolo Bonzini
On 02/11/20 16:30, Igor Mammedov wrote: > On Tue, 27 Oct 2020 14:21:20 -0400 > Paolo Bonzini wrote: > >> Various options affect the global state of QEMU including the rest of >> qemu_init, and they need to be called very early. Group them together >> in a function that is called at the beginning

Re: [PULL 90/92] hw/net/can: CTU CAN FD IP open hardware core emulation.

2020-11-02 Thread Peter Maydell
On Thu, 24 Sep 2020 at 11:21, Paolo Bonzini wrote: > > From: Jan Charvat > > The implementation of the model of complete open-source/design/hardware > CAN FD controller. The IP core project has been started and is maintained > by Ondrej Ille at Czech Technical University in Prague. > > CTU CAN FD

<    1   2   3   4   >