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

2021-11-09 Thread Zheng Chuan
Hi, steve On 2021/8/11 1:06, Alex Williamson wrote: > On Fri, 6 Aug 2021 14:43:53 -0700 > 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 >> descripto

Re: [PATCH 4/5] hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

2021-11-09 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 06:30:13AM +0100, Julia Suvorova wrote: > There are two ways to enable ACPI PCI Hot-plug: > > * Disable the Hot-plug Capable bit on PCIe slots. > > This was the first approach which led to regression [1-2], as > I/O space for a port is allocated only when it is hot

[PATCH v2 14/14] target/riscv: Enable uxl field write

2021-11-09 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/csr.c | 5 ++--- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/op_helper.c| 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 33e342f5

[PATCH v2 09/14] target/riscv: Relax debug check for pm write

2021-11-09 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/csr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 9f41954894..74c0b788fd 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1445,6 +1445,9 @@ static bool check_pm_current_disabled(CPURISC

[PATCH v2 13/14] target/riscv: Don't save pc when exception return

2021-11-09 Thread LIU Zhiwei
As pc will be written by the xepc in exception return, just ignore pc in translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/helper.h | 4 ++-- target/riscv/insn_trans/trans_privileged.c.inc | 7 ++- target/riscv/op_helper.c

[PATCH v2 12/14] target/riscv: Split out the vill from vtype

2021-11-09 Thread LIU Zhiwei
We need not specially process vtype when XLEN changes. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 1 + target/riscv/csr.c | 15 ++- target/riscv/machine.c | 1 + target/riscv/vector_helper.c | 7 ++- 4 files changed, 18 insertions(+), 6 deletio

[PATCH v2 08/14] target/riscv: Fix check range for first fault only

2021-11-09 Thread LIU Zhiwei
Only check the range that has passed the address translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/vector_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index cb6fa

[PATCH v2 10/14] target/riscv: Adjust vector address with mask

2021-11-09 Thread LIU Zhiwei
The mask comes from the pointer masking extension, or the max value corresponding to XLEN bits. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 4 target/riscv/cpu_helper.c| 40 target/riscv/csr.c

[PATCH v2 11/14] target/riscv: Adjust scalar reg in vector with XLEN

2021-11-09 Thread LIU Zhiwei
When sew <= 32bits, not need to extend scalar reg. When sew > 32bits, if xlen is less that sew, we should sign extend the scalar register, except explicitly specified by the spec. Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvv.c.inc | 5 +++-- target/riscv/internals.h

[PATCH v2 06/14] target/riscv: Adjust vsetvl according to XLEN

2021-11-09 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 2 ++ target/riscv/helper.h | 2 +- target/riscv/insn_trans/trans_rvv.c.inc | 4 ++-- target/riscv/vector_helper.c| 19 +++ 4 files changed, 20 insertions(+), 7 deletions(-) d

[PATCH v2 07/14] target/riscv: Ajdust vector atomic check with XLEN

2021-11-09 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvv.c.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc index f5aabd5263..41c7c88904 100644 --- a/target/riscv/insn_trans/trans_rv

[PATCH v2 03/14] target/riscv: Extend pc for runtime pc write

2021-11-09 Thread LIU Zhiwei
In some cases, we must restore the guest PC to the address of the start of the TB, such as when the instruction counter hits zero. So extend pc register according to current xlen for these cases. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c| 22 +++--- target/riscv/cp

[PATCH v2 05/14] target/riscv: Calculate address according to XLEN

2021-11-09 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvd.c.inc | 23 ++- target/riscv/insn_trans/trans_rvf.c.inc | 23 ++- target/riscv/insn_trans/trans_rvi.c.inc | 18 ++ target/riscv/translate.c| 13 + 4

[PATCH v2 04/14] target/riscv: Use gdb xml according to max mxlen

2021-11-09 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/gdbstub.c | 73 +++--- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index 23429179e2..7563414ef7 100644 --- a/target/ri

[PATCH v2 02/14] target/riscv: Ignore the pc bits above XLEN

2021-11-09 Thread LIU Zhiwei
The read from PC for translation is in cpu_get_tb_cpu_state, before translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/cpu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c

[PATCH v2 01/14] target/riscv: Sign extend pc for different XLEN

2021-11-09 Thread LIU Zhiwei
When pc is written, it is sign-extended to fill the widest supported XLEN. Signed-off-by: LIU Zhiwei --- target/riscv/translate.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 1d57bc97b5..a6a73ced9e

[PATCH v2 00/14] Support UXL filed in xstatus

2021-11-09 Thread LIU Zhiwei
In this patch set, we process the pc reigsters writes, gdb reads and writes, and address calculation under different UXLEN settings. v2: Split out vill from vtype Remove context switch when xlen changes at exception Use XL instead of OL in many places Use pointer masking and XLEN for vecto

Re: [PULL 05/33] i386: Add 'sgx-epc' device to expose EPC sections to guest

2021-11-09 Thread Thomas Huth
On 10/11/2021 07.41, Yang Zhong wrote: On Tue, Nov 09, 2021 at 06:48:59PM +0100, Paolo Bonzini wrote: On 11/9/21 15:25, Thomas Huth wrote: Our device-crash-test script reports that this new device can be used to crash QEMU: $ ./qemu-system-x86_64 -M none -device sgx-epc /home/thuth/devel/qemu/

Re: [PATCH 1/2] target/ppc: Fixed call to deferred exception

2021-11-09 Thread Cédric Le Goater
On 11/9/21 17:37, Daniel Henrique Barboza wrote: On 10/20/21 09:57, Lucas Mateus Castro (alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but helper_float_check_status checks fp_statu

Re: [PULL 05/33] i386: Add 'sgx-epc' device to expose EPC sections to guest

2021-11-09 Thread Yang Zhong
On Tue, Nov 09, 2021 at 06:48:59PM +0100, Paolo Bonzini wrote: > On 11/9/21 15:25, Thomas Huth wrote: > >Our device-crash-test script reports that this new device can be > >used to crash QEMU: > > > >$ ./qemu-system-x86_64 -M none -device sgx-epc > >/home/thuth/devel/qemu/include/hw/i386/pc.h:128:P

RE: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-09 Thread Zhang, Chen
> -Original Message- > From: Markus Armbruster > Sent: Wednesday, November 10, 2021 2:21 PM > To: Zhang, Chen > Cc: Jason Wang ; qemu-dev de...@nongnu.org>; Li Zhijian > Subject: Re: [PATCH] net/filter: Enable the vnet_hdr_support by default > > "Zhang, Chen" writes: > > >> -O

Re: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-09 Thread Markus Armbruster
"Zhang, Chen" writes: >> -Original Message- >> From: Markus Armbruster >> Sent: Wednesday, November 10, 2021 1:07 PM >> To: Zhang, Chen >> Cc: Jason Wang ; qemu-dev > de...@nongnu.org>; Li Zhijian >> Subject: Re: [PATCH] net/filter: Enable the vnet_hdr_support by default >> >> Zhang C

[PULL 2/3] docs/devel/qapi-code-gen: Belatedly document feature documentation

2021-11-09 Thread Markus Armbruster
Commit 6a8c0b5102 "qapi: Add feature flags to struct types" neglected to document how to document feature flags. Make up for that. Cc: Kevin Wolf Signed-off-by: Markus Armbruster Message-Id: <20211026111023.76937-3-arm...@redhat.com> [Editing accident fixed] --- docs/devel/qapi-code-gen.rst |

Re: [PATCH] audio: Add sndio backend

2021-11-09 Thread WANG Xuerui
On 2021/11/7 13:19, Brad Smith wrote: > audio: Add sndio backend > > Add a sndio backend. > > sndio is the native API used by OpenBSD, although it has been ported to > other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). > > The C code is from Alexandre Ratchov and the rest of

[PULL 0/3] QAPI patches patches for 2021-11-10

2021-11-09 Thread Markus Armbruster
The following changes since commit 0a70bcf18caf7a61d480f8448723c15209d128ef: Update version for v6.2.0-rc0 release (2021-11-09 18:22:57 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2021-11-10 for you to fetch changes up to 8c0bae5a19478db933

[PULL 1/3] docs/devel/qapi-code-gen: Drop a duplicate paragraph

2021-11-09 Thread Markus Armbruster
Commit 55ec69f8b1 "docs/devel/qapi-code-gen.txt: Update to new rST backend conventions" accidentally duplicated a paragraph. Drop it. Cc: Peter Maydell Signed-off-by: Markus Armbruster Message-Id: <20211026111023.76937-2-arm...@redhat.com> Reviewed-by: John Snow --- docs/devel/qapi-code-gen.r

[PULL 3/3] qapi: Belatedly mark unstable QMP parts with feature 'unstable'

2021-11-09 Thread Markus Armbruster
The work in merge commit e86e00a2493 lacks special feature flag 'unstable', because it raced with it. Add it where it's missing. Signed-off-by: Markus Armbruster Message-Id: <20211109145559.2122827-1-arm...@redhat.com> Reviewed-by: Damien Hedde Reviewed-by: Daniel P. Berrangé Reviewed-by: Phil

Re: [PATCH 1/5] hw/pci/pcie_port: Rename 'native-hotplug' to 'native-hpc-bit'

2021-11-09 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 06:30:10AM +0100, Julia Suvorova wrote: > Rename the option to better represent its function - toggle Hot-Plug > Capable bit in the PCIe Slot Capability. > > Signed-off-by: Julia Suvorova > --- > include/hw/pci/pcie_port.h | 2 +- > hw/i386/pc_q35.c

Re: [PATCH] qapi: Belatedly mark unstable QMP parts with feature 'unstable'

2021-11-09 Thread Markus Armbruster
Markus Armbruster writes: > The work in merge commit e86e00a2493 lacks special feature flag > 'unstable', because it raced with it. Add it where it's missing. > > Signed-off-by: Markus Armbruster Queued for 6.2.

Re: [PATCH] monitor: Fix find_device_state() for IDs containing slashes

2021-11-09 Thread Markus Armbruster
Markus Armbruster writes: > Recent commit 6952026120 "monitor: Tidy up find_device_state()" > assumed the function's argument is "the device's ID or QOM path" (as > documented for device_del). It's actually either an absolute QOM > path, or a QOM path relative to /machine/peripheral/. Such a re

[PULL 0/1] Monitor patches patches for 2021-11-10

2021-11-09 Thread Markus Armbruster
The following changes since commit 0a70bcf18caf7a61d480f8448723c15209d128ef: Update version for v6.2.0-rc0 release (2021-11-09 18:22:57 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2021-11-10 for you to fetch changes up to 1bf4d3294bd48b7

[PULL 1/1] monitor: Fix find_device_state() for IDs containing slashes

2021-11-09 Thread Markus Armbruster
Recent commit 6952026120 "monitor: Tidy up find_device_state()" assumed the function's argument is "the device's ID or QOM path" (as documented for device_del). It's actually either an absolute QOM path, or a QOM path relative to /machine/peripheral/. Such a relative path is a device ID when it d

[PATCH 4/5] hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

2021-11-09 Thread Julia Suvorova
There are two ways to enable ACPI PCI Hot-plug: * Disable the Hot-plug Capable bit on PCIe slots. This was the first approach which led to regression [1-2], as I/O space for a port is allocated only when it is hot-pluggable, which is determined by HPC bit. * Leave the HPC bit on

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

2021-11-09 Thread Julia Suvorova
Prepare for changing the _OSC method in q35 DSDT. Signed-off-by: Julia Suvorova --- tests/qtest/bios-tables-test-allowed-diff.h | 16 1 file changed, 16 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index d

[PATCH 1/5] hw/pci/pcie_port: Rename 'native-hotplug' to 'native-hpc-bit'

2021-11-09 Thread Julia Suvorova
Rename the option to better represent its function - toggle Hot-Plug Capable bit in the PCIe Slot Capability. Signed-off-by: Julia Suvorova --- include/hw/pci/pcie_port.h | 2 +- hw/i386/pc_q35.c | 2 +- hw/pci-bridge/gen_pcie_root_port.c | 6 +- hw/pci/pcie.c

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

2021-11-09 Thread Julia Suvorova
The changes are the result of 'hw/i386/acpi-build: Deny control on PCIe Native Hot-Plug in _OSC' and listed here: Method (_OSC, 4, NotSerialized) // _OSC: Operating System Capabilities { CreateDWordField (Arg3, Zero, CDW1) If ((Arg0 == ToUUID

[PATCH 2/5] hw/acpi/ich9: Add compatibility option for 'native-hpc-bit'

2021-11-09 Thread Julia Suvorova
To solve issues [1-2] the Hot Plug Capable bit in PCIe Slots will be turned on, while the switch to ACPI Hot-plug will be done in the DSDT table. Introducing 'x-keep-native-hpc' option disables the HPC bit only in 6.1 and as a result keeps the forced 'reserve-io' on pcie-root-ports in 6.1 too. [1

[PATCH 0/5] Fix Q35 ACPI PCI Hot-plug I/O issues

2021-11-09 Thread Julia Suvorova
Attempt [1] to fix I/O allocation with the 'reserve-io' hint on each pcie-root-port resulted in regression [2-3]. This patchset aims to fix it by addressing the root cause of the problem - the disabled PCIe Slot HPC bit. [1] 'hw/pcie-root-port: Fix hotplug for PCI devices requiring IO' [2] https:/

RE: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-09 Thread Zhang, Chen
> -Original Message- > From: Markus Armbruster > Sent: Wednesday, November 10, 2021 1:07 PM > To: Zhang, Chen > Cc: Jason Wang ; qemu-dev de...@nongnu.org>; Li Zhijian > Subject: Re: [PATCH] net/filter: Enable the vnet_hdr_support by default > > Zhang Chen writes: > > > This patch

Re: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-09 Thread Markus Armbruster
Zhang Chen writes: > This patch make filters and colo-compare module support vnet_hdr by > default. And also support -device non-virtio-net(like e1000.). > But it can't avoid user manual configuration error between > different filters when enable/disable virtio-net-pci. > > Signed-off-by: Zhang C

Re: [PATCH 13/13] target/riscv: Enable uxl field write

2021-11-09 Thread LIU Zhiwei
On 2021/11/2 上午1:01, Richard Henderson wrote: On 11/1/21 6:01 AM, LIU Zhiwei wrote:   mask |= MSTATUS_MPV | MSTATUS_GVA; +    if ((val ^ mstatus) & MSTATUS64_UXL) { +    mask |= MSTATUS64_UXL; +    } Why do you need the conditional here? Why is this not just     mask

[PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-09 Thread Zhang Chen
This patch make filters and colo-compare module support vnet_hdr by default. And also support -device non-virtio-net(like e1000.). But it can't avoid user manual configuration error between different filters when enable/disable virtio-net-pci. Signed-off-by: Zhang Chen --- net/colo-compare.c

RE: [PATCH V5 1/3] net/filter: Optimize transfer protocol for filter-mirror/redirector

2021-11-09 Thread Zhang, Chen
> > > > > > > > > > > > If we can do that, isn't it much more simpler to make > > > > > > vnet_hdr_support by default? > > > > > > > > > > Yes, For compatibility filters and COLO still work with the > > > > > original > > > > "vnet_hdr_support". > > > > > For new users, they can enable the new "aut

Re: [RFC 4/4] common-user: Allow return codes to be adjusted after sytsem call

2021-11-09 Thread Warner Losh
On Tue, Nov 9, 2021 at 1:11 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 11/8/21 7:49 PM, Warner Losh wrote: > > > /* code path for having successfully executed the syscall */ > > > + ADJUST_SYSCALL_RETCODE > > > ret > > > > > > 0: > >

Re: [PULL 1/2] hw: m68k: virt: Add compat machine for 6.1

2021-11-09 Thread BALATON Zoltan
On Tue, 9 Nov 2021, Peter Maydell wrote: On Tue, 9 Nov 2021 at 20:01, BALATON Zoltan wrote: But maybe it's too late to change at this point. Massively too late. We've been using this versioned-machine scheme for over a decade, and the upheaval of changing the way it works now would be rather

Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-11-09 Thread Leif Lindholm
On Tue, Nov 09, 2021 at 21:21:46 +, Peter Maydell wrote: > > Hmm, right. So you're thinking containing the versioning fully in the > > interfaces presented by the model: > > - Is the version node present? > > - If so, is it greater than X? > > - If so, is it great enough to support the SC

Re: [PATCH] audio: Add sndio backend

2021-11-09 Thread Brad Smith
On 11/8/2021 9:58 AM, Paolo Bonzini wrote: On 11/7/21 06:19, Brad Smith wrote:   if not get_option('spice_protocol').auto() or have_system @@ -1301,6 +1306,7 @@ if have_system   'oss': oss.found(),   'pa': pulse.found(),   'sdl': sdl.found(), +    'sndio': sndio.found(),     }     f

Re: [PULL 1/2] hw: m68k: virt: Add compat machine for 6.1

2021-11-09 Thread Peter Maydell
On Tue, 9 Nov 2021 at 20:01, BALATON Zoltan wrote: > But maybe it's too late to change at this point. Massively too late. We've been using this versioned-machine scheme for over a decade, and the upheaval of changing the way it works now would be rather out of proportion purely to tidy up the lis

Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-11-09 Thread Peter Maydell
On Tue, 9 Nov 2021 at 20:42, Leif Lindholm wrote: > > On Tue, Nov 09, 2021 at 13:43:50 +, Peter Maydell wrote: > > On Fri, 15 Oct 2021 at 13:23, Leif Lindholm wrote: > > > (Apologies for delay. Alex also tells me you are currently away, but > > > there is no strong urgency here.) > > > > (Tha

[PATCH v3] s390: kvm: adjust diag318 resets to retain data

2021-11-09 Thread Collin Walling
The CPNC portion of the diag 318 data is erroneously reset during an initial CPU reset caused by SIGP. Let's go ahead and relocate the diag318_info field within the CPUS390XState struct such that it is only zeroed during a clear reset. This way, the CPNC will be retained for each VCPU in the config

Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-11-09 Thread Leif Lindholm
On Tue, Nov 09, 2021 at 13:43:50 +, Peter Maydell wrote: > On Fri, 15 Oct 2021 at 13:23, Leif Lindholm wrote: > > (Apologies for delay. Alex also tells me you are currently away, but > > there is no strong urgency here.) > > (Thanks for the ping via Alex -- I missed this email when I was > sc

Re: [PULL 1/2] hw: m68k: virt: Add compat machine for 6.1

2021-11-09 Thread BALATON Zoltan
On Tue, 9 Nov 2021, Daniel P. Berrangé wrote: On Tue, Nov 09, 2021 at 01:34:49PM +0100, BALATON Zoltan wrote: On Tue, 9 Nov 2021, Laurent Vivier wrote: Add the missing machine type for m68k/virt Cc: qemu-sta...@nongnu.org Signed-off-by: Laurent Vivier Message-Id: <20211106194158.4068596-2-lau

[PATCH] target/ppc: Fix register update on lf[sd]u[x]/stf[sd]u[x]

2021-11-09 Thread matheus . ferst
From: Matheus Ferst These instructions should update the GPR indicated by the field RA instead of RT. This error caused a regression on Mac OS 9 boot and some graphical glitches in OS X. Fixes: a39a106634a9 ("target/ppc: Move load and store floating point instructions to decodetree") Reported-b

Re: Qemu and ARM secure state.

2021-11-09 Thread Peter Maydell
On Tue, 9 Nov 2021 at 19:06, Jean-Christophe DUBOIS wrote: > So basically the Qemu i.MX7 processor code needs to set psci-conduit to SMC > because we want to be able to boot the Linux kernel directly (without u-boot) > with Qemu emulating the PSCI services when an SMC instruction is triggered. >

qemu-img.c possibly overflowing shifts by BDRV_SECTOR_BITS

2021-11-09 Thread Peter Maydell
Hi; Coverity is complaining about some of the places in qemu-img.c where it takes a 32-bit variable and shifts it left by BDRV_SECTOR_BITS to convert a sector count to a byte count, because it's doing the shift in 32-bits rather than 64 and so Coverity thinks there might be overflow (CID 1465221, 1

Re: Qemu and ARM secure state.

2021-11-09 Thread Jean-Christophe DUBOIS
Le 09/11/2021 à 11:55, Peter Maydell a écrit : On Mon, 8 Nov 2021 at 22:09, Jean-Christophe DUBOIS wrote: OK, so one problem seems to be that PSCI-via-SMC is enabled on i.MX6UL when there is no built in PSCI related function on this processor. According the Linux DTS, i.MX7 (solo and dual) pr

[PATCH] spapr_numa.c: fix FORM1 distance-less nodes

2021-11-09 Thread Daniel Henrique Barboza
Commit 71e6fae3a99 fixed an issue with FORM2 affinity guests with NUMA nodes in which the distance info is absent in machine_state->numa_state->nodes. This happens when QEMU adds a default NUMA node and when the user adds NUMA nodes without specifying the distances. During the discussions of the f

[PATCH v4 2/2] accel/tcg: Register a force_rcu notifier

2021-11-09 Thread Greg Kurz
A TCG vCPU doing a busy loop systematicaly hangs the QEMU monitor if the user passes 'device_add' without argument. This is because drain_cpu_all() which is called from qmp_device_add() cannot return if readers don't exit read-side critical sections. That is typically what busy-looping TCG vCPUs do

[PATCH v4 1/2] rcu: Introduce force_rcu notifier

2021-11-09 Thread Greg Kurz
The drain_rcu_call() function can be blocked as long as an RCU reader stays in a read-side critical section. This is typically what happens when a TCG vCPU is executing a busy loop. It can deadlock the QEMU monitor as reported in https://gitlab.com/qemu-project/qemu/-/issues/650 . This can be avoi

[PATCH v4 0/2] accel/tcg: Fix monitor deadlock

2021-11-09 Thread Greg Kurz
Commit 7bed89958bfb ("device_core: use drain_call_rcu in in qmp_device_add") introduced a regression in QEMU 6.0 : passing device_add without argument hangs the monitor. This was reported against qemu-system-mips64 with TGC, but I could consistently reproduce it with other targets (x86 and ppc64).

Re: Failure of hot plugging secondary virtio_blk into q35 Windows 2019

2021-11-09 Thread Daniel P . Berrangé
On Tue, Nov 09, 2021 at 12:01:30PM -0500, Annie.li wrote: > On 11/9/2021 6:19 AM, Daniel P. Berrangé wrote: > > On Tue, Nov 09, 2021 at 04:40:10PM +0530, Ani Sinha wrote: > > > On Tue, Nov 9, 2021 at 3:23 PM Daniel P. Berrangé > > > wrote: > > > > On Tue, Nov 09, 2021 at 12:41:39PM +0530, Ani Sin

Re: [PATCH v3 2/2] accel/tcg: Register a force_rcu notifier

2021-11-09 Thread Greg Kurz
On Tue, 9 Nov 2021 19:03:56 +0100 Paolo Bonzini wrote: > On 11/9/21 18:24, Greg Kurz wrote:> Anyway, it seems more explicit to use > rr_current_cpu. > > > >> Alternately, no async_run_on_cpu at all, just rr_kick_next_cpu(). > >> > > > > Heh, this looks even better ! I'll try this right away. >

Re: [PATCH] meson.build: Support ncurses on MacOS

2021-11-09 Thread Daniel P . Berrangé
On Tue, Nov 09, 2021 at 06:49:57PM +0100, Stefan Weil wrote: > Am 15.06.21 um 03:53 schrieb Brad Smith: > > > On 6/14/2021 1:45 AM, Philippe Mathieu-Daudé wrote: > > > On 6/13/21 8:33 AM, Stefan Weil wrote: > > > > Am 13.06.21 um 03:40 schrieb Brad Smith: > > > > > > > > > This same problem also

Re: [PATCH v2 03/34] target/ppc: Move load and store floating point instructions to decodetree

2021-11-09 Thread Mark Cave-Ayland
On 09/11/2021 17:32, Matheus K. Ferst wrote: On 09/11/2021 10:43, Mark Cave-Ayland wrote: On 29/10/2021 21:23, matheus.fe...@eldorado.org.br wrote: From: Fernando Eckhardt Valle Move load floating point instructions (lfs, lfsu, lfsx, lfsux, lfd, lfdu, lfdx, lfdux) and store floating point

[PULL 1/3] docs/block-replication: use blockdev-backup

2021-11-09 Thread Vladimir Sementsov-Ogievskiy
We are going to deprecate drive-backup, so don't mention it here. Moreover, blockdev-backup seems more correct in the context. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/block-replication.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 0/3] jobs: deprecate drive-backup qmp command

2021-11-09 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit 2b22e7540d6ab4efe82d442363e3fc900cea6584: Merge tag 'm68k-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging (2021-11-09 13:16:56 +0100) are available in the Git repository at: https://src.openvz.org/scm/~vsementsov/qemu.git tags/pull-

Re: [PATCH v3 2/2] accel/tcg: Register a force_rcu notifier

2021-11-09 Thread Paolo Bonzini
On 11/9/21 18:24, Greg Kurz wrote:> Anyway, it seems more explicit to use rr_current_cpu. Alternately, no async_run_on_cpu at all, just rr_kick_next_cpu(). Heh, this looks even better ! I'll try this right away. Once you've tested it I can queue the series with just a --- a/accel/tcg/tcg

Re: Failure of hot plugging secondary virtio_blk into q35 Windows 2019

2021-11-09 Thread Annie.li
On 11/9/2021 6:19 AM, Daniel P. Berrangé wrote: On Tue, Nov 09, 2021 at 04:40:10PM +0530, Ani Sinha wrote: On Tue, Nov 9, 2021 at 3:23 PM Daniel P. Berrangé wrote: On Tue, Nov 09, 2021 at 12:41:39PM +0530, Ani Sinha wrote: +gerd On Mon, 8 Nov 2021, Annie.li wrote: Update: I've tested q35

Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW

2021-11-09 Thread Paolo Bonzini
On 11/9/21 15:45, Philippe Mathieu-Daudé wrote: When using the MinGW toolchain, we use the .exe suffix for the executable name. We also need to use it for the symlinks in the build directory. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini but perhaps we can get rid of the sym

Re: [PATCH] target/i386: sgx: mark device not user creatable

2021-11-09 Thread Thomas Huth
On 09/11/2021 18.50, Paolo Bonzini wrote: The device is created by the machine based on the sgx-epc property. It should not be created by users. Reported-by: Thomas Huth Signed-off-by: Paolo Bonzini --- hw/i386/sgx-epc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/sgx-epc.c

[PULL 3/3] qapi: deprecate drive-backup

2021-11-09 Thread Vladimir Sementsov-Ogievskiy
Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same cache and aio mode as source. Corresponding logic is in dr

[PULL 2/3] docs/interop/bitmaps: use blockdev-backup

2021-11-09 Thread Vladimir Sementsov-Ogievskiy
We are going to deprecate drive-backup, so use modern interface here. In examples where target image creation is shown, show blockdev-add as well. If target creation omitted, omit blockdev-add as well. Reviewed-by: Kashyap Chamarthy Signed-off-by: Vladimir Sementsov-Ogievskiy --- docs/interop/b

[PATCH] target/i386: sgx: mark device not user creatable

2021-11-09 Thread Paolo Bonzini
The device is created by the machine based on the sgx-epc property. It should not be created by users. Reported-by: Thomas Huth Signed-off-by: Paolo Bonzini --- hw/i386/sgx-epc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c index 55e2217eae..e508827e

Re: [PATCH] meson.build: Support ncurses on MacOS

2021-11-09 Thread Stefan Weil
Am 15.06.21 um 03:53 schrieb Brad Smith: On 6/14/2021 1:45 AM, Philippe Mathieu-Daudé wrote: On 6/13/21 8:33 AM, Stefan Weil wrote: Am 13.06.21 um 03:40 schrieb Brad Smith: This same problem also applies to OpenBSD as we have the same version of ncurses with support for wide characters. I ha

Re: [PULL 05/33] i386: Add 'sgx-epc' device to expose EPC sections to guest

2021-11-09 Thread Paolo Bonzini
On 11/9/21 15:25, Thomas Huth wrote: Our device-crash-test script reports that this new device can be used to crash QEMU: $ ./qemu-system-x86_64 -M none -device sgx-epc /home/thuth/devel/qemu/include/hw/i386/pc.h:128:PC_MACHINE: Object 0x55c80d332290 is not an instance of type generic-pc-machi

Re: [Ping][PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-09 Thread Paolo Bonzini
On 11/9/21 08:23, Denis Plotnikov wrote: Ping ping! Looks good, but can you explain why it's okay to call it before qemu_chr_cleanup() and user_creatable_cleanup()? I think a better solution to the ordering problem would be: qemu_chr_cleanup(); user_creatable_cleanup(); flush_rcu();

Re: [PATCH v2 03/34] target/ppc: Move load and store floating point instructions to decodetree

2021-11-09 Thread Matheus K. Ferst
On 09/11/2021 10:43, Mark Cave-Ayland wrote: On 29/10/2021 21:23, matheus.fe...@eldorado.org.br wrote: From: Fernando Eckhardt Valle Move load floating point instructions (lfs, lfsu, lfsx, lfsux, lfd, lfdu, lfdx, lfdux) and store floating point instructions(stfs, stfsu, stfsx, stfsux, stfd,

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup

2021-11-09 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 08:49, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 25.10.2021 07:24, Markus Armbruster wrote: Several moons ago, Vladimir posted Subject: [PATCH v2 3/3] qapi: deprecate drive-backup Date: Wed, 5 May 2021 16:58:03 +0300 Message-Id:<2021050513580

Re: [PATCH v3 2/2] accel/tcg: Register a force_rcu notifier

2021-11-09 Thread Greg Kurz
On Tue, 9 Nov 2021 09:21:27 +0100 Richard Henderson wrote: > On 11/9/21 8:54 AM, Richard Henderson wrote: > > On 11/8/21 12:33 PM, Greg Kurz wrote: > >> +static void rr_force_rcu(Notifier *notify, void *data) > >> +{ > >> +    /* > >> + * Called with rcu_registry_lock held, using async_run_on

Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW

2021-11-09 Thread Stefan Weil
Am 09.11.21 um 15:45 schrieb Philippe Mathieu-Daudé: When using the MinGW toolchain, we use the .exe suffix for the executable name. We also need to use it for the symlinks in the build directory. Signed-off-by: Philippe Mathieu-Daudé --- configure | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PULL v2 28/60] tcg/optimize: Split out fold_extract2

2021-11-09 Thread Richard Henderson
On 11/9/21 5:52 PM, Peter Maydell wrote: On Fri, 29 Oct 2021 at 05:59, Richard Henderson wrote: Reviewed-by: Luis Pires Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 39 ++- 1 file changed, 22 insertions(+),

Re: [PULL 0/1] Q800 for 6.2 patches

2021-11-09 Thread Richard Henderson
On 11/9/21 4:46 PM, Laurent Vivier wrote: The following changes since commit 2b22e7540d6ab4efe82d442363e3fc900cea6584: Merge tag 'm68k-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging (2021-11-09 13:16:56 +0100) are available in the Git repository at: git://github

Re: [PULL 22/22] python, iotests: replace qmp with aqmp

2021-11-09 Thread John Snow
On Tue, Nov 9, 2021 at 9:07 AM Thomas Huth wrote: > On 01/11/2021 18.30, John Snow wrote: > > Swap out the synchronous QEMUMonitorProtocol from qemu.qmp with the sync > > wrapper from qemu.aqmp instead. > > > > Add an escape hatch in the form of the environment variable > > QEMU_PYTHON_LEGACY_QMP

Re: [PATCH v2] s390x: kvm: adjust diag318 resets to retain data

2021-11-09 Thread Collin Walling
On 11/9/21 12:01, Janosch Frank wrote: > On 11/9/21 16:58, Collin Walling wrote: >> On 11/9/21 05:48, Janosch Frank wrote: >>> On 11/9/21 08:32, Christian Borntraeger wrote: Am 08.11.21 um 22:13 schrieb Collin Walling: > The CPNC portion of the diag 318 data is erroneously reset

Re: [PATCH v2] s390x: kvm: adjust diag318 resets to retain data

2021-11-09 Thread Janosch Frank
On 11/9/21 16:58, Collin Walling wrote: On 11/9/21 05:48, Janosch Frank wrote: On 11/9/21 08:32, Christian Borntraeger wrote: Am 08.11.21 um 22:13 schrieb Collin Walling: The CPNC portion of the diag 318 data is erroneously reset during an initial CPU reset caused by SIGP. Let's go ahead and

Re: [PATCH v2 1/2] linux-user: Move the SPDX license identifier to first line

2021-11-09 Thread Warner Losh
> On Nov 4, 2021, at 3:13 AM, Daniel P. Berrangé wrote: > > On Thu, Nov 04, 2021 at 08:15:40AM +0100, Philippe Mathieu-Daudé wrote: >> Tools consuming SPDX license identifiers benefit from having >> the SPDX tag in its own comment, not embedded with the license >> text. Move the tag to the fir

Re: [PATCH] linux-user: Add GPL-2.0+ SPDX license identifier

2021-11-09 Thread Warner Losh
> On Nov 3, 2021, at 2:31 PM, Philippe Mathieu-Daudé wrote: > > Use Qualcomm License Identifier tool [*] to classify linux-user/ > files per license type, filtering those matching at least 60% the > "GPLv2 or later" type, and manually add the GPL-2.0-or-later SPDX > comment. > > $ license-id

Re: [PATCH] linux-user: Add GPL-2.0+ SPDX license identifier

2021-11-09 Thread Warner Losh
> On Nov 4, 2021, at 4:14 PM, Philippe Mathieu-Daudé wrote: > > On 11/4/21 16:17, Taylor Simpson wrote: >>> -Original Message- >>> From: Philippe Mathieu-Daudé On >>> Behalf Of Philippe Mathieu-Daudé >>> Sent: Thursday, November 4, 2021 5:02 AM >>> To: Daniel P. Berrangé >>> Cc: Tayl

Re: [PULL v2 28/60] tcg/optimize: Split out fold_extract2

2021-11-09 Thread Peter Maydell
On Fri, 29 Oct 2021 at 05:59, Richard Henderson wrote: > > Reviewed-by: Luis Pires > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > tcg/optimize.c | 39 ++- > 1 file changed, 22 insertions(+), 17 deletions(-) > > diff --git a/

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

2021-11-09 Thread Michael S. Tsirkin
On Tue, Nov 09, 2021 at 04:16:34PM +, Daniel P. Berrangé wrote: > On Tue, Nov 09, 2021 at 11:05:28AM -0500, Michael S. Tsirkin wrote: > > On Tue, Nov 09, 2021 at 02:29:26PM +, Daniel P. Berrangé wrote: > > > On Tue, Nov 09, 2021 at 09:14:25AM -0500, Michael S. Tsirkin wrote: > > > > On Tue,

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

2021-11-09 Thread Ani Sinha
On Tue, Nov 9, 2021 at 9:46 PM Daniel P. Berrangé wrote: > > On Tue, Nov 09, 2021 at 11:05:28AM -0500, Michael S. Tsirkin wrote: > > On Tue, Nov 09, 2021 at 02:29:26PM +, Daniel P. Berrangé wrote: > > > On Tue, Nov 09, 2021 at 09:14:25AM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Nov 09,

Re: [PATCH 1/4] linux-user: Split out do_getdents, do_getdents64

2021-11-09 Thread Warner Losh
> On Nov 7, 2021, at 5:48 AM, Richard Henderson > wrote: > > Retain all 3 implementations of getdents for now. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall.c | 325 +++ > 1 file changed, 172 insertions(+), 153 deletions(-) Reviewed b

Re: [PATCH 0/4] linux-user: Fix getdents alignment issues (#704)

2021-11-09 Thread Warner Losh
> On Nov 7, 2021, at 5:48 AM, Richard Henderson > wrote: > > There are a number of alignement issues flagged up by clang, > this attempts to fix only one of them: getdents. Does it make sense to have size asserts for these types? That would catch the alignment issues and are cheap to mainta

Re: [PATCH 3/4] linux-user: Fix member types of target_dirent64

2021-11-09 Thread Warner Losh
> On Nov 7, 2021, at 5:48 AM, Richard Henderson > wrote: > > The host uint64_t (etc) does not have the correct > alignment constraint as the guest: use abi_* types. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall_defs.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletio

Re: [PATCH 2/2] target/ppc: ppc_store_fpscr doesn't update bit 52

2021-11-09 Thread Daniel Henrique Barboza
On 10/20/21 09:57, Lucas Mateus Castro (alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" This commit fixes the difference reported in the bug in the reserved bit 52, it does this by adding this bit to the mask of bits to not be directly altered in the ppc_store_fpscr function (the hardw

Re: [PATCH 2/4] linux-user: Always use flexible arrays for dirent d_name

2021-11-09 Thread Warner Losh
> On Nov 7, 2021, at 5:48 AM, Richard Henderson > wrote: > > We currently use a flexible array member for target_dirent, > but use incorrectly fixed length arrays for target_dirent64, > linux_dirent and linux_dirent64. > > This requires that we adjust the definition of the VFAT READDIR > ioc

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-09 Thread Warner Losh
> On Nov 8, 2021, at 12:42 PM, Khem Raj wrote: > > uint64_t is available in all userspaces via compiler include stdint.h > therefore use it instead of __u64 which is linux internal type, it fixes > build on some platforms eg. aarch64 systems using musl C library > > Signed-off-by: Khem Raj >

Re: [PATCH 1/2] target/ppc: Fixed call to deferred exception

2021-11-09 Thread Daniel Henrique Barboza
On 10/20/21 09:57, Lucas Mateus Castro (alqotel) wrote: From: "Lucas Mateus Castro (alqotel)" mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but helper_float_check_status checks fp_status and fp_status isn't updated based on FPSCR and

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

2021-11-09 Thread Daniel P . Berrangé
On Tue, Nov 09, 2021 at 11:05:28AM -0500, Michael S. Tsirkin wrote: > On Tue, Nov 09, 2021 at 02:29:26PM +, Daniel P. Berrangé wrote: > > On Tue, Nov 09, 2021 at 09:14:25AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Nov 09, 2021 at 09:01:52AM -0500, Stefan Berger wrote: > > > > The updated

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

2021-11-09 Thread Michael S. Tsirkin
On Tue, Nov 09, 2021 at 08:26:11PM +0530, Ani Sinha wrote: > On Tue, Nov 9, 2021 at 8:00 PM Daniel P. Berrangé wrote: > > > > On Tue, Nov 09, 2021 at 09:14:25AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Nov 09, 2021 at 09:01:52AM -0500, Stefan Berger wrote: > > > > The updated TPM related tab

  1   2   >