[PATCH 21/22] tests/functional: add 'uncompress' to QemuBaseTest

2024-11-29 Thread Daniel P . Berrangé
This helper wrappers utils.uncompress, forcing the use of the scratch directory, to ensure any uncompressed files are cleaned at test termination. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-)

[PATCH 15/22] tests/functional: add common zip_extract helper

2024-11-29 Thread Daniel P . Berrangé
This mirrors the existing archive_extract and cpio_extract helpers Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/utils.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/qemu_test/utils.py b/tests/functional/qemu_test/utils.py index 1bf1c410d5..41b

[PATCH 10/22] tests/functional: switch over to using self.build_file(...)

2024-11-29 Thread Daniel P . Berrangé
This removes direct access of the 'BUILD_DIR' variable. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 4 ++-- tests/functional/test_aarch64_virt.py | 6 +++--- tests/functional/test_virtio_gpu.py| 9 - 3 files changed, 9 insertions(+), 10 deletions(-

[PATCH 19/22] tests/functional: convert tests to new archive_extract helper

2024-11-29 Thread Daniel P . Berrangé
Replace use of utils.archive_extract and extract_from_deb with the new archive_extract helper. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/linuxkernel.py | 19 +- tests/functional/test_aarch64_aspeed.py | 4 +-- tests/functional/test_aarch64_raspi3.py

[PATCH 22/22] tests/functional: convert tests to new uncompress helper

2024-11-29 Thread Daniel P . Berrangé
Replace use of lzma_uncompress and gzip_uncompress with the new uncompress helper. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py| 2 +- tests/functional/test_aarch64_raspi4.py | 5 + tests/functional/test_aarch64_sbsaref.py | 9 ++--- tests/functi

[PATCH 08/22] tests/functional: add helpers for building file paths

2024-11-29 Thread Daniel P . Berrangé
Add helper methods that construct paths for * log files - to be preserved at the end of a test * scratch files - to be purged at the end of a test * build files - anything relative to the build root * data files - anything relative to the functional test source root * socket files - a short t

[PATCH 12/22] tests/functional: switch over to using self.scratch_file()

2024-11-29 Thread Daniel P . Berrangé
Replace any instances of os.path.join(self.workdir, ".../...") self.workdir + "/.../..." with self.scratch_file("...", "...") which is more compact and portable Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/linuxkernel.py | 7 ++- tests/functional/qemu_test/tuxr

[PATCH 07/22] tests/functional: switch to new test skip decorators

2024-11-29 Thread Daniel P . Berrangé
This ensures consistency of behaviour across all the tests, and requires that we provide gitlab bug links when marking a test to be skipped due to unreliability. Signed-off-by: Daniel P. Berrangé --- tests/functional/test_acpi_bits.py | 24 +++- tests/functional/test_arm_as

[PATCH 13/22] tests/functional: switch over to using self.socket_dir(...)

2024-11-29 Thread Daniel P . Berrangé
This removes direct creation of temporary dirs Signed-off-by: Daniel P. Berrangé --- tests/functional/test_arm_aspeed.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_arm_aspeed.py index c4869011db..ca223ac8f

[PATCH 20/22] tests/functional: generalize uncompress

2024-11-29 Thread Daniel P . Berrangé
There are many types of compression that the tests deal with, and it makes sense to have a single helper 'uncompress' that can deal with all. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/utils.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/fun

[PATCH 17/22] tests/functional: generalize archive_extract

2024-11-29 Thread Daniel P . Berrangé
There are many types of archives that the tests deal with, and 'archive_extract' suggests it can cope with any, rather than only tar files. Rename the existing method to 'tar_extract' and add a new method that can dynamically extract any zip, tar or cpio file based on file extension. Signed-off-by

[PATCH 1/3] clock: clear callback on unparent

2024-11-29 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/hw/clock.h | 8 hw/core/clock.c | 22 +- hw/core/qdev-clock.c | 5 + 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/hw/clock.h b/include/hw/clock.h index eb58599131c..a279bd4ba5e 100644 --

[PATCH 3/3] clock: inline most of qdev_init_clocklist

2024-11-29 Thread Paolo Bonzini
Move object creation out of qdev_init_clocklist. The input/output cases are very simple, and the aliases are completely different. Signed-off-by: Paolo Bonzini --- hw/core/qdev-clock.c | 71 +--- 1 file changed, 27 insertions(+), 44 deletions(-) diff --g

[PATCH 2/3] clock: treat outputs and inputs the same in NamedClockList

2024-11-29 Thread Paolo Bonzini
Leave around a reference not just for inputs but also for outputs. This is a better choice because in principle the monitor could walk the NamedClockList after the clocks have been unparented (which would free them) and before qdev_finalize_clocklist(). Signed-off-by: Paolo Bonzini --- hw/core/q

[PATCH 0/3] qdev-clock: miscellaneous cleanups

2024-11-29 Thread Paolo Bonzini
These are some simple patches that I made while studying qdev clocks. The main change is removing the callback on unparent rather than finalization, because finalization is too late and the callbacks (if they were called) would operate on a device that's been already partly dismantled. Patches 2 a

Re: How to query the number of processes queueing for the CPU inside the VM

2024-11-29 Thread João Vilaça
That's exactly it. How can we proceed to get it into guest-get-cpustat? On Fri, Nov 29, 2024 at 3:17 PM Daniel P. Berrangé wrote: > On Fri, Nov 29, 2024 at 02:38:52PM +, João Vilaça wrote: > > In KubeVirt, through libvirt, we need to know the number of processes > > queued for the CPU inside

Re: [PATCH v2] riscv/gdb: add virt mode debug interface

2024-11-29 Thread Yanfeng Liu
On Fri, 2024-11-29 at 09:59 +, Alex Bennée wrote: > Yanfeng writes: > > > On Thu, 2024-11-28 at 14:21 +, Alex Bennée wrote: > > > Yanfeng Liu writes: > > > > > > > This adds `virt` virtual register on debug interface so that users > > > > can access current virtualization mode for debug

Re: [PATCH v12 04/15] hw/display/apple-gfx: Adds configurable mode list

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:24, Phil Dennis-Jordan wrote: This change adds a property 'display_modes' on the graphics device which permits specifying a list of display modes. (screen resolution and refresh rate) The property is an array of a custom type to make the syntax slightly less awkward to use, for e

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

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:24, 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 affected

Re: [PATCH v12 06/15] hw: Add vmapple subdir

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:24, Phil Dennis-Jordan wrote: From: Alexander Graf We will introduce a number of devices that are specific to the vmapple target machine. To keep them all tidily together, let's put them into a single target directory. Signed-off-by: Alexander Graf Signed-off-by: Phil Dennis-J

Re: [PATCH v12 08/15] hvf: arm: Ignore writes to CNTP_CTL_EL0

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:24, Phil Dennis-Jordan wrote: From: Alexander Graf MacOS unconditionally disables interrupts of the physical timer on boot and then continues to use the virtual one. We don't really want to support a full physical timer emulation, so let's just ignore those writes. Signed-off-b

Re: [PATCH v12 09/15] gpex: Allow more than 4 legacy IRQs

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: From: Alexander Graf Some boards such as vmapple don't do real legacy PCI IRQ swizzling. Instead, they just keep allocating more board IRQ lines for each new legacy IRQ. Let's support that mode by giving instantiators a new "nr_irqs" property they c

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

2024-11-29 Thread Akihiko Odaki
On 2024/11/29 23:12, Phil Dennis-Jordan wrote: On Fri, 29 Nov 2024 at 11:07, Akihiko Odaki > wrote: On 2024/11/29 4:43, Phil Dennis-Jordan wrote: > > > On Thu, 28 Nov 2024 at 12:17, Akihiko Odaki mailto:akihiko.od...@daynix.com> > <

Re: [PATCH v12 02/15] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:24, Phil Dennis-Jordan wrote: MacOS provides a framework (library) that allows any vmm to implement a paravirtualized 3d graphics passthrough to the host metal stack called ParavirtualizedGraphics.Framework (PVG). The library abstracts away almost every aspect of the paravirtualiz

Re: [PATCH v12 14/15] hw/block/virtio-blk: Replaces request free function with g_free

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: The virtio_blk_free_request() function has been a 1-liner forwarding to g_free() for a while now. We may as well call g_free on the request pointer directly. Signed-off-by: Phil Dennis-Jordan Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki

Re: [PATCH v12 13/15] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: From: Alexander Graf Apple has its own virtio-blk PCI device ID where it deviates from the official virtio-pci spec slightly: It puts a new "apple type" field at a static offset in config space and introduces a new barrier command. This patch first

Re: [PATCH v12 12/15] hw/vmapple/cfg: Introduce vmapple cfg region

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: From: Alexander Graf Instead of device tree or other more standardized means, VMApple passes platform configuration to the first stage boot loader in a binary encoded format that resides at a dedicated RAM region in physical address space. This pat

Re: [PATCH v12 11/15] hw/vmapple/bdif: Introduce vmapple backdoor interface

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: From: Alexander Graf The VMApple machine exposes AUX and ROOT block devices (as well as USB OTG emulation) via virtio-pci as well as a special, simple backdoor platform device. This patch implements this backdoor platform device to the best of my u

Re: [PATCH v12 07/15] hw/misc/pvpanic: Add MMIO interface

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:24, Phil Dennis-Jordan wrote: From: Alexander Graf In addition to the ISA and PCI variants of pvpanic, let's add an MMIO platform device that we can use in embedded arm environments. Signed-off-by: Alexander Graf Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu

Re: [PATCH v12 10/15] hw/vmapple/aes: Introduce aes engine

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: From: Alexander Graf VMApple contains an "aes" engine device that it uses to encrypt and decrypt its nvram. It has trivial hard coded keys it uses for that purpose. Add device emulation for this device model. Signed-off-by: Alexander Graf Signed-

Re: [PATCH v12 15/15] hw/vmapple/vmapple: Add vmapple machine type

2024-11-29 Thread Akihiko Odaki
On 2024/11/30 0:25, Phil Dennis-Jordan wrote: From: Alexander Graf Apple defines a new "vmapple" machine type as part of its proprietary macOS Virtualization.Framework vmm. This machine type is similar to the virt one, but with subtle differences in base devices, a few special vmapple device ad

<    1   2