[PATCH v23 19/20] tests/avocado: s390x cpu topology dedicated errors

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 48 ++ 1 file changed, 48 insertions(+) diff --git a/tests/avocad

[PATCH v23 07/20] target/s390x/cpu topology: activate CPU topology

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled by default and fenced f

Re: Various changes "backportability"

2023-09-14 Thread Stefan Hajnoczi
On Wed, Sep 13, 2023 at 05:44:38PM +0300, Michael Tokarev wrote: > 13.09.2023 17:27, Stefan Hajnoczi wrote: > ... > > > For example, recent tpm bugfix, which is trivial by its own, > > > uses RETRY_ON_EINTR helper which were introduced recently and > > > which is now used everywhere. coroutine_fn

[PATCH v23 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel Test changes in the entitlement from both a guest and a host point of view, depending on the polarization. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-Glausch --- tests/avocado/s3

[PATCH v23 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-Glausch ---

[PATCH v23 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel The query-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-Glausch --- qapi/

Re: [RFC PATCH 2/3] {include/}hw/arm: refactor BSA/virt PPI logic

2023-09-14 Thread Philippe Mathieu-Daudé
On 14/9/23 14:01, Leif Lindholm wrote: GIC Private Peripheral Interrupts (PPI) are defined as GIC INTID 16-31. As in, PPI0 is INTID16 .. PPI15 is INTID31. Arm's Base System Architecture specification (BSA) lists the mandated and recommended private interrupt IDs by INTID, not by PPI index. But cu

[PATCH] gdbstub: Fix SEGFAULT in find_cpu_clusters()

2023-09-14 Thread Nikita Shubin
From: Nikita Shubin target_xml is a dynamic GString, use NULL to initialize it. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Nikita Shubin --- Observed with: build-qemu/qemu-system-riscv64 -M sifive_u -bios none -nographic -s Segmentation fault --- gdbstub/softmmu.c

Re: [RFC PATCH 3/3] hw/arm/sbsa-ref: use bsa.h for PPI definitions

2023-09-14 Thread Philippe Mathieu-Daudé
On 14/9/23 14:01, Leif Lindholm wrote: Use the private peripheral interrupt definitions from bsa.h instead of defining them locally. Refactor to use PPI() to convert from INTID macro where necessary. Signed-off-by: Leif Lindholm --- hw/arm/sbsa-ref.c | 24 +++- 1 file cha

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Kevin Wolf
Am 13.09.2023 um 18:31 hat Eric Blake geschrieben: > On Wed, Sep 13, 2023 at 04:47:54PM +0100, Daniel P. Berrangé wrote: > > On Wed, Sep 06, 2023 at 04:09:17PM +0200, Denis V. Lunev wrote: > > > Each particular testcase could skipped intentionally and accidentally. > > > For example the test is not

Re: [PATCH v3 01/12] gdbstub: Fix target_xml initialization

2023-09-14 Thread Philippe Mathieu-Daudé
On 13/9/23 00:40, Akihiko Odaki wrote: target_xml is no longer a fixed-length array but a pointer to a variable-length memory. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Akihiko Odaki --- gdbstub/softmmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH] gdbstub: Fix SEGFAULT in find_cpu_clusters()

2023-09-14 Thread Philippe Mathieu-Daudé
Hi Nikita, On 14/9/23 14:25, Nikita Shubin wrote: From: Nikita Shubin target_xml is a dynamic GString, use NULL to initialize it. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Nikita Shubin --- Observed with: build-qemu/qemu-system-riscv64 -M sifive_u -bios none -no

[PATCH v23 05/20] s390x/cpu topology: resetting the Topology-Change-Report

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl

[PATCH v23 18/20] tests/avocado: s390x cpu topology test socket full

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/s390_topo

[PATCH v23 14/20] tests/avocado: s390x cpu topology core

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel Introduction of the s390x cpu topology core functions and basic tests. We test the correlation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Sc

[PATCH v23 06/20] s390x/cpu topology: interception of PTF instruction

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function cod

[PATCH v23 17/20] tests/avocado: s390x cpu topology test dedicated CPU

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this from both host and guest point of view. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Signed-off

[PATCH v23 09/20] machine: adding s390 topology to query-cpu-fast

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth S

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Peter Maydell
On Thu, 14 Sept 2023 at 13:29, Kevin Wolf wrote: > > Am 13.09.2023 um 18:31 hat Eric Blake geschrieben: > > I guess it boils down to whether there is an actionable response in > > that message. If a test is skipped because it is the wrong format > > (for example, ./check -raw skipping a test that

[PATCH] target/riscv: pmp: Ignore writes when RW=01

2023-09-14 Thread Mayuresh Chitale
As per the Priv spec: "The R, W, and X fields form a collective WARL field for which the combinations with R=0 and W=1 are reserved." However currently such writes are not ignored as ought to be. The combinations with RW=01 are allowed only when the Smepmp extension is enabled and mseccfg.MML is se

Re: [PATCH] hw/qxl: move check of slot_id before accessing guest_slots

2023-09-14 Thread Michael Tokarev
14.09.2023 12:27, Anastasia Belova wrote: If slot_id >= NUM_MEMSLOTS, buffer overflow is possible. So the check should be upper than d->guest_slots[slot_id] where size of d->guest_slots is NUM_MEMSLOTS. Fixes: e954ea2873 ("qxl: qxl_add_memslot: remove guest trigerrable panics") Signed-off-by: An

Re: [PATCH v3] hw/cxl: Fix out of bound array access

2023-09-14 Thread Michael Tokarev
14.09.2023 10:06, Dmitry Frolov wrote: According to cxl_interleave_ways_enc(), fw->num_targets is allowed to be up to 16. This also corresponds to CXL specs. So, the fw->target_hbs[] array is iterated from 0 to 15. But it is statically declared of length 8. Thus, out of bound array access may occ

Re: [PATCH] hw/cxl: Fix out of bound array access

2023-09-14 Thread Michael Tokarev
13.09.2023 13:10, Dmitry Frolov wrote: According to cxl_interleave_ways_enc(), fw->num_targets is allowed to be up to 16. This also corresponds to CXL specs. So, the fw->target_hbs[] array is iterated from 0 to 15. But it is staticaly declared of length 8. Thus, out of bound array access may occu

[PATCH v23 00/20] s390x: CPU Topology

2023-09-14 Thread Nina Schoetterl-Glausch
Changes since v22 (range-diff below): * fix compile issues (thanks Thomas, Cédric) * incorporate feedback (thanks Thomas!), most notably * forbid books and drawers in older machine types * changed implementation of TLE entry ordering * also got rid of another ERRP_GUARD in s390_change_topology *

Re: [PATCH] hw/cxl: Fix out of bound array access

2023-09-14 Thread Michael Tokarev
14.09.2023 15:37, Michael Tokarev: 13.09.2023 13:10, Dmitry Frolov wrote: According to cxl_interleave_ways_enc(), fw->num_targets is allowed to be up to 16. This also corresponds to CXL specs. So, the fw->target_hbs[] array is iterated from 0 to 15. But it is staticaly declared of length 8. Thus

[PATCH v23 15/20] tests/avocado: s390x cpu topology polarization

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-

[PATCH v23 20/20] tests/avocado: s390x cpu topology bad move

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel This test verifies that QEMU refuses to move a CPU to an nonexistent location. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/avocado/s390_topology.

[PATCH v23 11/20] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glaus

[PATCH v23 02/20] s390x/cpu topology: add topology entries on CPU hotplug

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books and sockets in the case they are not specified. - verify the CPU attributes - check that we

[PATCH v23 01/20] CPU topology: extend with s390 specifics

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel S390 adds two new SMP levels, drawers and books to the CPU topology. S390 CPUs have specific topology features like dedication and entitlement. These indicate to the guest information on host vCPU scheduling and help the guest make better scheduling decisions. Let us provide t

[PATCH v23 10/20] machine: adding s390 topology to info hotpluggable-cpus

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth --- hw/core/machine-hmp-cmds.c | 6 ++ 1 file changed, 6 in

[PATCH v23 04/20] s390x/sclp: reporting the maximum nested topology entries

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Morel Reviewed-by: Nina

[PATCH v23 08/20] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU. The same command allows to modify the CPU attributes modifier

Re: [PATCH] qdev-properties: alias all object class properties

2023-09-14 Thread Stefan Hajnoczi
Paolo: ping? On Thu, 3 Aug 2023 at 15:51, Stefan Hajnoczi wrote: > > qdev_alias_all_properties() aliases a DeviceState's qdev properties onto > an Object. This is used for VirtioPCIProxy types so that --device > virtio-blk-pci has properties of its embedded --device virtio-blk-device > object. >

[sdl-qemu] [PATCH 0/1] There are no checks, virDomainChrSourceDefNew can return 0

2023-09-14 Thread Миронов Сергей Владимирович
There are no checks, virDomainChrSourceDefNew can return 0. Return value of a function 'virDomainChrSourceDefNew' is dereferenced at qemu_hotplug.c without checking for NULL, but it is usually checked for this function. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes

[sdl-qemu] [PATCH 1/1] No checks, dereferencing possible

2023-09-14 Thread Миронов Сергей Владимирович
No checks, dereferencing possible. Return value of a function 'virDomainChrSourceDefNew' is dereferenced at qemu_command.c without checking for NULL, but it is usually checked for this function. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1f85f0967b ("ci: jobs.sh:

Re: [PATCH 2/4] hw/cxl: Use available size parameter to index into register arrays.

2023-09-14 Thread Michael Tokarev
13.09.2023 18:05, Jonathan Cameron via wrote: Indexing has to be done into an array with the right size elements. As such, the size parameter always matches the array element size and can be used in place of the longer sizeof(*array) Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-component-ut

Re: [PATCH 4/4] hw/cxl: Line length reductions

2023-09-14 Thread Michael Tokarev
13.09.2023 18:05, Jonathan Cameron via wrote: Michael Tsirkin observed that there were some unnecessarily long lines in the CXL code in a recent review. This patch is intended to rectify that where it does not hurt readability. Reviewed-by: Michael Tokarev This whole series can be picked up i

Re: [PATCH] hw/cxl: Fix out of bound array access

2023-09-14 Thread Philippe Mathieu-Daudé
On 14/9/23 14:38, Michael Tokarev wrote: 14.09.2023 15:37, Michael Tokarev: 13.09.2023 13:10, Dmitry Frolov wrote: According to cxl_interleave_ways_enc(), fw->num_targets is allowed to be up to 16. This also corresponds to CXL specs. So, the fw->target_hbs[] array is iterated from 0 to 15. But

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-14 Thread lixianglai
Hi David: On 12.09.23 04:11, xianglai li wrote: Introduce new function to destroy CPU address space resources for cpu hot-(un)plug. How do other archs handle that? Or how are they able to get away without destroying? They do not remove the cpu address space, taking the X86 architecture as

Re: [PATCH] hw/qxl: move check of slot_id before accessing guest_slots

2023-09-14 Thread Philippe Mathieu-Daudé
Hi Anastasia, On 14/9/23 11:27, Anastasia Belova wrote: If slot_id >= NUM_MEMSLOTS, buffer overflow is possible. overflow: unlikely. Do you mean over-read? Did you found that by code audit? I can't see where this function get slot_id >= NUM_MEMSLOTS. This isn't guest triggerable and seems an

Re: [RFC PATCH v2 00/21] QEMU gmem implemention

2023-09-14 Thread David Hildenbrand
On 14.09.23 05:50, Xiaoyao Li wrote: It's the v2 RFC of enabling KVM gmem[1] as the backend for private memory. For confidential-computing, KVM provides gmem/guest_mem interfaces for userspace, like QEMU, to allocate user-unaccesible private memory. This series aims to add gmem support in QEMU's

Re: [PATCH v2 00/21] Graph locking part 4 (node management)

2023-09-14 Thread Kevin Wolf
Am 12.09.2023 um 18:49 hat Stefan Hajnoczi geschrieben: > On Mon, Sep 11, 2023 at 11:45:59AM +0200, Kevin Wolf wrote: > > The previous parts of the graph locking changes focussed mostly on the > > BlockDriver side and taking reader locks while performing I/O. This > > series focusses more on the fu

Re: [RFC PATCH 0/3] Refactor PPI logic/definitions for virt/sbsa-ref

2023-09-14 Thread Marcin Juszkiewicz
W dniu 14.09.2023 o 14:01, Leif Lindholm pisze: While reviewing Marcin's patch this morning, cross referencing different specifications and looking at various places around the source code in order to convinced myself he really hadn't missed something out (the existing plumbing made it *so* clean

Re: [PATCH v2 08/20] asc: generate silence if FIFO empty but engine still running

2023-09-14 Thread Philippe Mathieu-Daudé
On 14/9/23 09:56, Philippe Mathieu-Daudé wrote: On 9/9/23 11:48, Mark Cave-Ayland wrote: MacOS (un)helpfully leaves the FIFO engine running even when all the samples have been written to the hardware, and expects the FIFO status flags and IRQ to be updated continuously. There is an additiona

Re: [PATCH] hw/cxl: Fix out of bound array access

2023-09-14 Thread Michael Tokarev
14.09.2023 15:59, Philippe Mathieu-Daudé wrote: Cc: qemu-sta...@nongnu.org for stable-8.1. [not related to this particular patch] Maybe this can help if we specify the releases range as a comment in the Cc tag, for example here: Cc: qemu-sta...@nongnu.org # v8.1 and if it were a range: Cc:

Re: [PATCH] target/mips: Fix MSA BZ/BNZ opcodes displacement

2023-09-14 Thread Richard Henderson
On 9/14/23 01:58, Philippe Mathieu-Daudé wrote: The PC offset is*signed*. Cc:qemu-sta...@nongnu.org Reported-by: Sergey Evlashev Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1624 Fixes: c7a9ef7517 ("target/mips: Introduce decode tree bindings for MSA ASE") Signed-off-by: Philippe Mathi

Re: [PATCH] target/mips: Fix TX79 LQ/SQ opcodes

2023-09-14 Thread Richard Henderson
On 9/14/23 02:04, Philippe Mathieu-Daudé wrote: The base register address offset is*signed*. Cc:qemu-sta...@nongnu.org Fixes: 82a9f9 ("target/mips/tx79: Introduce LQ opcode (Load Quadword)") Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/tx79.decode | 2 +- 1 file changed, 1 in

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-14 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Sep 13, 2023 at 06:53:20PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Mon, Sep 11, 2023 at 02:13:19PM -0300, Fabiano Rosas wrote: >> >> The core yank code is strict about balanced registering and >> >> unregistering of yank functions. >> >> >> >> This

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-14 Thread David Hildenbrand
On 14.09.23 15:00, lixianglai wrote: Hi David: Hi! On 12.09.23 04:11, xianglai li wrote: Introduce new function to destroy CPU address space resources for cpu hot-(un)plug. How do other archs handle that? Or how are they able to get away without destroying? They do not remove the cpu a

Re: [PATCH v3 0/2] qemu-img: map: implement support for compressed clusters

2023-09-14 Thread Kevin Wolf
Am 07.09.2023 um 23:02 hat Andrey Drobyshev via geschrieben: > v2 --> v3: > * Make "compressed" field mandatory, not optional; > * Adjust field description in qapi/block-core.json; > * Squash patch 3 into patch 2 so that failing tests don't break bisect; > * Update even more tests' outputs

Re: [PATCH 02/13] memory: Introduce memory_region_iommu_set_iova_ranges

2023-09-14 Thread David Hildenbrand
On 04.09.23 10:03, Eric Auger wrote: This helper will allow to convey information about valid IOVA ranges to virtual IOMMUS. Signed-off-by: Eric Auger --- include/exec/memory.h | 26 ++ softmmu/memory.c | 15 +++ 2 files changed, 41 insertions(+) di

[PATCH v23 13/20] docs/s390x/cpu topology: document s390x cpu topology

2023-09-14 Thread Nina Schoetterl-Glausch
From: Pierre Morel Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Signed-off-by: Nina Schoetterl-Glausch --- MAINTAINERS| 2 + docs/devel/index-inter

Re: [PATCH v2 07/11] qapi: fix example of query-rocker-of-dpa-flows command

2023-09-14 Thread Markus Armbruster
Victor Toso writes: > Example output has a comment embedded in the array. Remove it. > The end result is a list of size 1. > > Signed-off-by: Victor Toso > --- > qapi/rocker.json | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/qapi/rocker.json b/qapi/rocker.json > ind

Re: [PATCH v2 00/11] Validate and test qapi examples

2023-09-14 Thread Markus Armbruster
PATCH 01-06,09: Reviewed-by: Markus Armbruster

[PATCH 3/4] virtio-blk: don't lock AioContext in the completion code path

2023-09-14 Thread Stefan Hajnoczi
Nothing in the completion code path relies on the AioContext lock anymore. Virtqueues are only accessed from one thread at any moment and the s->rq global state is protected by its own lock now. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 34 -- 1 f

[PATCH 2/4] virtio-blk: add lock to protect s->rq

2023-09-14 Thread Stefan Hajnoczi
s->rq is accessed from IO_CODE and GLOBAL_STATE_CODE. Introduce a lock to protect s->rq and eliminate reliance on the AioContext lock. Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio-blk.h | 3 +- hw/block/virtio-blk.c | 67 +++--- 2 files change

[PATCH 1/4] block/file-posix: set up Linux AIO and io_uring in the current thread

2023-09-14 Thread Stefan Hajnoczi
The file-posix block driver currently only sets up Linux AIO and io_uring in the BDS's AioContext. In the multi-queue block layer we must be able to submit I/O requests in AioContexts that do not have Linux AIO and io_uring set up yet since any thread can call into the block driver. Set up Linux A

[PATCH 0/4] virtio-blk: prepare for the multi-queue block layer

2023-09-14 Thread Stefan Hajnoczi
The virtio-blk device will soon be able to assign virtqueues to IOThreads, eliminating the single IOThread bottleneck. In order to do that, the I/O code path must support running in multiple threads. This patch series removes the AioContext lock from the virtio-blk I/O code path, adds thread-safet

[PATCH 4/4] virtio-blk: don't lock AioContext in the submission code path

2023-09-14 Thread Stefan Hajnoczi
There is no need to acquire the AioContext lock around blk_aio_*() or blk_get_geometry() anymore. I/O plugging (defer_call()) also does not require the AioContext lock anymore. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/blo

Re: [PATCH v2 07/11] qapi: fix example of query-rocker-of-dpa-flows command

2023-09-14 Thread Victor Toso
Hi, On Thu, Sep 14, 2023 at 03:50:23PM +0200, Markus Armbruster wrote: > Victor Toso writes: > > > Example output has a comment embedded in the array. Remove it. > > The end result is a list of size 1. > > > > Signed-off-by: Victor Toso > > --- > > qapi/rocker.json | 3 +-- > > 1 file changed,

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Eric Blake
On Wed, Sep 13, 2023 at 10:36:35AM -0500, Eric Blake wrote: > On Wed, Sep 06, 2023 at 04:09:17PM +0200, Denis V. Lunev wrote: > > Each particular testcase could skipped intentionally and accidentally. > > For example the test is not designed for a particular image format or > > is not run due to th

Re: [PATCH v2 07/11] qapi: fix example of query-rocker-of-dpa-flows command

2023-09-14 Thread Daniel P . Berrangé
On Thu, Sep 14, 2023 at 04:01:55PM +0200, Victor Toso wrote: > Hi, > > On Thu, Sep 14, 2023 at 03:50:23PM +0200, Markus Armbruster wrote: > > Victor Toso writes: > > > > > Example output has a comment embedded in the array. Remove it. > > > The end result is a list of size 1. > > > > > > Signed-

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-14 Thread Peter Maydell
On Thu, 7 Sept 2023 at 19:18, Stefan Hajnoczi wrote: > > From: Jeuk Kim > > This commit adds support for ufs logical unit. > The LU handles processing for the SCSI command, > unit descriptor query request. > > This commit enables the UFS device to process > IO requests. > > Signed-off-by: Jeuk Ki

Re: [PATCH v3 0/5] Support message-based DMA in vfio-user server

2023-09-14 Thread Stefan Hajnoczi
On Thu, Sep 07, 2023 at 06:04:05AM -0700, Mattias Nissler wrote: > This series adds basic support for message-based DMA in qemu's vfio-user > server. This is useful for cases where the client does not provide file > descriptors for accessing system memory via memory mappings. My motivating use > ca

Re: [PULL 3/5] hw/ufs: Support for Query Transfer Requests

2023-09-14 Thread Peter Maydell
On Thu, 7 Sept 2023 at 19:17, Stefan Hajnoczi wrote: > > From: Jeuk Kim > > This commit makes the UFS device support query > and nop out transfer requests. > > The next patch would be support for UFS logical > unit and scsi command transfer request. > > Signed-off-by: Jeuk Kim > Reviewed-by: Ste

Re: [PATCH] ppc/xive: Fix uint32_t overflow

2023-09-14 Thread Peter Maydell
On Wed, 13 Sept 2023 at 06:57, Cédric Le Goater wrote: > > As reported by Coverity, "idx << xive->pc_shift" is evaluated using > 32-bit arithmetic, and then used in a context expecting a "uint64_t". > Add a uint64_t cast. > > Fixes: Coverity CID 1519049 > Fixes: b68147b7a5bf ("ppc/xive: Add suppor

Re: [PATCH v1 02/22] Update linux-header to support iommufd cdev and hwpt alloc

2023-09-14 Thread Eric Auger
Hi Zhenzhong, On 8/30/23 12:37, Zhenzhong Duan wrote: > From https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git > branch: for_next > commit id: eb501c2d96cfce6b42528e8321ea085ec605e790 I see that in your branch you have now updated against v6.6-rc1. However you should run a full ./scr

Re: [PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-14 Thread Peter Maydell
On Thu, 7 Sept 2023 at 19:18, Stefan Hajnoczi wrote: > > From: Jeuk Kim > > This commit adds support for ufs logical unit. > The LU handles processing for the SCSI command, > unit descriptor query request. > > This commit enables the UFS device to process > IO requests. > > Signed-off-by: Jeuk Ki

[PATCH 2/3] hw/arm/smmuv3: Sort ID register setting into field order

2023-09-14 Thread Peter Maydell
In smmuv3_init_regs() when we set the various bits in the ID registers, we do this almost in order of the fields in the registers, but not quite. Move the initialization of SMMU_IDR3.RIL and SMMU_IDR5.OAS into their correct places. Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 4 ++-- 1 fil

Re: QEMU migration-test CI intermittent failure

2023-09-14 Thread Peter Xu
On Wed, Sep 13, 2023 at 04:42:31PM -0300, Fabiano Rosas wrote: > Stefan Hajnoczi writes: > > > Hi, > > The following intermittent failure occurred in the CI and I have filed > > an Issue for it: > > https://gitlab.com/qemu-project/qemu/-/issues/1886 > > > > Output: > > > > >>> QTEST_QEMU_IMG=./

[PATCH 3/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature

2023-09-14 Thread Peter Maydell
The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is supported, so we should theoretically have implemented it as part of the recent S2P work. Fortunately, for us the implementation is a no-op. This feature is about interpretation of the stage 2 page table descriptor XN bits, which con

[PATCH 1/3] hw/arm/smmuv3: Update ID register bit field definitions

2023-09-14 Thread Peter Maydell
Update the SMMUv3 ID register bit field definitions to the set in the most recent specification (IHI0700 F.a). Signed-off-by: Peter Maydell --- hw/arm/smmuv3-internal.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/s

[PATCH 0/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX

2023-09-14 Thread Peter Maydell
The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is supported, so we should theoretically have implemented it as part of the recent S2P work. Fortunately, for us the implementation is a no-op. This feature is about interpretation of the stage 2 page table descriptor XN bits, which con

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-14 Thread Denis V. Lunev
On 9/14/23 16:10, Eric Blake wrote: On Wed, Sep 13, 2023 at 10:36:35AM -0500, Eric Blake wrote: On Wed, Sep 06, 2023 at 04:09:17PM +0200, Denis V. Lunev wrote: Each particular testcase could skipped intentionally and accidentally. For example the test is not designed for a particular image form

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-14 Thread Peter Xu
On Thu, Sep 14, 2023 at 10:23:38AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Sep 13, 2023 at 06:53:20PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Mon, Sep 11, 2023 at 02:13:19PM -0300, Fabiano Rosas wrote: > >> >> The core yank code is strict about bala

Re: [RFC PATCH 0/3] Refactor PPI logic/definitions for virt/sbsa-ref

2023-09-14 Thread Leif Lindholm
On 2023-09-14 14:15, Marcin Juszkiewicz wrote: W dniu 14.09.2023 o 14:01, Leif Lindholm pisze: While reviewing Marcin's patch this morning, cross referencing different specifications and looking at various places around the source code in order to convinced myself he really hadn't missed somethi

Re: QEMU migration-test CI intermittent failure

2023-09-14 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Sep 13, 2023 at 04:42:31PM -0300, Fabiano Rosas wrote: >> Stefan Hajnoczi writes: >> >> > Hi, >> > The following intermittent failure occurred in the CI and I have filed >> > an Issue for it: >> > https://gitlab.com/qemu-project/qemu/-/issues/1886 >> > >> > Output: >>

Re: [sdl-qemu] [PATCH 1/1] No checks, dereferencing possible

2023-09-14 Thread Daniel P . Berrangé
On Thu, Sep 14, 2023 at 12:22:26PM +0200, Peter Krempa wrote: > On Thu, Sep 14, 2023 at 09:44:16 +, Миронов Сергей Владимирович wrote: > > No checks, dereferencing possible. > > > > > > Return value of a function 'virDomainChrSourceDefNew' > > is dereferenced at qemu_command.c without checkin

Re: [PATCH] tests/avocado: Fix console data loss

2023-09-14 Thread John Snow
On Wed, Sep 13, 2023 at 4:53 AM Alex Bennée wrote: > > > Nicholas Piggin writes: > > > Occasionally some avocado tests will fail waiting for console line > > despite the machine running correctly. Console data goes missing, as can > > be seen in the console log. This is due to _console_interactio

Re: [PATCH v2] target/riscv: update checks on writing pmpcfg for Smepmp version 1.0

2023-09-14 Thread Andrew Jones
On Fri, Sep 08, 2023 at 04:38:34PM +0800, Alvin Chang wrote: > Current checks on writing pmpcfg for Smepmp follows Smepmp version > 0.9.1. However, Smepmp specification has already been ratified, and > there are some differences between version 0.9.1 and 1.0. In this commit > we update the checks o

Re: [PATCH v2 12/24] tcg: Rename cpu_env to tcg_env

2023-09-14 Thread Philippe Mathieu-Daudé
On 14/9/23 08:10, Philippe Mathieu-Daudé wrote: On 14/9/23 04:44, Richard Henderson wrote: Allow the name 'cpu_env' to be used for something else. Signed-off-by: Richard Henderson ---   include/tcg/tcg.h |    2 +-   target/arm/tcg/translate-a32.h    |   

Re: QEMU migration-test CI intermittent failure

2023-09-14 Thread Peter Xu
On Thu, Sep 14, 2023 at 12:10:04PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Sep 13, 2023 at 04:42:31PM -0300, Fabiano Rosas wrote: > >> Stefan Hajnoczi writes: > >> > >> > Hi, > >> > The following intermittent failure occurred in the CI and I have filed > >> > an Issue for i

Re: [PATCH v2 22/24] accel/tcg: Remove env_tlb()

2023-09-14 Thread Philippe Mathieu-Daudé
On 14/9/23 04:44, Richard Henderson wrote: From: Anton Johansson The function is no longer used to access the TLB, and has been replaced by cpu->neg.tlb. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-9-a...@rev.ng> Reviewed-by: Richard Henderson [rth: Merge comment update

[PATCH v2] ppc/xive: Fix uint32_t overflow

2023-09-14 Thread Cédric Le Goater
As reported by Coverity, "idx << xive->pc_shift" is evaluated using 32-bit arithmetic, and then used in a context expecting a "uint64_t". Add a uint64_t cast. Fixes: Coverity CID 1519049 Fixes: b68147b7a5bf ("ppc/xive: Add support for the PC MMIOs") Signed-off-by: Cédric Le Goater Reviewed-by: Ph

Re: [PATCH 1/4] block/file-posix: set up Linux AIO and io_uring in the current thread

2023-09-14 Thread Eric Blake
On Thu, Sep 14, 2023 at 10:00:58AM -0400, Stefan Hajnoczi wrote: > The file-posix block driver currently only sets up Linux AIO and > io_uring in the BDS's AioContext. In the multi-queue block layer we must > be able to submit I/O requests in AioContexts that do not have Linux AIO > and io_uring se

Re: [PATCH 0/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX

2023-09-14 Thread Richard Henderson
On 9/14/23 07:57, Peter Maydell wrote: Peter Maydell (3): hw/arm/smmuv3: Update ID register bit field definitions hw/arm/smmuv3: Sort ID register setting into field order hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature Reviewed-by: Richard Henderson r~

[PATCH 8/9] tests/avocado: Fix console data loss

2023-09-14 Thread Alex Bennée
From: Nicholas Piggin Occasionally some avocado tests will fail waiting for console line despite the machine running correctly. Console data goes missing, as can be seen in the console log. This is due to _console_interaction calling makefile() on the console socket each time it is invoked, which

[PATCH 0/9] testing/next: avocado, gitlab, docker, cirrus

2023-09-14 Thread Alex Bennée
This is mostly focused on getting the tree green again. There are fixes for timeouts on various platforms. We explicitly disable a few due to a known regression. Also there is a chance to update our containers for Bookworm. I dropped the attempt to migrate from global's htags support as the lsif-c

[PATCH 3/9] tests/docker: Update docker-loongarch-cross toolchain

2023-09-14 Thread Alex Bennée
From: Richard Henderson Update from clfs 5.0 to clfs 8.1, which includes updates to binutils 2.41, gcc 13.2, and glibc 2.38. See https://github.com/loongson/build-tools Signed-off-by: Richard Henderson Message-Id: <20230829220228.928506-2-richard.hender...@linaro.org> --- tests/docker/dockerf

[PATCH 1/9] tests: update Debian images to Bookworm

2023-09-14 Thread Alex Bennée
Bookworm has been out a while now. Time to update our containers to the current stable. This requires the latest lcitool repo so update the sub-module too. For some reason the MIPs containers won't build so skip those for now. Signed-off-by: Alex Bennée --- .../dockerfiles/debian-amd64-cross.do

[PATCH 6/9] gitlab: make Cirrus CI timeout explicit

2023-09-14 Thread Alex Bennée
From: Daniel P. Berrangé On the GitLab side we're invoking the Cirrus CI job using the cirrus-run tool which speaks to the Cirrus REST API. Cirrus sometimes tasks 5-10 minutes to actually schedule the task, and thus the execution time of 'cirrus-run' inside GitLab will be slightly longer than the

[PATCH 9/9] tests/avocado: Disable MIPS Malta tests due to GitLab issue #1884

2023-09-14 Thread Alex Bennée
From: Philippe Mathieu-Daudé Commit 0d58c66068 ("softmmu: Use async_run_on_cpu in tcg_commit") introduced a regression which is only triggered by the MIPS Malta machine. Since those tests are gatting and disturb the CI workflow, disable them until https://gitlab.com/qemu-project/qemu/-/issues/186

[PATCH 4/9] microbit: add missing qtest_quit() call

2023-09-14 Thread Alex Bennée
From: Daniel P. Berrangé Without this call, the QEMU process is being left running which on FreeBSD 13.2 at least, makes meson think the test is still running, and thus execution of "make check" continues forever. This fixes the regression introduced in: commit a9c9bbee855877293683012942d3485

[PATCH 7/9] gitlab: make Cirrus CI jobs gating

2023-09-14 Thread Alex Bennée
From: Daniel P. Berrangé The Cirrus CI jobs have been non-gating for a while to let us build confidence in their reliability. Aside from periodic dependancy problems when FreeBSD Ports switches to be based on a new FreeBSD image version, the jobs have been reliable. It is thus worth making them g

Re: [PATCH v3 00/12] gdbstub and TCG plugin improvements

2023-09-14 Thread Alex Bennée
Akihiko Odaki writes: > This series extracts fixes and refactorings that can be applied > independently from "[PATCH RESEND v5 00/26] plugins: Allow to read > registers" as suggested by Nicholas Piggin. > > Patch "target/ppc: Remove references to gdb_has_xml" is also updated to > remove some de

[PATCH 5/9] qtest: kill orphaned qtest QEMU processes on FreeBSD

2023-09-14 Thread Alex Bennée
From: Daniel P. Berrangé On Linux we use PR_SET_PDEATHSIG to kill orphaned QEMU processes if we fail to call qtest_quit(), or the test program aborts/segvs. This prevents meson from hanging forever due to the orphaned process keeping stdout open. On FreeBSD we can achieve the same using PROC_PDE

[PATCH 2/9] gitlab: fix typo/spelling in comments

2023-09-14 Thread Alex Bennée
Signed-off-by: Alex Bennée --- .gitlab-ci.d/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index 188a770799..ef173a34e6 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/base.yml @@ -68,7 +68,7 @@ variables: ##

Re: QEMU migration-test CI intermittent failure

2023-09-14 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Sep 14, 2023 at 12:10:04PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Wed, Sep 13, 2023 at 04:42:31PM -0300, Fabiano Rosas wrote: >> >> Stefan Hajnoczi writes: >> >> >> >> > Hi, >> >> > The following intermittent failure occurred in the CI and I have

Re: [PATCH 2/9] gitlab: fix typo/spelling in comments

2023-09-14 Thread Thomas Huth
On 14/09/2023 17.54, Alex Bennée wrote: Signed-off-by: Alex Bennée --- .gitlab-ci.d/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index 188a770799..ef173a34e6 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/bas

<    1   2   3   4   >