Re: [PATCH v2 0/8] hw/display/apple-gfx: New macOS PV Graphics device

2024-07-20 Thread Phil Dennis-Jordan
On Sat 20. Jul 2024 at 16:42, Akihiko Odaki wrote: > > > It also became clear in out-of-band communication that Alexander would > > probably not end up having the time to see the patch through to > inclusion, > > and was happy for me to start making changes and to integrate my PCI > code. > > I

Re: [PATCH v2] Cursor: 8 -> 1 bit alpha downsampling improvement

2024-07-17 Thread Phil Dennis-Jordan
On Wed, 17 Jul 2024 at 15:20, Marc-André Lureau wrote: > Hi > > On Wed, Jul 17, 2024 at 5:11 PM Phil Dennis-Jordan > wrote: > >> >> Mouse cursors with 8 bit alpha were downsampled to 1-bit opacity maps by >>>> turning alpha values of 255 into 1 and

Re: [PATCH v2] Cursor: 8 -> 1 bit alpha downsampling improvement

2024-07-17 Thread Phil Dennis-Jordan
ended cursors, such as some VNC clients. >> >> Signed-off-by: Phil Dennis-Jordan >> > > Reviewed-by: Marc-André Lureau > Reviewed-by: Akihiko Odaki Thanks for the reviews folks! Is there anything I can do to move this forward? Should I submit a v3 with the review ta

Re: [PATCH] i386/hvf: Integrates x2APIC support with hvf accel

2024-07-17 Thread Phil Dennis-Jordan
ches touch code areas with other maintainers, HVF patches are mostly being ignored. Thanks! Phil On Mon, 8 Jul 2024 at 16:37, Phil Dennis-Jordan wrote: > Ping! > > It would be nice to get this one in before the 9.1 merge window closes. > > Thanks, > Phil > > > > &g

Re:

2024-07-17 Thread Phil Dennis-Jordan
On Tue, 16 Jul 2024 at 08:07, Akihiko Odaki wrote: > Hi, > > Thanks for continuing his effort. > > Please submit a patch series that includes his patches. Please also > merge fixes for his patches into them. This saves the effort to review > the obsolete code and keeps git bisect working. > >

[PATCH 12/26] hw/display/apple-gfx: Task memory mapping cleanup

2024-07-17 Thread Phil Dennis-Jordan
ress range. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 106 +++- hw/display/trace-events | 2 +- 2 files changed, 40 insertions(+), 68 deletions(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 6537e32806..a23f731ddc 10064

[PATCH 09/26] hw/display/apple-gfx: Wraps ObjC autorelease code in pool

2024-07-17 Thread Phil Dennis-Jordan
the presence of a surrounding pool. We therefore wrap some code in explicit pool scopes to prevent leaks. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 88 ++ 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/hw/display/apple

[PATCH 11/26] hw/display/apple-gfx: Uses ObjC category extension for private property

2024-07-17 Thread Phil Dennis-Jordan
of exposing private APIs on a class is via a category extension. This change does exactly that; this also avoids the extra cast to access the property. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/display/apple

[PATCH v2 0/8] hw/display/apple-gfx: New macOS PV Graphics device

2024-07-17 Thread Phil Dennis-Jordan
v1 patch set. (This fixes the colours on non-greyscale guest cursors.) * Removed a stray macOS 12 availability check. (These are no longer needed as Qemu 9.1 removes support for macOS 11 and older hosts.) Phil Dennis-Jordan (8): hw/display/apple-gfx: Introduce ParavirtualizedGraphic

Re: hw/display/apple-gfx

2024-07-17 Thread Phil Dennis-Jordan
On Tue, 16 Jul 2024 at 08:48, Akihiko Odaki wrote: > The cover letter says: > > > 04-13: These patches address issues identified during code review in > > the original e-mail threads as well as my own review. > > So these patches are certainly to be squashed. There are other patches > titled

[PATCH 14/26] hw/display/apple-gfx: Refactoring of realize function

2024-07-17 Thread Phil Dennis-Jordan
vicinity of the refactored code. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 120 ++--- 1 file changed, 76 insertions(+), 44 deletions(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 39e33ed999..f9046f41a0 100644 --- a/hw

[PATCH 16/26] hw/display/apple-gfx: Asynchronous MMIO writes on x86-64

2024-07-17 Thread Phil Dennis-Jordan
issues, so we're left with 2 different implementations. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 806feb58fa..48463e5a1f 100644 --- a/hw

[PATCH v2 8/8] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF

2024-07-17 Thread Phil Dennis-Jordan
if it's more than I can manage. Signed-off-by: Phil Dennis-Jordan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7d9811458c..b870bd6ad5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -511,6 +511,7 @@ F: target/arm/hvf/ X86 HVF CPUs M

[PATCH v2 5/8] hw/display/apple-gfx: Replaces magic number with queried MMIO length

2024-07-17 Thread Phil Dennis-Jordan
for the default changes. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 16 +++- hw/display/trace-events | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 3756a9e3ff..6f374455f9 100644 --- a/hw

[no subject]

2024-07-17 Thread Phil Dennis-Jordan
s easier to review, and the git blame history acts as a sort of documentation, so I've kept them for now. Alexander Graf (1): hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support Phil Dennis-Jordan (25): hw/vmapple/apple-gfx: BQL renaming update hw/display/apple-gfx: M

Re: [PATCH 16/26] hw/display/apple-gfx: Asynchronous MMIO writes on x86-64

2024-07-17 Thread Phil Dennis-Jordan
On Tue, 16 Jul 2024 at 16:48, BALATON Zoltan wrote: > Only a guess but I think ARM like POWER has weak memory consistency so > maybe some sync ops are needed between writes somewhere whereas it would > work on X86_64 that has strong guarantees so no such explicit sync is > needed? I may

[PATCH 22/26] hw/display/apple-gfx: Replaces magic number with queried MMIO length

2024-07-17 Thread Phil Dennis-Jordan
for the default changes. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 16 +++- hw/display/trace-events | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 801ae4ad51..cbcbaf0006 100644 --- a/hw

[PATCH v2 1/8] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-07-17 Thread Phil Dennis-Jordan
Switched to asynchronous MMIO writes on x86-64 * Rendering and graphics update are now done asynchronously * Fixed cursor handling * Coding convention fixes * Removed software cursor compositing Signed-off-by: Phil Dennis-Jordan --- hw/display/Kconfig | 8 + hw/display/apple-gfx-v

[PATCH v2 6/8] hw/display/apple-gfx: Host GPU picking improvements

2024-07-17 Thread Phil Dennis-Jordan
fault logic, it is now: 1. Select a GPU with unified memory (iGPU) 2. If (1) fails, select a GPU that is built-in, not an eGPU. 3. If (2) fails, fall back to system default. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 28 +++- 1 file changed, 27 inser

[PATCH v2 3/8] ui/cocoa: Adds non-app runloop on main thread mode

2024-07-17 Thread Phil Dennis-Jordan
requirement and other subsystems’ runloop requests don’t conflict with each other. The main runloop is required for the AppleGFX PV graphics device, so the runloop request call has been added to its initialisation. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 3 +++ include/qemu

[PATCH 10/26] hw/display/apple-gfx: Fixes ObjC new/init misuse, plugs leaks

2024-07-17 Thread Phil Dennis-Jordan
'init' call is removed from instances of the new + init pattern. 'new' and alloc+init return an object with a retain count of 1. The change therefore also inserts release calls for temporary objects created in this way to prevent them leaking. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple

[PATCH v2 4/8] hw/display/apple-gfx: Implements texture syncing for non-UMA GPUs

2024-07-17 Thread Phil Dennis-Jordan
screen stayed black on AMD Radeon GPUs. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.h | 1 + hw/display/apple-gfx.m | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/display/apple-gfx.h b/hw/display/apple-gfx.h index 9d6d40795e..995ecf7f4a 100644

[PATCH 05/26] hw/display/apple-gfx: native -> little endian memory ops

2024-07-17 Thread Phil Dennis-Jordan
This is considered best practice. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 87bcdcd98e..8b0459f969 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display

[PATCH 02/26] hw/vmapple/apple-gfx: BQL renaming update

2024-07-17 Thread Phil Dennis-Jordan
Since the original apple-gfx code was written, the BQL functions have been renamed. This change updates the apple-gfx code to use the new names. Signed-off-by: Phil Dennis-Jordan --- hw/vmapple/apple-gfx.m | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions

[PATCH v2 2/8] hw/display/apple-gfx: Adds PCI implementation

2024-07-17 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 --- hw

[PATCH 17/26] hw/display/apple-gfx: Asynchronous rendering and graphics update

2024-07-17 Thread Phil Dennis-Jordan
-by: Phil Dennis-Jordan --- hw/display/apple-gfx.h | 15 +++- hw/display/apple-gfx.m | 193 +++-- 2 files changed, 138 insertions(+), 70 deletions(-) diff --git a/hw/display/apple-gfx.h b/hw/display/apple-gfx.h index fa7fea6368..9d6d40795e 100644 --- a/hw/display

[PATCH 21/26] hw/display/apple-gfx: Implements texture syncing for non-UMA GPUs

2024-07-17 Thread Phil Dennis-Jordan
screen stayed black on AMD Radeon GPUs. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.h | 1 + hw/display/apple-gfx.m | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/display/apple-gfx.h b/hw/display/apple-gfx.h index 9d6d40795e..995ecf7f4a 100644

[PATCH 18/26] hw/display/apple-gfx: Adds PCI implementation

2024-07-17 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 the shared code previously split from the vmapple MMIO variant of the device. Signed-off-by: Phil Dennis

[PATCH 13/26] hw/display/apple-gfx: Defines PGTask_s struct instead of casting

2024-07-17 Thread Phil Dennis-Jordan
. The upshot are improved type safety and fewer casts. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index a23f731ddc..39e33ed999 100644 --- a/hw

[PATCH 26/26] hw/display/apple-gfx: Removes UI pointer support check

2024-07-17 Thread Phil Dennis-Jordan
The dpy_cursor_define_supported() check is destined for removal when the last UI frontend without cursor support (cocoa) gains cursor integration. This patch is required to reconcile with that change. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 24 1

[PATCH 19/26] ui/cocoa: Adds non-app runloop on main thread mode

2024-07-17 Thread Phil Dennis-Jordan
requirement and other subsystems’ runloop requests don’t conflict with each other. The main runloop is required for the AppleGFX PV graphics device, so the runloop request call has been added to its initialisation. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 3 +++ include/qemu

[PATCH 03/26] hw/display/apple-gfx: Moved from hw/vmapple/

2024-07-17 Thread Phil Dennis-Jordan
The macOS PV graphics device is useful outside the (as yet incomplete) vmapple machine type, so this patch moves it to hw/display. Signed-off-by: Phil Dennis-Jordan --- hw/display/Kconfig | 4 hw/{vmapple => display}/apple-gfx.m | 0 hw/display/meson.bu

[PATCH 25/26] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF

2024-07-17 Thread Phil Dennis-Jordan
if it's more than I can manage. Signed-off-by: Phil Dennis-Jordan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7d9811458c..b870bd6ad5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -511,6 +511,7 @@ F: target/arm/hvf/ X86 HVF CPUs M

[PATCH 20/26] hw/display/apple-gfx: Fixes cursor hotspot handling

2024-07-17 Thread Phil Dennis-Jordan
The ParavirtualizedGraphics framework provides the cursor's hotspot, this change actually passes that information through to Qemu's cursor handling. This change also seizes the opportunity to make other cursor related code conform to coding standards. Signed-off-by: Phil Dennis-Jordan --- hw

[PATCH 06/26] hw/display/apple-gfx: Removes dead/superfluous code

2024-07-17 Thread Phil Dennis-Jordan
is explicitly supported according to the framework header docs. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 8b0459f969..b10c060d9a 100644

[PATCH 04/26] hw/display/apple-gfx: uses DEFINE_TYPES macro

2024-07-17 Thread Phil Dennis-Jordan
Switches the device definition to the more modern macro variants. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 3b437e2519

[PATCH 01/26] hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2024-07-17 Thread Phil Dennis-Jordan
provides and receives callbacks on MMIO access as well as to share memory address space between the VM and PVG. This patch implements a QEMU device that drives PVG for the VMApple variant of it. Signed-off-by: Alexander Graf Cherry-pick/rebase conflict fixes: Signed-off-by: Phil Dennis-Jordan

[PATCH 23/26] hw/display/apple-gfx: Host GPU picking improvements

2024-07-17 Thread Phil Dennis-Jordan
fault logic, it is now: 1. Select a GPU with unified memory (iGPU) 2. If (1) fails, select a GPU that is built-in, not an eGPU. 3. If (2) fails, fall back to system default. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 28 +++- 1 file changed, 27 inser

[PATCH 07/26] hw/display/apple-gfx: Makes set_mode thread & memory safe

2024-07-17 Thread Phil Dennis-Jordan
. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 54 +++--- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index b10c060d9a..39aba8d143 100644 --- a/hw/display/apple-gfx.m +++ b/hw

[PATCH 24/26] hw/display/apple-gfx: Adds configurable mode list

2024-07-17 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) PCI variant of apple-gfx only for the moment. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx-pci.m | 43 ++- hw/display

[PATCH v2 7/8] hw/display/apple-gfx: Adds configurable mode list

2024-07-17 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) PCI variant of apple-gfx only for the moment. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx-pci.m | 43 ++- hw/display

[PATCH 15/26] hw/display/apple-gfx: Separates generic & vmapple-specific functionality

2024-07-17 Thread Phil Dennis-Jordan
for a PCI based implementation by splitting out the vmapple-specific code into a separate code file. Signed-off-by: Phil Dennis-Jordan --- hw/display/Kconfig | 4 + hw/display/apple-gfx-vmapple.m | 194 + hw/display/apple-gfx.h | 47 +++ hw

[PATCH 08/26] hw/display/apple-gfx: Adds migration blocker

2024-07-17 Thread Phil Dennis-Jordan
Although the underlying ParavirtualizedGraphics.framework does support state (de-)serialisation, this is currently not yet integrated. We therefore add a migration blocker for now. Signed-off-by: Phil Dennis-Jordan --- hw/display/apple-gfx.m | 16 1 file changed, 16 insertions

Re: [PATCH 16/26] hw/display/apple-gfx: Asynchronous MMIO writes on x86-64

2024-07-16 Thread Phil Dennis-Jordan
On Mon, 15 Jul 2024 at 23:26, Philippe Mathieu-Daudé wrote: > Hi Phil, > > On 15/7/24 23:06, Phil Dennis-Jordan wrote: > > This change ensures that the MMIO write calls into the PVG > > framework are performed asynchronously on a background dispatch > > queue. W

Re: [PATCH] i386/hvf: Integrates x2APIC support with hvf accel

2024-07-08 Thread Phil Dennis-Jordan
Ping! It would be nice to get this one in before the 9.1 merge window closes. Thanks, Phil On Mon, 24 Jun 2024 at 11:47, Phil Dennis-Jordan wrote: > Support for x2APIC mode was recently introduced in the software emulated > APIC implementation for TCG. Enabling it when using macOS

Re: [PATCH v2 0/4] ui/cocoa: Add cursor composition

2024-07-06 Thread Phil Dennis-Jordan
ation. > > Signed-off-by: Akihiko Odaki > After fixing the typo in patch 3/4, the code appears to work as intended. (Tested on macOS 13 & 14, virtio-gpu with Cocoa UI.) So, for the whole patch set: Tested-by: Phil Dennis-Jordan

Re: [PATCH v2 3/4] ui/cocoa: Add cursor composition

2024-07-05 Thread Phil Dennis-Jordan
I've just tried to rebase my own patches on top of this work and noticed the following typo: On Thu, 27 Jun 2024 at 13:17, Akihiko Odaki wrote: > static void cocoa_refresh(DisplayChangeListener *dcl); > +static void cocoa_mouse_set(DisplayChangeListener *dcl, int x, int y, int > on); The

Re: [PATCH v2 3/4] ui/cocoa: Add cursor composition

2024-07-02 Thread Phil Dennis-Jordan
On Tue, 2 Jul 2024 at 16:20, Philippe Mathieu-Daudé wrote: > Hi Phil, > > On 2/7/24 15:19, Phil Dennis-Jordan wrote: > > > I'm still keen on NSCursor support for absolute pointing mode though, so > > I can experiment with doing a better job of cleaning it up as part v3

Re: [PATCH v2 4/4] ui/console: Remove dpy_cursor_define_supported()

2024-07-02 Thread Phil Dennis-Jordan
On Sat, 29 Jun 2024 at 14:21, Marc-André Lureau wrote: > >> Signed-off-by: Akihiko Odaki >> > > Agreed, > Reviewed-by: Marc-André Lureau > Reviewed-by: Phil Dennis-Jordan

Re: [PATCH v2 3/4] ui/cocoa: Add cursor composition

2024-07-02 Thread Phil Dennis-Jordan
On Thu, 27 Jun 2024 at 13:17, Akihiko Odaki wrote: > Co-authored-by: Phil Dennis-Jordan > Signed-off-by: Akihiko Odaki > > +- (void)setCursor:(QEMUCursor *)given_cursor > +{ > +[…] > + > +provider = CGDataProviderCreateWithData( > +NU

Re: [PATCH v2 2/4] ui/console: Convert mouse visibility parameter into bool

2024-07-02 Thread Phil Dennis-Jordan
On Sat, 29 Jun 2024 at 14:18, Marc-André Lureau wrote: > > On Thu, Jun 27, 2024 at 3:19 PM Akihiko Odaki > wrote: > >> Signed-off-by: Akihiko Odaki >> > > Reviewed-by: Marc-André Lureau > > Reviewed-by: Phil Dennis-Jordan

Re: [PATCH v2 1/4] ui/cocoa: Release CGColorSpace

2024-07-02 Thread Phil Dennis-Jordan
ace is retained; on return, you may safely release it. > > Signed-off-by: Akihiko Odaki Reviewed-by: Phil Dennis-Jordan

Re: [PATCH 3/3] ui/cocoa: Adds support for mouse cursors

2024-06-25 Thread Phil Dennis-Jordan
On Tue, 11 Jun 2024 at 09:36, Akihiko Odaki wrote: > > […] I also > > definitely think host cursor integration is useful and valuable, at > > least in absolute pointing mode - for example, when the host system is > > itself being remote controlled, and also to avoid the cursor being > > cropped

Re: [PATCH 1/2] ui/cocoa: Add cursor composition

2024-06-25 Thread Phil Dennis-Jordan
On Mon, 18 Mar 2024 at 08:59, Akihiko Odaki wrote: > The common pattern to implement accelerated cursor composition is to > replace the cursor and warp it so that the replaced cursor is shown at > the correct position on the guest display. Unfortunately, ui/cocoa > cannot do the same because

[PATCH v2 1/2] ui/cocoa: Minor fixes to CALayer based cursors

2024-06-25 Thread Phil Dennis-Jordan
This change fixes some object lifetime issues. (Unreleased reference counts) Signed-off-by: Phil Dennis-Jordan --- ui/cocoa.m | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 06ca114800..cca987eac7 100644 --- a/ui/cocoa.m +++ b/ui

[PATCH v2 2/2] ui/cocoa: Adds NSCursor absolute pointer support

2024-06-25 Thread Phil Dennis-Jordan
is changed by the guest causes a feedback loop in input events. Signed-off-by: Phil Dennis-Jordan --- ui/cocoa.m | 82 +++--- 1 file changed, 65 insertions(+), 17 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index cca987eac7..131c442e16 100644

[PATCH v2 0/2] ui/cocoa: Adds native absolute pointer support

2024-06-25 Thread Phil Dennis-Jordan
on whether relative or absolute input is used. Based-on: <20240318-cursor-v1-2-0bbe6c382...@daynix.com> Phil Dennis-Jordan (2): ui/cocoa: Minor fixes to CALayer based cursors ui/cocoa: Adds NSCursor absolute pointer support ui/cocoa.

[PATCH v2] Cursor: 8 -> 1 bit alpha downsampling improvement

2024-06-24 Thread Phil Dennis-Jordan
) are treated as transparent when converted to 1-bit alpha. This greatly improves the subjective appearance of anti-aliased mouse cursors, such as those used by macOS, when using a front-end UI without support for alpha-blended cursors, such as some VNC clients. Signed-off-by: Phil Dennis-Jordan --- ui

[PATCH] i386/hvf: Integrates x2APIC support with hvf accel

2024-06-24 Thread Phil Dennis-Jordan
& write operations for the MSR VM exits and allow-lists the CPUID flag in the x86 hvf runtime. Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf/x86_cpuid.c | 4 ++-- target/i386/hvf/x86_emu.c | 31 +++ 2 files changed, 33 insertions(+), 2 deletions(-)

Re: [PATCH 3/3] ui/cocoa: Adds support for mouse cursors

2024-06-10 Thread Phil Dennis-Jordan
On Sun, 9 Jun 2024 at 11:06, Akihiko Odaki wrote: > Thanks for working on ui/cocoa, but I already have submitted a patch for > this particular problem: > https://patchew.org/QEMU/20240318-cursor-v1-0-0bbe6c382...@daynix.com/ > Sorry, I missed this patch set - thanks for bringing it to my

Re: [PATCH 2/3] hw: Moves int_clamp() implementations to header

2024-06-10 Thread Phil Dennis-Jordan
On Sun, 9 Jun 2024 at 11:00, Akihiko Odaki wrote: > > On 2024/06/09 5:20, Phil Dennis-Jordan wrote: > > Both hw/input/hid.c and hw/usb/dev-wacom.c define identical versions > > (aside from code formatting) of a clamping function, int_clamp(). > > (marked inline) To avoid d

Re: [PATCH] ui/cocoa: Use qemu_add_mouse_change_notifier

2024-06-08 Thread Phil Dennis-Jordan
ing and replugging the tablet yields a relative -> absolute notification, and pointer input continues to behave correctly. Reviewed-by: Phil Dennis-Jordan Tested-by: Phil Dennis-Jordan On Fri, 22 Mar 2024 at 11:55, Akihiko Odaki wrote: > > This eliminates the polling in cocoa_refresh an

[PATCH 2/3] hw: Moves int_clamp() implementations to header

2024-06-08 Thread Phil Dennis-Jordan
Both hw/input/hid.c and hw/usb/dev-wacom.c define identical versions (aside from code formatting) of a clamping function, int_clamp(). (marked inline) To avoid duplication and to enable further re-use, this change moves the function into qemu/cutils.h. Signed-off-by: Phil Dennis-Jordan --- hw

[PATCH 1/3] Cursor: 8 -> 1 bit alpha downsampling improvement

2024-06-08 Thread Phil Dennis-Jordan
) are treated as transparent when converted to 1-bit alpha. This greatly improves the subjective appearance of anti-aliased mouse cursors, such as those used by macOS, when using a front-end UI without support for alpha-blended cursors, such as some VNC clients. Signed-off-by: Phil Dennis-Jordan --- ui

[PATCH 3/3] ui/cocoa: Adds support for mouse cursors

2024-06-08 Thread Phil Dennis-Jordan
which check for UI back-end cursor support, and fixes the issue of no visible mouse cursor when using one which does not. (Such as virtio-vga) Signed-off-by: Phil Dennis-Jordan --- ui/cocoa.m | 167 +++- ui/trace-events | 7 ++ 2 files changed, 171

[PATCH 0/3] Mouse cursor improvements on macOS and VNC

2024-06-08 Thread Phil Dennis-Jordan
amount. We therefore need to track this offset and counteract it when processing the event. For details, see the commit message and inline comments. This work was sponsored by Sauce Labs Inc. Phil Dennis-Jordan (3): Cursor: 8 -> 1 bit alpha downsampling improvement hw: Moves int_cl

Re: [PATCH v3 0/7] hvf x86 correctness and efficiency improvements

2024-06-06 Thread Phil Dennis-Jordan
On Thu, 6 Jun 2024 at 10:24, Paolo Bonzini wrote: > Queued, thanks. Thanks - also for reviewing, etc.! > Thanks for persisting! It sucks that the hv_vcpu_interrupt() API docs > are not clear, but your tests are great. The self-interrupt one is > the case that I was most worried about, and

[PATCH v3 0/7] hvf x86 correctness and efficiency improvements

2024-06-05 Thread Phil Dennis-Jordan
debugging this issue.) - vCPU handle type cleanup (Based on discussion with Paolo) - Added fixes for existing compile warnings. - Split patch series into 2 parts. This work has been sponsored by Sauce Labs Inc. Phil Dennis-Jordan (7): i386/hvf: Adds support for INVTSC cpuid bit i386/hvf: Fi

[PATCH v3 5/7] i386/hvf: In kick_vcpu use hv_vcpu_interrupt to force exit

2024-06-05 Thread Phil Dennis-Jordan
exits much more rarely, so a true "kick" is needed before switching to that. Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 268c5734d5..106ac5cbf6 100644 --- a/target/i386

[PATCH v3 7/7] hvf: Makes assert_hvf_ok report failed expression

2024-06-05 Thread Phil Dennis-Jordan
of assertions. Signed-off-by: Phil Dennis-Jordan --- accel/hvf/hvf-all.c | 49 +--- include/sysemu/hvf_int.h | 5 +++- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index db05b81be5..c008dc2f1e 100644

[PATCH v3 6/7] i386/hvf: Updates API usage to use modern vCPU run function

2024-06-05 Thread Phil Dennis-Jordan
lacking the new function anyway. The third code path selects dynamically based on runtime detected availability of the weakly-linked symbol. Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf/hvf.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/target

Re: [PATCH v8 1/5] i386/tcg: implement x2APIC registers MSR access

2023-10-22 Thread Phil Dennis-Jordan
to wire it up, but with that in place it noticeably improves guest OS performance. (This patch doesn't yet implement raising exceptions or checking for x2apic mode, more on that in my comments below.) Reviewed-by: Phil Dennis-Jordan On Tue, 26 Sept 2023 at 18:08, Bui Quang Minh wrote: > @@ -45

Re: [PATCH] hvf: Enable 1G page support

2023-10-21 Thread Phil Dennis-Jordan
booting an OS, but I get the same result in TCG mode, or if I disable CPUID_EXT2_PDPE1GB in hvf without this patch, so that's not a regression caused by this change. I found no other problems with a quick spot check using older OVMF and a few other VMs. Reviewed-by: Phil Dennis-Jordan On Tue, 17 Oct

[PATCH v2 4/4] i386/hvf: Fixes dirty memory tracking by page granularity RX->RWX change

2023-10-21 Thread Phil Dennis-Jordan
Dennis-Jordan --- target/i386/hvf/hvf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 43d64574ad..a15ee469c3 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -135,9 +135,10 @@ static bool

[PATCH v2 3/4] hvf: Consistent types for vCPU handles

2023-10-21 Thread Phil Dennis-Jordan
necessary, this change introduces a typedef which resolves to the active architecture’s hvf typedef. It also removes a now-unnecessary cast. Signed-off-by: Phil Dennis-Jordan --- accel/hvf/hvf-accel-ops.c | 2 +- include/sysemu/hvf_int.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions

[PATCH v2 0/4] hvf x86 correctness and efficiency improvements part 1

2023-10-21 Thread Phil Dennis-Jordan
on certain VMs, which led me to debugging this issue.) - vCPU handle type cleanup (Based on discussion with Paolo) - Added fixes for existing compile warnings. - Split patch series into 2 parts. This work has been sponsored by Sauce Labs Inc. Phil Dennis-Jordan (4): i386: hvf: Adds support

[PATCH v2 2/4] hvf: Fixes some compilation warnings

2023-10-21 Thread Phil Dennis-Jordan
headers, it also fixes what appears to be a typo causing a variable to be unused after initialisation. warning: variable 'entry_ctls' set but not used [-Wunused-but-set-variable] Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf/vmx.h| 3 +-- target/i386/hvf/x86_decode.c | 2

[PATCH v2 1/4] i386: hvf: Adds support for INVTSC cpuid bit

2023-10-21 Thread Phil Dennis-Jordan
requested feature: CPUID.8007H:EDX.invtsc [bit 8] x86 macOS itself relies on a fixed rate TSC for its own Mach absolute time timestamp mechanism, so there's no reason we can't enable this bit for guests. When the feature is enabled, a migration blocker is installed. Signed-off-by: Phil Dennis

Re: [PATCH 2/3] i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force exit

2023-10-20 Thread Phil Dennis-Jordan
Hi Roman, hi Paolo, Just an update on my investigation of the hv_vcpu_run -> hv_vcpu_run_until issue. The graphical issues with the Windows XP VM appear to be caused by the dirty memory page system not working as expected. The emulated (Cirrus) VGA adapter uses dirty page tracking to perform

Re: [PATCH 0/3] hvf x86 correctness and efficiency improvements

2023-10-16 Thread Phil Dennis-Jordan
On Mon, 16 Oct 2023 at 18:49, Paolo Bonzini wrote: > > switching to hv_vcpu_run_until() WITHOUT hv_vcpu_interrupt() > > causes some very obvious problems where the vCPU simply > > doesn't exit at all for long periods.) > > Yes, that makes sense. It looks like hv_vcpu_run_until() has an >

Re: [PATCH 0/3] hvf x86 correctness and efficiency improvements

2023-10-16 Thread Phil Dennis-Jordan
Hi Paolo, On Mon, 16 Oct 2023 at 16:39, Paolo Bonzini wrote: > > On 9/22/23 16:09, Phil Dennis-Jordan wrote: > > Patch 1 enables the INVTSC CPUID bit when running with hvf. This can > > enable some optimisations in the guest OS, and I've not found any reason > > it shou

Re: [PATCH 0/3] hvf x86 correctness and efficiency improvements

2023-10-05 Thread Phil Dennis-Jordan
Ping - let me know if there's anything particularly controversial, unclear, etc. about these patches or if I can do anything to make reviewing easier. Thanks! On Fri, 22 Sept 2023 at 16:09, Phil Dennis-Jordan wrote: > > This is a series of semi-related patches for the x86

Re: [PATCH v2 10/12] hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support

2023-09-23 Thread Phil Dennis-Jordan
This is a pretty big patch, but I've done my best to make sense of it. Here's a reasonably thorough first pass review. First off: I've tested it; it seems to broadly work as advertised! Tested-by: Phil Dennis-Jordan Second: Nice work on figuring out the undocumented bits for the vmapple

[PATCH 3/3] i386: hvf: Updates API usage to use modern vCPU run function

2023-09-22 Thread Phil Dennis-Jordan
dynamically based on runtime detected availability of the weakly-linked symbol. Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf/hvf.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 55bd7d2af8

[PATCH 0/3] hvf x86 correctness and efficiency improvements

2023-09-22 Thread Phil Dennis-Jordan
dent. This work has been sponsored by Sauce Labs Inc. Phil Dennis-Jordan (3): i386: hvf: Adds support for INVTSC cpuid bit i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force exit i386: hvf: Updates API usage to use modern vCPU run function target/i386/hvf/hvf.c

[PATCH 2/3] i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force exit

2023-09-22 Thread Phil Dennis-Jordan
, including many spurious exits, which made it less of a problem that nothing was actively done to stop the vCPU thread running guest code. The newer, more efficient hv_vcpu_run_until exits much more rarely, so a true "kick" is needed. Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf

[PATCH 1/3] i386: hvf: Adds support for INVTSC cpuid bit

2023-09-22 Thread Phil Dennis-Jordan
requested feature: CPUID.8007H:EDX.invtsc [bit 8] x86 macOS itself relies on a fixed rate TSC for its own Mach absolute time timestamp mechanism, so there's no reason we can't enable this bit for guests. Signed-off-by: Phil Dennis-Jordan --- target/i386/hvf/x86_cpuid.c | 4 1 file

Re: [PATCH] hw/misc: applesmc: use host osk as default on macs

2021-10-13 Thread Phil Dennis-Jordan
On Mon, 11 Oct 2021 at 15:19, Gabriel L. Somlo wrote: > Given *this* conversation, it might be worth someone's effort to try > that approach again. IMO it's really the most efficient: have an > already existing applesmc driver in the hypervisor's kernel expose the > desired key values (it's

Re: [PATCH] hw/misc: applesmc: use host osk as default on macs

2021-10-08 Thread Phil Dennis-Jordan
Apologies for the late reply, I've been rather busy… Generally, I think this is an awesome feature addition. (I also agree with Paolo's modification.) A few additional concerns though: 1. Licensing Given that the code it's heavily based on is copyright Apple Computer Inc., licensed under APSL,

Re: [Qemu-devel] [Bug 1714331] Re: Virtual machines not working anymore on 2.10

2017-09-07 Thread Phil Dennis-Jordan
29985189c6921c32 > > # bad: [77af8a2b95b79699de650965d5228772743efe84] hw/i386: Use Rev3 > FADT (ACPI 2.0) instead of Rev1 to improve guest OS support. > > git bisect bad 77af8a2b95b79699de650965d5228772743efe84 > > # first bad commit: [77af8a2b95b79699de650965d5228772743efe84] hw/i3

Re: [Qemu-devel] [PATCH] pc: acpi: force FADT rev1 for old i440fx machine types

2017-07-26 Thread Phil Dennis-Jordan
; > I still intend to find the issue. Unlike this FADT revision/length > problem, setup fails after a long time, basically at the very end of > the process. I tried to speed up bisecting it by saving the state of > the VM before the failure and running just the problematic part but it >

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-25 Thread Phil Dennis-Jordan
.c > +++ b/src/fw/paravirt.c > @@ -148,6 +148,18 @@ static void msr_feature_control_setup(void) > wrmsr_smp(MSR_IA32_FEATURE_CONTROL, feature_control_bits); > } > > +static void* > +build_rev1_fadt(struct fadt_descriptor_rev1 *fadt_v3) > +{ > +struct fadt_descriptor

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-21 Thread Phil Dennis-Jordan
On Fri, Jul 21, 2017 at 2:34 PM, Igor Mammedov <imamm...@redhat.com> wrote: > On Fri, 21 Jul 2017 10:23:38 +0100 > "Daniel P. Berrange" <berra...@redhat.com> wrote: > >> On Fri, Jul 21, 2017 at 11:06:36AM +0200, Igor Mammedov wrote: >> > On Thu, 20 J

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-21 Thread Phil Dennis-Jordan
On Fri, Jul 21, 2017 at 12:50 PM, BALATON Zoltan <bala...@eik.bme.hu> wrote: > On Fri, 21 Jul 2017, Igor Mammedov wrote: >> >> On Fri, 21 Jul 2017 10:20:26 +0100 >> "Daniel P. Berrange" <berra...@redhat.com> wrote: >>> >>> On Th

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-21 Thread Phil Dennis-Jordan
On Fri, Jul 21, 2017 at 11:46 AM, Igor Mammedov <imamm...@redhat.com> wrote: > On Fri, 21 Jul 2017 10:20:26 +0100 > "Daniel P. Berrange" <berra...@redhat.com> wrote: > >> On Thu, Jul 20, 2017 at 09:29:33PM +0200, Phil Dennis-Jordan wrote: >> > O

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-21 Thread Phil Dennis-Jordan
On Fri, Jul 21, 2017 at 11:06 AM, Igor Mammedov <imamm...@redhat.com> wrote: > On Thu, 20 Jul 2017 21:29:33 +0200 > Phil Dennis-Jordan <li...@philjordan.eu> wrote: > >> On Thu, Jul 20, 2017 at 6:40 PM, Programmingkid >> <programmingk...@gmail.com> wrote

Re: [Qemu-devel] Commit 77af8a2b95b79699de650965d5228772743efe84 breaks Windows 2000 support

2017-07-20 Thread Phil Dennis-Jordan
but adds yet another option. Thoughts? > commit 77af8a2b95b79699de650965d5228772743efe84 > Author: Phil Dennis-Jordan <p...@philjordan.eu> > Date: Wed Mar 15 19:20:26 2017 +1300 > > hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to improve guest OS > support. >

Re: [Qemu-devel] Commit 77af8a2b9 breaks (mac)OS X 10.11.6

2017-06-23 Thread Phil Dennis-Jordan
Hi, Apologies for the late reply, I've been away. On 20 June 2017 at 01:06, BALATON Zoltan wrote: >> I can (still) boot off my 10.11.0 installer iso image, and >> successfully upgraded from 10.11.4 to 10.11.6, with the latter >> continuing to boot without problems. > > I had

Re: [Qemu-devel] [PATCH] hw/arm/virt: generate 64-bit addressable ACPI objects

2017-04-07 Thread Phil Dennis-Jordan
On Fri, Apr 7, 2017 at 9:44 PM, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 7 April 2017 at 10:36, Phil Dennis-Jordan <p...@philjordan.eu> wrote: >> On 7 April 2017 at 21:11, Laszlo Ersek <ler...@redhat.com> wrote: >>> On 04/07/17 10:55, Andrew Jo

Re: [Qemu-devel] [PATCH] hw/arm/virt: generate 64-bit addressable ACPI objects

2017-04-07 Thread Phil Dennis-Jordan
On 7 April 2017 at 21:11, Laszlo Ersek wrote: > On 04/07/17 10:55, Andrew Jones wrote: >> On Thu, Apr 06, 2017 at 10:22:09PM +0100, Ard Biesheuvel wrote: >>> Our current ACPI table generation code limits the placement of ACPI >>> tables to 32-bit addressable memory, in order to

  1   2   >