Re: [PATCH v10 01/15] ui & main loop: Redesign of system-specific main thread event handling

2024-11-21 Thread Phil Dennis-Jordan
On Fri 22. Nov 2024 at 06:02, Akihiko Odaki wrote: > On 2024/11/13 23:23, Phil Dennis-Jordan wrote: > > macOS's Cocoa event handling must be done on the initial (main) thread > > of the process. Furthermore, if library or application code uses > > libdispatch, the main dispatch queue must be hand

[PATCH 1/2] rust: add BQL-enforcing Cell variant

2024-11-21 Thread Paolo Bonzini
QEMU objects usually have their pointer shared with the "outside world" very early in their lifetime, for example when they create their MemoryRegions. Because at this point it is not valid anymore to create a &mut reference to the device, individual parts of the device struct must be made mutable

[PATCH 0/2] rust: safe wrappers for interrupt sources

2024-11-21 Thread Paolo Bonzini
Interrupt sources, qemu_irq in C code, are pointers to IRQState objects. They are QOM link properties and can be written to outside the control of the device (i.e. from a shared reference); therefore their Rust representation must be an interior-mutable field. This make interrupt sources similar t

[PATCH 2/2] rust: add bindings for interrupt sources

2024-11-21 Thread Paolo Bonzini
The InterruptSource bindings let us call qemu_set_irq() and sysbus_init_irq() as safe code. Interrupt sources, qemu_irq in C code, are pointers to IRQState objects. They are QOM link properties and can be written to outside the control of the device (i.e. from a shared reference); therefore they m

[PATCH v3 0/3] tests/functional: Finish conversion of Aspeed tests

2024-11-21 Thread Cédric Le Goater
Hello, This series completes the conversion of the Aspeed tests to the new functional framework and removes the workarounds for capturing the console output. Thanks, C. Changes in v3: - Rebased on : https://lore.kernel.org/all/20241121165806.476008-1-alex.ben...@linaro.org/ - Added docu

[PATCH v3 1/3] tests/functional: Convert Aspeed aarch64 SDK tests

2024-11-21 Thread Cédric Le Goater
Drop the SSH connection which was introduced in the avocado tests to workaround read issues when interacting with console. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth --- tests/avocado/machine_aspeed.py | 78 tests/functional/meson.build| 2

[PATCH v3 2/3] tests/functional: Convert Aspeed arm SDK tests

2024-11-21 Thread Cédric Le Goater
Drop the SSH connection which was introduced in the avocado tests to workaround read issues when interacting with console. EXTRA_BOOTARGS was introduced to reduce the console output at Linux boot time. This didn't have the desired effect as we still had issues when trying to match patterns on the

[PATCH v3 3/3] tests/functional: Remove sleep workarounds from Aspeed tests

2024-11-21 Thread Cédric Le Goater
These were introduced in the avocado tests to workaround read issues when interacting with console. They are no longer necessary and we can use the expected "login:" string or the command prompt now. Drop the last use of exec_command. Signed-off-by: Cédric Le Goater Reviewed-by: Thomas Huth ---

Re: [PATCH v4] hw/riscv: Add Microblaze V generic board

2024-11-21 Thread Michal Simek
On 11/22/24 06:42, Alistair Francis wrote: On Wed, Nov 20, 2024 at 12:50 AM Sai Pavan Boddu wrote: Add a basic board with interrupt controller (intc), timer, serial (uartlite), small memory called LMB@0 (128kB) and DDR@0x8000 (configured via command line eg. -m 2g). This is basic config

Re: [PATCH v3 5/6] virtio-net: Initialize hash reporting values

2024-11-21 Thread Philippe Mathieu-Daudé
On 22/11/24 06:03, Akihiko Odaki wrote: The specification says hash_report should be set to VIRTIO_NET_HASH_REPORT_NONE if VIRTIO_NET_F_HASH_REPORT is negotiated but not configured with VIRTIO_NET_CTRL_MQ_RSS_CONFIG. However, virtio_net_receive_rcu() instead wrote out the content of the extra_hdr

Re: [PATCH v3 1/6] net: checksum: Convert data to void *

2024-11-21 Thread Philippe Mathieu-Daudé
On 22/11/24 06:03, Akihiko Odaki wrote: Convert the data parameter of net_checksum_calculate() to void * to save unnecessary casts for callers. Signed-off-by: Akihiko Odaki --- include/net/checksum.h | 2 +- net/checksum.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)

Re: pc-bios/optionrom: when/why do we build it?

2024-11-21 Thread Michael Tokarev
Maybe a more general question would be: what is our main build entry point? Is it `make` (or `make all`) still, or is it meson now? For this specific optionrom thing, I'd say we should add a separate rule to the top-level Makefile (or to meson.build) which is not run by default but can be run ex

Re: [PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-21 Thread Philippe Mathieu-Daudé
Hi Wafer, On 22/11/24 03:00, Wafer wrote: From: Wafer Xie The virtio-1.2 specification writes: 2.7.6 The Virtqueue Available Ring: "idx field indicates where the driver would put the next descriptor entry in the ring (modulo the queue size). This starts at 0, and increases" "modulo" ...

pc-bios/optionrom: when/why do we build it?

2024-11-21 Thread Michael Tokarev
Hi! Our configure includes pc-bios/optionrom/ into SUBDIRS variable in config-host.mak when i386 compiler is available, so `make all` will visit this subdir when building things. This will (re)build the roms in pc-bios/optionroms/ directory, but wont update the binaries in pc-bios/ which will be

Re: [PATCH for 10.0] tcg/optimize: fold recursively after optimizing deposit

2024-11-21 Thread Richard Henderson
On 11/21/24 02:19, Paolo Bonzini wrote: When generating code for x86 targets, this is able to simplify XOR+SETcc sequences. SETcc generates a setcond+deposit pair of TCG opcodes which used to become setcond+ext32u after optimization; now TCG recognizes that the output of setcond is itself alread

Re: [PATCH v4] hw/riscv: Add Microblaze V generic board

2024-11-21 Thread Alistair Francis
On Wed, Nov 20, 2024 at 12:50 AM Sai Pavan Boddu wrote: > > Add a basic board with interrupt controller (intc), timer, serial > (uartlite), small memory called LMB@0 (128kB) and DDR@0x8000 > (configured via command line eg. -m 2g). > This is basic configuration which matches HW generated out o

[PATCH v3 1/6] net: checksum: Convert data to void *

2024-11-21 Thread Akihiko Odaki
Convert the data parameter of net_checksum_calculate() to void * to save unnecessary casts for callers. Signed-off-by: Akihiko Odaki --- include/net/checksum.h | 2 +- net/checksum.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/checksum.h b/include

[PATCH v3 2/6] virtio-net: Fix size check in dhclient workaround

2024-11-21 Thread Akihiko Odaki
work_around_broken_dhclient() accesses IP and UDP headers to detect relevant packets and to calculate checksums, but it didn't check if the packet has size sufficient to accommodate them, causing out-of-bound access hazards. Fix this by correcting the size requirement. Fixes: 1d41b0c1ec66 ("Work a

[PATCH v3 3/6] virtio-net: Do not check for the queue before RSS

2024-11-21 Thread Akihiko Odaki
virtio_net_can_receive() checks if the queue is ready, but RSS will change the queue to use so, strictly speaking, we may still be able to receive the packet even if the queue initially provided is not ready. Perform RSS before virtio_net_can_receive() to cover such a case. Fixes: 4474e37a5b3a ("v

[PATCH v3 5/6] virtio-net: Initialize hash reporting values

2024-11-21 Thread Akihiko Odaki
The specification says hash_report should be set to VIRTIO_NET_HASH_REPORT_NONE if VIRTIO_NET_F_HASH_REPORT is negotiated but not configured with VIRTIO_NET_CTRL_MQ_RSS_CONFIG. However, virtio_net_receive_rcu() instead wrote out the content of the extra_hdr variable, which is not uninitialized in s

[PATCH v3 6/6] virtio-net: Copy received header to buffer

2024-11-21 Thread Akihiko Odaki
receive_header() used to cast the const qualifier of the pointer to the received packet away to modify the header. Avoid this by copying the received header to buffer. Signed-off-by: Akihiko Odaki --- hw/net/virtio-net.c | 85 + 1 file changed,

[PATCH v3 4/6] virtio-net: Fix hash reporting when the queue changes

2024-11-21 Thread Akihiko Odaki
virtio_net_process_rss() fills the values used for hash reporting, but the values used to be thrown away with a recursive function call if the queue changes after RSS. Avoid the function call to keep the values. Fixes: a4c960eedcd2 ("virtio-net: Do not write hashes to peer buffer") Buglink: https:

[PATCH v3 0/6] virtio-net fixes

2024-11-21 Thread Akihiko Odaki
Most of this series are fixes for software RSS and hash reporting, which should have no production user. However there is one exception; patch "virtio-net: Fix size check in dhclient workaround" fixes an out-of-bound access that can be triggered for anyone who don't use vhost. It has Cc: qemu-sta.

Re: [PATCH v10 01/15] ui & main loop: Redesign of system-specific main thread event handling

2024-11-21 Thread Akihiko Odaki
On 2024/11/13 23:23, Phil Dennis-Jordan wrote: macOS's Cocoa event handling must be done on the initial (main) thread of the process. Furthermore, if library or application code uses libdispatch, the main dispatch queue must be handling events on the main thread as well. So far, this has affecte

Re: [PATCH v4 6/6] target/riscv: Check svukte is not enabled in RV32

2024-11-21 Thread Alistair Francis
On Wed, Nov 20, 2024 at 5:47 PM Fea.Wang wrote: > > Based on the spec, svukte depends on SV39, so it should not be enabled > in RV32. The spec explicitly says it doesn't support RV32. > > Signed-off-by: Fea.Wang > --- > target/riscv/tcg/tcg-cpu.c | 5 + > 1 file changed, 5 insertions(+) >

Re: [PATCH v4 4/6] target/riscv: Check memory access to meet svukte rule

2024-11-21 Thread Alistair Francis
On Wed, Nov 20, 2024 at 5:48 PM Fea.Wang wrote: > > Follow the Svukte spec, do the memory access address checking > > 1. Include instruction fetches or explicit memory accesses > 2. System run in effective privilege U or VU > 3. Check senvcfg[UKTE] being set, or hstatus[HUKTE] being set if > instr

[PATCH v9 4/6] target/riscv: Add Smrnmi mnret instruction

2024-11-21 Thread frank . chang
From: Tommy Wu This patch adds a new instruction 'mnret'. 'mnret' is an M-mode-only instruction that uses the values in `mnepc` and `mnstatus` to return to the program counter, privilege mode, and virtualization mode of the interrupted context. Signed-off-by: Frank Chang Signed-off-by: Tommy Wu

[PATCH v9 1/6] target/riscv: Add 'ext_smrnmi' in the RISCVCPUConfig

2024-11-21 Thread frank . chang
From: Tommy Wu The boolean variable 'ext_smrnmi' is used to determine whether the Smrnmi extension exists. Signed-off-by: Frank Chang Signed-off-by: Tommy Wu Reviewed-by: Alistair Francis --- target/riscv/cpu_cfg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu_cfg.h b/

Re: [PATCH v8 2/5] target/riscv: Handle Smrnmi interrupt and exception

2024-11-21 Thread Frank Chang
On Wed, Nov 20, 2024 at 11:29 AM Frank Chang wrote: > On Mon, Nov 18, 2024 at 11:13 AM Alistair Francis > wrote: > >> On Mon, Oct 21, 2024 at 1:06 PM wrote: >> > >> > From: Tommy Wu >> > >> > Because the RNMI interrupt trap handler address is implementation >> defined. >> > We add the 'rnmi-in

[PATCH v9 5/6] target/riscv: Add Smrnmi cpu extension

2024-11-21 Thread frank . chang
From: Tommy Wu This adds the properties for ISA extension Smrnmi. Signed-off-by: Frank Chang Signed-off-by: Tommy Wu --- target/riscv/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index b402d8545b..6c91464a00 100644 --- a/target/riscv/cpu.

[PATCH v9 6/6] target/riscv: Add Zicfilp support for Smrnmi

2024-11-21 Thread frank . chang
From: Frank Chang Zicfilp extension introduces the MNPELP (bit 9) in mnstatus. The MNPELP field holds the previous ELP. When a RNMI trap is delivered, the MNPELP is set to ELP and ELP set to NO_LP_EXPECTED. Upon a mnret, if the mnstatus.MNPP holds the value y, then ELP is set to the value of MNP

[PATCH v9 0/6] Add Smrnmi support

2024-11-21 Thread frank . chang
From: Frank Chang This patchset added support for Smrnmi Extension in RISC-V. There are four new CSRs and one new instruction added to allow NMI to be resumable in RISC-V, which are: = * mnscratch (0x740) * mnepc (0x741) * mn

[PATCH v9 3/6] target/riscv: Handle Smrnmi interrupt and exception

2024-11-21 Thread frank . chang
From: Tommy Wu Because the RNMI interrupt trap handler address is implementation defined. We add the 'rnmi-interrupt-vector' and 'rnmi-exception-vector' as the property of the harts. It’s very easy for users to set the address based on their expectation. This patch also adds the functionality to

[PATCH v9 2/6] target/riscv: Add Smrnmi CSRs

2024-11-21 Thread frank . chang
From: Tommy Wu The Smrnmi extension adds the 'mnscratch', 'mnepc', 'mncause', 'mnstatus' CSRs. Signed-off-by: Frank Chang Signed-off-by: Tommy Wu Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 5 +++ target/riscv/cpu.h | 7 target/riscv/cpu_bits.h | 11 ++ target

Re: [PATCH v1 0/4] Initialize nr_cores and nr_threads early and related clearup

2024-11-21 Thread Xiaoyao Li
On 11/22/2024 2:52 AM, Paolo Bonzini wrote: On 11/21/24 17:24, Xiaoyao Li wrote: Could it go into cpu_common_initfn()? It can, I think. I'll move them into cpu_common_initfn() in v2 to avoid touching all the ARCHes. It does look better than the alternative of duplicating code. On the othe

[PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-21 Thread Wafer
From: Wafer Xie The virtio-1.2 specification writes: 2.7.6 The Virtqueue Available Ring: "idx field indicates where the driver would put the next descriptor entry in the ring (modulo the queue size). This starts at 0, and increases" The idx will increase from 0 to 0x and repeat, So idx may

Re: [PATCH v2 0/6] virtio-net fixes

2024-11-21 Thread Jason Wang
On Thu, Nov 21, 2024 at 6:09 PM Akihiko Odaki wrote: > > On 2024/11/21 19:05, Michael Tokarev wrote: > > 11.11.2024 09:40, Akihiko Odaki wrote: > >> Most of this series are fixes for software RSS and hash reporting, which > >> should have no production user. > >> > >> However there is one exceptio

Re: [PATCH 12/14] pnv/xive: Support ESB Escalation

2024-11-21 Thread Mike Kowal
On 11/18/2024 11:00 PM, Nicholas Piggin wrote: On Wed Oct 16, 2024 at 7:13 AM AEST, Michael Kowal wrote: From: Glenn Miles END notification processing has an escalation path. The escalation is not always an END escalation but can be an ESB escalation. Also added a check for 'resume' proces

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-11-21 Thread Nathan Chen
>> Also as a heads up, I've added support for auto-inserting PCIe switch >> between the PXB and GPUs in libvirt to attach multiple devices to a SMMU >> node per libvirt's documentation - "If you intend to plug multiple >> devices into a pcie-expander-bus, you must connect a >> pcie-switch-upstream

[PATCH] target/riscv: Don't start user-mode with VILL

2024-11-21 Thread Palmer Dabbelt
This is still under discussion in the psABI, but it's looking like we're going to forbid VILL in userspace in order to maintain compatibility with binaries that don't expect implementations to trap whole register moves under VILL (as in QEMU before 4eff52cd46 ("target/riscv: Add vill check for whol

Re: [PATCH 06/14] ppc/xive2: Process group backlog when updating the CPPR

2024-11-21 Thread Mike Kowal
On 11/18/2024 10:34 PM, Nicholas Piggin wrote: On Wed Oct 16, 2024 at 7:13 AM AEST, Michael Kowal wrote: From: Frederic Barrat When the hypervisor or OS pushes a new value to the CPPR, if the LSMFB value is lower than the new CPPR value, there could be a pending group interrupt in the backlog,

Re: [PATCH v2 06/22] tests/qtest/migration: Move qmp helpers to a separate file

2024-11-21 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:14PM -0300, Fabiano Rosas wrote: > We current have a bunch of non-test functions in migration-test.c and > some others in migration-helpers.c. In order to split migration-test.c > into separate test binaries, these helpers need to go somewhere > else. > > To avoid mak

Re: [PATCH v2 07/22] tests/qtest/migration: Rename migration-helpers.c

2024-11-21 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:15PM -0300, Fabiano Rosas wrote: > Rename migration-helpers.c to migration-util.c to make its purpose > more explicit and avoid the "helper" terminology. > > Move the file to the qtest/migration/ directory along with the rest of > the migration files. > > Signed-off-

[PATCH v2 08/13] qdev: Make qdev_get_machine() not use container_get()

2024-11-21 Thread Peter Xu
Currently, qdev_get_machine() has a slight misuse on container_get(), as the helper says "get a container" but in reality the goal is to get the machine object. It is still a "container" but not strictly. Note that it _may_ get a container (at "/machine") in our current unit test of test-qdev-glo

Re: [PATCH 03/14] ppc/xive2: Support group-matching when looking for target

2024-11-21 Thread Mike Kowal
On 11/18/2024 9:22 PM, Nicholas Piggin wrote: On Wed Oct 16, 2024 at 7:13 AM AEST, Michael Kowal wrote: From: Frederic Barrat If an END has the 'i' bit set (ignore), then it targets a group of VPs. The size of the group depends on the VP index of the target (first 0 found when looking at the

Re: [PATCH 02/14] ppc/xive2: Add grouping level to notification

2024-11-21 Thread Mike Kowal
On 11/18/2024 8:08 PM, Nicholas Piggin wrote: On Wed Oct 16, 2024 at 7:13 AM AEST, Michael Kowal wrote: From: Frederic Barrat The NSR has a (so far unused) grouping level field. When a interrupt is presented, that field tells the hypervisor or OS if the interrupt is for an individual VP or f

Re: QEMU commit 0a923be2f642 broke my or1k image.

2024-11-21 Thread Rob Landley
On 9/16/24 02:21, Stafford Horne wrote: On Wed, Sep 11, 2024 at 12:42:58AM -0500, Rob Landley wrote: Grab this tarball, extract it, and ./run-qemu.sh. It's a simple linux+initramfs image that boots to a shell prompt. https://landley.net/bin/mkroot/latest/or1k.tgz QEMU 7.0.0 ran that linux-o

[PATCH v1 1/1] hw/nvme: Add OCP SMART / Health Information Extended Log Page

2024-11-21 Thread Stephen Bates
The Open Compute Project [1] includes a Datacenter NVMe SSD Specification [2]. The most recent version of this specification (as of November 2024) is 2.6.1. This specification layers on top of the NVM Express specifications [3] to provide additional functionality. A key part of of this is the 512 B

Re: [PATCH 00/39] maintainer updates for -rc2 pre-PR

2024-11-21 Thread Cédric Le Goater
On 11/21/24 20:10, Thomas Huth wrote: On 21/11/2024 20.03, Cédric Le Goater wrote: Hello Alex, On 11/21/24 17:57, Alex Bennée wrote: This is a mostly testing focused set of patches but a few bug fixes as well. I plan to send the PR in on Monday. I can drop any patches that are objected to but

[PATCH v2 01/13] qom: Add TYPE_CONTAINER macro

2024-11-21 Thread Peter Xu
Provide a macro for the container type across QEMU source tree, rather than hard code it every time. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Peter Xu --- include/qom/object.h | 1 + hw/arm/stellaris.c | 2 +- qom/container.c | 4 ++-- qom/objec

[PATCH v2 10/18] tests/functional: honour requested test VM name in QEMUMachine

2024-11-21 Thread Daniel P . Berrangé
The functional test case class is going to the trouble of passing around a machine name, but then fails to give this QEMUMachine. As a result, QEMUMachine will create a completely random name. Since log file names match the machine name, this results in log files accumulating over time. Reviewed-b

Re: QEMU patches for native windows support through clang-cl

2024-11-21 Thread Erwin Jansen
Would a good next step be to work out some more details in a document that outlines what process we are using, what we are planning to do and include a set of suggestions as a starting point to see if we can upstream some of the changes to the larger community? We currently don't have a proper sol

Re: [PATCH] scsi: megasas: Internal cdbs have 16-byte length

2024-11-21 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 04/22] tests/migration: Disambiguate guestperf vs. a-b

2024-11-21 Thread Peter Xu
On Wed, Nov 13, 2024 at 04:46:12PM -0300, Fabiano Rosas wrote: > The current build structure for migration tests is confusing. There is > the tests/migration directory, which contains two different guest code > implementations, one for the qtests (a-b-{bootblock|kernel}.S) and > another for the gue

[PATCH] fix dirtyring not converge use small dirtylimit

2024-11-21 Thread wangfuqiang49
From: fuqiang wang When using a low dirtylimit to restrict a VM with a high dirty ratio, such as in the guestperf test scenario compr-dirty-limit-period-1000 (dirtylimit=1), this can lead to too long sleep times for the vcpu threads and the migration thread may have to wait vcpu thread due to the

Re: [PATCH v7 05/12] util/dsa: Implement DSA task asynchronous completion thread model.

2024-11-21 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * Create a dedicated thread for DSA task completion. > * DSA completion thread runs a loop and poll for completed tasks. > * Start and stop DSA completion thread during DSA device start stop. > > User space application can directly submit task to Intel D

Re: [PATCH v7 04/12] util/dsa: Implement DSA task enqueue and dequeue.

2024-11-21 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > * Use a safe thread queue for DSA task enqueue/dequeue. > * Implement DSA task submission. > * Implement DSA batch task submission. > > Signed-off-by: Hao Xiang > Signed-off-by: Yichen Wang Reviewed-by: Fabiano Rosas

Re: [PATCH v7 09/12] migration/multifd: Enable DSA offloading in multifd sender path.

2024-11-21 Thread Fabiano Rosas
Yichen Wang writes: > From: Hao Xiang > > Multifd sender path gets an array of pages queued by the migration > thread. It performs zero page checking on every page in the array. > The pages are classfied as either a zero page or a normal page. This > change uses Intel DSA to offload the zero pag

[PATCH 13/39] tests/functional: don't try to wait for the empty string

2024-11-21 Thread Alex Bennée
From: Daniel P. Berrangé Telling exec_command_wand_wait_for_pattern to wait for the empty string does not make any conceptual sense, as a check for empty string will always succeed. It makes even less sense when followed by a call to wait_for_console_pattern() with a real match. Signed-off-by: D

Re: [PATCH v2 06/13] hw/ppc: Explicitly create the drc container

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:21, Peter Xu wrote: QEMU will start to not rely on implicit creations of containers soon. Make PPC drc devices follow by explicitly create the container whenever a drc device is realized, dropping container_get() calls. No functional change intended. Cc: Nicholas Piggin Cc: Dan

Re: [PATCH v2 08/13] qdev: Make qdev_get_machine() not use container_get()

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:21, Peter Xu wrote: Currently, qdev_get_machine() has a slight misuse on container_get(), as the helper says "get a container" but in reality the goal is to get the machine object. It is still a "container" but not strictly. Note that it _may_ get a container (at "/machine") in o

Re: [PATCH v2 02/13] qom: New object_property_add_new_container()

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:21, Peter Xu wrote: To move towards explicit creations of containers, starting that by providing a helper for creating container objects. Signed-off-by: Peter Xu --- include/qom/object.h | 12 qom/container.c | 14 +++--- 2 files changed, 23 insertio

Re: [PATCH v2 07/13] qom: Create system containers explicitly

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:21, Peter Xu wrote: Always explicitly create QEMU system containers upfront. Root containers will be created when trying to fetch the root object the 1st time. They are: /objects /chardevs /backend Machine sub-containers will be created only until machine is being init

Re: [PATCH v2 10/13] qom: Use machine_get_container()

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:21, Peter Xu wrote: Use machine_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu --- hw/core/gpio.c| 3 +-- hw/core/qdev.c| 3 +-- hw/core/sysbus.c | 4 ++-- hw/i386/pc.c | 4 ++-- system/ioport.c | 2 +- syst

Re: [PATCH v2 12/13] qom: Use object_get_container()

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:22, Peter Xu wrote: Use object_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu --- backends/cryptodev.c | 4 ++-- chardev/char.c | 2 +- qom/object.c | 2 +- scsi/pr-manager.c| 4 ++-- ui/console.c | 2 +- ui/dbus-char

Re: [PATCH v2 13/13] qom: Remove container_get()

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 20:22, Peter Xu wrote: Now there's no user of container_get(), remove it. Signed-off-by: Peter Xu --- include/qom/object.h | 11 --- qom/container.c | 23 --- 2 files changed, 34 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH RFC 06/10] target/riscv: Define PMU event related structures

2024-11-21 Thread Atish Kumar Patra
On Wed, Nov 20, 2024 at 6:25 AM Aleksei Filippov wrote: > > > > > On 22 Oct 2024, at 15:58, Atish Kumar Patra wrote: > > > > On Mon, Oct 21, 2024 at 6:45 AM Aleksei Filippov > > wrote: > >> > >> > >> > >>> On 11 Oct 2024, at 23:45, Atish Kumar Patra wrote: > >>> > >>> On Thu, Oct 10, 2024 at 5:

[PATCH v2 07/13] qom: Create system containers explicitly

2024-11-21 Thread Peter Xu
Always explicitly create QEMU system containers upfront. Root containers will be created when trying to fetch the root object the 1st time. They are: /objects /chardevs /backend Machine sub-containers will be created only until machine is being initialized. They are: /machine/unattach

Re: [PATCH 17/39] tests/functional: add a QMP backdoor for debugging stalled tests

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: From: Daniel P. Berrangé Support the QEMU_TEST_QMP_BACKDOOR=backdoor.sock env variable as a way to get a QMP backdoor for debugging a stalled QEMU test. Most typically this would be used if running the tests directly: $ QEMU_TEST_QMP_BACKDOOR=backdoor.

Re: [PATCH 16/39] tests/functional: remove time.sleep usage from tuxrun tests

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: From: Daniel P. Berrangé The tuxrun tests send a series of strings to the guest to login and then run commands. Since we have been unable to match on console output that isn't followed by a newline, the test used many time.sleep() statements to pretend to

[PATCH 25/39] tests/functional: update the mips32el tuxrun tests

2024-11-21 Thread Alex Bennée
Now there are new upto date images available we should update to them. Signed-off-by: Alex Bennée Cc: Anders Roxell --- tests/functional/test_mipsel_tuxrun.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_mipsel_tuxrun.py b/tests/functional/t

Re: [PATCH 14/39] tests/functional: require non-NULL success_message for console wait

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: From: Daniel P. Berrangé When waiting for expected output, the 'success_message' is a mandatory parameter, with 'failure_message' defaulting to None. The code has logic which indicates it was trying to cope with 'success_message' being None and 'failure_

[PATCH v2 06/13] hw/ppc: Explicitly create the drc container

2024-11-21 Thread Peter Xu
QEMU will start to not rely on implicit creations of containers soon. Make PPC drc devices follow by explicitly create the container whenever a drc device is realized, dropping container_get() calls. No functional change intended. Cc: Nicholas Piggin Cc: Daniel Henrique Barboza Cc: Harsh Prate

[PATCH v2 11/13] qom: Add object_get_container()

2024-11-21 Thread Peter Xu
Add a helper to fetch a root container (under object_get_root()). Sanity check on the type of the object. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Peter Xu --- include/qom/object.h | 10 ++ qom/object.c | 10 ++ 2 files changed

[PATCH v2 02/13] qom: New object_property_add_new_container()

2024-11-21 Thread Peter Xu
To move towards explicit creations of containers, starting that by providing a helper for creating container objects. Signed-off-by: Peter Xu --- include/qom/object.h | 12 qom/container.c | 14 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/incl

[PATCH v2 05/13] ppc/e500: Avoid abuse of container_get()

2024-11-21 Thread Peter Xu
container_get() is going to become strict on not allowing to return a non-container. Switch the e500 user to use object_resolve_path_component() explicitly. Cc: Bharat Bhushan Cc: qemu-...@nongnu.org Reviewed-by: Cédric Le Goater Reviewed-by: Daniel P. Berrangé Signed-off-by: Peter Xu --- hw

[PATCH v2 09/13] qdev: Add machine_get_container()

2024-11-21 Thread Peter Xu
Add a helper to fetch machine containers. Add some sanity check around. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Xu --- include/hw/qdev-core.h | 10 ++ hw/core/qdev.c | 11 +++ 2 files changed, 21 insertions(+) diff --git a/include/hw/qdev-core.h b/incl

[PATCH v2 03/13] tests: Fix test-qdev-global-props on anonymous qdev realize()

2024-11-21 Thread Peter Xu
test-qdev-global-props creates a few subprocesses and test things based on qdev realize(). One thing was overlooked since the start, that anonymous creations of qdev (then realize() the device) requires the machine object's presence, as all these devices need to be attached to QOM tree, by default

[PATCH v2 04/13] tests: Explicitly create containers in test_qom_partial_path()

2024-11-21 Thread Peter Xu
Drop one use of container_get(), instead switch to the explicit function to create a container. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Peter Xu --- tests/unit/check-qom-proplist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/te

[PATCH v2 12/13] qom: Use object_get_container()

2024-11-21 Thread Peter Xu
Use object_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu --- backends/cryptodev.c | 4 ++-- chardev/char.c | 2 +- qom/object.c | 2 +- scsi/pr-manager.c| 4 ++-- ui/console.c | 2 +- ui/dbus-chardev.c| 2 +- 6 files changed, 8 inserti

[PATCH v2 13/13] qom: Remove container_get()

2024-11-21 Thread Peter Xu
Now there's no user of container_get(), remove it. Signed-off-by: Peter Xu --- include/qom/object.h | 11 --- qom/container.c | 23 --- 2 files changed, 34 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 47f7c4..f3a887e34f 100644

[PATCH v2 10/13] qom: Use machine_get_container()

2024-11-21 Thread Peter Xu
Use machine_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu --- hw/core/gpio.c| 3 +-- hw/core/qdev.c| 3 +-- hw/core/sysbus.c | 4 ++-- hw/i386/pc.c | 4 ++-- system/ioport.c | 2 +- system/memory.c | 2 +- system/qdev-monit

[PATCH v2 00/13] QOM: container_get() removal

2024-11-21 Thread Peter Xu
This series is not for 9.2, but for 10.0. v1: https://lore.kernel.org/r/20241120215703.3918445-1-pet...@redhat.com v2 changelog: - Rename container_create() to object_property_add_new_container() [Markus] - Drop "ui/console: Explicitly create "/backend" container", instead create "/backend" con

Re: [PATCH] ui/gtk: Fix event handling on macOS hosts

2024-11-21 Thread Phil Dennis-Jordan
Charalampos contacted me off-list with his original patch and I made a few suggestions after testing it. So I'm not sure the 'Co-developed-by' tag is warranted given I didn't write any code. In any case, this patch worked in the testing I did on macOS, and it looks to be near-zero risk on other pla

Re: [PATCH 00/39] maintainer updates for -rc2 pre-PR

2024-11-21 Thread Thomas Huth
On 21/11/2024 20.03, Cédric Le Goater wrote: Hello Alex, On 11/21/24 17:57, Alex Bennée wrote: This is a mostly testing focused set of patches but a few bug fixes as well. I plan to send the PR in on Monday. I can drop any patches that are objected to but I think its pretty safe. Contains:   

Re: [PATCH 21/39] tests/functional: update the aarch64 tuxrun tests

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: Now there are new upto date images available we should update to them. With the new rootfs the blk I/O errors also go away on arm64be. Signed-off-by: Alex Bennée Cc: Anders Roxell --- tests/functional/test_aarch64_tuxrun.py | 16 1 fi

Re: [PATCH 23/39] tests/functional: add a m68k tuxrun tests

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: We didn't have this before and as it exercises the m68k virt platform it seems worth adding. We don't wait for the shutdown because QEMU will auto-exit on the shutdown. Signed-off-by: Alex Bennée Cc: Laurent Vivier Cc: Anders Roxell --- tests/function

Re: [PATCH 13/39] tests/functional: don't try to wait for the empty string

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: From: Daniel P. Berrangé Telling exec_command_wand_wait_for_pattern to wait for the empty string does not make any conceptual sense, as a check for empty string will always succeed. It makes even less sense when followed by a call to wait_for_console_patt

Re: [PATCH 10/12] qom: Create system containers explicitly

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 19:03, Peter Xu wrote: On Thu, Nov 21, 2024 at 06:29:06PM +0100, Philippe Mathieu-Daudé wrote: On 21/11/24 18:17, Peter Xu wrote: On Thu, Nov 21, 2024 at 02:01:45PM +0100, Philippe Mathieu-Daudé wrote: On 21/11/24 11:30, Daniel P. Berrangé wrote: On Wed, Nov 20, 2024 at 04:57:01PM

Re: [PATCH 00/39] maintainer updates for -rc2 pre-PR

2024-11-21 Thread Cédric Le Goater
Hello Alex, On 11/21/24 17:57, Alex Bennée wrote: This is a mostly testing focused set of patches but a few bug fixes as well. I plan to send the PR in on Monday. I can drop any patches that are objected to but I think its pretty safe. Contains: - Daniel's clean-up of functional tests -

Re: [PATCH 07/39] tests/functional: remove comments talking about avocado

2024-11-21 Thread Pierrick Bouvier
On 11/21/24 08:57, Alex Bennée wrote: From: Daniel P. Berrangé The first comment is still relevant but should talk about our own test harness instead. The second comment adds no value over reading the code and can be removed. Signed-off-by: Daniel P. Berrangé Message-Id: <20241121154218.14230

Re: [PATCH 12/39] tests/functional: logs details of console interaction operations

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: From: Daniel P. Berrangé When functional tests go wrong, it will often be related to the console interaction wait state. By logging the messages that we're looking for, and data we're about to be sending, it'll be easier to diagnose where tests are gettin

Re: [PATCH 11/39] tests/functional: enable debug logging for QEMUMachine

2024-11-21 Thread Thomas Huth
On 21/11/2024 17.57, Alex Bennée wrote: From: Daniel P. Berrangé Set the 'qemu.machine' logger to 'DEBUG' level, to ensure we see log messages related to the QEMUMachine class. Most importantly this ensures we capture the full QEMU command line args for instances we spawn. Signed-off-by: Danie

Re: [PATCH v2 11/18] tests/functional: enable debug logging for QEMUMachine

2024-11-21 Thread Thomas Huth
On 21/11/2024 16.42, Daniel P. Berrangé wrote: Set the 'qemu.machine' logger to 'DEBUG' level, to ensure we see log messages related to the QEMUMachine class. Most importantly this ensures we capture the full QEMU command line args for instances we spawn. Signed-off-by: Daniel P. Berrangé ---

Re: [PATCH v1 0/4] Initialize nr_cores and nr_threads early and related clearup

2024-11-21 Thread Philippe Mathieu-Daudé
On 21/11/24 17:24, Xiaoyao Li wrote: On 11/11/2024 6:49 PM, David Hildenbrand wrote: On 08.11.24 08:06, Xiaoyao Li wrote: This series is extracted from TDX QEMU v6[1] series per Paolo's request. It is originally motivated by x86 TDX to track CPUID_HT in env- >features[] which requires nr_cor

Re: QEMU patches for native windows support through clang-cl

2024-11-21 Thread Paolo Bonzini
> NB As a general point, we actively block use of clang with Windows > builds (more strictly in 9.2 now), because it lacks support for the > 'gcc_struct' annotation that we rely on to guarantee correct ABI for > structs exposed to guests in particular. Ah, good point. This is https://github.com/ll

Re: [PATCH] scsi: megasas: Internal cdbs have 16-byte length

2024-11-21 Thread Fabiano Rosas
Guenter Roeck writes: > On 2/17/24 01:06, Michael Tokarev wrote: >>> 28.02.2023 20:11, Guenter Roeck wrote: Host drivers do not necessarily set cdb_len in megasas io commands. With commits 6d1511cea0 ("scsi: Reject commands if the CDB length exceeds buf_len") and fe9d8927e2 ("scsi:

Re: [PATCH v1 0/4] Initialize nr_cores and nr_threads early and related clearup

2024-11-21 Thread Paolo Bonzini
On 11/21/24 17:24, Xiaoyao Li wrote: Could it go into cpu_common_initfn()? It can, I think. I'll move them into cpu_common_initfn() in v2 to avoid touching all the ARCHes. It does look better than the alternative of duplicating code. On the other hand qemu_init_vcpu is already duplicated a

[PATCH v2] hvf: Enable 1G page support

2024-11-21 Thread Paolo Bonzini
From: Alexander Graf Hvf on x86 only supported 2MiB large pages, but never bothered to strip out the 1GiB page size capability from -cpu host. With QEMU 8.0.0 this became a problem because OVMF started to use 1GiB pages by default. Let's just unconditionally add 1GiB page walk support to the wal

Re: QEMU patches for native windows support through clang-cl

2024-11-21 Thread Paolo Bonzini
On 11/21/24 19:17, Pierrick Bouvier wrote: On 11/21/24 09:36, Erwin Jansen wrote: The Android Emulator team has successfully ported QEMU 8 to compile with clang-cl, enabling Windows compilation and better integration with the Microsoft ecosystem. This involved:   * Replacing shell scripts wit

  1   2   3   >