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

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 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 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 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 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 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 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 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 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 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: 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

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 16/22] tests/functional: add common deb_extract helper

2024-11-29 Thread Daniel P . Berrangé
This mirrors the existing archive_extract, cpio_extract and zip_extract helpers Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/linuxkernel.py | 15 +-- tests/functional/qemu_test/utils.py | 13 + 2 files changed, 18 insertions(+), 10 deletions(-)

[PATCH 18/22] tests/functional: add 'archive_extract' to QemuBaseTest

2024-11-29 Thread Daniel P . Berrangé
This helper wrappers utils.archive_extract, forcing the use of the scratch directory, to ensure any extracted files are cleaned at test termination. If a specific member is requested, then the path to the extracted file is also returned. Signed-off-by: Daniel P. Berrangé --- tests/functional/qem

[PATCH 14/22] tests/functional: remove redundant 'rmtree' call

2024-11-29 Thread Daniel P . Berrangé
Everything in the scratch directory is automatically purged. Calling 'rmtree' again breaks the ability to optionally preserve the scratch directory contents. Signed-off-by: Daniel P. Berrangé --- tests/functional/test_sh4eb_r2d.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/funct

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

2024-11-29 Thread Daniel P . Berrangé
This removes direct access of the 'self.logdir' variable. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 9 - tests/functional/test_virtio_gpu.py| 4 +--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/functional/qemu_test/testcas

[PATCH 01/22] tests/functional: increase timeouts for arm sx1 test

2024-11-29 Thread Daniel P . Berrangé
When under high load the test VM does not complete running in the default 30 second timeout. Double it to give more headroom. Signed-off-by: Daniel P. Berrangé --- tests/functional/test_arm_sx1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_arm

[PATCH 02/22] tests/functional: remove unused system imports

2024-11-29 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- tests/functional/test_aarch64_sbsaref.py | 1 - tests/functional/test_acpi_bits.py | 1 - tests/functional/test_m68k_mcf5208evb.py | 2 -- tests/functional/test_microblaze_s3adsp1800.py | 1 - tests/functional/test_mips64el_loongson3v.

[PATCH 04/22] tests/functional: remove pointless with statement

2024-11-29 Thread Daniel P . Berrangé
The xorriso command directly writes to 'filename', so the surrounding 'with' statement is pointless. Signed-off-by: Daniel P. Berrangé --- tests/functional/test_ppc64_hv.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/functional/test_ppc64_hv.py b/tests/funct

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

2024-11-29 Thread Daniel P . Berrangé
This removes direct path manipulation to figure out the source dir Signed-off-by: Daniel P. Berrangé --- tests/functional/test_acpi_bits.py | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/functional/test_acpi_bits.py b/tests/functional/test_acpi

[PATCH 05/22] tests/functional: remove duplicated 'which' function impl

2024-11-29 Thread Daniel P . Berrangé
Put the 'which' function into shared code. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/cmd.py | 10 ++ tests/functional/test_acpi_bits.py | 13 + tests/functional/test_ppc64_hv.py | 13 +---

[PATCH 06/22] tests/functional: introduce some helpful decorators

2024-11-29 Thread Daniel P . Berrangé
Reduce repeated boilerplate with some helper decorators: @skipIfNotPlatform("x86_64", "aarch64") => Skip unless the build host platform matches @skipIfMissingCommands("mkisofs", "losetup") => Skips unless all listed commands are found in $PATH @skipIfMissingImports("numpy", "cv2") =>

[PATCH 03/22] tests/functional: remove duplicated 'qemu_test' import statements

2024-11-29 Thread Daniel P . Berrangé
Group all imports that originate in the 'qemu_test' package into one statement. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/tuxruntest.py | 9 + tests/functional/test_aarch64_raspi4.py | 4 ++-- tests/functional/test_aarch64_sbsaref.py | 5

[PATCH 00/22 for 10.0] tests/functional: various improvements wrt assets/scratch files

2024-11-29 Thread Daniel P . Berrangé
This series is an attempt to bring a little more guaranteed order to asset and scratch file handling in the functional tests. The main highlights are: * Add custom @skipX decorators for common scenarios present in QEMU tests * Add helpers for creating file paths for various well known

Re: [PATCH v3 19/24] vfio/migration: Add x-migration-multifd-transfer VFIO property

2024-11-29 Thread Maciej S. Szmigiero
On 29.11.2024 15:11, Cédric Le Goater wrote: On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This property allows configuring at runtime whether to transfer the particular device state via multifd channels when live migrating that device. It defaults to AUTO, which m

Re: [PATCH v3 18/24] vfio/migration: Don't run load cleanup if load setup didn't run

2024-11-29 Thread Maciej S. Szmigiero
On 29.11.2024 15:08, Cédric Le Goater wrote: On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" It's possible for load_cleanup SaveVMHandler to get called without load_setup handler being called first. Since we'll be soon running cleanup operations there that access obj

Re: [PATCH v3 17/24] migration: Add save_live_complete_precopy_thread handler

2024-11-29 Thread Maciej S. Szmigiero
On 29.11.2024 15:03, Cédric Le Goater wrote: On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This SaveVMHandler helps device provide its own asynchronous transmission of the remaining data at the end of a precopy phase via multifd channels, in parallel with the transf

Re: [PATCH-for-10.0 3/3] hw/char/riscv_htif: Clarify MemoryRegionOps expect 32-bit accesses

2024-11-29 Thread Daniel Henrique Barboza
On 11/29/24 12:43 PM, Philippe Mathieu-Daudé wrote: Looking at htif_mm_ops[] read/write handlers, we notice they expect 32-bit values to accumulate into to the 'fromhost' and 'tohost' 64-bit variables. Explicit by setting the .impl min/max fields. Signed-off-by: Philippe Mathieu-Daudé --- No

Re: [PATCH-for-10.0 2/3] hw/char/riscv_htif: Explicit little-endian implementation

2024-11-29 Thread Daniel Henrique Barboza
On 11/29/24 12:43 PM, Philippe Mathieu-Daudé wrote: Since our RISC-V system emulation is only built for little endian, the HTIF device aims to interface with little endian memory accesses, thus we can explicit htif_mm_ops:endianness being DEVICE_LITTLE_ENDIAN. In that case tswap64() is equiva

Re: [PATCH-for-10.0 1/3] MAINTAINERS: Cover RISC-V HTIF interface

2024-11-29 Thread Daniel Henrique Barboza
On 11/29/24 12:43 PM, Philippe Mathieu-Daudé wrote: The HTIF interface is RISC-V specific, add it within the MAINTAINERS section covering hw/riscv/. Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Daniel Henrique Barboza IMHO 'RISC-V TCG CPUs' should cover target/riscv/ which are

Re: [RFC PATCH] target/arm: implement SEL2 physical and virtual timers

2024-11-29 Thread Peter Maydell
On Wed, 27 Nov 2024 at 17:01, Alex Bennée wrote: > > When FEAT_SEL2 was implemented the SEL2 timers where missed. This > shows up when building the latest Hafnium with SPMC_AT_EL=2. The > actual implementation utilises the same logic as the rest of the > timers so all we need to do is: > > - def

Re: [PATCH v2 0/3] Allow to enable multifd and postcopy migration together

2024-11-29 Thread Peter Xu
On Fri, Nov 29, 2024 at 05:52:53PM +0530, Prasad Pandit wrote: > From: Prasad Pandit > > Hello, > > * Currently Multifd and Postcopy migration can not be used together. > QEMU shows "Postcopy is not yet compatible with multifd" message. > > When migrating guests with large (100's GB) RAM, M

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

2024-11-29 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

[PATCH-for-10.0 v2] hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature

2024-11-29 Thread Philippe Mathieu-Daudé
Generic code wanting to access KVM specific methods should do so being protected by the 'kvm_enabled()' helper. Doing so avoid link failures when optimization is disabled (using --enable-debug), see for example commits c04cfb4596a ("hw/i386: fix short-circuit logic with non-optimizing builds") and

Re: [PATCH v2 2/3 for 9.2] tests/qtest: drop 'fuzz-' prefix from virtio-balloon test

2024-11-29 Thread Philippe Mathieu-Daudé
On 29/11/24 14:55, Daniel P. Berrangé wrote: This test file is expected to be extended for arbitrary virtio-balloon related tests, not merely those discovered by fuzzing. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 2 +- .../{fuzz-vir

Re: [PATCH] amd_iommu: Fix kvm_enable_x2apic link error with clang in non-KVM builds

2024-11-29 Thread Philippe Mathieu-Daudé
On 29/11/24 11:29, Philippe Mathieu-Daudé wrote: On 14/11/24 12:45, Sairaj Kodilkar wrote: Commit b12cb3819 (amd_iommu: Check APIC ID > 255 for XTSup) throws linking error for the `kvm_enable_x2apic` when kvm is disabled and Clang is used for compilation. This issue comes up because Clang does

Re: [PATCH] amd_iommu: Fix kvm_enable_x2apic link error with clang in non-KVM builds

2024-11-29 Thread Philippe Mathieu-Daudé
On 29/11/24 11:29, Philippe Mathieu-Daudé wrote: On 14/11/24 12:45, Sairaj Kodilkar wrote: Commit b12cb3819 (amd_iommu: Check APIC ID > 255 for XTSup) throws linking error for the `kvm_enable_x2apic` when kvm is disabled and Clang is used for compilation. This issue comes up because Clang does

Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model

2024-11-29 Thread Cornelia Huck
On Fri, Nov 29 2024, Peter Maydell wrote: > On Fri, 29 Nov 2024 at 15:10, Cornelia Huck wrote: >> The good news is that in many cases we only have differences in bits >> that map to a feature (and are actually writable in current KVM.) The >> bad news is that we have a number of exceptions. >> >

Re: [PULL 0/3] Bugfixes for QEMU 9.2 rc3

2024-11-29 Thread Peter Maydell
On Thu, 28 Nov 2024 at 19:05, Paolo Bonzini wrote: > > The following changes since commit 24602b77f5658ae8377958c15fdef2f44affc743: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-11-28 > 10:50:20 +) > > are available in the Git reposit

Re: [PULL for-9.2 0/7] 9p queue 2024-11-28

2024-11-29 Thread Peter Maydell
On Thu, 28 Nov 2024 at 18:59, Christian Schoenebeck wrote: > > The following changes since commit 24602b77f5658ae8377958c15fdef2f44affc743: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024-11-28 > 10:50:20 +) > > are available in the Git

[PATCH-for-10.0 3/3] hw/char/riscv_htif: Clarify MemoryRegionOps expect 32-bit accesses

2024-11-29 Thread Philippe Mathieu-Daudé
Looking at htif_mm_ops[] read/write handlers, we notice they expect 32-bit values to accumulate into to the 'fromhost' and 'tohost' 64-bit variables. Explicit by setting the .impl min/max fields. Signed-off-by: Philippe Mathieu-Daudé --- Notes 1/ these variables belong to HTIFState but are decla

[PATCH-for-10.0 0/3] hw/char/riscv_htif: Remove tswap64() calls

2024-11-29 Thread Philippe Mathieu-Daudé
Trying to make sense of these tswap64 calls I figured this device could be simplified. Tested using 'make check-{qtest,functional}' on both big/little endian hosts, no failure but I'm not sure the code path is covered. Philippe Mathieu-Daudé (3): MAINTAINERS: Cover RISC-V HTIF interface hw/ch

[PATCH-for-10.0 1/3] MAINTAINERS: Cover RISC-V HTIF interface

2024-11-29 Thread Philippe Mathieu-Daudé
The HTIF interface is RISC-V specific, add it within the MAINTAINERS section covering hw/riscv/. Signed-off-by: Philippe Mathieu-Daudé --- IMHO 'RISC-V TCG CPUs' should cover target/riscv/ which are the accelerator-facing implementations, and each machine or device in hw/riscv/ should have its ow

[PATCH-for-10.0 2/3] hw/char/riscv_htif: Explicit little-endian implementation

2024-11-29 Thread Philippe Mathieu-Daudé
Since our RISC-V system emulation is only built for little endian, the HTIF device aims to interface with little endian memory accesses, thus we can explicit htif_mm_ops:endianness being DEVICE_LITTLE_ENDIAN. In that case tswap64() is equivalent to le64_to_cpu(), as in "convert this 64-bit little-

Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model

2024-11-29 Thread Peter Maydell
On Fri, 29 Nov 2024 at 15:10, Cornelia Huck wrote: > The good news is that in many cases we only have differences in bits > that map to a feature (and are actually writable in current KVM.) The > bad news is that we have a number of exceptions. > > Comparison #1: > > ID_AA64DFR0 > f010307009

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

2024-11-29 Thread Phil Dennis-Jordan
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 additions and a vastly different boot chain. This

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

2024-11-29 Thread Phil Dennis-Jordan
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 --- v4: * Use recommended object type declaration pattern. * Correctly lo

[PATCH v12 00/15] macOS PV Graphics and new vmapple machine type

2024-11-29 Thread Phil Dennis-Jordan
This patch set introduces a new ARM and macOS HVF specific machine type called "vmapple", as well as a family of display devices based on the ParavirtualizedGraphics.framework in macOS. One of the display adapter variants, apple-gfx-mmio, is required for the new machine type, while apple-gfx-pci ca

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

2024-11-29 Thread Phil Dennis-Jordan
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-Daudé Signed-off-by: Phil Dennis-Jordan Revie

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

2024-11-29 Thread Phil Dennis-Jordan
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 example: -device '{"driver":"apple-gfx-pci", "di

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

2024-11-29 Thread Phil Dennis-Jordan
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 Qemu in both the Cocoa and SDL UIs, although in

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

2024-11-29 Thread Phil Dennis-Jordan
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 paravirtualized device model and only provides and receives c

[PATCH v12 05/15] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF

2024-11-29 Thread Phil Dennis-Jordan
I'm happy to take responsibility for the macOS PV graphics code. As HVF patches don't seem to get much attention at the moment, I'm also adding myself as designated reviewer for HVF and x86 HVF to try and improve that. I anticipate that the resulting workload should be covered by the funding I'm r

[PATCH v12 03/15] hw/display/apple-gfx: Adds PCI implementation

2024-11-29 Thread Phil Dennis-Jordan
This change wires up the PCI variant of the paravirtualised graphics device, mainly useful for x86-64 macOS guests, implemented by macOS's ParavirtualizedGraphics.framework. It builds on code shared with the vmapple/mmio variant of the PVG device. Signed-off-by: Phil Dennis-Jordan Reviewed-by: Ak

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

2024-11-29 Thread Phil Dennis-Jordan
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 can use to support more than 4 legacy IRQ lines.

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

2024-11-29 Thread Phil Dennis-Jordan
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-off-by: Phil Dennis-Jordan Reviewed-by: Akihiko

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

2024-11-29 Thread Phil Dennis-Jordan
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 understanding. I left out any USB OTG parts; they

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

2024-11-29 Thread Phil Dennis-Jordan
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-by: Alexander Graf Signed-off-by: Phil Dennis-Jo

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

2024-11-29 Thread Phil Dennis-Jordan
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-Jordan Reviewed-by: Akihiko Odaki --- MAINTAIN

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

2024-11-29 Thread Phil Dennis-Jordan
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 creates a mechanism for virtio-blk downstream c

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

2024-11-29 Thread Phil Dennis-Jordan
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 patch models this configuration space as a qdev dev

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

2024-11-29 Thread Daniel P . Berrangé
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 the VM. > > Can we get this information through the qemu-guest-agent? The only CPU stats related command in QGA is 'guest-get-cpustat's

Re: [RFC 18/21] arm/cpu: Introduce a customizable kvm host cpu model

2024-11-29 Thread Cornelia Huck
On Tue, Nov 12 2024, Eric Auger wrote: > I am scared about the overall implementation/test matrix. Can we afford > supporting that many setups, revision based models, named models with > all kinds of features optim-in/opt-out. We should also keep in mind what > is our current goal, ie. supporting

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

2024-11-29 Thread João Vilaça
In KubeVirt, through libvirt, we need to know the number of processes queued for the CPU inside the VM. Can we get this information through the qemu-guest-agent? -- kind regards, João Vilaça

[PATCH 0/6] linux-user: Add support for various missing netlink sockopt entries

2024-11-29 Thread deller
From: Helge Deller This patchset adds various missing sockopt calls, so that qemu linux-user is able to successfully build the debian gupnp package in a chroot. Tested with a 32-bit big-endian hppa linux-user chroot running on a phyiscal x86-64 little-endian host. This fixes debian's bug report

[PATCH 3/6] linux-user: netlink: Add IP_PKTINFO cmsg parsing

2024-11-29 Thread deller
From: Helge Deller Fixes those warnings: Unsupported host ancillary data: 0/8 Signed-off-by: Helge Deller --- linux-user/syscall.c | 12 1 file changed, 12 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 494323efba..bbe2560927 100644 --- a/linux-user

[PATCH 5/6] linux-user: netlink: add netlink neighbour emulation

2024-11-29 Thread deller
From: Helge Deller Fixes various warnings in the testsuite while building gupnp: gssdp-net-DEBUG: Failed to send netlink message: Operation not supported gupnp-context-DEBUG: Mismatch between host header and host IP (example.com, expected: 127.0.0.1) gupnp-context-DEBUG: Mismatch between host

[PATCH 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2024-11-29 Thread deller
From: Helge Deller Fixes this warning: Unknown host IFA type: 11 Signed-off-by: Helge Deller --- linux-user/fd-trans.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c index c04a97c73a..6191e3115b 100644 --- a/linux-user/fd-trans.c +++ b/linux-

[PATCH 2/6] linux-user: Use unique error messages for cmsg parsing

2024-11-29 Thread deller
From: Helge Deller Avoid using the same error message for two different code paths as it complicates determining the one which actually triggered. Signed-off-by: Helge Deller --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b

[PATCH 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF

2024-11-29 Thread deller
From: Helge Deller Share code with IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP. Signed-off-by: Helge Deller --- linux-user/syscall.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bbe2560927..4360543e20 100644 --- a

[PATCH 6/6] linux-user: netlink: Add missing QEMU_IFLA entries

2024-11-29 Thread deller
From: Helge Deller This fixes the following qemu warnings when building debian gupnp package: Unknown host QEMU_IFLA type: 61 Unknown host QEMU_IFLA type: 58 Unknown host QEMU_IFLA type: 59 Unknown host QEMU_IFLA type: 60 Unknown host QEMU_IFLA type: 32820 QEMU_IFLA type 32820 is actually N

Re: [PATCH v3 20/24] vfio/migration: Add load_device_config_state_start trace event

2024-11-29 Thread Cédric Le Goater
On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" And rename existing load_device_config_state trace event to load_device_config_state_end for consistency since it is triggered at the end of loading of the VFIO device config state. This way both the start and end points

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

2024-11-29 Thread Phil Dennis-Jordan
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 > > wrote: > > > > On 2024/11/28 0:02, Phil Dennis-Jordan wrote: > > > macOS's Cocoa event handling

Re: [PATCH v3 19/24] vfio/migration: Add x-migration-multifd-transfer VFIO property

2024-11-29 Thread Cédric Le Goater
On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This property allows configuring at runtime whether to transfer the particular device state via multifd channels when live migrating that device. It defaults to AUTO, which means that VFIO device state transfer via multi

Re: [PATCH v3 17/24] migration: Add save_live_complete_precopy_thread handler

2024-11-29 Thread Cédric Le Goater
On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This SaveVMHandler helps device provide its own asynchronous transmission of the remaining data at the end of a precopy phase via multifd channels, in parallel with the transfer done by save_live_complete_precopy handlers

Re: [PATCH v3 18/24] vfio/migration: Don't run load cleanup if load setup didn't run

2024-11-29 Thread Cédric Le Goater
On 11/17/24 20:20, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" It's possible for load_cleanup SaveVMHandler to get called without load_setup handler being called first. Since we'll be soon running cleanup operations there that access objects that need earlier initialization in load_

[PATCH v2 0/3 for 9.2] hw/virtio: fix crash in virtio-balloon and test it

2024-11-29 Thread Daniel P . Berrangé
See patch 1 for the background info on the problem Changed in v2: * Add qtest coverage for the crash scenario Daniel P. Berrangé (3): hw/virtio: fix crash in processing balloon stats tests/qtest: drop 'fuzz-' prefix from virtio-balloon test tests/qtest: add test for querying balloon guest

Re: [PATCH v2 3/3 for 9.2] tests/qtest: add test for querying balloon guest stats

2024-11-29 Thread Fabiano Rosas
Daniel P. Berrangé writes: > This test would have identified the crash caused by the addition of new > balloon stats fields. > > Signed-off-by: Daniel P. Berrangé > --- > tests/qtest/virtio-balloon-test.c | 20 > 1 file changed, 20 insertions(+) > > diff --git a/tests/qtest

Re: [PATCH v2 2/3 for 9.2] tests/qtest: drop 'fuzz-' prefix from virtio-balloon test

2024-11-29 Thread Fabiano Rosas
Daniel P. Berrangé writes: > This test file is expected to be extended for arbitrary virtio-balloon > related tests, not merely those discovered by fuzzing. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH v2 1/3 for 9.2] hw/virtio: fix crash in processing balloon stats

2024-11-29 Thread David Hildenbrand
On 29.11.24 14:55, Daniel P. Berrangé wrote: balloon_stats_get_all will iterate over guest stats upto the max VIRTIO_BALLOON_S_NR value, calling visit_type_uint64 to populate the QObject dict. The dict keys are obtained from the static array balloon_stat_names which is VIRTIO_BALLOON_S_NR in size

[PATCH v2 1/3 for 9.2] hw/virtio: fix crash in processing balloon stats

2024-11-29 Thread Daniel P . Berrangé
balloon_stats_get_all will iterate over guest stats upto the max VIRTIO_BALLOON_S_NR value, calling visit_type_uint64 to populate the QObject dict. The dict keys are obtained from the static array balloon_stat_names which is VIRTIO_BALLOON_S_NR in size. Unfortunately the way that array is declared

  1   2   >