Re: [PATCH 01/17] replay: Fix migration use of clock for statistics

2024-12-23 Thread Pavel Dovgalyuk
On 23.12.2024 20:26, Peter Xu wrote: On Sat, Dec 21, 2024 at 01:02:01PM +1000, Nicholas Piggin wrote: On Sat Dec 21, 2024 at 2:31 AM AEST, Peter Xu wrote: On Fri, Dec 20, 2024 at 08:42:03PM +1000, Nicholas Piggin wrote: Migration reads CLOCK_HOST when not holding the replay_mutex, which assert

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

2024-12-23 Thread Phil Dennis-Jordan
On Thu, 19 Dec 2024 at 11:50, Akihiko Odaki wrote: > Reviewing "[PATCH v2 6/6] hw/vmapple: XHCI controller's interrupt > mapping workaround for macOS", I found a few problems so I'm adding > comments for them: > > On 2024/12/19 5:20, Phil Dennis-Jordan wrote: > > From: Alexander Graf > > > > App

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

2024-12-23 Thread Philippe Mathieu-Daudé
On 18/12/24 21:20, Phil Dennis-Jordan wrote: 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

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

2024-12-23 Thread Philippe Mathieu-Daudé
On 18/12/24 21:20, 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 ca

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

2024-12-23 Thread Philippe Mathieu-Daudé
Hi Phil, On 23/12/24 14:53, Phil Dennis-Jordan wrote: On Thu, 19 Dec 2024 at 11:50, Akihiko Odaki > wrote: Reviewing "[PATCH v2 6/6] hw/vmapple: XHCI controller's interrupt mapping workaround for macOS", I found a few problems so I'm adding comments

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

2024-12-23 Thread Phil Dennis-Jordan
Hi Philippe, > On 23.12.2024, at 17:36, Philippe Mathieu-Daudé wrote: > > Hi Phil, > >> On 23/12/24 14:53, Phil Dennis-Jordan wrote: >> On Thu, 19 Dec 2024 at 11:50, Akihiko Odaki > > wrote: >>Reviewing "[PATCH v2 6/6] hw/vmapple: XHCI controller's interrup

Re: [PATCH 01/17] replay: Fix migration use of clock for statistics

2024-12-23 Thread Peter Xu
On Sat, Dec 21, 2024 at 01:02:01PM +1000, Nicholas Piggin wrote: > On Sat Dec 21, 2024 at 2:31 AM AEST, Peter Xu wrote: > > On Fri, Dec 20, 2024 at 08:42:03PM +1000, Nicholas Piggin wrote: > > > Migration reads CLOCK_HOST when not holding the replay_mutex, which > > > asserts when recording a trace

Re: [PATCH v16 00/14] macOS PV Graphics and new vmapple machine type

2024-12-23 Thread Philippe Mathieu-Daudé
On 23/12/24 23:16, Phil Dennis-Jordan wrote: 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 f

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

2024-12-23 Thread Philippe Mathieu-Daudé
On 23/12/24 23:17, Phil Dennis-Jordan wrote: > Do you have other changes in your v16? I'm quite happy to integrate this > v15. The ones proposed by Akihiko are the only ones. I’ve already implemented them, so I’m happy to post v16. OK, rebasing on the upstream master bra

[PATCH v16 00/14] macOS PV Graphics and new vmapple machine type

2024-12-23 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 v16 08/14] gpex: Allow more than 4 legacy IRQs

2024-12-23 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 v16 14/14] hw/vmapple/vmapple: Add vmapple machine type

2024-12-23 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 v16 09/14] hw/vmapple/aes: Introduce aes engine

2024-12-23 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 v16 04/14] hw/display/apple-gfx: Adds configurable mode list

2024-12-23 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 v16 05/14] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF

2024-12-23 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. Signed-off-by: Phil Dennis-Jordan Reviewed-by: Roman Bolshakov Reviewed-by: P

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

2024-12-23 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 Tested-by: Akihiko Odaki --- hw/block/virtio-blk.c | 43 ++

[PATCH v16 12/14] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2024-12-23 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 v16 02/14] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-12-23 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

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

2024-12-23 Thread Phil Dennis-Jordan
On Mon, 23 Dec 2024 at 18:38, Phil Dennis-Jordan wrote: > Hi Philippe, > > > On 23.12.2024, at 17:36, Philippe Mathieu-Daudé > wrote: > > > > Hi Phil, > > > >> On 23/12/24 14:53, Phil Dennis-Jordan wrote: > >> On Thu, 19 Dec 2024 at 11:50, Akihiko Odaki > wrote

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

2024-12-23 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 v16 07/14] hw/misc/pvpanic: Add MMIO interface

2024-12-23 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 v16 03/14] hw/display/apple-gfx: Adds PCI implementation

2024-12-23 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 v16 06/14] hw: Add vmapple subdir

2024-12-23 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 Tested-by: Ak

[PATCH v16 10/14] hw/vmapple/bdif: Introduce vmapple backdoor interface

2024-12-23 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 v16 11/14] hw/vmapple/cfg: Introduce vmapple cfg region

2024-12-23 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