Re: [PATCH v4 3/3] tests: acpi: Add updated TPM related tables

2021-12-22 Thread Ani Sinha
On Wed, 22 Dec 2021, Stefan Berger wrote: > The updated TPM related tables have the following additions: > >Device (TPM) >{ >Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: > Hardware ID > + Name (_STR, "TPM 2.0 Device") // _STR: Description String > +

Re: [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables

2021-12-22 Thread Ani Sinha
On Wed, 22 Dec 2021, Stefan Berger wrote: > Replace existing TPM related tables, that are about to change, with > empty files. > > Cc: Michael S. Tsirkin > Cc: Igor Mammedov > Cc: Ani Sinha > Signed-off-by: Stefan Berger Acked-by: Ani Sinha > Message-id:

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2021-12-22 Thread Ani Sinha
On Wed, 22 Dec 2021, Stefan Berger wrote: > Add missing device identification objects _STR and _UID. They will appear > as files 'description' and 'uid' under Linux sysfs. > > Cc: Shannon Zhao > Cc: Michael S. Tsirkin > Cc: Igor Mammedov > Cc: Ani Sinha > Fixes:

Re: [PATCH] pci: Skip power-off reset when pending unplug

2021-12-22 Thread Gerd Hoffmann
> > > > So I am not sure how to fix the assignment issues as I'm not sure how do > > > > they trigger, but here is a wild idea: maybe it should support an API > > > > for starting reset asynchronously, then if the following access is > > > > trying to reset again that second reset can just be

Re: [PATCH v3 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-12-22 Thread Anup Patel
On Mon, Dec 20, 2021 at 6:39 PM Yifei Jiang wrote: > > Add kvm_riscv_get/put_regs_timer to synchronize virtual time context > from KVM. > > To set register of RISCV_TIMER_REG(state) will occur a error from KVM > on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter > that

Re: [PATCH v3 07/12] target/riscv: Support setting external interrupt by KVM

2021-12-22 Thread Anup Patel
On Mon, Dec 20, 2021 at 6:39 PM Yifei Jiang wrote: > > When KVM is enabled, set the S-mode external interrupt through > kvm_riscv_set_irq function. > > Signed-off-by: Yifei Jiang > Signed-off-by: Mingwang Li > Reviewed-by: Alistair Francis Looks good to me. Reviewed-by: Anup Patel Regards,

Re: [PATCH v3 06/12] target/riscv: Support start kernel directly by KVM

2021-12-22 Thread Anup Patel
On Thu, Dec 23, 2021 at 11:33 AM Anup Patel wrote: > > On Mon, Dec 20, 2021 at 6:39 PM Yifei Jiang wrote: > > > > Get kernel and fdt start address in virt.c, and pass them to KVM > > when cpu reset. Add kvm_riscv.h to place riscv specific interface. > > > > In addition, PLIC is created without

Re: [PATCH v3 06/12] target/riscv: Support start kernel directly by KVM

2021-12-22 Thread Anup Patel
On Mon, Dec 20, 2021 at 6:39 PM Yifei Jiang wrote: > > Get kernel and fdt start address in virt.c, and pass them to KVM > when cpu reset. Add kvm_riscv.h to place riscv specific interface. > > In addition, PLIC is created without M-mode PLIC contexts when KVM > is enabled. > > Signed-off-by:

Re: [PATCH 2/8] ppc/ppc4xx: Convert printfs()

2021-12-22 Thread David Gibson
On Wed, Dec 22, 2021 at 07:40:19AM +0100, Cédric le Goater wrote: > Use a QEMU log primitive for errors and trace events for debug. > > Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson > --- > hw/ppc/mpc8544_guts.c | 9 ++--- > hw/ppc/ppc4xx_devs.c | 39

Re: [PATCH 1/8] target/ppc: Print out literal exception names in logs

2021-12-22 Thread David Gibson
On Wed, Dec 22, 2021 at 07:40:18AM +0100, Cédric le Goater wrote: > It facilitates reading the logs when mask CPU_LOG_INT is activated. We > should do the same for error codes. > > Cc: Fabiano Rosas > Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson > --- > target/ppc/excp_helper.c

check-python-tox failures

2021-12-22 Thread Richard Henderson
Hi John, This test has been failing for quite a while. While it is allowed to fail, can we either fix this or disable it, to allow the ci to go proper green? r~

Re: [PULL 0/7] NBD patches

2021-12-22 Thread Richard Henderson
On 12/22/21 10:52 AM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at:

[PATCH 3/3] target/ppc: Use env->pnc_cyc_cnt

2021-12-22 Thread Richard Henderson
Use the cached pmc_cyc_cnt value in pmu_update_cycles and pmc_update_overflow_timer. This leaves pmc_get_event and pmc_is_inactive unused, so remove them. Signed-off-by: Richard Henderson --- target/ppc/power8-pmu.c | 107 1 file changed, 9

[PATCH 2/3] target/ppc: Rewrite pmu_increment_insns

2021-12-22 Thread Richard Henderson
Use the cached pmc_ins_cnt value. Unroll the loop over the different PMC counters. Treat the PMC4 run-latch specially. Signed-off-by: Richard Henderson --- target/ppc/power8-pmu.c | 76 ++--- 1 file changed, 48 insertions(+), 28 deletions(-) diff --git

[PATCH 1/3] target/ppc: Cache per-pmc insn and cycle count settings

2021-12-22 Thread Richard Henderson
This is the combination of frozen bit and counter type, on a per counter basis. So far this is only used by HFLAGS_INSN_CNT, but will be used more later. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 3 +++ target/ppc/power8-pmu.h | 14 +-- target/ppc/cpu_init.c

[PATCH 0/3] Reorg ppc64 pmu insn counting

2021-12-22 Thread Richard Henderson
In contrast to Daniel's version, the code stays in power8-pmu.c, but is better organized to not take so much overhead. Before: 32.97% qemu-system-ppc qemu-system-ppc64 [.] pmc_get_event 20.22% qemu-system-ppc qemu-system-ppc64 [.] helper_insns_inc 4.52% qemu-system-ppc

Re: [PATCH 0/8] Re-write PPC64 PMU instruction count using TCG Ops

2021-12-22 Thread Richard Henderson
On 12/22/21 5:45 AM, Daniel Henrique Barboza wrote: Hi, Two days ago Richard Henderson reported test failures with Avocado and powernv8/9 due to timeouts [1]. The culprit ended up to be commit , a commit where I introduced PMU instruction counting for TCG PPC64. For a reason that is still

Re: [PULL 0/3] Block patches

2021-12-22 Thread Richard Henderson
On 12/22/21 8:52 AM, Hanna Reitz wrote: The following changes since commit 8c5f94cd4182753959c8be8de415120dc879d8f0: Merge tag 'pull-loong-20211221-2' of https://gitlab.com/rth7680/qemu into staging (2021-12-21 13:30:35 -0800) are available in the Git repository at:

[PATCH v4 3/3] tests: acpi: Add updated TPM related tables

2021-12-22 Thread Stefan Berger
The updated TPM related tables have the following additions: Device (TPM) { Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: Hardware ID + Name (_STR, "TPM 2.0 Device") // _STR: Description String + Name (_UID, One) // _UID: Unique ID Name (_STA,

[PATCH v4 0/3] tpm: Add missing ACPI device identification objects

2021-12-22 Thread Stefan Berger
This series of patches adds missing ACPI device identification objects _STR and _UID to TPM 1.2 and TPM 2 ACPI tables. Stefan v4: - Rebased on current master: regenerated binaries in patch 3 v3: - Dropped replacement of ACPI tables with empty files in 1/3. - Reduced ignored files

[PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables

2021-12-22 Thread Stefan Berger
Replace existing TPM related tables, that are about to change, with empty files. Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Signed-off-by: Stefan Berger Message-id: 2020133559.3370990-2-stef...@linux.ibm.com --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file

[PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2021-12-22 Thread Stefan Berger
Add missing device identification objects _STR and _UID. They will appear as files 'description' and 'uid' under Linux sysfs. Cc: Shannon Zhao Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708 Signed-off-by: Stefan Berger

Re: [PATCH v11 00/31] LoongArch64 port of QEMU TCG

2021-12-22 Thread gaosong
Hi, On 2021/12/21 下午8:00, Philippe Mathieu-Daudé wrote: Which way is better? Access to 3a5000 hardware environment is certainly better for us, as this remove the maintenance burden. We are preparing 3a5000 hardware enviroment. Naybe one or two days later, you can get the IP. Thanks Song

RE: [PATCH v7 07/13] target/hexagon: prepare input for the idef-parser

2021-12-22 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 07/13] target/hexagon: prepare input

RE: [PATCH v7 11/13] target/hexagon: call idef-parser functions

2021-12-22 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 11/13] target/hexagon: call idef-parser

Re: [PATCH V7 19/29] vfio-pci: cpr part 1 (fd and dma)

2021-12-22 Thread Michael S. Tsirkin
On Wed, Dec 22, 2021 at 11:05:24AM -0800, Steve Sistare wrote: > Enable vfio-pci devices to be saved and restored across an exec restart > of qemu. > > At vfio creation time, save the value of vfio container, group, and device > descriptors in cpr state. > > In cpr-save and cpr-exec, suspend the

Re: [PATCH] pci: Skip power-off reset when pending unplug

2021-12-22 Thread Alex Williamson
On Wed, 22 Dec 2021 15:48:24 -0500 "Michael S. Tsirkin" wrote: > On Wed, Dec 22, 2021 at 12:08:09PM -0700, Alex Williamson wrote: > > On Tue, 21 Dec 2021 18:40:09 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Dec 21, 2021 at 09:36:56AM -0700, Alex Williamson wrote: > > > > On

Re: [PATCH V7 17/29] pci: export functions for cpr

2021-12-22 Thread Michael S. Tsirkin
On Wed, Dec 22, 2021 at 11:05:22AM -0800, Steve Sistare wrote: > Export msix_is_pending, msix_init_vector_notifiers, and pci_update_mappings > for use by cpr. No functional change. > > Signed-off-by: Steve Sistare With things like that, I prefer when the API is exported together with the patch

[PATCH v3 0/5] Add horizontal mouse scroll support

2021-12-22 Thread Dmitry Petrov
This patchset adds implements passing horizontal scroll events from the host system to guest systems via ps/2 mouse device. This is useful during testing horizontal scroll behaviour in guest operating systems as well as using it in case it provides any benefits for a particular application. The

[PATCH v3 2/5] ui/cocoa: pass horizontal scroll information to the device code

2021-12-22 Thread Dmitry Petrov
Signed-off-by: Dmitry Petrov --- ui/cocoa.m | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 69745c483b..ac18e14ce0 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -970,21 +970,27 @@ QemuCocoaView *cocoaView; */

[PATCH v3 5/5] ui/input-legacy: pass horizontal scroll information

2021-12-22 Thread Dmitry Petrov
This code seems to be used by vmport hack, passing these values allows to implement horizontal scroll support even when using vmport. In case it's not supported horizontal scroll will act as a vertical one. Signed-off-by: Dmitry Petrov --- ui/input-legacy.c | 15 +++ 1 file changed,

[PATCH v3 4/5] ui/sdl2: pass horizontal scroll information to the device code

2021-12-22 Thread Dmitry Petrov
Signed-off-by: Dmitry Petrov --- ui/sdl2.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 0bd30504cf..46a252d7d9 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -33,6 +33,7 @@ #include "sysemu/runstate-action.h" #include "sysemu/sysemu.h" #include

[PATCH v3 3/5] ui/gtk: pass horizontal scroll information to the device code

2021-12-22 Thread Dmitry Petrov
Signed-off-by: Dmitry Petrov --- ui/gtk.c | 54 ++ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 6a1f65d518..a8567b9ddc 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -968,33 +968,63 @@ static gboolean

[PATCH v3 1/5] ps2: Initial horizontal scroll support

2021-12-22 Thread Dmitry Petrov
This change adds support for horizontal scroll to ps/2 mouse device code. The code is implemented to match the logic of linux kernel which is used as a reference. Signed-off-by: Dmitry Petrov --- hw/input/ps2.c | 57 +++--- qapi/ui.json | 2 +- 2

Re: [PATCH] target/riscv/pmp: fix no pmp illegal intrs

2021-12-22 Thread Alistair Francis
On Tue, Dec 21, 2021 at 6:08 PM Nikita Shubin wrote: > > From: Nikita Shubin > > As per the privilege specification, any access from S/U mode should fail > if no pmp region is configured and pmp is present, othwerwise access > should succeed. > > Fixes: d102f19a208 (target/riscv/pmp: Raise

Re: [PATCH 3/3] meson: generate trace points for qmp commands

2021-12-22 Thread Paolo Bonzini
Il mar 21 dic 2021, 20:35 Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> ha scritto: --- a/trace/meson.build +++ b/trace/meson.build @@ -2,10 +2,14 @@ specific_ss.add(files('control-target.c')) trace_events_files = [] -foreach dir : [ '.' ] + trace_events_subdirs - trace_events_file

Re: [PATCH 3/3] meson: cleanup common-user/ build

2021-12-22 Thread Paolo Bonzini
Il mar 21 dic 2021, 21:32 Richard Henderson ha scritto: > On 12/21/21 8:33 AM, Paolo Bonzini wrote: > > Do not go through a static_library, which is only necessary in order to > reuse > > some source files between emulators and tests. > > That's not true, is it. Anyway, you're moving the file

RE: [PATCH v7 07/13] target/hexagon: prepare input for the idef-parser

2021-12-22 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 07/13] target/hexagon: prepare input

RE: [PATCH v7 03/13] target/hexagon: make slot number an unsigned

2021-12-22 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 03/13] target/hexagon: make slot number

RE: [PATCH v7 02/13] target/hexagon: import README for idef-parser

2021-12-22 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 02/13] target/hexagon: import README for

Re: [PATCH 3/6] linux-user: Add code for PR_GET/SET_UNALIGN

2021-12-22 Thread Laurent Vivier
Le 20/12/2021 à 22:41, Richard Henderson a écrit : This requires extra work for each target, but adds the common syscall code, and the necessary flag in CPUState. Reviewed-by: Warner Losh Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 3 +++

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-22 Thread Michael S. Tsirkin
On Wed, Dec 22, 2021 at 09:27:51PM +0100, Philippe Mathieu-Daudé wrote: > On Wed, Dec 22, 2021 at 9:20 PM Michael S. Tsirkin wrote: > > On Wed, Dec 22, 2021 at 08:19:41PM +0100, Philippe Mathieu-Daudé wrote: > > > +Mauro & Alex > > > > > > On 12/21/21 15:48, Michael S. Tsirkin wrote: > > > > When

Re: [PATCH 2/6] linux-user: Disable more prctl subcodes

2021-12-22 Thread Laurent Vivier
Le 20/12/2021 à 23:41, Philippe Mathieu-Daudé a écrit : On 12/20/21 22:41, Richard Henderson wrote: Create a list of subcodes that we want to pass on, a list of subcodes that should not be passed on because they would affect the running qemu itself, and a list that probably could be implemented

Re: [PATCH] pci: Skip power-off reset when pending unplug

2021-12-22 Thread Michael S. Tsirkin
On Wed, Dec 22, 2021 at 12:08:09PM -0700, Alex Williamson wrote: > On Tue, 21 Dec 2021 18:40:09 -0500 > "Michael S. Tsirkin" wrote: > > > On Tue, Dec 21, 2021 at 09:36:56AM -0700, Alex Williamson wrote: > > > On Mon, 20 Dec 2021 18:03:56 -0500 > > > "Michael S. Tsirkin" wrote: > > > > > > >

Re: [PATCH 1/6] linux-user: Split out do_prctl and subroutines

2021-12-22 Thread Laurent Vivier
Le 20/12/2021 à 22:41, Richard Henderson a écrit : Since the prctl constants are supposed to be generic, supply any that are not provided by the host. Split out subroutines for PR_GET_FP_MODE, PR_SET_FP_MODE, PR_GET_VL, PR_SET_VL, PR_RESET_KEYS, PR_SET_TAGGED_ADDR_CTRL, PR_GET_TAGGED_ADDR_CTRL.

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-22 Thread Philippe Mathieu-Daudé
On Wed, Dec 22, 2021 at 9:20 PM Michael S. Tsirkin wrote: > On Wed, Dec 22, 2021 at 08:19:41PM +0100, Philippe Mathieu-Daudé wrote: > > +Mauro & Alex > > > > On 12/21/21 15:48, Michael S. Tsirkin wrote: > > > When bus is looked up on a pci write, we didn't > > > validate that the lookup

Re: [PATCH v2 5/7] linux-user/nios2: Fix EA vs PC confusion

2021-12-22 Thread Laurent Vivier
Le 21/12/2021 à 03:50, Richard Henderson a écrit : The real kernel will talk about the user PC as EA, because that's where the hardware will have copied it, and where it expects to put it to then use ERET. But qemu does not emulate all of the exception stuff while emulating user-only.

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-22 Thread Michael S. Tsirkin
On Wed, Dec 22, 2021 at 08:19:41PM +0100, Philippe Mathieu-Daudé wrote: > +Mauro & Alex > > On 12/21/21 15:48, Michael S. Tsirkin wrote: > > When bus is looked up on a pci write, we didn't > > validate that the lookup succeeded. > > Fuzzers thus can trigger QEMU crash by dereferencing the NULL >

Re: [PATCH v2 4/7] linux-user/nios2: Map a real kuser page

2021-12-22 Thread Laurent Vivier
Le 21/12/2021 à 03:50, Richard Henderson a écrit : The first word of page1 is data, so the whole thing can't be implemented with emulation of addresses. Use init_guest_commpage for the allocation. Hijack trap number 16 to implement cmpxchg. Signed-off-by: Richard Henderson ---

[PATCH V7 08/29] memory: flat section iterator

2021-12-22 Thread Steve Sistare
Add an iterator over the sections of a flattened address space. Signed-off-by: Steve Sistare --- include/exec/memory.h | 31 +++ softmmu/memory.c | 20 2 files changed, 51 insertions(+) diff --git a/include/exec/memory.h

[PATCH V7 26/29] chardev: cpr for simple devices

2021-12-22 Thread Steve Sistare
Set QEMU_CHAR_FEATURE_CPR for devices that trivially support cpr. char-stdio is slightly less trivial. Allow the gdb server by closing it on exec. Signed-off-by: Steve Sistare --- chardev/char-mux.c | 1 + chardev/char-null.c| 1 + chardev/char-serial.c | 1 + chardev/char-stdio.c |

[PATCH V7 21/29] vfio-pci: cpr part 3 (intx)

2021-12-22 Thread Steve Sistare
Preserve vfio INTX state across cpr restart. Preserve VFIOINTx fields as follows: pin : Recover this from the vfio config in kernel space interrupt : Preserve its eventfd descriptor across exec. unmask : Ditto route.irq : This could perhaps be recovered in vfio_pci_post_load by

Re: [PATCH v2 1/5] ps2: Initial horizontal scroll support

2021-12-22 Thread Marc-André Lureau
Hi Dmitry On Wed, Dec 22, 2021 at 7:11 PM Dmitry Petrov wrote: > Hi Marc-André, > > Thank you for the comments! > > The reason of adding the support there was because I've been working on > horizontal scroll support for another os > (serenity os -

[PATCH V7 18/29] vfio-pci: refactor for cpr

2021-12-22 Thread Steve Sistare
Export vfio_address_spaces. Refactor vector use into a helper vfio_vector_init. Add vfio_notifier_init and vfio_notifier_cleanup for named notifiers, and pass additional arguments to vfio_remove_kvm_msi_virq. All for use by cpr in a subsequent patch. No functional change. Signed-off-by: Steve

[PATCH V7 10/29] machine: memfd-alloc option

2021-12-22 Thread Steve Sistare
Allocate anonymous memory using memfd_create if the memfd-alloc machine option is set. Signed-off-by: Steve Sistare --- hw/core/machine.c | 19 +++ include/hw/boards.h | 1 + qemu-options.hx | 6 ++ softmmu/physmem.c | 47

[PATCH V7 28/29] chardev: cpr for sockets

2021-12-22 Thread Steve Sistare
Save accepted socket fds before cpr-save, and look for them after cpr-load. in the environment after cpr-load. Reject cpr-exec if a socket enables the TLS or websocket option. Allow a monitor socket by closing it on exec. Signed-off-by: Mark Kanda Signed-off-by: Steve Sistare ---

[PATCH V7 17/29] pci: export functions for cpr

2021-12-22 Thread Steve Sistare
Export msix_is_pending, msix_init_vector_notifiers, and pci_update_mappings for use by cpr. No functional change. Signed-off-by: Steve Sistare --- hw/pci/msix.c | 20 ++-- hw/pci/pci.c | 3 +-- include/hw/pci/msix.h | 5 + include/hw/pci/pci.h | 1 + 4

[PATCH V7 00/29] Live Update

2021-12-22 Thread Steve Sistare
Provide the cpr-save, cpr-exec, and cpr-load commands for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cpr-save stops the VM and saves vmstate to an ordinary file. It supports any type of guest image and

[PATCH V7 29/29] cpr: only-cpr-capable option

2021-12-22 Thread Steve Sistare
Add the only-cpr-capable option, which causes qemu to exit with an error if any devices that are not capable of cpr are added. This guarantees that a cpr-exec operation will not fail with an unsupported device error. Signed-off-by: Steve Sistare --- MAINTAINERS | 1 +

[PATCH V7 15/29] cpr: restart HMP interfaces

2021-12-22 Thread Steve Sistare
cpr-save mode may be "restart" cpr-exec Call qmp_cpr_exec(). Arguments: command : command line to execute, with space-separated arguments Signed-off-by: Steve Sistare --- hmp-commands.hx | 21 - include/monitor/hmp.h | 1 + monitor/hmp-cmds.c| 11

[PATCH V7 25/29] chardev: cpr framework

2021-12-22 Thread Steve Sistare
Add QEMU_CHAR_FEATURE_CPR for devices that support cpr. Add the chardev reopen-on-cpr option for devices that can be closed on cpr and reopened after exec. cpr is allowed only if either QEMU_CHAR_FEATURE_CPR or reopen-on-cpr is set for all chardevs in the configuration. Signed-off-by: Steve

[PATCH V7 27/29] chardev: cpr for pty

2021-12-22 Thread Steve Sistare
Save and restore pty descriptors across cpr-save and cpr-load. Signed-off-by: Steve Sistare --- chardev/char-pty.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index a2d1e7c..9801a4f 100644 --- a/chardev/char-pty.c

[PATCH V7 19/29] vfio-pci: cpr part 1 (fd and dma)

2021-12-22 Thread Steve Sistare
Enable vfio-pci devices to be saved and restored across an exec restart of qemu. At vfio creation time, save the value of vfio container, group, and device descriptors in cpr state. In cpr-save and cpr-exec, suspend the use of virtual addresses in DMA mappings with VFIO_DMA_UNMAP_FLAG_VADDR,

[PATCH V7 24/29] loader: suppress rom_reset during cpr

2021-12-22 Thread Steve Sistare
Reported-by: Zheng Chuan Signed-off-by: Steve Sistare --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 052a0fd..e88fab2 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -52,6 +52,7 @@ #include "hw/hw.h"

[PATCH V7 14/29] cpr: restart mode

2021-12-22 Thread Steve Sistare
Provide the cpr-save restart mode, which preserves the guest VM across a restart of the qemu process. After cpr-save, the caller passes qemu command-line arguments to cpr-exec, which directly exec's the new qemu binary. The arguments must include -S so new qemu starts in a paused state. The

[PATCH V7 22/29] vfio-pci: recover from unmap-all-vaddr failure

2021-12-22 Thread Steve Sistare
If vfio_cpr_save fails to unmap all vaddr's, then recover by walking all flat sections to restore the vaddr for each. Do so by invoking the vfio listener callback, and passing a new "replay" flag that tells it to replay a mapping without re-allocating new userland data structures. Signed-off-by:

[PATCH V7 12/29] vl: helper to request re-exec

2021-12-22 Thread Steve Sistare
Add a qemu_system_exec_request() hook that causes the main loop to exit and re-exec qemu using the specified arguments. Signed-off-by: Steve Sistare --- include/sysemu/runstate.h | 1 + softmmu/runstate.c| 21 + 2 files changed, 22 insertions(+) diff --git

[PATCH V7 20/29] vfio-pci: cpr part 2 (msi)

2021-12-22 Thread Steve Sistare
Finish cpr for vfio-pci MSI/MSI-X devices by preserving eventfd's and vector state. Signed-off-by: Steve Sistare --- hw/vfio/pci.c | 103 +- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[PATCH V7 04/29] migration: simplify savevm

2021-12-22 Thread Steve Sistare
Use qemu_file_open to simplify a few functions in savevm.c. No functional change. Signed-off-by: Steve Sistare --- migration/savevm.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 0bef031..c71d525 100644

[PATCH V7 16/29] hostmem-memfd: cpr for memory-backend-memfd

2021-12-22 Thread Steve Sistare
Preserve memory-backend-memfd memory objects during cpr. Signed-off-by: Steve Sistare --- backends/hostmem-memfd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c index 3fc85c3..5097a05 100644 ---

[PATCH V7 09/29] oslib: qemu_clear_cloexec

2021-12-22 Thread Steve Sistare
Define qemu_clear_cloexec, analogous to qemu_set_cloexec. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Steve Sistare --- include/qemu/osdep.h | 1 + util/oslib-posix.c | 9 + util/oslib-win32.c | 4 3 files changed, 14 insertions(+) diff --git a/include/qemu/osdep.h

[PATCH V7 23/29] vhost: reset vhost devices for cpr

2021-12-22 Thread Steve Sistare
A vhost device is implicitly preserved across re-exec because its fd is not closed, and the value of the fd is specified on the command line for the new qemu to find. However, new qemu issues an VHOST_RESET_OWNER ioctl, which fails because the device already has an owner. To fix, reset the owner

[PATCH V7 01/29] memory: qemu_check_ram_volatile

2021-12-22 Thread Steve Sistare
Add a function that returns an error if any ram_list block represents volatile memory. Signed-off-by: Steve Sistare --- include/exec/memory.h | 8 softmmu/memory.c | 26 ++ 2 files changed, 34 insertions(+) diff --git a/include/exec/memory.h

[PATCH V7 03/29] migration: qemu file wrappers

2021-12-22 Thread Steve Sistare
Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix files and file descriptors. Signed-off-by: Steve Sistare --- migration/qemu-file-channel.c | 36 migration/qemu-file-channel.h | 6 ++ 2 files changed, 42 insertions(+) diff --git

[PATCH V7 13/29] cpr: preserve extra state

2021-12-22 Thread Steve Sistare
cpr must save state that is needed after qemu is restarted, when devices are realized. Thus the extra state cannot be saved in the cpr-load vmstate file, as objects must already exist before that file can be loaded. Instead, define auxilliary state structures and vmstate descriptions, not

[PATCH V7 05/29] vl: start on wakeup request

2021-12-22 Thread Steve Sistare
If qemu starts and loads a VM in the suspended state, then a later wakeup request will set the state to running, which is not sufficient to initialize the vm, as vm_start was never called during this invocation of qemu. See qemu_system_wakeup_request(). Define the start_on_wakeup_requested()

[PATCH V7 06/29] cpr: reboot mode

2021-12-22 Thread Steve Sistare
Provide the cpr-save and cpr-load functions for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cpr-save stops the VM and saves vmstate to an ordinary file. It supports any type of guest image and block

[PATCH V7 07/29] cpr: reboot HMP interfaces

2021-12-22 Thread Steve Sistare
cpr-save Call qmp_cpr_save(). Arguments: filename : save vmstate to filename mode: must be "reboot" cpr-load Call qmp_cpr_load(). Arguments: filename : load vmstate from filename Signed-off-by: Mark Kanda Signed-off-by: Steve Sistare --- hmp-commands.hx | 31

[PATCH V7 11/29] qapi: list utility functions

2021-12-22 Thread Steve Sistare
Generalize strList_from_comma_list() to take any delimiter character, rename as strList_from_string(), and move it to qapi/util.c. Also add strv_from_strList() and QAPI_LIST_LENGTH(). No functional change. Signed-off-by: Steve Sistare --- include/qapi/util.h | 28

[PATCH V7 02/29] migration: fix populate_vfio_info

2021-12-22 Thread Steve Sistare
Include CONFIG_DEVICES so that populate_vfio_info is instantiated for CONFIG_VFIO. Signed-off-by: Steve Sistare --- migration/target.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/migration/target.c b/migration/target.c index 907ebf0..4390bf0 100644 ---

RE: [PATCH v7 05/13] target/hexagon: introduce new helper functions

2021-12-22 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 05/13] target/hexagon: introduce new

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-22 Thread Philippe Mathieu-Daudé
+Mauro & Alex On 12/21/21 15:48, Michael S. Tsirkin wrote: > When bus is looked up on a pci write, we didn't > validate that the lookup succeeded. > Fuzzers thus can trigger QEMU crash by dereferencing the NULL > bus pointer. > > Fixes: b32bd763a1 ("pci: introduce acpi-index property for PCI

[PATCH v2 3/3] avocado/vnc: add test_change_listen

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add simple test-case for new change-vnc-listen qmp command. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Marc-André Lureau --- tests/avocado/vnc.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/avocado/vnc.py b/tests/avocado/vnc.py index

[PATCH v2 2/3] qapi/ui: introduce change-vnc-listen

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add command that can change addresses where VNC server listens for new connections. Prior to 6.0 this functionality was available through 'change' qmp command which was deleted. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Marc-André Lureau --- docs/about/removed-features.rst | 3

[PATCH v2 0/3] qapi/ui: add change-vnc-listen

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2: 01, 03: add Mark-Andre's r-bs 02: add a bit of documentation and "'if': 'CONFIG_VNC'", still, keep Mark-Adnre's r-b here too Recently our customer requested a possibility to change VNC listen port dynamically. Happily in Rhel7-based Qemu we already have this possibility: through

[PATCH v2 1/3] ui/vnc: refactor arrays of addresses to SocketAddressList

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Let's use SocketAddressList instead of dynamic arrays. Benefits: - Automatic cleanup: don't need specific freeing function and drop some gotos. - Less indirection: no triple asterix anymore! - Prepare for the following commit, which will reuse new interface of vnc_display_listen().

Re: [PATCH] ui/dbus: fix buffer-overflow detected by ASAN

2021-12-22 Thread Philippe Mathieu-Daudé
On 12/22/21 15:40, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > On the last added dbus patch, I left a tiny BO: > > ==441487==ERROR: AddressSanitizer: heap-buffer-overflow on address > 0x61125a70 at pc 0x7f0817bb764c bp 0x7ffde672ae60 sp 0x7ffde672ae58 > WRITE of size 8

Re: [PATCH] pci: Skip power-off reset when pending unplug

2021-12-22 Thread Alex Williamson
On Tue, 21 Dec 2021 18:40:09 -0500 "Michael S. Tsirkin" wrote: > On Tue, Dec 21, 2021 at 09:36:56AM -0700, Alex Williamson wrote: > > On Mon, 20 Dec 2021 18:03:56 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Dec 20, 2021 at 11:26:59AM -0700, Alex Williamson wrote: > > > > The

[PULL 7/7] iotests: add nbd-reconnect-on-open test

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin --- .../qemu-iotests/tests/nbd-reconnect-on-open | 71 +++ .../tests/nbd-reconnect-on-open.out | 11 +++ 2 files changed, 82 insertions(+) create mode 100755

[PULL 5/7] iotests.py: add and use qemu_io_wrap_args()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
For qemu_io* functions support --image-opts argument, which conflicts with -f argument from qemu_io_args. For QemuIoInteractive use new wrapper as well, which allows relying on default format. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin ---

[PULL 1/7] nbd: allow reconnect on open, with corresponding new options

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
It is useful when start of vm and start of nbd server are not simple to sync. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- qapi/block-core.json | 9 - block/nbd.c | 45 +++- 2 files changed, 52 insertions(+),

[PULL 6/7] iotests.py: add qemu_io_popen()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Add qemu-io Popen constructor wrapper. To be used in the following new test commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[PULL 2/7] nbd/client-connection: nbd_co_establish_connection(): return real error

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
The only caller of nbd_do_establish_connection() that uses errp is nbd_open(). The only way to cancel this call is through open_timer timeout. And for this case, user will be more interested in description of last failed connect rather than in "Connection attempt cancelled by other operation".

[PULL 4/7] iotests.py: add qemu_tool_popen()

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Split qemu_tool_popen() from qemu_tool_pipe_and_status() to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin --- tests/qemu-iotests/iotests.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

[PULL 0/7] NBD patches

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at: https://src.openvz.org/scm/~vsementsov/qemu.git

[PULL 3/7] nbd/client-connection: improve error message of cancelled attempt

2021-12-22 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- nbd/client-connection.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nbd/client-connection.c b/nbd/client-connection.c index 722998c985..2bda42641d 100644 --- a/nbd/client-connection.c +++

Re: [PATCH v2 1/7] linux-user/nios2: Properly emulate EXCP_TRAP

2021-12-22 Thread Laurent Vivier
Le 21/12/2021 à 03:50, Richard Henderson a écrit : The real kernel has to load the instruction and extract the imm5 field; for qemu, modify the translator to do this. The use of R_AT for this in cpu_loop was a bug. Handle the other trap numbers as per the kernel's trap_table. Reviewed-by:

Re: [PATCH 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2021-12-22 Thread Philippe Mathieu-Daudé
On 12/22/21 08:05, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> Do not list vhost-user-blk in BlockExportType >> when CONFIG_VHOST_USER_BLK_SERVER is disabled. >> >> Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API") > > My immediate reaction was "what

Re: [PATCH 0/5] ppc/pnv: Preliminary cleanups before user created PHBs

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: Hello, There are the last cleanups preparing ground for PHBs created on the command line and possibly libvirt support. As a note to whoever wants to give this series a go: I'm working in more fixes and cleanups on top of these patches. I'm

Re: [PATCH 4/5] ppc/pnv: Attach PHB3 root port device when defaults are enabled

2021-12-22 Thread Daniel Henrique Barboza
On 12/22/21 03:38, Cédric Le Goater wrote: This cleanups the PHB3 model a bit more since the root port is an independent device and it will ease our task when adding user created PHB3s. Signed-off-by: Cédric Le Goater --- Reviewed-by: Daniel Henrique Barboza

  1   2   >