[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(-)

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

2024-06-24 Thread Phil Dennis-Jordan
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 v2 0/2] ui/cocoa: Adds native absolute pointer support

2024-06-25 Thread Phil Dennis-Jordan
ng 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/c

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

2024-06-25 Thread Phil Dennis-Jordan
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 --- a

[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

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 warpi

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 ne

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

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

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

[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

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

2024-06-05 Thread Phil Dennis-Jordan
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 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 0/7] hvf x86 correctness and efficiency improvements

2024-06-05 Thread Phil Dennis-Jordan
oman for noticing the regression in observed behaviour 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

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 you'

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

2024-06-08 Thread Phil Dennis-Jordan
ual display adapter implementations 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-ev

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

2024-06-08 Thread Phil Dennis-Jordan
nding 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 i

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

2024-06-08 Thread Phil Dennis-Jordan
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 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

Re: [PATCH] ui/cocoa: Use qemu_add_mouse_change_notifier

2024-06-08 Thread Phil Dennis-Jordan
plugging 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_refre

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

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, i

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 whole

[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
;t support 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_cpui

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

2023-09-22 Thread Phil Dennis-Jordan
e applied in that order, patch 1 is independent. 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 moder

[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

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

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 th

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 parti

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

2023-10-21 Thread Phil Dennis-Jordan
;t support 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

[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_de

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

2023-10-21 Thread Phil Dennis-Jordan
regression in observed behaviour 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

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

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

2023-10-21 Thread Phil Dennis-Jordan
;t get anywhere near 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

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

2023-10-22 Thread Phil Dennis-Jordan
l patch 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 wro

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

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

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 Clover with unpatche

Re: [Qemu-devel] [PATCH v2 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-04-06 Thread Phil Dennis-Jordan
Looks good to me. Reviewed-by: Phil Dennis-Jordan On Wed, Apr 5, 2017 at 5:01 AM, Gabriel L. Somlo wrote: > Signed-off-by: Gabriel Somlo > Reviewed-by: Alexander Graf > Reviewed-by: Philippe Mathieu-Daudé > --- > hw/misc/

Re: [Qemu-devel] [PATCH v2 2/3] applesmc: implement error status port

2017-04-06 Thread Phil Dennis-Jordan
investigation is documented somewhere (FakeSMC mailing list/forum perhaps?) then it might be worth linking to that in the commit message, assuming that's in line with Qemu policy. Thanks for implementing this! Reviewed-by: Phil Dennis-Jordan On Wed, Apr 5, 2017 at 5:01 AM, Gabriel L. Somlo wrote:

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 be able to emit the

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 wrote: > On 7 April 2017 at 10:36, Phil Dennis-Jordan wrote: >> 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

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-26 Thread Phil Dennis-Jordan
On 23 January 2017 at 12:12, Igor Mammedov wrote: >> For reference, my approach to filling out the Xdsdt/Xfacs fields in >> build_fadt() is essentially the same as for the 32-bit variants from >> rev1: >> >> unsigned xfacs_offset = (char *)&fadt->Xfacs - table_data->data; >> bios_linker_loader_add

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-31 Thread Phil Dennis-Jordan
On 18 January 2017 at 18:19, Igor Mammedov wrote: > On Wed, 18 Jan 2017 18:30:59 +0200 > "Michael S. Tsirkin" wrote: > >> On Wed, Jan 18, 2017 at 12:45:54PM +0100, Phil Dennis-Jordan wrote: > [...] > >> > I suspect more might be involved in enabling ACPI

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-31 Thread Phil Dennis-Jordan
On Tue, 31 Jan 2017 at 16:41, Igor Mammedov wrote: > On Tue, 31 Jan 2017 16:58:22 +0200 > "Michael S. Tsirkin" wrote: > > > On Tue, Jan 31, 2017 at 03:31:46PM +0100, Phil Dennis-Jordan wrote: > > > On 18 January 2017 at 18:19, Igor Mammedov > wrote: >

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-02-06 Thread Phil Dennis-Jordan
31, 2017 at 03:31:46PM +0100, Phil Dennis-Jordan wrote: >>> On 18 January 2017 at 18:19, Igor Mammedov wrote: >>>> On Wed, 18 Jan 2017 18:30:59 +0200 >>>> "Michael S. Tsirkin" wrote: >>>> >>>>> On Wed, Jan 18, 2017 at 12:45:54PM

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-02-06 Thread Phil Dennis-Jordan
On 31 January 2017 at 20:08, Laszlo Ersek wrote: > On 01/31/17 19:17, Michael S. Tsirkin wrote: >> On Tue, Jan 31, 2017 at 05:28:57PM +0100, Laszlo Ersek wrote: >>> The ACPI 6.1 spec says, >>> >>> - DSDT: [...] If the X_DSDT field contains a non-zero value then this >>> field must be zero. >>> -

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-02-07 Thread Phil Dennis-Jordan
On 7 February 2017 at 20:54, Laszlo Ersek wrote: > On 02/06/17 17:30, Phil Dennis-Jordan wrote: >> Thanks for the in-depth reply - apologies for abandoning the thread >> for a few days. Looks like a bunch of things have already been hashed >> out, but I have a few more com

[Qemu-devel] [PATCH v2 1/2] hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to improve guest OS support.

2017-03-11 Thread Phil Dennis-Jordan
regressions became apparent in tests with a range of Windows (XP-10) and Linux versions. Signed-off-by: Phil Dennis-Jordan --- hw/i386/acpi-build.c| 32 +-- include/hw/acpi/acpi-defs.h | 77 + tests/bios-tables-test.c| 4

[Qemu-devel] [PATCH v2 0/2] hw/i386: Update FADT to Revision 3 (ACPI 2.0)

2017-03-11 Thread Phil Dennis-Jordan
ompile-time assertion has been added for the PC/Q35 reset register equivalence. [1]: https://bugzilla.tianocore.org/show_bug.cgi?id=368 [2]: EDK2 commit range e0e1cfcbbb24..198a46d768fb Phil Dennis-Jordan (2): hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to improve guest OS support. hw/i3

[Qemu-devel] [PATCH v2 2/2] hw/i386: Build-time assertion on pc/q35 reset register being identical.

2017-03-11 Thread Phil Dennis-Jordan
This adds a clarifying comment and build time assert to the FADT reset register field initialisation: the reset register is the same on both machine types. Signed-off-by: Phil Dennis-Jordan --- hw/i386/acpi-build.c | 3 +++ hw/pci-host/piix.c | 6 -- include/hw/i386/pc.h | 6 ++ 3

[Qemu-devel] [PATCH v3 0/2] hw/i386: Update FADT to Revision 3 (ACPI 2.0)

2017-03-14 Thread Phil Dennis-Jordan
to fadt" * Instead of just adding the reset register, set up a fully standards compliant Rev3 FADT. (ACPI 2.0) * A compile-time assertion has been added for the PC/Q35 reset register equivalence. [1]: https://bugzilla.tianocore.org/show_bug.cgi?id=368 [2]: EDK2 commit range e0e1cfcbbb

[Qemu-devel] [PATCH v3 1/2] hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to improve guest OS support.

2017-03-14 Thread Phil Dennis-Jordan
regressions became apparent in tests with a range of Windows (XP-10) and Linux versions. The BIOS tables test suite's FADT checksum test has also been updated to reflect the new FADT layout and content. Signed-off-by: Phil Dennis-Jordan --- hw/i386/acpi-build.c

[Qemu-devel] [PATCH v3 2/2] hw/i386: Build-time assertion on pc/q35 reset register being identical.

2017-03-14 Thread Phil Dennis-Jordan
This adds a clarifying comment and build time assert to the FADT reset register field initialisation: the reset register is the same on both machine types. Signed-off-by: Phil Dennis-Jordan --- hw/i386/acpi-build.c | 3 +++ hw/pci-host/piix.c | 6 -- include/hw/i386/pc.h | 6 ++ 3

Re: [Qemu-devel] [PATCH v2 0/2] hw/i386: Update FADT to Revision 3 (ACPI 2.0)

2017-03-14 Thread Phil Dennis-Jordan
On 15 March 2017 at 08:29, Michael S. Tsirkin wrote: > > On Sat, Mar 11, 2017 at 10:06:22PM -0800, no-re...@patchew.org wrote: > > Hi, > > > > This series failed automatic build test. Please find the testing commands > > and > > their output below. If you have docker installed, you can probably

[Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-18 Thread Phil Dennis-Jordan
About 2 years ago, Reza Jelveh submitted essentially this same patch: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05832.html It adds the reset register defined in ACPI 2.0 to the x86 FADT, which fixes rebooting for Darwin/OS X/macOS guests. I'm trying to revive this as part of an ef

[Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
-apic-clocks" to enable the same behaviour when running Qemu with KVM acceleration, if the KVM TSC frequency can be established. The virtualised APIC bus cycle is hardcoded to 1GHz in KVM, so ebx of the CPUID leaf is also hardcoded to this value. Signed-off-by: Phil Dennis-Jordan --- target/

[Qemu-devel] [PATCH] hw/usb/dev-hid: add a Mac guest compatibility option to usb-tablet

2017-01-18 Thread Phil Dennis-Jordan
f 0x02 (mouse) and a bInterfaceProtocol value of 0x00. Signed-off-by: Phil Dennis-Jordan --- hw/usb/dev-hid.c | 138 ++- 1 file changed, 136 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 24d05f7..0f5b796 100644 --

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
Thanks for the comments Paulo and Eduardo, On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > vmware_clock_rates, false), > > Maybe just vmware-cpuid-freq instead? Whatever the choice, please make > the bool field in struct X86CPU co

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
On 18 January 2017 at 17:10, Paolo Bonzini wrote: > You enable vmware-cpuid-freq unconditionally. But then you actually > publish 0x4010 only if INVTSC is set. Right, got it, thanks. What about the Hyper-V conflict? That will be vastly more probable if the option is on by default. Don't publ

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
Thanks for the comments Paulo and Eduardo, On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > vmware_clock_rates, false), > > Maybe just vmware-cpuid-freq instead? Whatever the choice, please make > the bool field in struct X86CPU co

Re: [Qemu-devel] [PATCH] hw/usb/dev-hid: add a Mac guest compatibility option to usb-tablet

2017-01-19 Thread Phil Dennis-Jordan
Thanks for looking into this, Gerd. On 19 January 2017 at 10:06, Gerd Hoffmann wrote: > Waded through the specs. Setting bInterfaceProtocol to 0x00 should be > done anyway. Only boot protocol devices (which the tablet isn't) should > set this to 1 (kbd) or 2 (mouse). No need to hide that behi

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-19 Thread Phil Dennis-Jordan
On 18 January 2017 at 17:30, Michael S. Tsirkin wrote: > I think what's important is the Fadt format revision. That one was 1 for 1.0b > and 3 for 2.0. > > See page 112, Table 5-5 Fixed ACPI Description Table Format in acpi spec > 1.0b. > > Now look at page 110 in spec 2.0, this time > "Table 5-8

[Qemu-devel] [PATCH v2 0/2] hw/usb/dev-hid: Make usb-tablet work with OS X/macOS guests

2017-01-20 Thread Phil Dennis-Jordan
the spec anyway. * As the boot protocol change is permanent, separate interface and device descriptor constants for the Mac/non-Mac variants of the tablet are no longer required, and have been removed. Phil Dennis-Jordan (2): hw/usb/dev-hid: set bInterfaceProtocol to 0x00 for usb-tablet hw

[Qemu-devel] [PATCH v2 2/2] hw/usb/dev-hid: add a usb-tablet Mac guest compatibility option

2017-01-20 Thread Phil Dennis-Jordan
ination with the previous commit's boot protocol fix, this allows the usb-tablet to correctly control the mouse cursor in OS X/macOS guest systems. Signed-off-by: Phil Dennis-Jordan --- hw/usb/dev-hid.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c

[Qemu-devel] [PATCH v2 1/2] hw/usb/dev-hid: set bInterfaceProtocol to 0x00 for usb-tablet

2017-01-20 Thread Phil Dennis-Jordan
ate events. Signed-off-by: Phil Dennis-Jordan --- hw/usb/dev-hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 24d05f7..a23e5d4 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -144,7 +144,7 @@ static const USBDescIface desc_if

[Qemu-devel] [PATCH v2 1/3] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-20 Thread Phil Dennis-Jordan
f-by: Phil Dennis-Jordan --- target/i386/cpu.c | 1 + target/i386/cpu.h | 4 target/i386/kvm.c | 36 ++-- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index aba11ae..dabad37 100644 --- a/target/i386/c

[Qemu-devel] [PATCH v2 0/3] x86-kvm: Fix Mac guest timekeeping by exposing TSC frequency in CPUID

2017-01-20 Thread Phil Dennis-Jordan
ed, one for setting up PC machine version 2.8/2.9 compatibility configurations, the second for enabling the new option in version 2.9+ PIIX/q35 configurations by default, while leaving it disabled for 2.8 or older machines. Phil Dennis-Jordan (3): x86-KVM: Supply TSC and APIC clock rates t

[Qemu-devel] [PATCH v2 3/3] pc: Enable vmware-cpuid-freq CPU option for 2.9+ machine types

2017-01-20 Thread Phil Dennis-Jordan
Signed-off-by: Phil Dennis-Jordan --- include/hw/i386/pc.h | 5 + target/i386/cpu.c| 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 853edf8..e0ad244 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h

[Qemu-devel] [PATCH v2 2/3] pc: Add 2.9 machine type

2017-01-20 Thread Phil Dennis-Jordan
Signed-off-by: Phil Dennis-Jordan --- hw/i386/pc_piix.c| 13 - hw/i386/pc_q35.c | 12 +++- include/hw/i386/pc.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 5e1adbe..cdbe396 100644 --- a/hw/i386

[Qemu-devel] [PATCH v3] hw/usb/dev-hid: Improve guest compatibility of usb-tablet

2017-01-25 Thread Phil Dennis-Jordan
dinates are not directly translated to absolute mouse cursor positions. Changing it to 0x02 (mouse) fixes the problem, and does not have any adverse effect in other operating systems and windowing systems. (VMWare does the same thing.) Signed-off-by: Phil Dennis-Jordan --- Changelog = v

Re: [Qemu-devel] [PATCH v2 0/3] x86-kvm: Fix Mac guest timekeeping by exposing TSC frequency in CPUID

2017-01-25 Thread Phil Dennis-Jordan
On 24 January 2017 at 12:58, Paolo Bonzini wrote: > Looks good, thanks! Queued patches 1 and 3 for 2.9 (patch 2 is in already). Awesome, thanks for your help! As there are now some minor merge conflicts with upstream, I've rebased the remaining 2 patches on latest master, they're in the vmware-

Re: [Qemu-devel] [PATCH v3] hw/usb/dev-hid: Improve guest compatibility of usb-tablet

2017-01-25 Thread Phil Dennis-Jordan
On 25 January 2017 at 18:27, wrote: > Your series seems to have some coding style problems. See output below for > more information: > > Type: series > Subject: [Qemu-devel] [PATCH v3] hw/usb/dev-hid: Improve guest compatibility > of usb-tablet > Message-id: 1485365075-32702-1-git-send-email-p..

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

2017-07-20 Thread Phil Dennis-Jordan
ption. Thoughts? > commit 77af8a2b95b79699de650965d5228772743efe84 > Author: Phil Dennis-Jordan > 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. > > This updates the FADT generated for x86/

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 wrote: > On Thu, 20 Jul 2017 21:29:33 +0200 > Phil Dennis-Jordan wrote: > >> On Thu, Jul 20, 2017 at 6:40 PM, Programmingkid >> wrote: >> > I noticed that Windows 2000 does not boot up in QEMU recently. After >&g

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 wrote: > On Fri, 21 Jul 2017 10:20:26 +0100 > "Daniel P. Berrange" wrote: > >> On Thu, Jul 20, 2017 at 09:29:33PM +0200, Phil Dennis-Jordan wrote: >> > On Thu, Jul 20, 2017 at 6:40 PM, Programmingkid >> >

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 wrote: > On Fri, 21 Jul 2017, Igor Mammedov wrote: >> >> On Fri, 21 Jul 2017 10:20:26 +0100 >> "Daniel P. Berrange" wrote: >>> >>> On Thu, Jul 20, 2017 at 09:29:33PM +0200, Phil Dennis-Jordan

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 wrote: > On Fri, 21 Jul 2017 10:23:38 +0100 > "Daniel P. Berrange" wrote: > >> On Fri, Jul 21, 2017 at 11:06:36AM +0200, Igor Mammedov wrote: >> > On Thu, 20 Jul 2017 21:29:33 +0200 >> > Phil Dennis-Jordan

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

2017-07-25 Thread Phil Dennis-Jordan
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_rev1 *fadt_v1 = malloc_high(sizeof *fadt_v1); > + > +memcpy(fadt_v1, fadt_v3, sizeof *fadt_v1); > +fadt_v1->length = sizeof *fadt_v1; > +fadt_v1->revision = 1; We should mask out the flags bits that are reserved in ACPI 1.0 as they refer to fields not present in this revision's FADT. e.g. // upper 23 bits reserved in rev1 FADT fadt_v1->flags &= 0x1ff; > +fadt_v1->checksum -= checksum(fadt_v1, fadt_v1->length); > +return fadt_v1; > +} > + > static void > build_compatibility_rsdt(void) > { > @@ -182,6 +194,12 @@ build_compatibility_rsdt(void) > u64 tbl_addr = xsdt->table_offset_entry[i]; > if (!tbl_addr || (tbl_addr & ~0xULL)) > continue; > +struct acpi_table_header *tbl = (void*)(u32)tbl_addr; > +/* The RSDT should only have an ACPI 1.0 FADT according to > + * the spec. > + */ > +if (tbl->signature == FACP_SIGNATURE && tbl->revision > 1) > +tbl_addr = (u32)build_rev1_fadt((void *)tbl); > rsdt->table_offset_entry[j++] = (u32)tbl_addr; > } > > -- > 2.13.3 > > With these changes: Reviewed-by: Phil Dennis-Jordan

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

2017-07-26 Thread Phil Dennis-Jordan
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 &g

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

2017-09-07 Thread Phil Dennis-Jordan
cal. > > git bisect bad 6103451aeb749e92bf7d730429985189c6921c32 > > # 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: [77af8a2b95b

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 abov

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] 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 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. Withou

[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

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

2024-07-17 Thread Phil Dennis-Jordan
ares 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 +

[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 ++-

[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 ++-

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

2024-07-17 Thread Phil Dennis-Jordan
in default 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

[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 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 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-Jorda

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

2024-07-17 Thread Phil Dennis-Jordan
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

  1   2   3   4   5   6   >