[PATCH] tests/tcg/aarch64/sysregs.c: Use S syntax for id_aa64zfr0_el1 and id_aa64smfr0_el1

2023-07-06 Thread Peter Maydell
Some assemblers will complain about attempts to access id_aa64zfr0_el1 and id_aa64smfr0_el1 by name if the test binary isn't built for the right processor type: /tmp/ccASXpLo.s:782: Error: selected processor does not support system register name 'id_aa64zfr0_el1' /tmp/ccASXpLo.s:829: Error: sel

Re: [PATCH v2 4/4] virtio-mem: Support "x-ignore-shared" migration

2023-07-06 Thread Juan Quintela
David Hildenbrand wrote: > To achieve desired "x-ignore-shared" functionality, we should not > discard all RAM when realizing the device and not mess with > preallocation/postcopy when loading device state. In essence, we should > not touch RAM content. > > As "x-ignore-shared" gets set after real

Re: [PATCH 0/2] migration: trivialities

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 12:29:35PM +0200, Laszlo Ersek wrote: > SSIA; originally for RHBZ#2018404 (hence the links in the commit > messages). > > Cc: Juan Quintela (maintainer:Migration) > Cc: Leonardo Bras (reviewer:Migration) > Cc: Peter Xu (reviewer:Migration) > Cc: qemu-triv...@nongnu.org >

Re: [PATCH v9 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties

2023-07-06 Thread Andrew Jones
On Thu, Jul 06, 2023 at 07:17:32AM -0300, Daniel Henrique Barboza wrote: > Let's add KVM user properties for the multi-letter extensions that KVM > currently supports: zicbom, zicboz, zihintpause, zbb, ssaia, sstc, > svinval and svpbmt. > > As with MISA extensions, we're using the KVMCPUConfig typ

Re: [PULL 07/11] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

2023-07-06 Thread Peter Maydell
On Wed, 5 Jul 2023 at 10:25, Philippe Mathieu-Daudé wrote: > > Cc'ing John. > > On 5/7/23 06:53, Richard Henderson wrote: > > On 7/4/23 18:36, Peter Maydell wrote: > >> +int main(int argc, char **argv) > >> +{ > >> +const char *shm_name = "qemu-test-tcg-aarch64-icivau"; > >> +int fd; > >>

Re: [PATCH v4 1/2] migration: switchover-hold parameter

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 11:40:04AM +0300, Avihai Horon wrote: > This only handles the QMP case, but we forgot to handle the HMP case. > I was testing it and got the following assert: > >   (qemu) migrate_set_parameter switchover-hold on >   qemu-system-x86_64: ../migration/migration-hmp-cmds.c:627

Re: [PATCH 2/2] target/arm: Define neoverse-v1

2023-07-06 Thread Peter Maydell
On Wed, 5 Jul 2023 at 15:09, Richard Henderson wrote: > > On 7/4/23 15:06, Peter Maydell wrote: > > If you're checking the values against the TRM, note that the > > summary tables differ from the register description in the TRM > > for ID_AA64DFR0_EL1, ID_AA64ZFR0_EL1 and ID_PFR0_EL1: we > > trust

[PATCH v5 2/2] qtest/migration: Use switchover-hold to speedup

2023-07-06 Thread Peter Xu
This solution is heavily based on Daniel's original approach here, but hopefully a cleaner way to impl: https://lore.kernel.org/r/20230601161347.1803440-11-berra...@redhat.com The difference is we use the switchover-hold flag rather than tuning bw+downtime to guide test convergence, comparing to

[PATCH v5 1/2] migration: switchover-hold parameter

2023-07-06 Thread Peter Xu
Add a new migration parameter switchover-hold which can block src qemu migration from switching over to dest from running. One can set this flag to true so src qemu will keep iterating the VM data, not switching over to dest even if it can. It means now live migration works somehow like COLO; we

[PATCH v5 0/2] migration: switchover-hold flag

2023-07-06 Thread Peter Xu
This v5 patchset is based on master. Since I'm not sure how long this series will take for review, we could probably apply Dan's previous patch 10 first, then when I repost I can provide a revert patch when needed. v5: - Fix HMP set the new bit [Avihai] A new flag "switchover-hold" is added to a

Re: [PATCH v9 14/20] target/riscv/kvm.c: add multi-letter extension KVM properties

2023-07-06 Thread Daniel Henrique Barboza
On 7/6/23 09:14, Andrew Jones wrote: On Thu, Jul 06, 2023 at 07:17:32AM -0300, Daniel Henrique Barboza wrote: Let's add KVM user properties for the multi-letter extensions that KVM currently supports: zicbom, zicboz, zihintpause, zbb, ssaia, sstc, svinval and svpbmt. As with MISA extensions,

Re: [PULL 07/11] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

2023-07-06 Thread John Högberg
> That is enough to get it to build, but then in the CI the test > consistently fails: > > https://gitlab.com/pm215/qemu/-/jobs/4606447875 > > TEST icivau on aarch64 > make[1]: *** [Makefile:178: run-icivau] Error 1 > > I'm going to drop this patch from the pullreq until we > can figure out what's

Re: [PULL 07/11] tests/tcg/aarch64: Add testcases for IC IVAU and dual-mapped code

2023-07-06 Thread Peter Maydell
On Thu, 6 Jul 2023 at 13:45, John Högberg wrote: > > > That is enough to get it to build, but then in the CI the test > > consistently fails: > > > > https://gitlab.com/pm215/qemu/-/jobs/4606447875 > > > > TEST icivau on aarch64 > > make[1]: *** [Makefile:178: run-icivau] Error 1 > > > > I'm going

Re: [PATCH v3] target/ppc: Machine check on invalid real address access on POWER9/10

2023-07-06 Thread Cédric Le Goater
On 7/6/23 13:43, BALATON Zoltan wrote: On Thu, 6 Jul 2023, Cédric Le Goater wrote: On 7/6/23 09:32, Nicholas Piggin wrote: On Mon Jul 3, 2023 at 10:03 PM AEST, Nicholas Piggin wrote: ppc currently silently accepts invalid real address access. Catch these and turn them into machine checks on PO

Re: [PATCH 2/3] qemu-img: map: report compressed data blocks

2023-07-06 Thread Andrey Drobyshev
On 6/21/23 21:12, Denis V. Lunev wrote: > On 6/7/23 17:26, Andrey Drobyshev wrote: >> Right now "qemu-img map" reports compressed blocks as containing data >> but having no host offset.  This is not very informative.  Instead, >> let's add another boolean field named "compressed" in case JSON outpu

[PATCH] qemu_cleanup: begin drained section after vm_shutdown()

2023-07-06 Thread Fiona Ebner
in order to avoid requests being stuck in a BlockBackend's request queue during cleanup. Having such requests can lead to a deadlock [0] with a virtio-scsi-pci device using iothread that's busy with IO when initiating a shutdown with QMP 'quit'. There is a race where such a queued request can cont

Re: [PATCH v2 1/4] softmmu/physmem: Warn with ram_block_discard_range() on MAP_PRIVATE file mapping

2023-07-06 Thread Juan Quintela
David Hildenbrand wrote: > On 06.07.23 10:10, Juan Quintela wrote: >> David Hildenbrand wrote: >>> ram_block_discard_range() cannot possibly do the right thing in >>> MAP_PRIVATE file mappings in the general case. >>> >>> To achieve the documented semantics, we also have to punch a hole into >>>

Re: [PATCH] target/riscv: Fix LMUL check to use minimum SEW

2023-07-06 Thread Weiwei Li
On 2023/7/6 18:44, Rob Bradford wrote: The previous check was failing with: ELEN = 64 SEW = 16 and LMUL = 1/8 (encoded as 5) which is a valid combination. Fix the check to correctly match the specification by using minimum SEW rather than the active SEW. From the specification: "In general

Re: [PATCH v2 1/4] softmmu/physmem: Warn with ram_block_discard_range() on MAP_PRIVATE file mapping

2023-07-06 Thread David Hildenbrand
On 06.07.23 15:20, Juan Quintela wrote: David Hildenbrand wrote: On 06.07.23 10:10, Juan Quintela wrote: David Hildenbrand wrote: ram_block_discard_range() cannot possibly do the right thing in MAP_PRIVATE file mappings in the general case. To achieve the documented semantics, we also have

[PULL 01/14] target/arm: Add raw_writes ops for register whose write induce TLB maintenance

2023-07-06 Thread Peter Maydell
From: Eric Auger Some registers whose 'cooked' writefns induce TLB maintenance do not have raw_writefn ops defined. If only the writefn ops is set (ie. no raw_writefn is provided), it is assumed the cooked also work as the raw one. For those registers it is not obvious the tlb_flush works on KVM

[PULL 10/14] hw: arm: allwinner-sramc: Set class_size

2023-07-06 Thread Peter Maydell
From: Akihiko Odaki AwSRAMCClass is larger than SysBusDeviceClass so the class size must be advertised accordingly. Fixes: 05def917e1 ("hw: arm: allwinner-sramc: Add SRAM Controller support for R40") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henders

[PULL 08/14] tests/qtest: xlnx-canfd-test: Fix code coverity issues

2023-07-06 Thread Peter Maydell
From: Vikram Garhwal Following are done to fix the coverity issues: 1. Change read_data to fix the CID 1512899: Out-of-bounds access (OVERRUN) 2. Fix match_rx_tx_data to fix CID 1512900: Logically dead code (DEADCODE) 3. Replace rand() in generate_random_data() with g_rand_int() Signed-off-by: V

[PULL 14/14] target/arm: Avoid over-length shift in arm_cpu_sve_finalize() error case

2023-07-06 Thread Peter Maydell
If you build QEMU with the clang sanitizer enabled, you can see it fire when running the arm-cpu-features test: $ QTEST_QEMU_BINARY=./build/arm-clang/qemu-system-aarch64 ./build/arm-clang/tests/qtest/arm-cpu-features [...] ../../target/arm/cpu64.c:125:19: runtime error: shift exponent 64 is too l

[PULL 13/14] target/arm: Define neoverse-v1

2023-07-06 Thread Peter Maydell
Now that we have implemented support for FEAT_LSE2, we can define a CPU model for the Neoverse-V1, and enable it for the virt and sbsa-ref boards. Signed-off-by: Peter Maydell Message-id: 20230704130647.2842917-3-peter.mayd...@linaro.org Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson -

[PULL 02/14] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-07-06 Thread Peter Maydell
From: Yuquan Wang The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this uses XHCI to provide a usb controller with 64-bit DMA capablity instead of EHCI. We bump the platform version to 0.3 with this change. Al

[PULL v2 00/14] target-arm queue

2023-07-06 Thread Peter Maydell
repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230706 for you to fetch changes up to c41077235168140cdd4a34fce9bd95c3d30efe9c: target/arm: Avoid over-length shift in arm_cpu_sve_finalize() error case (2023-07-06 1

[PULL 06/14] target/arm: Fix SME full tile indexing

2023-07-06 Thread Peter Maydell
From: Richard Henderson For the outer product set of insns, which take an entire matrix tile as output, the argument is not a combined tile+column. Therefore using get_tile_rowcol was incorrect, as we extracted the tile number from itself. The test case relies only on assembler support for SME,

[PULL 07/14] target/arm: Handle IC IVAU to improve compatibility with JITs

2023-07-06 Thread Peter Maydell
From: John Högberg Unlike architectures with precise self-modifying code semantics (e.g. x86) ARM processors do not maintain coherency for instruction execution and memory, requiring an instruction synchronization barrier on every core that will execute the new code, and on many models also the e

[PULL 03/14] tests/tcg/aarch64/sysregs.c: Use S syntax for id_aa64zfr0_el1 and id_aa64smfr0_el1

2023-07-06 Thread Peter Maydell
Some assemblers will complain about attempts to access id_aa64zfr0_el1 and id_aa64smfr0_el1 by name if the test binary isn't built for the right processor type: /tmp/ccASXpLo.s:782: Error: selected processor does not support system register name 'id_aa64zfr0_el1' /tmp/ccASXpLo.s:829: Error: sel

[PULL 12/14] target/arm: Suppress more TCG unimplemented features in ID registers

2023-07-06 Thread Peter Maydell
We already squash the ID register field for FEAT_SPE (the Statistical Profiling Extension) because TCG does not implement it and if we advertise it to the guest the guest will crash trying to look at non-existent system registers. Do the same for some other features which a real hardware Neoverse-

[PULL 09/14] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG

2023-07-06 Thread Peter Maydell
From: Fabiano Rosas This code is only relevant when TCG is present in the build. Building with --disable-tcg --enable-xen on an x86 host we get: $ ../configure --target-list=x86_64-softmmu,aarch64-softmmu --disable-tcg --enable-xen $ make -j$(nproc) ... libqemu-aarch64-softmmu.fa.p/target_arm_g

[PULL 05/14] target/arm: Dump ZA[] when active

2023-07-06 Thread Peter Maydell
From: Richard Henderson Always print each matrix row whole, one per line, so that we get the entire matrix in the proper shape. Signed-off-by: Richard Henderson Message-id: 20230622151201.1578522-3-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- targe

[PULL 11/14] target/xtensa: Assert that interrupt level is within bounds

2023-07-06 Thread Peter Maydell
In handle_interrupt() we use level as an index into the interrupt_vector[] array. This is safe because we have checked it against env->config->nlevel, but Coverity can't see that (and it is only true because each CPU config sets its XCHAL_NUM_INTLEVELS to something less than MAX_NLEVELS), so it com

Re: [PATCH v2 2/4] virtio-mem: Skip most of virtio_mem_unplug_all() without plugged memory

2023-07-06 Thread Juan Quintela
David Hildenbrand wrote: > On 06.07.23 10:15, Juan Quintela wrote: >> David Hildenbrand wrote: >>> Already when starting QEMU we perform one system reset that ends up >>> triggering virtio_mem_unplug_all() with no actual memory plugged yet. >>> That, in turn will trigger ram_block_discard_range()

[PULL 04/14] target/arm: Avoid splitting Zregs across lines in dump

2023-07-06 Thread Peter Maydell
From: Richard Henderson Allow the line length to extend to 548 columns. While annoyingly wide, it's still less confusing than the continuations we print. Also, the default VL used by Linux (and max for A64FX) uses only 140 columns. Signed-off-by: Richard Henderson Message-id: 20230622151201.1

Re: [PATCH 1/2] migration: factor out "resume_requested" in qmp_migrate()

2023-07-06 Thread Michael Tokarev
06.07.2023 13:29, Laszlo Ersek пишет: It cuts back on those awkward, duplicated !(has_resume && resume) expressions. Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo Bras (reviewer:Migration) Cc: Peter Xu (reviewer:Migration) Cc: qemu-triv...@nongnu.org Bugzilla: https://bugzilla.redhat.

Re: [PATCH v5 1/2] migration: switchover-hold parameter

2023-07-06 Thread Avihai Horon
On 06/07/2023 15:43, Peter Xu wrote: External email: Use caution opening links or attachments Add a new migration parameter switchover-hold which can block src qemu migration from switching over to dest from running. One can set this flag to true so src qemu will keep iterating the VM data,

Re: [PATCH v5 1/2] migration: switchover-hold parameter

2023-07-06 Thread Markus Armbruster
Peter Xu writes: > Add a new migration parameter switchover-hold which can block src qemu > migration from switching over to dest from running. > > One can set this flag to true so src qemu will keep iterating the VM data, > not switching over to dest even if it can. > > It means now live migrati

[PATCH] tb-maint: Document #ifdef..else..endif correctly

2023-07-06 Thread Richard W.M. Jones
It was hard to tell from the comments whether the code applied to user mode (CONFIG_USER_ONLY) or system mode. Fix the comments on the #else and #endif directives to be clearer. Signed-off-by: Richard W.M. Jones --- accel/tcg/tb-maint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH v5 1/2] migration: switchover-hold parameter

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 04:29:22PM +0300, Avihai Horon wrote: > > diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c > > index 9885d7c9f7..c3b3860f00 100644 > > --- a/migration/migration-hmp-cmds.c > > +++ b/migration/migration-hmp-cmds.c > > @@ -338,6 +338,9 @@ void hmp_i

Re: [PATCH v5 1/2] migration: switchover-hold parameter

2023-07-06 Thread Avihai Horon
On 06/07/2023 16:44, Peter Xu wrote: External email: Use caution opening links or attachments On Thu, Jul 06, 2023 at 04:29:22PM +0300, Avihai Horon wrote: diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index 9885d7c9f7..c3b3860f00 100644 --- a/migration/migrati

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > Provide an explicit reason for qemu_file_shutdown()s, which can be >> > displayed in query-migrate when used. >> > >> >> Can we consider this to cover the TODO: >> >> * TODO: convert

Re: [PATCH 2/3] qemu-img: map: report compressed data blocks

2023-07-06 Thread Denis V. Lunev
On 7/6/23 15:10, Andrey Drobyshev wrote: On 6/21/23 21:12, Denis V. Lunev wrote: On 6/7/23 17:26, Andrey Drobyshev wrote: Right now "qemu-img map" reports compressed blocks as containing data but having no host offset.  This is not very informative.  Instead, let's add another boolean field nam

Re: [PATCH v5 1/2] migration: switchover-hold parameter

2023-07-06 Thread Peter Xu
Hi, Markus, On Thu, Jul 06, 2023 at 03:38:13PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > Add a new migration parameter switchover-hold which can block src qemu > > migration from switching over to dest from running. > > > > One can set this flag to true so src qemu will keep itera

Re: [PATCH v2 6/7] qemufile: Always return a verbose error

2023-07-06 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 05, 2023 at 06:54:37PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > There're a lot of cases where we only have an errno set in last_error but >> > without a detailed error description. When this happens, try to generate >> > an error contains the errno

Re: [PATCH v2 0/4] virtio-mem: Support "x-ignore-shared" migration

2023-07-06 Thread Michael S. Tsirkin
On Thu, Jul 06, 2023 at 09:56:05AM +0200, David Hildenbrand wrote: > If there is no further feedback, I'll queue this myself shortly. > > Stumbling over "x-ignore-shared" migration support for virtio-mem on > my todo list, I remember talking to Dave G. a while ago about how > ram_block_discard_ran

[PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Jean-Philippe Brucker
Arm TF-A fails to boot via semihosting following a recent change to the MMU code. Semihosting attempts to read parameters passed by TF-A in secure RAM via cpu_memory_rw_debug(). While performing the S1 translation, we call S1_ptw_translate() on the page table descriptor address, with an MMU index o

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Peter Maydell
On Thu, 6 Jul 2023 at 15:12, Jean-Philippe Brucker wrote: > > Arm TF-A fails to boot via semihosting following a recent change to the > MMU code. Semihosting attempts to read parameters passed by TF-A in > secure RAM via cpu_memory_rw_debug(). While performing the S1 > translation, we call S1_ptw_

Re: [PATCH 2/2] virtio-iommu: Rework the trace in virtio_iommu_set_page_size_mask()

2023-07-06 Thread Jean-Philippe Brucker
On Wed, Jul 05, 2023 at 03:16:31PM +0200, Eric Auger wrote: > >>> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index > >>> 1eaf81bab5..0d9f7196fe 100644 > >>> --- a/hw/virtio/virtio-iommu.c > >>> +++ b/hw/virtio/virtio-iommu.c > >>> @@ -1101,29 +1101,24 @@ static int > >>> virti

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 01:55:47AM -0300, Leonardo Bras wrote: > When trying to migrate a machine type pc-q35-6.0 or lower, with this > cmdline options, > > -device > driver=pcie-root-port,port=18,chassis=19,id=pcie-root-port18,bus=pcie.0,addr=0x12 > \ > -device > driver=nec-usb-xhci,p2=4,p3=4,

Re: [PATCH 1/2] migration: factor out "resume_requested" in qmp_migrate()

2023-07-06 Thread Laszlo Ersek
On 7/6/23 15:28, Michael Tokarev wrote: > 06.07.2023 13:29, Laszlo Ersek пишет: >> It cuts back on those awkward, duplicated !(has_resume && resume) >> expressions. >> >> Cc: Juan Quintela (maintainer:Migration) >> Cc: Leonardo Bras (reviewer:Migration) >> Cc: Peter Xu (reviewer:Migration) >> Cc

Re: [PATCH QEMU v7 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-07-06 Thread Markus Armbruster
~hyman writes: > From: Hyman Huang(黄勇) > > Introduce "x-vcpu-dirty-limit-period" migration experimental > parameter, which is in the range of 1 to 1000ms and used to > make dirtyrate calculation period configurable. > > Currently with the "x-vcpu-dirty-limit-period" varies, the > total time of l

Re: [PATCH] qemu_cleanup: begin drained section after vm_shutdown()

2023-07-06 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH QEMU v7 3/9] qapi/migration: Introduce vcpu-dirty-limit parameters

2023-07-06 Thread Markus Armbruster
~hyman writes: > From: Hyman Huang(黄勇) > > Introduce "vcpu-dirty-limit" migration parameter used > to limit dirty page rate during live migration. > > "vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are > two dirty-limit-related migration parameters, which can > be set before and during live

Re: [PATCH QEMU v7 4/9] migration: Introduce dirty-limit capability

2023-07-06 Thread Markus Armbruster
~hyman writes: > From: Hyman Huang(黄勇) > > Introduce migration dirty-limit capability, which can > be turned on before live migration and limit dirty > page rate durty live migration. > > Introduce migrate_dirty_limit function to help check > if dirty-limit capability enabled during live migrati

Re: [PATCH QEMU v7 8/9] migration: Extend query-migrate to provide dirty page limit info

2023-07-06 Thread Markus Armbruster
~hyman writes: > From: Hyman Huang(黄勇) > > Extend query-migrate to provide throttle time and estimated > ring full time with dirty-limit capability enabled, through which > we can observe if dirty limit take effect during live migration. > > Signed-off-by: Hyman Huang(黄勇) > Reviewed-by: Markus

[PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Peng Liang
virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we enable log trace backend. But if we disable the log trace backend (e.g., --enable-trace-backends=nop), then virt-acpi-build.c will not include qemu/error-re

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Peng Liang
I'm not sure whether the error has already been fixed by others or not. If so, please just ignore this patch. On 07/06/2023 23:08, Peng Liang wrote: virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we ena

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Jean-Philippe Brucker
On Thu, Jul 06, 2023 at 03:28:32PM +0100, Peter Maydell wrote: > On Thu, 6 Jul 2023 at 15:12, Jean-Philippe Brucker > wrote: > > > > Arm TF-A fails to boot via semihosting following a recent change to the > > MMU code. Semihosting attempts to read parameters passed by TF-A in > > secure RAM via cp

Re: [PATCH 2/2] virtio-iommu: Rework the trace in virtio_iommu_set_page_size_mask()

2023-07-06 Thread Eric Auger
Hi Jean, On 7/6/23 16:35, Jean-Philippe Brucker wrote: > On Wed, Jul 05, 2023 at 03:16:31PM +0200, Eric Auger wrote: > diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index > 1eaf81bab5..0d9f7196fe 100644 > --- a/hw/virtio/virtio-iommu.c > +++ b/hw/virtio/virtio-io

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Peter Maydell
On Thu, 6 Jul 2023 at 16:25, Jean-Philippe Brucker wrote: > > On Thu, Jul 06, 2023 at 03:28:32PM +0100, Peter Maydell wrote: > > On Thu, 6 Jul 2023 at 15:12, Jean-Philippe Brucker > > wrote: > > > > > > Arm TF-A fails to boot via semihosting following a recent change to the > > > MMU code. Semiho

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Jean-Philippe Brucker
On Thu, Jul 06, 2023 at 04:42:02PM +0100, Peter Maydell wrote: > > > Do you have a repro case for this bug? Did it work > > > before commit fe4a5472ccd6 ? > > > > Yes I bisected to fe4a5472ccd6 by trying to run TF-A, following > > instructions here: > > https://github.com/ARM-software/arm-trusted-f

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Peter Maydell
On Thu, 6 Jul 2023 at 17:10, Jean-Philippe Brucker wrote: > > On Thu, Jul 06, 2023 at 04:42:02PM +0100, Peter Maydell wrote: > > > > Do you have a repro case for this bug? Did it work > > > > before commit fe4a5472ccd6 ? > > > > > > Yes I bisected to fe4a5472ccd6 by trying to run TF-A, following >

Re: [PATCH v2] i386/xen: consistent locking around Xen singleshot timers

2023-07-06 Thread Paul Durrant
On 04/07/2023 16:51, David Woodhouse wrote: From: David Woodhouse Coverity points out (CID 1507534, 1507968) that we sometimes access env->xen_singleshot_timer_ns under the protection of env->xen_timers_lock and sometimes not. This isn't always an issue. There are two modes for the timers; if

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 10:50:34AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > Provide an explicit reason for qemu_file_shutdown()s, which can be > >> > displayed in query-migrate when used

Re: [PATCH] xen-block: Avoid leaks on new error path

2023-07-06 Thread Paul Durrant
On 04/07/2023 18:18, Anthony PERARD wrote: From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver` when

[PATCH v2 2/3] qemu-img: map: report compressed data blocks

2023-07-06 Thread Andrey Drobyshev via
Right now "qemu-img map" reports compressed blocks as containing data but having no host offset. This is not very informative. Instead, let's add another boolean field named "compressed" in case JSON output mode is specified. This is achieved by utilizing new allocation status flag BDRV_BLOCK_CO

[PATCH v2 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-07-06 Thread Andrey Drobyshev via
Functions qcow2_get_host_offset(), get_cluster_offset(), vmdk_co_block_status() explicitly report compressed cluster types when data is compressed. However, this information is never passed further. Let's make use of it by adding new BDRV_BLOCK_COMPRESSED flag for bdrv_block_status(), so that cal

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-06 Thread Alex Bennée
Alex Bennée writes: > Currently QEMU has to know some details about the back-end to be able > to setup the guest. While various parts of the setup can be delegated > to the backend (for example config handling) this is a very piecemeal > approach. > > This patch suggests a new feature flag (VHO

[PATCH v2 3/3] qemu-iotests: update expected tests output to contain "compressed" field

2023-07-06 Thread Andrey Drobyshev via
The previous commit adds "compressed" boolean field to JSON output of "qemu-img map" command. Let's tweak expected tests output accordingly. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/122.out| 84 tests/qemu-iotests/154.out| 194

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Ani Sinha
> On 06-Jul-2023, at 8:38 PM, Peng Liang wrote: > > virt-acpi-build.c uses warn_report. However, it doesn't include > qemu/error-report.h directly, it include qemu/error-report.h via trace.h > if we enable log trace backend. But if we disable the log trace backend > (e.g., --enable-trace-backe

[PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-06 Thread Andrey Drobyshev via
v1 --> v2: * Add vmdk format to the 1st commit. Tweak commit message accordingly; * Make "compressed" field in MapEntry optional. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00184.html Andrey Drobyshev (3): block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Marcin Juszkiewicz
W dniu 6.07.2023 o 17:25, Jean-Philippe Brucker pisze: (Note that there is an issue with TF-A missing ENABLE_FEAT_FGT for qemu at the moment, which prevents booting Linux with -cpu max. I'll send the fix to TF-A after this, but this reproducer should at least boot edk2.) Which reminds me that

Re: [PATCH 1/2] migration: factor out "resume_requested" in qmp_migrate()

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 12:29, Laszlo Ersek wrote: It cuts back on those awkward, duplicated !(has_resume && resume) expressions. Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo Bras (reviewer:Migration) Cc: Peter Xu (reviewer:Migration) Cc: qemu-triv...@nongnu.org Bugzilla: https://bugzilla.redhat.c

Re: [PATCH 2/2] migration: unexport migrate_fd_error()

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 12:29, Laszlo Ersek wrote: The only migrate_fd_error() call sites are in "migration/migration.c", which is also where we define migrate_fd_error(). Make the function static, and remove its declaration from "migration/migration.h". Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-06 Thread Michael S. Tsirkin
On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: > Currently QEMU has to know some details about the back-end to be able > to setup the guest. While various parts of the setup can be delegated > to the backend (for example config handling) this is a very piecemeal > approach. > This pa

Re: [PATCH 1/4] QGA VSS: Add wrapper to send log to debugger and stderr

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 12:58, Konstantin Kostiuk wrote: On Thu, Jul 6, 2023 at 1:01 PM Philippe Mathieu-Daudé > wrote: On 6/7/23 09:54, Konstantin Kostiuk wrote: > Hi Philippe, > > On Wed, Jul 5, 2023 at 11:35 PM Philippe Mathieu-Daudé > mailto:phi...@lina

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 17:08, Peng Liang wrote: virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we enable log trace backend. But if we disable the log trace backend (e.g., --enable-trace-backends=nop), then virt-acpi-b

Re: [PATCH] tb-maint: Document #ifdef..else..endif correctly

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 15:43, Richard W.M. Jones wrote: It was hard to tell from the comments whether the code applied to user mode (CONFIG_USER_ONLY) or system mode. Fix the comments on the #else and #endif directives to be clearer. Signed-off-by: Richard W.M. Jones --- accel/tcg/tb-maint.c | 4 ++-- 1

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Peter Maydell
On Thu, 6 Jul 2023 at 17:21, Peter Maydell wrote: > > On Thu, 6 Jul 2023 at 17:10, Jean-Philippe Brucker > wrote: > > > > On Thu, Jul 06, 2023 at 04:42:02PM +0100, Peter Maydell wrote: > > > > > Do you have a repro case for this bug? Did it work > > > > > before commit fe4a5472ccd6 ? > > > > > >

[PATCH 1/2] accel/tcg: Split out cpu_exec_longjmp_cleanup

2023-07-06 Thread Richard Henderson
Share the setjmp cleanup between cpu_exec_step_atomic and cpu_exec_setjmp. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 43 +++ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index

[PATCH 0/2] accel/tcg: Fix race condition in tb create/invalidate

2023-07-06 Thread Richard Henderson
Thanks for the test case, Richard WMJ. Using the fedora rawhide kernel-core-6.5.0-0.rc0.20230703gita901a3568fd2.8.fc39.x86_64.rpm I was able to reproduce the problem within 30 iterations. I'm now at 650 iterations and counting. r~ Richard Henderson (2): accel/tcg: Split out cpu_exec_longjmp

[PATCH 2/2] accel/tcg: Always lock pages before translation

2023-07-06 Thread Richard Henderson
We had done this for user-mode by invoking page_protect within the translator loop. Extend this to handle system mode as well. Move page locking out of tb_link_page. Reported-by: Liren Wei Reported-by: Richard W.M. Jones Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 30 ++

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Michael Tokarev
06.07.2023 18:08, Peng Liang wrote: virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we enable log trace backend. But if we disable the log trace backend (e.g., --enable-trace-backends=nop), then virt-acpi-

Re: [PATCH 0/2] migration: trivialities

2023-07-06 Thread Michael Tokarev
06.07.2023 13:29, Laszlo Ersek wrote: SSIA; originally for RHBZ#2018404 (hence the links in the commit messages). Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo Bras (reviewer:Migration) Cc: Peter Xu (reviewer:Migration) Cc: qemu-triv...@nongnu.org Laszlo Ersek (2): migration: fact

[PATCH] chore: rename `tricore_feature` to `is_tricore_feature_enabled`

2023-07-06 Thread Rui Chen
While upgrading capstone to v5 , there was some name clash with the tricore_feature in capstone (which was introduced in this PR ), thus rename tricore_feature to is_tricore_feature_enabled

Re: [PULL v2 00/14] target-arm queue

2023-07-06 Thread Richard Henderson
8:36:44 +0200) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230706 for you to fetch changes up to c41077235168140cdd4a34fce9bd95c3d30efe9c: target/arm: Avoid over-length shift in arm_cpu_sve_finalize() error case (2023-0

Re: [RFC PATCH-for-8.1] accel: Remove HAX accelerator

2023-07-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > HAX is deprecated since commits 73741fda6c ("MAINTAINERS: Abort > HAXM maintenance") and 90c167a1da ("docs/about/deprecated: Mark > HAXM in QEMU as deprecated"), released in v8.0.0. > > Per the QEMU deprecation policy, we shouldn't remove it before > QEMU release

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jul 06, 2023 at 10:50:34AM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: >> >> Peter Xu writes: >> >> >> >> > Provide an explicit reason for qemu_file_shutdown()s, which can be >> >> > displaye

Re: [PATCH 1/2] accel/tcg: Split out cpu_exec_longjmp_cleanup

2023-07-06 Thread Richard W.M. Jones
On Thu, Jul 06, 2023 at 06:05:36PM +0100, Richard Henderson wrote: > Share the setjmp cleanup between cpu_exec_step_atomic > and cpu_exec_setjmp. > > Signed-off-by: Richard Henderson Reviewed-by: Richard W.M. Jones (I'm still testing the other one, but already up to 600 iterations) Rich. > -

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 4:37 AM Juan Quintela wrote: > > Leonardo Bras wrote: > > When trying to migrate a machine type pc-q35-6.0 or lower, with this > > cmdline options, > > > > -device > > driver=pcie-root-port,port=18,chassis=19,id=pcie-root-port18,bus=pcie.0,addr=0x12 > > \ > > -device > >

Re: [PATCH] virtio-gpu: do not replace surface when scanout is disabled

2023-07-06 Thread Kim, Dongwon
On 7/4/2023 8:12 AM, Marc-André Lureau wrote: Hi On Wed, Jun 28, 2023 at 12:32 AM Dongwon Kim wrote: Surface is replaced with a place holder whenever the surface res is unreferenced by the guest message. With this logic, there is very frequent switching between guest display and

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 02:33:42PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, Jul 06, 2023 at 10:50:34AM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: > >> >> Peter Xu writes: > >> >> > >> >> > Pr

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 11:35 AM Peter Xu wrote: > > On Thu, Jul 06, 2023 at 01:55:47AM -0300, Leonardo Bras wrote: > > When trying to migrate a machine type pc-q35-6.0 or lower, with this > > cmdline options, > > > > -device > > driver=pcie-root-port,port=18,chassis=19,id=pcie-root-port18,bus=pci

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > I asked the same question, and I still keep confused: whether there's a > > first bad commit? Starting from when it fails? > > > > For example, is this broken on 6.0 binaries too with pc-q35-6.0? > > I tested for qem

Re: [PATCH v3 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:28:58PM -0300, Fabiano Rosas wrote: > file-based migration requires the target to initiate its migration after > the source has finished writing out the data in the file. Currently > there's no easy way to initiate 'migrate-incoming', allow this by > introducing migrate_i

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 3:24 PM Peter Xu wrote: > > On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > > I asked the same question, and I still keep confused: whether there's a > > > first bad commit? Starting from when it fails? > > > > > > For example, is this broke

Re: [PATCH v3 1/6] tests/qtest: migration: Expose migrate_set_capability

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:28:57PM -0300, Fabiano Rosas wrote: > The following patch will make use of this function from within > migrate-helpers.c, so move it there. > > Reviewed-by: Juan Quintela > Reviewed-by: Thomas Huth > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v3 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:28:59PM -0300, Fabiano Rosas wrote: > Use the new migrate_incoming_qmp helper in the places that currently > open-code calling migrate-incoming. > > Signed-off-by: Fabiano Rosas > Reviewed-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v3 4/6] migration: Set migration status early in incoming side

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:29:00PM -0300, Fabiano Rosas wrote: > We are sending a migration event of MIGRATION_STATUS_SETUP at > qemu_start_incoming_migration but never actually setting the state. > > This creates a window between qmp_migrate_incoming and > process_incoming_migration_co where the

<    1   2   3   >