[PATCH v2 0/6] virtio-net fixes

2024-11-10 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 1/1] pc-bios/s390x: Initialize cdrom type to false for each IPL device

2024-11-10 Thread Thomas Huth
On 08/11/2024 20.41, jro...@linux.ibm.com wrote: From: Jared Rossi Clear information about cdrom type so that current IPL device isn't tainted by stale data from previous devices. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pc-

[PATCH] configure: Use -ef to compare paths

2024-11-10 Thread Akihiko Odaki
configure checks if it is executed in the source directory by comparing the literal paths, but there may be multiple representations of a directory due to symbolic links. Use the -ef operator to tell if they point to the same directory. Signed-off-by: Akihiko Odaki --- configure | 2 +- 1 file c

Re: [PULL 32/65] amd_iommu: Check APIC ID > 255 for XTSup

2024-11-10 Thread Shukla, Santosh
Hi Phil, On 11/10/2024 4:36 PM, Phil Dennis-Jordan wrote: > Hi, > > This commit seems to be causing link errors, likely on all platforms > where KVM is not available, but at minimum that's what I'm seeing when > trying to build the staging branch on macOS. > > ld: Undefined symbols: > _kvm_ena

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

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, 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 v8 15/15] hw/vmapple/vmapple: Add vmapple machine type

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 5:18, Phil Dennis-Jordan wrote: I've applied the majority of this feedback in the soon-to-be-posted v9 of the patch set, thanks! Just a few extra comments/replies below: On Sun, 10 Nov 2024 at 08:38, Akihiko Odaki wrote: On 2024/11/08 23:47, Phil Dennis-Jordan wrote: From: Ale

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

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, 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 v9 04/16] hw/display/apple-gfx: Adds configurable mode list

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, 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 v9 10/16] hw/vmapple/aes: Introduce aes engine

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, 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-

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

2024-11-10 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 v2 3/6] virtio-net: Do not check for the queue before RSS

2024-11-10 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 v2 1/6] net: checksum: Convert data to void *

2024-11-10 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 v2 5/6] virtio-net: Initialize hash reporting values

2024-11-10 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 v2 4/6] virtio-net: Fix hash reporting when the queue changes

2024-11-10 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 v2 2/6] virtio-net: Fix size check in dhclient workaround

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

Re: [CAUTION - External Sender] Re: [PATCH] target/riscv: Add Tenstorrent Ascalon CPU

2024-11-10 Thread Alistair Francis
On Mon, Nov 11, 2024 at 12:04 AM Daniel Henrique Barboza wrote: > > > > On 11/10/24 10:54 AM, Philippe Mathieu-Daudé wrote: > > On 9/11/24 22:46, Anton Blanchard wrote: > >> Hi Philippe, > >> > >> On Sun, Nov 10, 2024 at 5:21 AM Philippe Mathieu-Daudé > >> wrote: > >>> Generally speaking (I'm not

Re: [PATCH 1/2] hw/net/virtio-net.c: Don't assume IP length field is aligned

2024-11-10 Thread Jason Wang
On Fri, Nov 8, 2024 at 4:48 AM Peter Maydell wrote: > > On Thu, 7 Nov 2024 at 16:32, Peter Maydell wrote: > > > > In virtio-net.c we assume that the IP length field in the packet is > > aligned, and we copy its address into a uint16_t* in the > > VirtioNetRscUnit struct which we then dereference

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

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 0:01, Phil Dennis-Jordan wrote: On Sun, 10 Nov 2024 at 08:15, Akihiko Odaki wrote: On 2024/11/08 23:47, 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

Re: [PATCH v4 14/17] intel_iommu: Set default aw_bits to 48 in scalable modern mode

2024-11-10 Thread Jason Wang
On Mon, Nov 11, 2024 at 10:58 AM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Jason Wang > >Sent: Monday, November 11, 2024 9:24 AM > >Subject: Re: [PATCH v4 14/17] intel_iommu: Set default aw_bits to 48 in > >scalable > >modern mode > > > >On Fri, Nov 8, 2024 at 1:30 PM D

Re: [PATCH v1] vhost: fail device start if iotlb update fails

2024-11-10 Thread Jason Wang
Hi Prasad: On Thu, Nov 7, 2024 at 7:33 PM Prasad Pandit wrote: > > From: Prasad Pandit > > While starting a vhost device, updating iotlb entries > via 'vhost_device_iotlb_miss' may return an error. > > qemu-kvm: vhost_device_iotlb_miss: > 700871,700871: Fail to update device iotlb Actuall

Re: [PATCH] configure: Use -ef to compare paths

2024-11-10 Thread Thomas Huth
On 11/11/2024 08.19, Akihiko Odaki wrote: configure checks if it is executed in the source directory by comparing the literal paths, but there may be multiple representations of a directory due to symbolic links. Use the -ef operator to tell if they point to the same directory. Signed-off-by: Ak

Re: [PATCH v3 16/17] tests/functional: Explicit endianness of microblaze assets

2024-11-10 Thread Thomas Huth
On 08/11/2024 16.43, Philippe Mathieu-Daudé wrote: The archive used in test_microblaze_s3adsp1800.py (testing a big-endian target) contains a big-endian kernel. Rename using the _BE suffix. Similarly, the archive in test_microblazeel_s3adsp1800 (testing a little-endian target) contains a little-

Re: [PATCH v3 15/17] hw/microblaze: Support various endianness for s3adsp1800 machines

2024-11-10 Thread Thomas Huth
On 08/11/2024 16.43, Philippe Mathieu-Daudé wrote: Introduce an abstract machine parent class which defines the 'little_endian' property. Duplicate the current machine, which endian is tied to the binary endianness, to one big endian and a little endian machine; updating the machine description.

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

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 0:54, Phil Dennis-Jordan wrote: On Sun, 10 Nov 2024 at 09:30, Akihiko Odaki wrote: On 2024/11/08 23:46, 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 Paravi

RE: [PATCH v4 14/17] intel_iommu: Set default aw_bits to 48 in scalable modern mode

2024-11-10 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Sent: Monday, November 11, 2024 9:24 AM >Subject: Re: [PATCH v4 14/17] intel_iommu: Set default aw_bits to 48 in >scalable >modern mode > >On Fri, Nov 8, 2024 at 1:30 PM Duan, Zhenzhong >wrote: >> >> >> >> >-Original Message- >> >From: Jas

Re: [PATCH v9 11/16] hw/vmapple/bdif: Introduce vmapple backdoor interface

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, 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 v4 14/17] intel_iommu: Set default aw_bits to 48 in scalable modern mode

2024-11-10 Thread Jason Wang
On Fri, Nov 8, 2024 at 1:30 PM Duan, Zhenzhong wrote: > > > > >-Original Message- > >From: Jason Wang > >Sent: Friday, November 8, 2024 12:42 PM > >Subject: Re: [PATCH v4 14/17] intel_iommu: Set default aw_bits to 48 in > >scalable > >modern mode > > > >On Mon, Sep 30, 2024 at 5:30 PM Zh

Re: [PATCH v9 16/16] hw/vmapple/virtio-blk: Replace variant types with property on base

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, Phil Dennis-Jordan wrote: This reduces the type hierarchy of the vmapple-virtio-blk-pci-base type and vmapple-virtio-root/vmapple-virtio-aux leaf types with a single vmapple-virtio-blk-pci type which exposes a 'variant' enum property which can be set to 'aux' or 'root'. This

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

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 6:55, 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 v4 0/5] Support virtio-gpu DRM native context

2024-11-10 Thread Akihiko Odaki
On 2024/11/11 7:18, Dmitry Osipenko wrote: This patchset adds DRM native context support to VirtIO-GPU on Qemu. Contarary to Virgl and Venus contexts which mediate high level GFX APIs, DRM native context [1] mediates lower level kernel driver UAPI, which reflects in a less CPU overhead and less/

Re: [PATCH v3 6/6] virtio-gpu: Support DRM native context

2024-11-10 Thread Akihiko Odaki
On 2024/10/31 19:26, Alex Bennée wrote: Dmitry Osipenko writes: Add support for DRM native contexts to VirtIO-GPU. DRM context is enabled using a new virtio-gpu-gl device option "drm=on". I feel like using "drm" is confusing in this context because drm exists for the host and guest. What abo

Re: [PATCH v3 17/17] tests/functional: Add microblaze cross-endianness tests

2024-11-10 Thread Thomas Huth
On 08/11/2024 16.43, Philippe Mathieu-Daudé wrote: Copy/paste the current tests, but call the opposite endianness machines, testing: - petalogix-s3adsp1800-le machine (little-endian CPU) on the qemu-system-microblaze binary (big-endian) - petalogix-s3adsp1800-be machine (big-endian CPU) on the

Re: [PULL 32/65] amd_iommu: Check APIC ID > 255 for XTSup

2024-11-10 Thread Phil Dennis-Jordan
Hi, This commit seems to be causing link errors, likely on all platforms where KVM is not available, but at minimum that's what I'm seeing when trying to build the staging branch on macOS. ld: Undefined symbols: _kvm_enable_x2apic, referenced from: _amdvi_sysbus_realize in hw_i386_amd_iom

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

2024-11-10 Thread Phil Dennis-Jordan
On Sun, 10 Nov 2024 at 08:38, Akihiko Odaki wrote: > > On 2024/11/08 23:47, 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, bu

Re: [PATCH 3/7] target/i386/kvm: init PMU information only once

2024-11-10 Thread Zhao Liu
Hi Dongli, > int kvm_arch_init_vcpu(CPUState *cs) > { > struct { > @@ -2237,6 +2247,13 @@ int kvm_arch_init_vcpu(CPUState *cs) > cpuid_i = kvm_x86_build_cpuid(env, cpuid_data.entries, cpuid_i); > cpuid_data.cpuid.nent = cpuid_i; > > +/* > + * Initialize PMU information o

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

2024-11-10 Thread Phil Dennis-Jordan
On Sun, 10 Nov 2024 at 08:10, Akihiko Odaki wrote: > > On 2024/11/10 16:08, Phil Dennis-Jordan wrote: > > > > > > On Sun 10. Nov 2024 at 08:01, Akihiko Odaki > > wrote: > > > > On 2024/11/08 23:46, Phil Dennis-Jordan wrote: > > > macOS's Cocoa event handl

Re: [PATCH] MAINTAINERS: CC rust/ patches to qemu-rust list

2024-11-10 Thread Philippe Mathieu-Daudé
On 10/11/24 15:19, Manos Pitsidianakis wrote: On Sun, Nov 10, 2024 at 3:59 PM Philippe Mathieu-Daudé wrote: On 9/11/24 19:29, Manos Pitsidianakis wrote: As of cafeaca-zquygttg-vhrtewpz0l4cpimnxkkix45yw6gvhxo...@mail.gmail.com "As of [*] ..." but I'm not sure about the usefulness of "like qe

Re: [PATCH 2/2] hw/usb: Add TI TUSB73X0 XHCI controller model

2024-11-10 Thread Philippe Mathieu-Daudé
Hi Nick, On 10/11/24 05:00, Nicholas Piggin wrote: This controller is accepted by IBM Power firmware when the subsystem IDs are set to Power servers. Firmware is picky about device support so the NEC driver does not work. The TI HW has some interesting differences from NEC, notably a separate B

Re: [RFC PATCH 1/2] usb/msd: Add status to usb_msd_packet_complete() function

2024-11-10 Thread Philippe Mathieu-Daudé
On 10/11/24 03:39, Nicholas Piggin wrote: This is a convenience change that accepts a status when completing a packet. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 09/29] qapi/qom: Define cache enumeration and properties for machine

2024-11-10 Thread Zhao Liu
Hi Peter, On Fri, Nov 08, 2024 at 07:10:42PM +, Peter Maydell wrote: > Date: Fri, 8 Nov 2024 19:10:42 + > From: Peter Maydell > Subject: Re: [PULL 09/29] qapi/qom: Define cache enumeration and properties > for machine > > On Tue, 5 Nov 2024 at 22:49, Philippe Mathieu-Daudé wrote: > > >

Re: [PULL 10/29] hw/core: Check smp cache topology support for machine

2024-11-10 Thread Zhao Liu
Hi Peter, On Fri, Nov 08, 2024 at 07:16:50PM +, Peter Maydell wrote: > Date: Fri, 8 Nov 2024 19:16:50 + > From: Peter Maydell > Subject: Re: [PULL 10/29] hw/core: Check smp cache topology support for > machine > > On Tue, 5 Nov 2024 at 22:49, Philippe Mathieu-Daudé wrote: > > > > From:

Re: [CAUTION - External Sender] Re: [PATCH] target/riscv: Add Tenstorrent Ascalon CPU

2024-11-10 Thread Philippe Mathieu-Daudé
On 9/11/24 22:46, Anton Blanchard wrote: Hi Philippe, On Sun, Nov 10, 2024 at 5:21 AM Philippe Mathieu-Daudé wrote: Generally speaking (I'm not objecting to this patch as is), for DEFINE_VENDOR_CPU() it would be nice to have reference to some documentation -- at least to review whether the cpu

[PATCH for 9.2 0/2] machine: Miscellaneous coverity fixes

2024-11-10 Thread Zhao Liu
Hi, This series fixes coverity issues (CID 1565389 and 1565391) introduced by smp-cache [1] [2]. [1]: https://lore.kernel.org/qemu-devel/20241105224727.53059-1-phi...@linaro.org/T/#mcdb1aabb7909cc379d2776d33b420565d0befc7a [2]: https://lore.kernel.org/qemu-devel/20241105224727.53059-1-phi...@li

[PATCH for 9.2 1/2] hw/core/machine-smp: Initialize caches_bitmap before reading

2024-11-10 Thread Zhao Liu
The caches_bitmap is defined in machine_parse_smp_cache(), but it was not initialized. Initialize caches_bitmap by clearing all its bits to zero. Resolves: Coverity CID 1565389 Fixes: 4e88e7e3403d ("qapi/qom: Define cache enumeration and properties for machine") Reported-by: Peter Maydell Signe

[PATCH for 9.2 2/2] hw/core/machine-smp: Fix error message parameter

2024-11-10 Thread Zhao Liu
In the loop checking smp cache support, the error message should report the current cache level and type. Fix the parameter of error_setg() to ensure it reports the correct cache level and type. Resolves: Coverity CID 1565391 Fixes: f35c0221fef8 ("hw/core: Check smp cache topology support for mac

Re: [PATCH] MAINTAINERS: CC rust/ patches to qemu-rust list

2024-11-10 Thread Manos Pitsidianakis
On Sun, Nov 10, 2024 at 5:36 PM Philippe Mathieu-Daudé wrote: > > On 10/11/24 15:19, Manos Pitsidianakis wrote: > > On Sun, Nov 10, 2024 at 3:59 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 9/11/24 19:29, Manos Pitsidianakis wrote: > >>> As of cafeaca-zquygttg-vhrtewpz0l4cpimnxkkix45yw6gvhxo

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

2024-11-10 Thread Akihiko Odaki
On 2024/11/08 23:46, 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 paravirtuali

[PATCH v7 0/1] TPM TIS SPI Support

2024-11-10 Thread dan tan
*** BLURB HERE *** Version 7 summary: - tpm/tpm_tis_spi: Support TPM for SPI - Reduce SPI wait states to improve performace. Although the real SPI buses have four wait states to accommodate the timing of various slave devices, there is no need to emulate that for

[PATCH v7 1/1] tpm/tpm_tis_spi: Support TPM for SPI (Serial Peripheral Interface)

2024-11-10 Thread dan tan
Implement support for TPM via SPI interface. The SPI bus master is provided by PowerNV SPI device which is an SSI peripheral. It can uses the tpm_emulator driver backend with the external swtpm. Signed-off-by: dan tan --- v3: - moved variable tis_addr from TPMStateSPI struct to local - added the

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

2024-11-10 Thread Phil Dennis-Jordan
I've applied the majority of this feedback in the soon-to-be-posted v9 of the patch set, thanks! Just a few extra comments/replies below: On Sun, 10 Nov 2024 at 08:38, Akihiko Odaki wrote: > > On 2024/11/08 23:47, Phil Dennis-Jordan wrote: > > From: Alexander Graf > > > > Apple defines a new "v

[PATCH v9 15/16] hw/vmapple/vmapple: Add vmapple machine type

2024-11-10 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 v9 00/16] macOS PV Graphics and new vmapple machine type

2024-11-10 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 v9 16/16] hw/vmapple/virtio-blk: Replace variant types with property on base

2024-11-10 Thread Phil Dennis-Jordan
This reduces the type hierarchy of the vmapple-virtio-blk-pci-base type and vmapple-virtio-root/vmapple-virtio-aux leaf types with a single vmapple-virtio-blk-pci type which exposes a 'variant' enum property which can be set to 'aux' or 'root'. This change removes a bunch of device type boilerplat

[PATCH v9 10/16] hw/vmapple/aes: Introduce aes engine

2024-11-10 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 --- v3: * Rebased

[PATCH v9 09/16] gpex: Allow more than 4 legacy IRQs

2024-11-10 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 v9 01/16] ui & main loop: Redesign of system-specific main thread event handling

2024-11-10 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 v9 03/16] hw/display/apple-gfx: Adds PCI implementation

2024-11-10 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 --- v4: * Th

[PATCH v9 04/16] hw/display/apple-gfx: Adds configurable mode list

2024-11-10 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 v9 12/16] hw/vmapple/cfg: Introduce vmapple cfg region

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

[PATCH v9 06/16] hw: Add vmapple subdir

2024-11-10 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 v9 02/16] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-11-10 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 v9 13/16] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2024-11-10 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 v9 07/16] hw/misc/pvpanic: Add MMIO interface

2024-11-10 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 v9 08/16] hvf: arm: Ignore writes to CNTP_CTL_EL0

2024-11-10 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 v9 14/16] hw/block/virtio-blk: Replaces request free function with g_free

2024-11-10 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 --- hw/block/virtio-blk.c | 43 +++---

[PATCH v9 11/16] hw/vmapple/bdif: Introduce vmapple backdoor interface

2024-11-10 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 v9 05/16] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF

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

Re: [CAUTION - External Sender] Re: [PATCH] target/riscv: Add Tenstorrent Ascalon CPU

2024-11-10 Thread Daniel Henrique Barboza
On 11/10/24 10:54 AM, Philippe Mathieu-Daudé wrote: On 9/11/24 22:46, Anton Blanchard wrote: Hi Philippe, On Sun, Nov 10, 2024 at 5:21 AM Philippe Mathieu-Daudé wrote: Generally speaking (I'm not objecting to this patch as is), for DEFINE_VENDOR_CPU() it would be nice to have reference to

Re: [PATCH] linux-user/strace: show TID instead of PID

2024-11-10 Thread J . Neuschäfer
On Thu, Oct 24, 2024 at 01:47:31AM +0200, J. Neuschäfer wrote: > This aligns with strace, and is very useful when tracing multi-threaded > programs. The result is the same in single-threaded programs. > > gettid() requires the _GNU_SOURCE feature test macro, so it might be > unavailable in rare cas

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

2024-11-10 Thread Phil Dennis-Jordan
On Sun, 10 Nov 2024 at 08:15, Akihiko Odaki wrote: > > On 2024/11/08 23:47, 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 t

Re: [PATCH] target/riscv: Add Tenstorrent Ascalon CPU

2024-11-10 Thread Daniel Henrique Barboza
Hi, On 11/8/24 8:07 PM, Anton Blanchard wrote: Add a CPU entry for the Tenstorrent Ascalon CPU, a series of 2 wide to 8 wide RV64 cores. As Phil mentioned, it would be nice to have a reference of the CPU you're adding. The link you gave in the reply (https://tenstorrent.com/ip/tt-ascalon) is

Re: [PATCH] MAINTAINERS: CC rust/ patches to qemu-rust list

2024-11-10 Thread Philippe Mathieu-Daudé
On 9/11/24 19:29, Manos Pitsidianakis wrote: As of cafeaca-zquygttg-vhrtewpz0l4cpimnxkkix45yw6gvhxo...@mail.gmail.com "As of [*] ..." but I'm not sure about the usefulness of "like qemu-block, qemu-arm, qemu-ppc etc but", maybe scratch it? we have a new topical mailing list like qemu-block,

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

2024-11-10 Thread Phil Dennis-Jordan
On Sun, 10 Nov 2024 at 09:30, Akihiko Odaki wrote: > > On 2024/11/08 23:46, 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).

Re: [PATCH] MAINTAINERS: CC rust/ patches to qemu-rust list

2024-11-10 Thread Manos Pitsidianakis
On Sun, Nov 10, 2024 at 3:59 PM Philippe Mathieu-Daudé wrote: > > On 9/11/24 19:29, Manos Pitsidianakis wrote: > > As of cafeaca-zquygttg-vhrtewpz0l4cpimnxkkix45yw6gvhxo...@mail.gmail.com > > "As of [*] ..." but I'm not sure about the usefulness of "like > qemu-block, qemu-arm, qemu-ppc etc but",

Re: [PATCH] hw/i386/elfboot: allocate "header" in heap

2024-11-10 Thread Michael S. Tsirkin
On Sat, Nov 09, 2024 at 12:03:14AM +0100, s...@redhat.com wrote: > From: Sergio Lopez > > In x86_load_linux(), we were using a stack-allocated array as data for > fw_cfg_add_bytes(). Since the latter just takes a reference to the > pointer instead of copying the data, it can happen that the conte

[PATCH v4 2/5] ui/sdl2: Implement dpy dmabuf functions

2024-11-10 Thread Dmitry Osipenko
From: Pierre-Eric Pelloux-Prayer If EGL is used, we can rely on dmabuf to import textures without doing copies. To get this working on X11, we use the existing SDL hint: SDL_HINT_VIDEO_X11_FORCE_EGL (because dmabuf can't be used with GLX). Signed-off-by: Pierre-Eric Pelloux-Prayer Signed-off-b

[PATCH v4 0/5] Support virtio-gpu DRM native context

2024-11-10 Thread Dmitry Osipenko
This patchset adds DRM native context support to VirtIO-GPU on Qemu. Contarary to Virgl and Venus contexts which mediate high level GFX APIs, DRM native context [1] mediates lower level kernel driver UAPI, which reflects in a less CPU overhead and less/simpler code needed to support it. DRM contex

[PATCH v4 4/5] virtio-gpu: Support asynchronous fencing

2024-11-10 Thread Dmitry Osipenko
Support asynchronous fencing feature of virglrenderer. It allows Qemu to handle fence as soon as it's signalled instead of periodically polling the fence status. This feature is required for enabling DRM context support in Qemu because legacy fencing mode isn't supported for DRM contexts in virglre

[PATCH v4 3/5] virtio-gpu: Handle virgl fence creation errors

2024-11-10 Thread Dmitry Osipenko
Print out error messages when virgl fence creation fails to aid debugging of the fence-related bugs. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virti

[PATCH v4 1/5] ui/sdl2: Restore original context after new context creation

2024-11-10 Thread Dmitry Osipenko
SDL API changes GL context to a newly created GL context, which differs from other GL providers that don't switch context. Change SDL backend to restore the original GL context. This allows Qemu's virtio-gpu to support new virglrenderer async-fencing feature for Virgl contexts, otherwise virglrende

[PATCH v4 5/5] virtio-gpu: Support DRM native context

2024-11-10 Thread Dmitry Osipenko
Add support for DRM native contexts to VirtIO-GPU. DRM context is enabled using a new virtio-gpu-gl device option "drm_native_context=on". Unlike Virgl and Venus contexts that operate on application API level, DRM native contexts work on a kernel UAPI level. This lower level results in a lightweig