Re: [PATCH v9] qapi: introduce 'query-kvm-cpuid' action

2021-06-17 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Jun 17, 2021 at 05:53:11PM +0200, Claudio Fontana wrote: >> On 6/17/21 5:39 PM, Valeriy Vdovin wrote: >> > On Thu, Jun 17, 2021 at 04:14:17PM +0200, Markus Armbruster wrote: >> >> Claudio Fontana writes: >> >> >> >>> On 6/17/21 1:09 PM, Markus Armbruster wrote:

[PATCH v3 23/24] accel: add tcg module annotations

2021-06-17 Thread Gerd Hoffmann
Add module annotations for tcg so autoloading works. Signed-off-by: Gerd Hoffmann --- accel/tcg/tcg-accel-ops.c | 1 + accel/tcg/tcg-all.c | 1 + 2 files changed, 2 insertions(+) diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 7191315aeed4..1a8e8390bd60 100644

[PATCH v3 21/24] accel: add qtest module annotations

2021-06-17 Thread Gerd Hoffmann
Add module annotations for qtest so autoloading works. Signed-off-by: Gerd Hoffmann --- accel/qtest/qtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index edb29f6fa4c0..7e6b8110d52b 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c

[PATCH v3 20/24] accel: autoload modules

2021-06-17 Thread Gerd Hoffmann
Call module_object_class_by_name() instead of object_class_by_name() for objects possibly implemented as module Signed-off-by: Gerd Hoffmann --- accel/accel-common.c | 2 +- accel/accel-softmmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/accel-common.c

[PATCH v3 16/24] modules: add tracepoints

2021-06-17 Thread Gerd Hoffmann
One for module load and one for qom type lookup. Signed-off-by: Gerd Hoffmann --- util/module.c | 3 +++ util/trace-events | 4 2 files changed, 7 insertions(+) diff --git a/util/module.c b/util/module.c index a9ec2da9972e..acaaecad56c9 100644 --- a/util/module.c +++ b/util/module.c

[PATCH v3 15/24] modules: use modinfo for qemu opts load

2021-06-17 Thread Gerd Hoffmann
Use module database to figure which module adds given QemuOpts group. Signed-off-by: Gerd Hoffmann --- softmmu/vl.c| 17 - stubs/module-opts.c | 4 util/module.c | 19 +++ 3 files changed, 19 insertions(+), 21 deletions(-) diff --git

[PATCH v3 14/24] modules: use modinfo for qom load

2021-06-17 Thread Gerd Hoffmann
Use module database to figure which module implements a given QOM type. Drop hard-coded object list. Signed-off-by: Gerd Hoffmann --- util/module.c | 77 --- 1 file changed, 24 insertions(+), 53 deletions(-) diff --git a/util/module.c

[PATCH v3 12/24] modules: add block module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- block/iscsi-opts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/iscsi-opts.c b/block/iscsi-opts.c index afaf8837d6c1..4f2da405e645 100644 --- a/block/iscsi-opts.c +++ b/block/iscsi-opts.c @@ -68,3 +68,4 @@ static void iscsi_block_opts_init(void) }

[PATCH v3 13/24] modules: use modinfo for dependencies

2021-06-17 Thread Gerd Hoffmann
Use module database for module dependencies. Drop hard-coded dependency list. Signed-off-by: Gerd Hoffmann --- util/module.c | 55 --- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/util/module.c b/util/module.c index

[PATCH v3 11/24] modules: add s390x module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/s390x/virtio-ccw-gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index 75a9e4bb3908..5868a2a07093 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -59,6 +59,7 @@ static

[PATCH v3 10/24] modules: add ui module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- ui/egl-headless.c | 4 ui/gtk.c | 4 ui/sdl2.c | 4 ui/spice-app.c| 3 +++ ui/spice-core.c | 5 + 5 files changed, 20 insertions(+) diff --git a/ui/egl-headless.c b/ui/egl-headless.c index da377a74af69..75404e0e8700

[PATCH v3 24/24] accel: build tcg modular

2021-06-17 Thread Gerd Hoffmann
Build tcg accel ops as module. Which is only a small fraction of tcg. Also only x86 for now. Signed-off-by: Gerd Hoffmann --- accel/tcg/meson.build | 5 - meson.build | 14 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/accel/tcg/meson.build

[PATCH v3 05/24] modules: add virtio-gpu module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost-user-vga.c | 1 + hw/display/virtio-gpu-base.c| 1 + hw/display/virtio-gpu-gl.c | 3 +++ hw/display/virtio-gpu-pci-gl.c | 3 +++

[PATCH v3 22/24] accel: build qtest modular

2021-06-17 Thread Gerd Hoffmann
Allow building accelerators as module. Start with qtest as first user. Signed-off-by: Gerd Hoffmann --- accel/qtest/meson.build | 8 ++-- meson.build | 6 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/accel/qtest/meson.build b/accel/qtest/meson.build

[PATCH v3 09/24] modules: add ccid module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/ccid-card-emulated.c | 1 + hw/usb/ccid-card-passthru.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 5c76bed77aa0..6c8c0355e099 100644 --- a/hw/usb/ccid-card-emulated.c +++

[PATCH v3 17/24] modules: check arch and block load on mismatch

2021-06-17 Thread Gerd Hoffmann
Add module_allow_arch() to set the target architecture. In case a module is limited to some arch verify arches match and ignore the module if not. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 1 + softmmu/vl.c | 3 +++ util/module.c | 29

[PATCH v3 06/24] modules: add chardev module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- chardev/baum.c | 1 + chardev/spice.c | 4 2 files changed, 5 insertions(+) diff --git a/chardev/baum.c b/chardev/baum.c index 5deca778bc44..79d618e35045 100644 --- a/chardev/baum.c +++ b/chardev/baum.c @@ -680,6 +680,7 @@ static const TypeInfo

[PATCH v3 19/24] modules: target-specific module build infrastructure

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- meson.build | 36 1 file changed, 36 insertions(+) diff --git a/meson.build b/meson.build index 9cf50a50d39a..e822477a231a 100644 --- a/meson.build +++ b/meson.build @@ -1781,6 +1781,7 @@ user_ss = ss.source_set() util_ss =

[PATCH v3 03/24] modules: generate modinfo.c

2021-06-17 Thread Gerd Hoffmann
Add script to generate C source with a small database containing the module meta-data. Signed-off-by: Gerd Hoffmann --- scripts/modinfo-generate.py | 84 + include/qemu/module.h | 17 softmmu/vl.c| 4 ++ util/module.c

[PATCH v3 08/24] modules: add usb-redir module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 6a75b0dc4ab2..4ec9326e0582 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2608,6 +2608,7 @@ static const TypeInfo usbredir_dev_info = {

[PATCH v3 04/24] modules: add qxl module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 6e1f8ff1b2a7..84f99088e0a0 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2522,6 +2522,7 @@ static const TypeInfo qxl_primary_info = {

[PATCH v3 02/24] modules: collect module meta-data

2021-06-17 Thread Gerd Hoffmann
Add script to collect the module meta-data from the source code, store the results in *.modinfo files. Signed-off-by: Gerd Hoffmann --- scripts/modinfo-collect.py | 67 ++ meson.build| 11 +++ 2 files changed, 78 insertions(+) create mode

[PATCH v3 18/24] modules: check arch on qom lookup

2021-06-17 Thread Gerd Hoffmann
With target-specific modules we can have multiple modules implementing the same object. Therefore we have to check the target arch on lookup to find the correct module. Signed-off-by: Gerd Hoffmann --- util/module.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/module.c

[PATCH v3 07/24] modules: add audio module annotations

2021-06-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- audio/spiceaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index 999bfbde47c5..a8d370fe6f31 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -317,3 +317,5 @@ static void register_audio_spice(void)

[PATCH v3 00/24] modules: add meta-data database

2021-06-17 Thread Gerd Hoffmann
This patch series adds support for module meta-data. Today this is either hard-coded in qemu (see qemu_load_module_for_opts) or handled with manually maintained lists in util/module (see module_deps[] and qom_modules[]). This series replaced that scheme with annotation macros, so the meta-data

[PATCH v3 01/24] modules: add modinfo macros

2021-06-17 Thread Gerd Hoffmann
Add macros for module info annotations. Instead of having that module meta-data stored in lists in util/module.c place directly in the module source code. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 25 + 1 file changed, 25 insertions(+) diff --git

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

2021-06-17 Thread Alexey Kardashevskiy
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, Alexey Kardashevskiy wrote: On 6/15/21

Re: [PATCH v6 00/10] Fixed some bugs and optimized some codes for COLO

2021-06-17 Thread chen.zh...@intel.com
On 5/18/21 9:33 AM, Zhang, Chen wrote: -Original Message- From: Lukas Straub Sent: Tuesday, May 18, 2021 3:47 AM To: Rao, Lei Cc: Zhang, Chen ; lizhij...@cn.fujitsu.com; jasow...@redhat.com; quint...@redhat.com; dgilb...@redhat.com; pbonz...@redhat.com; qemu-devel@nongnu.org

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

2021-06-17 Thread Vivek Goyal
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 : > > /** > * Open a file > * > * Open flags

Re: [PATCH v3 4/4] tests/boot-serial-test: Add STM32VLDISCOVERY board testcase

2021-06-17 Thread Alistair Francis
On Fri, Jun 18, 2021 at 2:56 AM Alexandre Iooss wrote: > > New mini-kernel test for STM32VLDISCOVERY USART1. > > Signed-off-by: Alexandre Iooss Acked-by: Alistair Francis Alistair > --- > tests/qtest/boot-serial-test.c | 37 ++ > 1 file changed, 37

Re: [PATCH 16/21] linux-user/riscv: Implement setup_sigtramp

2021-06-17 Thread Alistair Francis
On Wed, Jun 16, 2021 at 11:22 AM Richard Henderson wrote: > > Create and record the rt signal trampoline. > > This fixes a bug wrt libgcc fallback unwinding. It expects > the stack pointer to point to the siginfo_t, whereas we had > inexplicably placed our private signal trampoline at the start

Re: [PATCH v3 3/4] docs/system: arm: Add stm32 boards description

2021-06-17 Thread Alistair Francis
On Fri, Jun 18, 2021 at 2:56 AM Alexandre Iooss wrote: > > This adds the target guide for Netduino 2, Netduino Plus 2 and > STM32VLDISCOVERY. > > Signed-off-by: Alexandre Iooss Reviewed-by: Alistair Francis Alistair > --- > MAINTAINERS| 1 + > docs/system/arm/stm32.rst |

Re: [PATCH v3 2/4] stm32vldiscovery: Add the STM32VLDISCOVERY Machine

2021-06-17 Thread Alistair Francis
On Fri, Jun 18, 2021 at 2:56 AM Alexandre Iooss wrote: > > This is a Cortex-M3 based machine. Information can be found at: > https://www.st.com/en/evaluation-tools/stm32vldiscovery.html > > Signed-off-by: Alexandre Iooss Reviewed-by: Alistair Francis Alistair > --- > MAINTAINERS

Re: [PATCH v3 1/4] stm32f100: Add the stm32f100 SoC

2021-06-17 Thread Alistair Francis
On Fri, Jun 18, 2021 at 2:56 AM Alexandre Iooss wrote: > > This SoC is similar to stm32f205 SoC. > This will be used by the STM32VLDISCOVERY to create a machine. > > Signed-off-by: Alexandre Iooss Please keep any Reviewed by tags for a patch between versions if you don't make large changes.

Re: [PATCH v7 6/7] migration/dirtyrate: move init step of calculation to main thread

2021-06-17 Thread Hyman Huang
在 2021/6/17 23:34, Peter Xu 写道: On Thu, Jun 17, 2021 at 10:12:07PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) since main thread may "query dirty rate" at any time, it's better to move init step into main thead so that synchronization overhead between "main" and

Re: [PATCH v7 3/7] memory: make global_dirty_tracking a bitmask

2021-06-17 Thread Hyman Huang
在 2021/6/17 23:29, Peter Xu 写道: On Thu, Jun 17, 2021 at 10:12:04PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) dirty rate measurement may start or stop dirty tracking during calculation. this conflict with migration because stop dirty tracking make migration leave dirty

Re: [PATCH v7 3/7] memory: make global_dirty_tracking a bitmask

2021-06-17 Thread Hyman Huang
在 2021/6/17 23:29, Peter Xu 写道: On Thu, Jun 17, 2021 at 10:12:04PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) dirty rate measurement may start or stop dirty tracking during calculation. this conflict with migration because stop dirty tracking make migration leave dirty

Re: [PATCH v7 4/7] migration/dirtyrate: introduce struct and adjust DirtyRateStat

2021-06-17 Thread Hyman Huang
在 2021/6/17 23:27, Peter Xu 写道: On Thu, Jun 17, 2021 at 10:12:05PM +0800, huang...@chinatelecom.cn wrote: ## +# @DirtyRateMeasureMode: +# +# An enumeration of mode of measuring dirtyrate. +# +# @page-sampling: calculate dirtyrate by sampling pages. +# +# @dirty-ring: calculate dirtyrate by

Re: [PATCH v5 15/15] hw/i2c: Introduce i2c_start_recv() and i2c_start_send()

2021-06-17 Thread BALATON Zoltan
On Thu, 17 Jun 2021, Philippe Mathieu-Daudé wrote: To ease reviewing code using the I2C bus API, introduce the i2c_start_recv() and i2c_start_send() helpers which don't take the confusing 'is_recv' boolean argument. In defence of this is_recv I'd like to mention that I2C has such a bit in

Re: [PATCH v5 14/15] hw/i2c: Extract i2c_do_start_transfer() from i2c_start_transfer()

2021-06-17 Thread BALATON Zoltan
On Thu, 17 Jun 2021, Philippe Mathieu-Daudé wrote: To allow further simplications, extract i2c_do_start_transfer() from i2c_start_transfer(). This is mostly the same function, but the former is static and takes an enum argument. Reviewed-by: Richard Henderson Signed-off-by: Philippe

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

2021-06-17 Thread BALATON Zoltan
On Wed, 16 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/16/21 10:01 PM, BALATON Zoltan wrote: On Wed, 16 Jun 2021, Philippe Mathieu-Daudé wrote: On 6/16/21 9:16 PM, Corey Minyard wrote: On Wed, Jun 16, 2021 at 06:14:11PM +0200, Philippe Mathieu-Daudé wrote: Instead of using the confuse

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

2021-06-17 Thread BALATON Zoltan
On Thu, 17 Jun 2021, Philippe Mathieu-Daudé wrote: Instead of using the confuse i2c_send_recv(), rewrite to directly call i2c_recv() & i2c_send(), resulting in code easier to review. Reviewed-by: Richard Henderson Acked-by: Corey Minyard Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH v5 04/15] hw/display/sm501: Replace i2c_send_recv() by i2c_recv() & i2c_send()

2021-06-17 Thread BALATON Zoltan
On Thu, 17 Jun 2021, Philippe Mathieu-Daudé wrote: Instead of using the confuse i2c_send_recv(), rewrite to directly call i2c_recv() & i2c_send(), resulting in code easier to review. Reviewed-by: Richard Henderson Acked-by: Corey Minyard Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

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

2021-06-17 Thread Eric Farman
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 vfio-ccw subchannels, it fixes the problem encountered

[PATCH v4 4/4] s390x/css: Add passthrough IRB

2021-06-17 Thread Eric Farman
Wire in the subchannel callback for building the IRB ESW and ECW space for passthrough devices, and copy the hardware's ESW into the IRB we are building. If the hardware presented concurrent sense, then copy that sense data into the IRB's ECW space. Signed-off-by: Eric Farman ---

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

2021-06-17 Thread Eric Farman
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 proper struct for the 20-byte Extended-Status Word (ESW)

[PATCH v4 2/4] s390x/css: Split out the IRB sense data

2021-06-17 Thread Eric Farman
Let's move this logic into its own routine, so it can be reused later. Signed-off-by: Eric Farman Reviewed-by: Thomas Huth --- hw/s390x/css.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 59d935570e..a54e384566

[PATCH v4 3/4] s390x/css: Refactor IRB construction

2021-06-17 Thread Eric Farman
Currently, all subchannel types have "sense data" copied into the IRB.ECW space, and a couple flags enabled in the IRB.SCSW and IRB.ESW. But for passthrough (vfio-ccw) subchannels, this data isn't populated in the first place, so enabling those flags leads to unexpected behavior if the guest tries

[PULL 3/4] Hexagon (target/hexagon) cleanup gen_store_conditional[48] functions

2021-06-17 Thread Taylor Simpson
Previously the store-conditional code was writing to hex_pred[prednum]. Then, the fGEN_TCG override was reading from there to the destination variable so that the packet commit logic would handle it properly. The correct implementation is to write to the destination variable and don't have the

[PULL 4/4] Hexagon (target/hexagon) remove unused TCG variables

2021-06-17 Thread Taylor Simpson
Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c| 6 -- target/hexagon/translate.c | 11 ++- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index bd18cb1..5dbabe0 100644

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

2021-06-17 Thread Taylor Simpson
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 --- target/hexagon/macros.h| 27

[PULL 2/4] Hexagon (target/hexagon) fix l2fetch instructions

2021-06-17 Thread Taylor Simpson
Y4_l2fetch == l2fetch(Rs32, Rt32) Y5_l2fetch == l2fetch(Rs32, Rtt32) The semantics for these instructions are present, but the encodings are missing. Note that these are treated as nops in qemu, so we add overrides. Test case added to tests/tcg/hexagon/misc.c Reviewed-by: Richard Henderson >

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

2021-06-17 Thread Vivek Goyal
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. Therefore, when the respective

Re: [PATCH v5 0/7] Use ACPI PCI hot-plug for Q35

2021-06-17 Thread Michael S. Tsirkin
On Thu, Jun 17, 2021 at 09:07:32PM +0200, Julia Suvorova wrote: > The patch set consists of two parts: > patches 1-4: introduce new feature > 'acpi-pci-hotplug-with-bridge-support' on Q35 > patches 5-7: make the feature default along with changes in ACPI tables > > With the feature

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

2021-06-17 Thread Michael S. Tsirkin
On Thu, Jun 17, 2021 at 09:07:36PM +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

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

2021-06-17 Thread Michael S. Tsirkin
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 out how OVMF was supposed to > behave until realizing the binary I was using

Re: [PATCH v2 20/23] hw/acpi: Do not restrict ACPI core routines to x86 architecture

2021-06-17 Thread Michael S. Tsirkin
On Wed, Jun 16, 2021 at 10:43:25PM +0200, Philippe Mathieu-Daudé wrote: > ACPI core routines (in core.c) are not really x86-specific. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/acpi/meson.build | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Eduardo Habkost
On Thu, Jun 17, 2021 at 3:17 PM Dov Murik wrote: > > > > On 17/06/2021 20:22, Eduardo Habkost wrote: > > On Thu, Jun 17, 2021 at 03:48:52PM +0300, Dov Murik wrote: > >> > >> > >> On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: > >>> Hi Dov, James, > >>> > >>> +Connor who asked to be reviewer.

Re: [PATCH v16 43/99] target/arm: move a15 cpu model away from the TCG-only models

2021-06-17 Thread Claudio Fontana
On 6/17/21 8:01 PM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 6/4/21 8:52 AM, Alex Bennée wrote: >>> From: Claudio Fontana >>> Cortex-A15 is the only ARM cpu class we need in KVM too. >>> We will be able to move it to tcg/ once the board code and >>> configurations >>> are fixed.

[PATCH 1/4] fuzz: adjust timeout to allow for longer inputs

2021-06-17 Thread Alexander Bulekov
Using a custom timeout is useful to continue fuzzing complex devices, even after we run into some slow code-path. However, simply adding a fixed timeout to each input effectively caps the maximum input length/number of operations at some artificial value. There are two major problems with this: 1.

[PATCH 0/4] Miscellaneous fuzzer changes

2021-06-17 Thread Alexander Bulekov
Hello, These patches 1.) Change generic-fuzzer timeouts so they are reconfigured prior to each individual IO command, to allow for longer-running inputs 2.) Add an instrumentation filter to prevent libfuzzer from tracking noisy/irrelevant parts of the code. 3.) Fix the AC97 and ES1370 fuzzer

[PATCH 4/4] fuzz: fix the ES1370 generic-fuzzer config.

2021-06-17 Thread Alexander Bulekov
TYPE_ES1370 is "ES1370", capitalized. Fix the config to account for that. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz_configs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h

[PATCH v5 7/7] bios-tables-test: Update golden binaries

2021-06-17 Thread Julia Suvorova
Add ACPI hot-plug registers to DSDT Q35 tables. Changes in the tables: +Scope (_SB.PCI0) +{ +OperationRegion (PCST, SystemIO, 0x0CC4, 0x08) +Field (PCST, DWordAcc, NoLock, WriteAsZeros) +{ +PCIU, 32, +PCID, 32 +} + +

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

2021-06-17 Thread Alexander Bulekov
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 inputs for coverage observed in timer code, memory APIs

[PATCH 3/4] fuzz: fix the AC97 generic-fuzzer config.

2021-06-17 Thread Alexander Bulekov
TYPE_AC97 is "AC97", capitalized. Fix the config to account for that. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz_configs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h

Re: [PATCH v3 4/4] tests/boot-serial-test: Add STM32VLDISCOVERY board testcase

2021-06-17 Thread Thomas Huth
On 17/06/2021 18.56, Alexandre Iooss wrote: New mini-kernel test for STM32VLDISCOVERY USART1. Signed-off-by: Alexandre Iooss --- tests/qtest/boot-serial-test.c | 37 ++ 1 file changed, 37 insertions(+) diff --git a/tests/qtest/boot-serial-test.c

[PATCH RFC] meson: add option to use zstd for qcow2 compression by default

2021-06-17 Thread Vladimir Sementsov-Ogievskiy
Recently we added support of zstd to qcow2 format, as zstd seems to be better than zlib in general, and which is important (as qcow2 compression used mostly for backups) compressed writes are faster with zstd. Let's add a build option to use zstd by default. Signed-off-by: Vladimir

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

2021-06-17 Thread Julia Suvorova
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 control hot-plug for each downstream port is retained, while

[PATCH v5 2/7] hw/i386/acpi-build: Add ACPI PCI hot-plug methods to Q35

2021-06-17 Thread Julia Suvorova
Implement notifications and gpe to support q35 ACPI PCI hot-plug. Use 0xcc4 - 0xcd7 range for 'acpi-pci-hotplug' io ports. Signed-off-by: Julia Suvorova Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.h| 4 include/hw/acpi/ich9.h | 2 ++ include/hw/acpi/pcihp.h | 3 ++-

[PATCH v2 10/11] hw/nvme: reimplement format nvm to allow cancellation

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch, the aios associated with broadcast format are submitted anonymously (no aiocb reference saved from the blk_aio call). Fix this by formatting the namespaces one after another, saving a reference to the aiocb for each. Signed-off-by: Klaus Jensen ---

[PATCH v2 09/11] hw/nvme: reimplement zone reset to allow cancellation

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch, the aios associated with zone reset are submitted anonymously (no reference saved to the aiocb from the blk_aio call). Fix this by resetting the zones one after another, saving a reference to the aiocb for each reset. Signed-off-by: Klaus Jensen ---

[PATCH v2 07/11] hw/nvme: add dw0/1 to the req completion trace event

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Some commands report additional useful information in dw0 and dw1 of the completion queue entry. Add them to the trace. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 2 ++ hw/nvme/trace-events | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

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

2021-06-17 Thread Peter Maydell
On Tue, 15 Jun 2021 at 18:01, Alex Bennée wrote: > > The previous numbers were a guess at best and rather arbitrary without > taking into account anything that might be loaded. Instead of using > guesses based on the state of registers implement a new function that > scans MemoryRegions for the

[PATCH v2 06/11] hw/nvme: use prinfo directly in nvme_check_prinfo and nvme_dif_check

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen The nvme_check_prinfo() and nvme_dif_check() functions operate on the 16 bit "control" member of the NvmeCmd. These functions do not otherwise operate on an NvmeCmd or an NvmeRequest, so change them to expect the actual 4 bit PRINFO field and add constants that work on this

Re: [PATCH] hw/nvme: fix missing check for PMR capability

2021-06-17 Thread Klaus Jensen
On Jun 7 11:47, Klaus Jensen wrote: From: Klaus Jensen Qiang Liu reported that an access on an unknown address is triggered in memory_region_set_enabled because a check on CAP.PMRS is missing for the PMRCTL register write when no PMR is configured. Cc: qemu-sta...@nongnu.org Fixes:

[PATCH v5 6/7] hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35

2021-06-17 Thread Julia Suvorova
Q35 has three different types of PCI devices hot-plug: PCIe Native, SHPC Native and ACPI hot-plug. This patch changes the default choice for cold-plugged bridges from PCIe Native to ACPI Hot-plug with ability to use SHPC and PCIe Native for hot-plugged bridges. This is a list of the PCIe Native

[PATCH v5 5/7] bios-tables-test: Allow changes in DSDT ACPI tables

2021-06-17 Thread Julia Suvorova
All DSDT Q35 tables will be modified because ACPI hot-plug is enabled by default. Signed-off-by: Julia Suvorova Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH v5 3/7] hw/acpi/ich9: Enable ACPI PCI hot-plug

2021-06-17 Thread Julia Suvorova
Add acpi_pcihp to ich9_pm as part of 'acpi-pci-hotplug-with-bridge-support' option. Set default to false. Signed-off-by: Julia Suvorova Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.h | 1 + include/hw/acpi/ich9.h | 3 ++ hw/acpi/ich9.c | 67

[PATCH v2 02/11] hw/nvme: add nvme_block_status_all helper

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Pull the gist of nvme_check_dulbe() into a helper function. This is in preparation for dsm refactoring. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 41 - 1 file changed, 28 insertions(+), 13 deletions(-) diff --git

[PATCH v5 0/7] Use ACPI PCI hot-plug for Q35

2021-06-17 Thread Julia Suvorova
The patch set consists of two parts: patches 1-4: introduce new feature 'acpi-pci-hotplug-with-bridge-support' on Q35 patches 5-7: make the feature default along with changes in ACPI tables With the feature disabled Q35 falls back to the native hot-plug. Pros * no racy behavior

[PATCH v5 1/7] hw/acpi/pcihp: Enhance acpi_pcihp_disable_root_bus() to support Q35

2021-06-17 Thread Julia Suvorova
PCI Express does not allow hot-plug on pcie.0. Check for Q35 in acpi_pcihp_disable_root_bus() to be able to forbid hot-plug using the 'acpi-root-pci-hotplug' flag. Signed-off-by: Julia Suvorova Reviewed-by: Igor Mammedov --- hw/acpi/pcihp.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Dov Murik
On 17/06/2021 20:22, Eduardo Habkost wrote: > On Thu, Jun 17, 2021 at 03:48:52PM +0300, Dov Murik wrote: >> >> >> On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: >>> Hi Dov, James, >>> >>> +Connor who asked to be reviewer. >>> >>> On 6/15/21 5:20 PM, Eduardo Habkost wrote: On Tue, May

[PATCH v2 11/11] Partially revert "hw/block/nvme: drain namespaces on sq deletion"

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen This partially reverts commit 98f84f5a4eca5c03e32fff20f246d9b4b96d6422. Since all "multi aio" commands are now reimplemented to properly track the nested aiocbs, we can revert the "hack" that was introduced to make sure all requests we're properly drained upon sq deletion.

[PATCH v2 05/11] hw/nvme: remove assert from nvme_get_zone_by_slba

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Make nvme_get_zone_by_slba() return NULL if the slba is out of range. This allows the function to be used without guarding the call with a call to nvme_check_bounds(), in preparation for the next patch. Add asserts after calling nvme_get_zone_by_slba() instead.

[PATCH v2 01/11] hw/nvme: reimplement flush to allow cancellation

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch, a broadcast flush would result in submitting multiple "fire and forget" aios (no reference saved to the aiocbs returned from the blk_aio_flush calls). Fix this by issuing the flushes one after another. Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h

[PATCH v2 08/11] hw/nvme: reimplement the copy command to allow aio cancellation

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Before this patch the code would issue several aios simultaneously without saving a reference to the aiocb. Without the aiocb reference the individual copies cannot be canceled. Fix this by issuing copies of the ranges one after another. Signed-off-by: Klaus Jensen ---

[PATCH v2 03/11] hw/nvme: reimplement dsm to allow cancellation

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch, a loop was used to issue multiple "fire and forget" aios for each range in the command. Without a reference to the aiocb returned from the blk_aio_pdiscard calls, the aios cannot be canceled. Fix this by processing the ranges one after another. As a

[PATCH v2 00/11] hw/nvme: reimplement all multi-aio commands with custom aiocbs

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen This series reimplements flush, dsm, copy, zone reset and format nvm to allow cancellation. I posted an RFC back in March ("hw/block/nvme: convert ad-hoc aio tracking to aiocb") and I've applied some feedback from Stefan and reimplemented the remaining commands. The basic

[PATCH v2 04/11] hw/nvme: save reftag when generating pi

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Prepare nvme_dif_pract_generate_dif() and nvme_dif_check() to be callable in smaller increments by making the reftag a pointer parameter updated by the function. Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 4 ++-- hw/nvme/ctrl.c | 10 +- hw/nvme/dif.c | 22

[PATCH v2] hw/nvme: fix pin-based interrupt behavior (again)

2021-06-17 Thread Klaus Jensen
From: Klaus Jensen Jakub noticed[1] that, when using pin-based interrupts, the device will unconditionally deasssert when any CQEs are acknowledged. However, the pin should not be deasserted if other completion queues still holds unacknowledged CQEs. The bug is an artifact of commit

Re: GICv3 for MTTCG

2021-06-17 Thread Andrey Shinkevich
On 6/17/21 8:44 PM, shashi.mall...@linaro.org wrote: > Hi Andrey, > > The issue doesnt seem related to ITS patchset as the implementation has > no changes around MTTCG or vCPU configurations. > > if this patchset were not applied(with only commit 3e9f48b),do you > still see the hang issue? No,

Re: [PATCH] hw/nvme: fix pin-based interrupt behavior (again)

2021-06-17 Thread Klaus Jensen
On Jun 17 07:50, Keith Busch wrote: On Thu, Jun 17, 2021 at 12:08:20PM +0200, Klaus Jensen wrote: if (cq->tail != cq->head) { +if (!pending) { +n->cq_pending++; +} You should check cq->irq_enabled before incrementing cq_pending. You don't want to leave the irq

Re: [PULL 00/34] NBD patches for 2021-06-15

2021-06-17 Thread Vladimir Sementsov-Ogievskiy
17.06.2021 12:42, Peter Maydell wrote: On Tue, 15 Jun 2021 at 21:50, Eric Blake 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

Re: [PULL 28/34] nbd/client-connection: return only one io channel

2021-06-17 Thread Vladimir Sementsov-Ogievskiy
15.06.2021 23:47, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy block/nbd doesn't need underlying sioc channel anymore. So, we can update nbd/client-connection interface to return only one top-most io channel, which is more straight forward. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH 4/4] target/mips: Add declarations for generic DSP TCG helpers

2021-06-17 Thread Philippe Mathieu-Daudé
On 6/17/21 7:49 PM, Philippe Mathieu-Daudé wrote: > To be able to extract the DSP ASE translation routines to > different source file, declare few TCG helpers, MASK_SPECIAL3 > and a DSP register in "translate.h". > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/tcg/translate.h | 7

Re: [PATCH v6 0/8] virtiofsd: Add support to enable/disable posix acls

2021-06-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210617181213.1177835-1-vgo...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210617181213.1177835-1-vgo...@redhat.com Subject: [PATCH v6 0/8] virtiofsd: Add

[PATCH v6 0/8] virtiofsd: Add support to enable/disable posix acls

2021-06-17 Thread Vivek Goyal
Hi, This is V6 of the patches. Changes since V5: - Kernel patches for extended setxattr have been merged in 5.13-rc1. These patches have been modified to work with FUSE_SETXATTR_EXT. Currently posix ACL support does not work well with virtiofs and bunch of tests fail when I run xfstests

[PATCH v6 5/8] virtiofsd: Add umask to seccom allow list

2021-06-17 Thread Vivek Goyal
Patches in this series are going to make use of "umask" syscall. So allow it. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtiofsd/passthrough_seccomp.c

[PATCH v6 2/8] virtiofsd: Fix fuse setxattr() API change issue

2021-06-17 Thread Vivek Goyal
With kernel header updates fuse_setxattr_in struct has grown in size. But this new struct size only takes affect if user has opted in for fuse feature FUSE_SETXATTR_EXT otherwise fuse continues to send "fuse_setxattr_in" of older size. Older size is determined by FUSE_COMPAT_SETXATTR_IN_SIZE. Fix

[PATCH v6 6/8] virtiofsd: Add capability to change/restore umask

2021-06-17 Thread Vivek Goyal
When parent directory has default acl and a file is created in that directory, then umask is ignored and final file permissions are determined using default acl instead. (man 2 umask). Currently, fuse applies the umask and sends modified mode in create request accordingly. fuse server can set

  1   2   3   4   5   >