Re: [PATCH v2 2/3] hw/timer: Initial commit of Ibex Timer

2021-06-18 Thread Alistair Francis
On Fri, Jun 11, 2021 at 9:52 PM Paolo Bonzini wrote: > > On 11/06/21 01:01, Alistair Francis wrote: > > On Wed, Jun 9, 2021 at 5:57 PM Paolo Bonzini wrote: > >> > >> On 09/06/21 01:48, Alistair Francis wrote: > >>> Add support for the Ibex timer. This is used with the RISC-V > >>> mtime/mtimecmp

Re: [PULL 1/4] Hexagon (target/hexagon) fix bug in fLSBNEW*

2021-06-18 Thread Thomas Huth
On 17/06/2021 23.52, Taylor Simpson wrote: Change fLSBNEW/fLSBNEW0/fLSBNEW1 from copy to "x & 1" Remove gen_logical_not function Clean up fLSBNEWNOT to use andi-1 followed by xori-1 Test cases added to tests/tcg/hexagon/misc.c Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson ---

Re: [PATCH 2/4] fuzz: add an instrumentation filter

2021-06-18 Thread Philippe Mathieu-Daudé
On 6/17/21 9:53 PM, Alexander Bulekov wrote: > By default, -fsanitize=fuzzer instruments all code with coverage > information. However, this means that libfuzzer will track coverage over > hundreds of source files that are unrelated to virtual-devices. This > means that libfuzzer will optimize inpu

Re: [PATCH v5 2/2] hw/char: QOMify sifive_uart

2021-06-18 Thread Alistair Francis
On Wed, Jun 16, 2021 at 7:29 PM Lukas Jünger wrote: > > This QOMifies the SiFive UART model. Migration and reset have been > implemented. > > Signed-off-by: Lukas Jünger > Reviewed-by: Bin Meng Thanks! Applied to riscv-to-apply.next Alistair > --- > include/hw/char/sifive_uart.h | 11 ++--

[PATCH v3 0/3] OpenTitan: Add support for the RISC-V timer

2021-06-18 Thread Alistair Francis
V3: - Fix the value of the "infinite timer" Alistair Francis (3): hw/char/ibex_uart: Make the register layout private hw/timer: Initial commit of Ibex Timer hw/riscv: OpenTitan: Connect the mtime and mtimecmp timer include/hw/char/ibex_uart.h | 37 - include/hw/riscv/opentitan.h

[PATCH v3 1/3] hw/char/ibex_uart: Make the register layout private

2021-06-18 Thread Alistair Francis
We don't need to expose the register layout in the public header, so don't. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- include/hw/char/ibex_uart.h | 37 - hw/char/ibex_uart.c | 37 + 2 files changed,

[PATCH v3 2/3] hw/timer: Initial commit of Ibex Timer

2021-06-18 Thread Alistair Francis
Add support for the Ibex timer. This is used with the RISC-V mtime/mtimecmp similar to the SiFive CLINT. We currently don't support changing the prescale or the timervalue. Signed-off-by: Alistair Francis --- include/hw/timer/ibex_timer.h | 52 ++ hw/timer/ibex_timer.c | 305 ++

[PATCH v3 3/3] hw/riscv: OpenTitan: Connect the mtime and mtimecmp timer

2021-06-18 Thread Alistair Francis
Connect the Ibex timer to the OpenTitan machine. The timer can trigger the RISC-V MIE interrupt as well as a custom device interrupt. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- include/hw/riscv/opentitan.h | 5 - hw/riscv/opentitan.c | 14 +++--- 2 files chan

Re: [PATCH v2 02/11] keyval: introduce keyval_merge

2021-06-18 Thread Markus Armbruster
Paolo Bonzini writes: > This patch introduces a function that merges two keyval-produced > (or keyval-like) QDicts. It can be used to emulate the behavior of > .merge_lists = true QemuOpts groups, merging -readconfig sections and > command-line options in a single QDict, and also to implement -s

Re: [PATCH] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-18 Thread Greg Kurz
On Thu, 17 Jun 2021 21:40:07 -0400 Vivek Goyal wrote: > On Thu, Jun 17, 2021 at 04:15:18PM +0200, Greg Kurz wrote: > > A well behaved FUSE client uses FUSE_CREATE to create files. It isn't > > supposed to pass O_CREAT along a FUSE_OPEN request, as documented in > > the "fuse_lowlevel.h" header :

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Max Reitz
On 17.06.21 23:21, Vivek Goyal wrote: On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefor

Re: [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Max Reitz
On 09.06.21 17:55, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our lo_inode (and lo_inode_put() thus closes the FD). Therefore, lo_find

Re: [PATCH v5 5/6] ui/vnc: Use qcrypto_tls_creds_check_endpoint()

2021-06-18 Thread Daniel P . Berrangé
On Thu, Jun 17, 2021 at 02:18:29PM +0200, Philippe Mathieu-Daudé wrote: > Avoid accessing QCryptoTLSCreds internals by using > the qcrypto_tls_creds_check_endpoint() helper. > > Signed-off-by: Philippe Mathieu-Daudé > --- > ui/vnc.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-)

Re: [PATCH v5 6/6] crypto: Make QCryptoTLSCreds* structures private

2021-06-18 Thread Daniel P . Berrangé
On Thu, Jun 17, 2021 at 02:18:30PM +0200, Philippe Mathieu-Daudé wrote: > Code consuming the "crypto/tlscreds*.h" APIs doesn't need > to access its internals. Move the structure definitions to > the "tlscredspriv.h" private header (only accessible by > implementations). The public headers (in inclu

Re: [PULL 00/45] Memory, i386, compilation, bugfix changes for 2021-06-17

2021-06-18 Thread Peter Maydell
On Thu, 17 Jun 2021 at 10:36, Paolo Bonzini wrote: > > The following changes since commit 1ea06abceec61b6f3ab33dadb0510b6e09fb61e2: > > Merge remote-tracking branch > 'remotes/berrange-gitlab/tags/misc-fixes-pull-request' into staging > (2021-06-14 15:59:13 +0100) > > are available in the Git

Re: [PATCH v3 06/13] hw/i2c/ppc4xx_i2c: Replace i2c_send_recv() by i2c_recv() & i2c_send()

2021-06-18 Thread Philippe Mathieu-Daudé
On 6/18/21 1:49 AM, BALATON Zoltan wrote: > On Wed, 16 Jun 2021, Philippe Mathieu-Daudé wrote: >> On 6/16/21 10:01 PM, BALATON Zoltan wrote: >>> Having a send_recv in one func >>> allowed to avoid if-else in some places like these but if you think it's >>> better without this function at all I can

Re: [PATCH] i386: load kernel on xen using DMA

2021-06-18 Thread Alex Bennée
Marek Marczykowski-Górecki writes: > Kernel on Xen is loaded via fw_cfg. Previously it used non-DMA version, > which loaded the kernel (and initramfs) byte by byte. Change this > to DMA, to load in bigger chunks. > This change alone reduces load time of a (big) kernel+initramfs from > ~10s down

Re: [PATCH V3 1/6] block/rbd: bump librbd requirement to luminous release

2021-06-18 Thread Peter Lieven
Am 16.06.21 um 14:26 schrieb Ilya Dryomov: > On Wed, May 19, 2021 at 4:26 PM Peter Lieven wrote: >> even luminous (version 12.2) is unmaintained for over 3 years now. >> Bump the requirement to get rid of the ifdef'ry in the code. >> Qemu 6.1 dropped the support for RHEL-7 which was the last suppo

Re: [PATCH] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-18 Thread Miklos Szeredi
On Thu, 17 Jun 2021 at 16:15, Greg Kurz wrote: > > A well behaved FUSE client uses FUSE_CREATE to create files. It isn't > supposed to pass O_CREAT along a FUSE_OPEN request, as documented in > the "fuse_lowlevel.h" header : > > /** > * Open a file > * > * Open flags are availab

Re: [PATCH V3 5/6] block/rbd: add write zeroes support

2021-06-18 Thread Peter Lieven
Am 16.06.21 um 14:34 schrieb Ilya Dryomov: > On Wed, May 19, 2021 at 4:28 PM Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 37 - >> 1 file changed, 36 insertions(+), 1 deletion(-) >> >> diff --git a/block/rbd.c b/block/rbd.c >> ind

Re: [PATCH] hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582)

2021-06-18 Thread Yuval Shaia
Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia On Wed, 16 Jun 2021 at 14:06, Marcel Apfelbaum wrote: > From: Marcel Apfelbaum > > Ensure mremap boundaries not trusting the guest kernel to > pass the correct buffer length. > > Fixes: CVE-2021-3582 > Reported-by: VictorV (Kunlun Lab) > Tested

Re: [PATCH V3 4/6] block/rbd: migrate from aio to coroutines

2021-06-18 Thread Peter Lieven
Am 17.06.21 um 16:43 schrieb Ilya Dryomov: > On Wed, May 19, 2021 at 4:27 PM Peter Lieven wrote: >> Signed-off-by: Peter Lieven >> --- >> block/rbd.c | 255 ++-- >> 1 file changed, 87 insertions(+), 168 deletions(-) >> >> diff --git a/block/rbd.c b

[PATCH v2 0/2] execlog TCG plugin to log instructions

2021-06-18 Thread Alexandre Iooss
execlog is a plugin that logs executed instructions with some useful metadata including memory access. The output of the plugin is designed to be usable with other tools. For example it could be used with a side-channel leakage model to create side-channel traces from QEMU for security evaluation.

[PATCH v2 2/2] docs/devel: tvg-plugins: add execlog plugin description

2021-06-18 Thread Alexandre Iooss
This adds description of the execlog TCG plugin with an example. Signed-off-by: Alexandre Iooss --- docs/devel/tcg-plugins.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 18c6581d85..02818a3327 100644 -

[PATCH v2 1/2] contrib/plugins: add execlog to log instruction execution and memory access

2021-06-18 Thread Alexandre Iooss
Log instruction execution and memory access to a file. This plugin can be used for reverse engineering or for side-channel analysis using QEMU. Signed-off-by: Alexandre Iooss --- MAINTAINERS | 1 + contrib/plugins/Makefile | 1 + contrib/plugins/execlog.c | 123 +++

Re: [PATCH] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-18 Thread Greg Kurz
On Fri, 18 Jun 2021 10:58:33 +0200 Miklos Szeredi wrote: > On Thu, 17 Jun 2021 at 16:15, Greg Kurz wrote: > > > > A well behaved FUSE client uses FUSE_CREATE to create files. It isn't > > supposed to pass O_CREAT along a FUSE_OPEN request, as documented in > > the "fuse_lowlevel.h" header : > >

[RFC PATCH] tests/tcg: skip the signals test for hppa for now

2021-06-18 Thread Alex Bennée
While Richard has some patches that fix the instability on other architectures the hppa signal support still needs vdso support before we can make this reliable. So for now skip the test. Signed-off-by: Alex Bennée Cc: Richard Henderson --- tests/tcg/hppa/Makefile.target | 4 1 file change

Re: [PATCH] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-18 Thread Miklos Szeredi
On Fri, 18 Jun 2021 at 11:21, Greg Kurz wrote: > > On Fri, 18 Jun 2021 10:58:33 +0200 > Miklos Szeredi wrote: > > > On Thu, 17 Jun 2021 at 16:15, Greg Kurz wrote: > > > > > > A well behaved FUSE client uses FUSE_CREATE to create files. It isn't > > > supposed to pass O_CREAT along a FUSE_OPEN re

Re: [PATCH v5 2/9] qapi: replace List[str] by QAPISchemaIfCond

2021-06-18 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Jun 14, 2021 at 4:20 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Wrap the 'if' condition in a higher-level object. Not only does this >> >> I can see "wrap in an object". I'm afraid do

Re: [PATCH v5 9/9] qapi: make 'if' condition strings simple identifiers

2021-06-18 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Change the 'if' condition strings to be C-agnostic and be simple > identifiers. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Stefan Hajnoczi > Tested-by: John Snow [...] > diff --git a/tests/qapi-schema/doc-good.txt b/t

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-06-18 Thread Cornelia Huck
On Fri, Jun 18 2021, Eric Farman wrote: > The Interrupt Response Block is comprised of several other > structures concatenated together, but only the 12-byte > Subchannel-Status Word (SCSW) is defined as a proper struct. > Everything else is a simple array of 32-bit words. > > Let's define a prop

Re: [PATCH v5 3/9] qapi: make gen_if/gen_endif take a simple string

2021-06-18 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Jun 14, 2021 at 4:48 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Instead of building prepocessor conditions from a list of string, use >> > the result generated from QAPISchemaIfCond.cg

Re: [PATCH v4 0/4] s390x: Fix IRB sense data

2021-06-18 Thread Cornelia Huck
On Fri, Jun 18 2021, Eric Farman wrote: > Conny, et al, > > Here is a quick update to the series for fixing passthrough > sense data in the irb, using a subchannel-specific callback. > > As before, the first three patches are code refactoring. > Since patch 3 doesn't implement the callback for vf

Re: [PATCH 7/9] target/mips: Remove microMIPS BPOSGE32 / BPOSGE64 unuseful cases

2021-06-18 Thread Philippe Mathieu-Daudé
On 6/17/21 7:43 PM, Philippe Mathieu-Daudé wrote: > These switch cases for the microMIPS BPOSGE32 / BPOSGE64 opcodes have > been added commit 3c824109da0 ("target-mips: microMIPS ASE support"). > More than 11 years later it is safe to assume there won't be added > soon. The cases fall back to the d

Re: [PATCH v2 0/2] execlog TCG plugin to log instructions

2021-06-18 Thread Alexandre IOOSS
Supersedes: <20210614090116.816833-1-erdn...@crans.org> On 6/18/21 11:10 AM, Alexandre Iooss wrote: execlog is a plugin that logs executed instructions with some useful metadata including memory access. The output of the plugin is designed to be usable with other tools. For example it could be

Re: [PATCH v3 2/3] hw/timer: Initial commit of Ibex Timer

2021-06-18 Thread Bin Meng
On Fri, Jun 18, 2021 at 3:28 PM Alistair Francis wrote: > > Add support for the Ibex timer. This is used with the RISC-V > mtime/mtimecmp similar to the SiFive CLINT. > > We currently don't support changing the prescale or the timervalue. > > Signed-off-by: Alistair Francis > --- > include/hw/ti

Re: [PATCH v3 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2021-06-18 Thread Peter Maydell
On Thu, 17 Jun 2021 at 20:22, Peter Maydell wrote: > This will pick the first MR it finds that happens to be RAM (which > could be some tiny thing). You don't want that, you want specifically > whatever the board decided was the system RAM, which is the MemoryRegion > MachineState::ram. As a conc

Re: [PATCH qemu v21] spapr: Implement Open Firmware client interface

2021-06-18 Thread BALATON Zoltan
On Fri, 18 Jun 2021, Alexey Kardashevskiy wrote: On 6/17/21 21:29, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 17/06/2021 19:16, BALATON Zoltan wrote: On Thu, 17 Jun 2021, Alexey Kardashevskiy wrote: On 16/06/2021 20:34, BALATON Zoltan wrote: On Wed, 16 Jun 2021

Re: [PATCH V3 1/6] block/rbd: bump librbd requirement to luminous release

2021-06-18 Thread Ilya Dryomov
On Fri, Jun 18, 2021 at 10:58 AM Peter Lieven wrote: > > Am 16.06.21 um 14:26 schrieb Ilya Dryomov: > > On Wed, May 19, 2021 at 4:26 PM Peter Lieven wrote: > >> even luminous (version 12.2) is unmaintained for over 3 years now. > >> Bump the requirement to get rid of the ifdef'ry in the code. > >

[PATCH v6 00/11] qapi: untie 'if' conditions from C preprocessor

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series makes the 'if' conditions less liberal, by formalizing a simple expression tree based on bare boolean logic of configure option identifiers. (this allows to express conditions in Rust in my QAPI-Rust PoC series) thanks v6: after Markus review - drop th

[PATCH v6 01/11] docs: update the documentation upfront about schema configuration

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Update the documentation describing the changes in this series. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Tested-by: John Snow --- docs/devel/qapi-code-gen.txt | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-)

[PATCH v6 02/11] qapi: wrap Sequence[str] in an object

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Except for the special casing assert in _make_implicit_object_type(), which needs to handle schema objects, it's a mechanical change. Signed-off-by: Marc-André Lureau --- docs/sphinx/qapidoc.py | 10 +++--- scripts/qapi/commands.py | 4 +-- scripts/qapi/e

[PATCH v6 03/11] qapi: add QAPISchemaIfCond.is_present()

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/sphinx/qapidoc.py | 8 scripts/qapi/schema.py | 7 +-- tests/qapi-schema/test-qapi.py | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapid

[PATCH v6 04/11] qapi: _make_enum_members() to work with pre-built QAPISchemaIfCond

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Instead of lowering the expression back to its original form, and having to convert it again, special-case the 'if' condition to be pre-built. Signed-off-by: Marc-André Lureau --- scripts/qapi/schema.py | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-)

[PATCH v6 07/11] qapi: replace if condition list with dict {'all': [...]}

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Replace the simple list sugar form with a recursive structure that will accept other operators in the following commits (all, any or not). Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py| 23 +-- scripts/qapi/expr.py

[PATCH v6 05/11] qapi: introduce QAPISchemaIfCond.cgen()

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Instead of building prepocessor conditions from a list of string, use the result generated from QAPISchemaIfCond.cgen() and hide the implementation details. Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py | 35 ++- scripts

[PATCH v6 06/11] qapidoc: introduce QAPISchemaIfCond.docgen()

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Instead of building the condition documentation from a list of string, use the result generated from QAPISchemaIfCond.docgen(). Signed-off-by: Marc-André Lureau --- docs/sphinx/qapidoc.py | 14 -- scripts/qapi/common.py | 6 ++ scripts/qapi/schema.py |

[PATCH v6 08/11] qapi: add 'any' condition

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/unit/test-qmp-cmds.c | 1 + scripts/qapi/common.py | 4 ++-- scripts/qapi/expr.py| 6 +++--- tests/qapi-schema/bad-if.err| 2 +- tests/qapi-schema/doc-good.json

[PATCH v6 10/11] qapi: add 'not' condition operation

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau For the sake of completeness, introduce the 'not' condition. Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py | 4 scripts/qapi/expr.py| 7 +-- tests/qapi-schema/bad-if.err| 2 +- tests/qapi-schema/doc

[PATCH v6 11/11] qapi: make 'if' condition strings simple identifiers

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Change the 'if' condition strings to be C-agnostic and be simple identifiers. Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Tested-by: John Snow --- qapi/block-core.json | 16 ++--- qapi/block-export.json

Re: [PATCH v5 4/9] qapi: start building an 'if' predicate tree

2021-06-18 Thread Marc-André Lureau
Hi On Mon, Jun 14, 2021 at 6:39 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > The following patches are going to express schema 'if' conditions in a > > target language agnostic way. For that, let's start building a predicate > > tree of

[PATCH v6 09/11] qapi: convert 'if' C-expressions to the new syntax tree

2021-06-18 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi Tested-by: John Snow --- qapi/machine-target.json | 20 qapi/misc-target.json| 12 +++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/qapi/machine-target.js

Re: [PATCH V3 5/6] block/rbd: add write zeroes support

2021-06-18 Thread Ilya Dryomov
On Fri, Jun 18, 2021 at 11:00 AM Peter Lieven wrote: > > Am 16.06.21 um 14:34 schrieb Ilya Dryomov: > > On Wed, May 19, 2021 at 4:28 PM Peter Lieven wrote: > >> Signed-off-by: Peter Lieven > >> --- > >> block/rbd.c | 37 - > >> 1 file changed, 36 insertions(+

[PATCH v2 1/2] migration/rdma: Fix out of order wrid

2021-06-18 Thread Li Zhijian
destination: ../qemu/build/qemu-system-x86_64 -enable-kvm -netdev tap,id=hn0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown -device e1000,netdev=hn0,mac=50:52:54:00:11:22 -boot c -drive if=none,file=./Fedora-rdma-server-migration.qcow2,id=drive-virtio-disk0 -device virtio-blk-pci,bus=pci.0,a

Re: [PATCH v5 7/9] qapi: normalize 'if' condition to IfPredicate tree

2021-06-18 Thread Marc-André Lureau
Hi On Tue, Jun 15, 2021 at 3:34 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Modify check_if() to normalize the condition tree. > > How is it normalized? Let me rephrase my question: how does the IR > change? If the generated code cha

[PATCH v2 2/2] migration/rdma: rename cq and comp_channel with recv prefix

2021-06-18 Thread Li Zhijian
make the code more clear Signed-off-by: Li Zhijian --- migration/rdma.c | 50 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 16fe0688858..527972d4970 100644 --- a/migration/rdma.c +++ b/mi

Re: [PATCH v5 1/9] docs: update the documentation about schema configuration

2021-06-18 Thread Marc-André Lureau
Hi On Tue, Jun 15, 2021 at 3:53 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Update the documentation describing the changes in this series. > > Suggest to add "upfront" for clarity. > done > > > > Signed-off-by: Marc-André Lureau >

Too slow edk2 bios boot?

2021-06-18 Thread Bin Meng
Hi Laszlo, Using the QEMU shipped edk2 bios, for i386, it boots very quickly to the EFI shell. $ qemu-system-i386 -nographic -pflash edk2-i386-code.fd However with x86_64, it takes a very long time to boot to the EFI shell. It seems it got stuck in the PXE boot. Any ideas? $ qemu-system-x86_64

Re: [PATCH v1 1/1] vfio/migration: Correct device state from vmstate change for savevm case.

2021-06-18 Thread Kirti Wankhede
CCing more Nvidia folks who are testing this patch. Gentle Ping for review. Thanks, Kirti On 6/9/2021 12:07 AM, Kirti Wankhede wrote: Set _SAVING flag for device state from vmstate change handler when it gets called from savevm. Currently State transition savevm/suspend is seen as: _RUN

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-06-18 Thread Cornelia Huck
On Fri, Jun 18 2021, Eric Farman wrote: > The Interrupt Response Block is comprised of several other > structures concatenated together, but only the 12-byte > Subchannel-Status Word (SCSW) is defined as a proper struct. > Everything else is a simple array of 32-bit words. > > Let's define a prop

Re: [PATCH v2] ui/gtk: Allow user to select monitor number to display qemu in full screen through new gtk display option

2021-06-18 Thread Markus Armbruster
You neglected to cc: the Graphics maintainer. I'm doing that for you now. sweeaun writes: > -display gtk,monitor= > > Signed-off-by: sweeaun Your commit message is formatted badly. What about this: ui/gtk: New -display gtk parameter 'monitor'. This lets the user select monitor num

Re: [PATCH V3 4/6] block/rbd: migrate from aio to coroutines

2021-06-18 Thread Ilya Dryomov
On Fri, Jun 18, 2021 at 11:07 AM Peter Lieven wrote: > > Am 17.06.21 um 16:43 schrieb Ilya Dryomov: > > On Wed, May 19, 2021 at 4:27 PM Peter Lieven wrote: > >> Signed-off-by: Peter Lieven > >> --- > >> block/rbd.c | 255 ++-- > >> 1 file changed,

Re: [RFC 0/3] qtest: pick tests that require KVM at runtime

2021-06-18 Thread Igor Mammedov
On Thu, 17 Jun 2021 18:49:17 +0200 Claudio Fontana wrote: > On 6/16/21 5:24 PM, Igor Mammedov wrote: > > > > Sometimes it's necessary to execute a test that depends on KVM, > > however qtest is not aware if tested QEMU binary supports KVM > > on the host it the test is executed. > > Hello, >

Re: [PATCH v2 19/23] hw/i386: Move pc_madt_cpu_entry() to acpi-pc.c

2021-06-18 Thread Igor Mammedov
On Wed, 16 Jun 2021 22:43:24 +0200 Philippe Mathieu-Daudé wrote: > pc_madt_cpu_entry() is specific to QEMU 'PC' machines, > move it to acpi-pc.c. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/acpi-common.c | 40 > hw/i386/acpi-pc.c | 39

Re: [PATCH v2 00/23] target/i386/sev: Housekeeping (OVMF + SEV-disabled binaries)

2021-06-18 Thread Igor Mammedov
On Thu, 17 Jun 2021 16:42:24 -0400 "Michael S. Tsirkin" wrote: > On Wed, Jun 16, 2021 at 10:43:05PM +0200, Philippe Mathieu-Daudé wrote: > > Hi, > > > > While testing James & Dov patch: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg810571.html > > I wasted some time trying to figure

Re: Too slow edk2 bios boot?

2021-06-18 Thread Gerd Hoffmann
On Fri, Jun 18, 2021 at 06:46:57PM +0800, Bin Meng wrote: > Hi Laszlo, > > Using the QEMU shipped edk2 bios, for i386, it boots very quickly to > the EFI shell. > > $ qemu-system-i386 -nographic -pflash edk2-i386-code.fd > > However with x86_64, it takes a very long time to boot to the EFI > she

Re: [PATCH v5 4/7] hw/pci/pcie: Do not set HPC flag if acpihp is used

2021-06-18 Thread Igor Mammedov
On Thu, 17 Jun 2021 21:07:36 +0200 Julia Suvorova wrote: > Instead of changing the hot-plug type in _OSC register, do not > set the 'Hot-Plug Capable' flag. This way guest will choose ACPI > hot-plug if it is preferred and leave the option to use SHPC with > pcie-pci-bridge. > > The ability to c

[PATCH] tests/qtest/nvme-test: add persistent memory region test

2021-06-18 Thread Gollu Appalanaidu
This will test the PMR functionality. Signed-off-by: Gollu Appalanaidu --- tests/qtest/nvme-test.c | 78 - 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c index d32c953a38..6d557be6ca 100644 -

Re: [PATCH v5 4/7] hw/pci/pcie: Do not set HPC flag if acpihp is used

2021-06-18 Thread Michael S. Tsirkin
On Fri, Jun 18, 2021 at 01:54:40PM +0200, Igor Mammedov wrote: > On Thu, 17 Jun 2021 21:07:36 +0200 > Julia Suvorova wrote: > > > Instead of changing the hot-plug type in _OSC register, do not > > set the 'Hot-Plug Capable' flag. This way guest will choose ACPI > > hot-plug if it is preferred and

Re: [RFC 0/3] qtest: pick tests that require KVM at runtime

2021-06-18 Thread Claudio Fontana
On 6/18/21 1:26 PM, Igor Mammedov wrote: > On Thu, 17 Jun 2021 18:49:17 +0200 > Claudio Fontana wrote: > >> On 6/16/21 5:24 PM, Igor Mammedov wrote: >>> >>> Sometimes it's necessary to execute a test that depends on KVM, >>> however qtest is not aware if tested QEMU binary supports KVM >>> on the

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-06-18 Thread Cornelia Huck
On Fri, Jun 18 2021, Cornelia Huck wrote: > On Fri, Jun 18 2021, Eric Farman wrote: > >> The Interrupt Response Block is comprised of several other >> structures concatenated together, but only the 12-byte >> Subchannel-Status Word (SCSW) is defined as a proper struct. >> Everything else is a si

Re: [PATCH v2 00/23] target/i386/sev: Housekeeping (OVMF + SEV-disabled binaries)

2021-06-18 Thread Michael S. Tsirkin
On Fri, Jun 18, 2021 at 01:46:23PM +0200, Igor Mammedov wrote: > On Thu, 17 Jun 2021 16:42:24 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, Jun 16, 2021 at 10:43:05PM +0200, Philippe Mathieu-Daudé wrote: > > > Hi, > > > > > > While testing James & Dov patch: > > > https://www.mail-archive.co

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-06-18 Thread Eric Farman
On Fri, 2021-06-18 at 14:46 +0200, Cornelia Huck wrote: > On Fri, Jun 18 2021, Cornelia Huck wrote: > > > On Fri, Jun 18 2021, Eric Farman wrote: > > > > > The Interrupt Response Block is comprised of several other > > > structures concatenated together, but only the 12-byte > > > Subchannel-St

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-06-18 Thread Eric Farman
On Fri, 2021-06-18 at 11:38 +0200, Cornelia Huck wrote: > On Fri, Jun 18 2021, Eric Farman wrote: > > > The Interrupt Response Block is comprised of several other > > structures concatenated together, but only the 12-byte > > Subchannel-Status Word (SCSW) is defined as a proper struct. > > Everyt

Re: [PULL 0/7] Audio 20210617 patches

2021-06-18 Thread Peter Maydell
On Thu, 17 Jun 2021 at 13:55, Gerd Hoffmann wrote: > > The following changes since commit 38848ce565849e5b867a5e08022b3c755039c11a: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20210616' into staging (2021-06-16 > 17:02:30 +0100) > > are available in the Git reposi

Re: Too slow edk2 bios boot?

2021-06-18 Thread Bin Meng
On Fri, Jun 18, 2021 at 7:46 PM Gerd Hoffmann wrote: > On Fri, Jun 18, 2021 at 06:46:57PM +0800, Bin Meng wrote: > > Hi Laszlo, > > > > Using the QEMU shipped edk2 bios, for i386, it boots very quickly to > > the EFI shell. > > > > $ qemu-system-i386 -nographic -pflash edk2-i386-code.fd > > > > H

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-06-18 Thread Cornelia Huck
On Fri, Jun 18 2021, Eric Farman wrote: > On Fri, 2021-06-18 at 14:46 +0200, Cornelia Huck wrote: >> On Fri, Jun 18 2021, Cornelia Huck wrote: >> >> > On Fri, Jun 18 2021, Eric Farman wrote: >> > > +/* format-0 extended-status word */ >> > > +typedef struct ESW { >> > > + uint32_t word0; >>

Re: GICv3 for MTTCG

2021-06-18 Thread Alex Bennée
Andrey Shinkevich writes: > Dear Shashi, > > I have applied the version 4 of the series "GICv3 LPI and ITS feature > implementation" right after the commit 3e9f48b as before (because the > GCCv7.5 is unavailable in the YUM repository for CentOS-7.9). > > The guest OS still hangs at its start

[PATCH v16 1/7] arm64: mte: Handle race when synchronising tags

2021-06-18 Thread Steven Price
mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag before restoring/zeroing the MTE tags. However if another thread were to race and attempt to sync the tags on the same page before the first thread had completed restoring/zeroing then it would see the flag is already set and con

[PATCH v16 0/7] MTE support for KVM guest

2021-06-18 Thread Steven Price
This series adds support for using the Arm Memory Tagging Extensions (MTE) in a KVM guest. This time with less BKL but hopefully no new races! Changes since v15[1]: - Prevent VM_SHARED mappings with an MTE-enabled VM. - Dropped the mte_prepare_page_tags() function, sanitise_mte_tags() now

[PATCH v16 2/7] arm64: mte: Sync tags for pages where PTE is untagged

2021-06-18 Thread Steven Price
A KVM guest could store tags in a page even if the VMM hasn't mapped the page with PROT_MTE. So when restoring pages from swap we will need to check to see if there are any saved tags even if !pte_tagged(). However don't check pages for which pte_access_permitted() returns false as these will not

[PATCH v16 6/7] KVM: arm64: ioctl to fetch/store tags in a guest

2021-06-18 Thread Steven Price
The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM and it's unlikely the tags are correct for the VMM). Instead add a new ioctl which allows the VMM to easi

[PATCH v16 3/7] KVM: arm64: Introduce MTE VM feature

2021-06-18 Thread Steven Price
Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging for a VM. This will expose the feature to the guest and automatically tag memory pages touched by the VM as PG_mte_tagged (and clear the tag storage) to ensure that the guest cannot see stale tags, and so that the tags are correctl

[PATCH v16 4/7] KVM: arm64: Save/restore MTE registers

2021-06-18 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_arm.h | 3 +- arch/arm64/includ

Re: [RFC 0/3] qtest: pick tests that require KVM at runtime

2021-06-18 Thread Igor Mammedov
On Fri, 18 Jun 2021 14:43:46 +0200 Claudio Fontana wrote: > On 6/18/21 1:26 PM, Igor Mammedov wrote: > > On Thu, 17 Jun 2021 18:49:17 +0200 > > Claudio Fontana wrote: > > > >> On 6/16/21 5:24 PM, Igor Mammedov wrote: > >>> > >>> Sometimes it's necessary to execute a test that depends on KVM

[PATCH v16 5/7] KVM: arm64: Expose KVM_ARM_CAP_MTE

2021-06-18 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/reset.c| 3 ++- arch/arm64/kvm/sys_regs.c | 3 +++ 3 files changed, 14 insertions(

[PATCH v16 7/7] KVM: arm64: Document MTE capability and ioctl

2021-06-18 Thread Steven Price
A new capability (KVM_CAP_ARM_MTE) identifies that the kernel supports granting a guest access to the tags, and provides a mechanism for the VMM to enable it. A new ioctl (KVM_ARM_MTE_COPY_TAGS) provides a simple way for a VMM to access the tags of a guest without having to maintain a PROT_MTE map

Re: [PATCH v3 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-06-18 Thread jonathan.albrecht
On 2021-06-01 8:22 pm, Ilya Leoshkevich wrote: Verify that s390x-specific uc_mcontext.psw.addr is reported correctly. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/signal.c| 163 2 files changed, 164 insert

[PATCH 2/7] target/arm: Handle FPU being disabled in FPCXT_NS accesses

2021-06-18 Thread Peter Maydell
If the guest makes an FPCXT_NS access when the FPU is disabled, one of two things happens: * if there is no active FP context, then the insn behaves the same way as if the FPU was enabled: writes ignored, reads same value as FPDSCR_NS * if there is an active FP context, then we take a NOCP

[PATCH 4/7] target/arm: Handle writeback in VLDR/VSTR sysreg with no memory access

2021-06-18 Thread Peter Maydell
A few subcases of VLDR/VSTR sysreg succeed but do not perform a memory access: * VSTR of VPR when unprivileged * VLDR to VPR when unprivileged * VLDR to FPCXT_NS when fpInactive In these cases, even though we don't do the memory access we should still update the base register and perform the st

[PATCH 0/7] target/arm: Fix FPCXT_NS accesses when FPU disabled

2021-06-18 Thread Peter Maydell
This patchseries fixes some bugs in v8.1M M-profile sysreg accesses: (1) When the FPU is disabled and there is no active FP context (as defined by the pseudocode fpInactive flag), accesses to FPCXT_NS should not fail with a NOCP exception (2) For cases where VLDR/VSTR sysreg don't perf

[PATCH 7/7] target/arm: Handle FPU check for FPCXT_NS insns via vfp_access_check_m()

2021-06-18 Thread Peter Maydell
Instead of open-coding the "take NOCP exception if FPU disabled, otherwise call gen_preserve_fp_state()" code in the accessors for FPCXT_NS, add an argument to vfp_access_check_m() which tells it to skip the gen_update_fp_context() call, so we can use it for the FPCXT_NS case. Signed-off-by: Peter

[PATCH 5/7] target/arm: Factor FP context update code out into helper function

2021-06-18 Thread Peter Maydell
Factor the code in full_vfp_access_check() which updates the ownership of the FP context and creates a new FP context out into its own function. Signed-off-by: Peter Maydell --- target/arm/translate-vfp.c | 104 + 1 file changed, 58 insertions(+), 46 deletions

[PATCH 3/7] target/arm: Don't NOCP fault for FPCXT_NS accesses

2021-06-18 Thread Peter Maydell
The M-profile architecture requires that accesses to FPCXT_NS when there is no active FP state must not take a NOCP fault even if the FPU is disabled. We were not implementing this correctly, because in our decode we catch the NOCP faults early in m-nocp.decode. Fix this bug by moving all the hand

[PATCH 1/7] target/arm/translate-vfp.c: Whitespace fixes

2021-06-18 Thread Peter Maydell
In the code for handling VFP system register accesses there is some stray whitespace after a unary '-' operator, and also some incorrect indent in a couple of function prototypes. We're about to move this code to another file, so fix the code style issues first so checkpatch doesn't complain about

[PATCH 6/7] target/arm: Split vfp_access_check() into A and M versions

2021-06-18 Thread Peter Maydell
vfp_access_check and its helper routine full_vfp_access_check() has gradually grown and is now an awkward mix of A-profile only and M-profile only pieces. Refactor it into an A-profile only and an M-profile only version, taking advantage of the fact that now the only direct call to full_vfp_access

Re: [PATCH v16 1/7] arm64: mte: Handle race when synchronising tags

2021-06-18 Thread Catalin Marinas
On Fri, Jun 18, 2021 at 02:28:20PM +0100, Steven Price wrote: > mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag > before restoring/zeroing the MTE tags. However if another thread were to > race and attempt to sync the tags on the same page before the first > thread had complet

Re: [PATCH v3 01/44] target/arm: Implement MVE VLDR/VSTR (non-widening forms)

2021-06-18 Thread Richard Henderson
On 6/17/21 5:15 AM, Peter Maydell wrote: Implement the forms of the MVE VLDR and VSTR insns which perform non-widening loads of bytes, halfwords or words from memory into vector elements of the same width (encodings T5, T6, T7). (At the moment we know for MVE and M-profile in general that vfp_ac

Re: [PATCH v16 3/7] KVM: arm64: Introduce MTE VM feature

2021-06-18 Thread Catalin Marinas
On Fri, Jun 18, 2021 at 02:28:22PM +0100, Steven Price wrote: > Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging > for a VM. This will expose the feature to the guest and automatically > tag memory pages touched by the VM as PG_mte_tagged (and clear the tag > storage) to ensure t

Re: [PATCH v3 02/44] target/arm: Implement widening/narrowing MVE VLDR/VSTR insns

2021-06-18 Thread Richard Henderson
On 6/17/21 5:15 AM, Peter Maydell wrote: Implement the variants of MVE VLDR (encodings T1, T2) which perform "widening" loads where bytes or halfwords are loaded from memory and zero or sign-extended into halfword or word length vector elements, and the narrowing MVE VSTR (encodings T1, T2) where

  1   2   3   4   >