mbox series

[v7,00/22] host: Support macOS 12

Message ID 20220306231753.50277-1-philippe.mathieu.daude@gmail.com (mailing list archive)
Headers show
Series host: Support macOS 12 | expand

Message

Philippe Mathieu-Daudé March 6, 2022, 11:17 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Few patches to be able to build QEMU on macOS 12 (Monterey).

Missing review:
 0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch
 0013-osdep-Avoid-using-Clang-specific-__builtin_available.patch
 0014-meson-Resolve-the-entitlement.sh-script-once-for-goo.patch
 0015-meson-Log-QEMU_CXXFLAGS-content-in-summary.patch
 0016-configure-Pass-filtered-QEMU_OBJCFLAGS-to-meson.patch
 0017-ui-cocoa-Constify-qkeycode-translation-arrays.patch
 0020-ui-cocoa-capture-all-keys-and-combos-when-mouse-is-g.patch
 0021-ui-cocoa-add-option-to-swap-Option-and-Command.patch
 0022-gitlab-ci-Support-macOS-12-via-cirrus-run.patch

Since v6:
- Dropped merged patches
- Addressed Akihiko Odaki comments (squashed 2 patches, added R/T-b)
- Dropped 'configure: Disable out-of-line atomic operations on Aarch64'
- Add few macos patches on the list pending for 7.0 so tested by CI

Since v5:
- Fixed failed rebase between patches 10 and 16 (Akihiko)
- Include "ui/cocoa: Fix the leak of qemu_console_get_label"

Since v4:
- Use MAC_OS_X_VERSION_MIN_REQUIRED definition (Akihiko)
- Include patches from Akihiko

Since v3:
- Fix --enable-modules
- Ignore #pragma on softfloat3 tests
- Addressed Akihiko Odaki comments
- Include Cameron Esfahani patches

Since v2:
- Addressed Akihiko Odaki comments:
  . use __is_identifier(),
  . remove cocoa setAllowedFileTypes()
- Addressed Daniel Berrangé comment:
  . rebased on testing/next, update libvirt-ci/lcitool

Akihiko Odaki (2):
  audio: Log context for audio bug
  coreaudio: Always return 0 in handle_voice_change

Cameron Esfahani (2):
  hvf: Use standard CR0 and CR4 register definitions
  hvf: Fix OOB write in RDTSCP instruction decode

Carwyn Ellis (2):
  ui/cocoa: add option to disable left-command forwarding to guest
  ui/cocoa: release mouse when user switches away from QEMU window

Gustavo Noronha Silva (2):
  ui/cocoa: capture all keys and combos when mouse is grabbed
  ui/cocoa: add option to swap Option and Command

Philippe Mathieu-Daudé (14):
  configure: Allow passing extra Objective C compiler flags
  tests/fp/berkeley-testfloat-3: Ignore ignored #pragma directives
  hvf: Make hvf_get_segments() / hvf_put_segments() local
  hvf: Remove deprecated hv_vcpu_flush() calls
  block/file-posix: Remove a deprecation warning on macOS 12
  audio/coreaudio: Remove a deprecation warning on macOS 12
  audio/dbus: Fix building with modules on macOS
  audio: Rename coreaudio extension to use Objective-C compiler
  osdep: Avoid using Clang-specific __builtin_available()
  meson: Resolve the entitlement.sh script once for good
  meson: Log QEMU_CXXFLAGS content in summary
  configure: Pass filtered QEMU_OBJCFLAGS to meson
  ui/cocoa: Constify qkeycode translation arrays
  gitlab-ci: Support macOS 12 via cirrus-run

 .gitlab-ci.d/cirrus.yml            |  16 ++++
 .gitlab-ci.d/cirrus/macos-12.vars  |  16 ++++
 audio/audio.c                      |  25 +++---
 audio/audio_template.h             |  27 +++----
 audio/{coreaudio.c => coreaudio.m} |  23 +++---
 audio/meson.build                  |   4 +-
 block/file-posix.c                 |  14 +++-
 configure                          |  31 ++++++++
 include/qemu/osdep.h               |  10 +--
 meson.build                        |  17 +++-
 qapi/ui.json                       |  29 +++++++
 qemu-options.hx                    |  15 ++++
 target/i386/hvf/vmx.h              |  19 +++--
 target/i386/hvf/x86.c              |   6 +-
 target/i386/hvf/x86.h              |  34 --------
 target/i386/hvf/x86_decode.c       |  12 ++-
 target/i386/hvf/x86_mmu.c          |   2 +-
 target/i386/hvf/x86_task.c         |   4 +-
 target/i386/hvf/x86hvf.c           |  14 +++-
 target/i386/hvf/x86hvf.h           |   3 +-
 tests/fp/meson.build               |   5 ++
 tests/lcitool/refresh              |   1 +
 ui/cocoa.m                         | 122 ++++++++++++++++++++++++++---
 23 files changed, 327 insertions(+), 122 deletions(-)
 create mode 100644 .gitlab-ci.d/cirrus/macos-12.vars
 rename audio/{coreaudio.c => coreaudio.m} (97%)

Comments

Philippe Mathieu-Daudé March 15, 2022, 12:48 p.m. UTC | #1
On 7/3/22 00:17, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> Few patches to be able to build QEMU on macOS 12 (Monterey).
> 
> Missing review:
>   0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch
>   0013-osdep-Avoid-using-Clang-specific-__builtin_available.patch
>   0014-meson-Resolve-the-entitlement.sh-script-once-for-goo.patch
>   0015-meson-Log-QEMU_CXXFLAGS-content-in-summary.patch
>   0016-configure-Pass-filtered-QEMU_OBJCFLAGS-to-meson.patch
>   0017-ui-cocoa-Constify-qkeycode-translation-arrays.patch
>   0020-ui-cocoa-capture-all-keys-and-combos-when-mouse-is-g.patch
>   0021-ui-cocoa-add-option-to-swap-Option-and-Command.patch
>   0022-gitlab-ci-Support-macOS-12-via-cirrus-run.patch

Queuing reviewed patches; IOW all except:

    0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch
    0022-gitlab-ci-Support-macOS-12-via-cirrus-run.patch

Thanks,

Phil.
Claudio Fontana May 3, 2022, 9:40 a.m. UTC | #2
On 3/7/22 12:17 AM, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> Few patches to be able to build QEMU on macOS 12 (Monterey).
> 
> Missing review:
>  0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch
>  0013-osdep-Avoid-using-Clang-specific-__builtin_available.patch
>  0014-meson-Resolve-the-entitlement.sh-script-once-for-goo.patch
>  0015-meson-Log-QEMU_CXXFLAGS-content-in-summary.patch
>  0016-configure-Pass-filtered-QEMU_OBJCFLAGS-to-meson.patch
>  0017-ui-cocoa-Constify-qkeycode-translation-arrays.patch
>  0020-ui-cocoa-capture-all-keys-and-combos-when-mouse-is-g.patch
>  0021-ui-cocoa-add-option-to-swap-Option-and-Command.patch
>  0022-gitlab-ci-Support-macOS-12-via-cirrus-run.patch
> 
> Since v6:
> - Dropped merged patches
> - Addressed Akihiko Odaki comments (squashed 2 patches, added R/T-b)
> - Dropped 'configure: Disable out-of-line atomic operations on Aarch64'
> - Add few macos patches on the list pending for 7.0 so tested by CI


Hi Philippe, I did not find v6 somehow,

and I was looking for patch:

"[PATCH v5 06/16] hvf: Enable RDTSCP support"

was it dropped / merged with something else? I do not see it in latest git, nor in this respin,
maybe it is in your tree somewhere?

Thanks,

Claudio

> 
> Since v5:
> - Fixed failed rebase between patches 10 and 16 (Akihiko)
> - Include "ui/cocoa: Fix the leak of qemu_console_get_label"
> 
> Since v4:
> - Use MAC_OS_X_VERSION_MIN_REQUIRED definition (Akihiko)
> - Include patches from Akihiko
> 
> Since v3:
> - Fix --enable-modules
> - Ignore #pragma on softfloat3 tests
> - Addressed Akihiko Odaki comments
> - Include Cameron Esfahani patches
> 
> Since v2:
> - Addressed Akihiko Odaki comments:
>   . use __is_identifier(),
>   . remove cocoa setAllowedFileTypes()
> - Addressed Daniel Berrangé comment:
>   . rebased on testing/next, update libvirt-ci/lcitool
> 
> Akihiko Odaki (2):
>   audio: Log context for audio bug
>   coreaudio: Always return 0 in handle_voice_change
> 
> Cameron Esfahani (2):
>   hvf: Use standard CR0 and CR4 register definitions
>   hvf: Fix OOB write in RDTSCP instruction decode
> 
> Carwyn Ellis (2):
>   ui/cocoa: add option to disable left-command forwarding to guest
>   ui/cocoa: release mouse when user switches away from QEMU window
> 
> Gustavo Noronha Silva (2):
>   ui/cocoa: capture all keys and combos when mouse is grabbed
>   ui/cocoa: add option to swap Option and Command
> 
> Philippe Mathieu-Daudé (14):
>   configure: Allow passing extra Objective C compiler flags
>   tests/fp/berkeley-testfloat-3: Ignore ignored #pragma directives
>   hvf: Make hvf_get_segments() / hvf_put_segments() local
>   hvf: Remove deprecated hv_vcpu_flush() calls
>   block/file-posix: Remove a deprecation warning on macOS 12
>   audio/coreaudio: Remove a deprecation warning on macOS 12
>   audio/dbus: Fix building with modules on macOS
>   audio: Rename coreaudio extension to use Objective-C compiler
>   osdep: Avoid using Clang-specific __builtin_available()
>   meson: Resolve the entitlement.sh script once for good
>   meson: Log QEMU_CXXFLAGS content in summary
>   configure: Pass filtered QEMU_OBJCFLAGS to meson
>   ui/cocoa: Constify qkeycode translation arrays
>   gitlab-ci: Support macOS 12 via cirrus-run
> 
>  .gitlab-ci.d/cirrus.yml            |  16 ++++
>  .gitlab-ci.d/cirrus/macos-12.vars  |  16 ++++
>  audio/audio.c                      |  25 +++---
>  audio/audio_template.h             |  27 +++----
>  audio/{coreaudio.c => coreaudio.m} |  23 +++---
>  audio/meson.build                  |   4 +-
>  block/file-posix.c                 |  14 +++-
>  configure                          |  31 ++++++++
>  include/qemu/osdep.h               |  10 +--
>  meson.build                        |  17 +++-
>  qapi/ui.json                       |  29 +++++++
>  qemu-options.hx                    |  15 ++++
>  target/i386/hvf/vmx.h              |  19 +++--
>  target/i386/hvf/x86.c              |   6 +-
>  target/i386/hvf/x86.h              |  34 --------
>  target/i386/hvf/x86_decode.c       |  12 ++-
>  target/i386/hvf/x86_mmu.c          |   2 +-
>  target/i386/hvf/x86_task.c         |   4 +-
>  target/i386/hvf/x86hvf.c           |  14 +++-
>  target/i386/hvf/x86hvf.h           |   3 +-
>  tests/fp/meson.build               |   5 ++
>  tests/lcitool/refresh              |   1 +
>  ui/cocoa.m                         | 122 ++++++++++++++++++++++++++---
>  23 files changed, 327 insertions(+), 122 deletions(-)
>  create mode 100644 .gitlab-ci.d/cirrus/macos-12.vars
>  rename audio/{coreaudio.c => coreaudio.m} (97%)
>
Philippe Mathieu-Daudé May 9, 2022, 12:31 p.m. UTC | #3
On 3/5/22 11:40, Claudio Fontana wrote:
> On 3/7/22 12:17 AM, Philippe Mathieu-Daudé wrote:
>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>
>> Few patches to be able to build QEMU on macOS 12 (Monterey).
>>
>> Missing review:
>>   0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch
>>   0013-osdep-Avoid-using-Clang-specific-__builtin_available.patch
>>   0014-meson-Resolve-the-entitlement.sh-script-once-for-goo.patch
>>   0015-meson-Log-QEMU_CXXFLAGS-content-in-summary.patch
>>   0016-configure-Pass-filtered-QEMU_OBJCFLAGS-to-meson.patch
>>   0017-ui-cocoa-Constify-qkeycode-translation-arrays.patch
>>   0020-ui-cocoa-capture-all-keys-and-combos-when-mouse-is-g.patch
>>   0021-ui-cocoa-add-option-to-swap-Option-and-Command.patch
>>   0022-gitlab-ci-Support-macOS-12-via-cirrus-run.patch
>>
>> Since v6:
>> - Dropped merged patches
>> - Addressed Akihiko Odaki comments (squashed 2 patches, added R/T-b)
>> - Dropped 'configure: Disable out-of-line atomic operations on Aarch64'
>> - Add few macos patches on the list pending for 7.0 so tested by CI
> 
> 
> Hi Philippe, I did not find v6 somehow,
> 
> and I was looking for patch:
> 
> "[PATCH v5 06/16] hvf: Enable RDTSCP support"
> 
> was it dropped / merged with something else? I do not see it in latest git, nor in this respin,
> maybe it is in your tree somewhere?

The patch stayed unreviewed during 2 months, so I dropped it.

Now it got at least a Tested-by tag from Silvio, I'll include it in the
next PR.

Regards,

Phil.
Claudio Fontana May 9, 2022, 1:08 p.m. UTC | #4
On 5/9/22 2:31 PM, Philippe Mathieu-Daudé wrote:
> On 3/5/22 11:40, Claudio Fontana wrote:
>> On 3/7/22 12:17 AM, Philippe Mathieu-Daudé wrote:
>>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>
>>> Few patches to be able to build QEMU on macOS 12 (Monterey).
>>>
>>> Missing review:
>>>   0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch
>>>   0013-osdep-Avoid-using-Clang-specific-__builtin_available.patch
>>>   0014-meson-Resolve-the-entitlement.sh-script-once-for-goo.patch
>>>   0015-meson-Log-QEMU_CXXFLAGS-content-in-summary.patch
>>>   0016-configure-Pass-filtered-QEMU_OBJCFLAGS-to-meson.patch
>>>   0017-ui-cocoa-Constify-qkeycode-translation-arrays.patch
>>>   0020-ui-cocoa-capture-all-keys-and-combos-when-mouse-is-g.patch
>>>   0021-ui-cocoa-add-option-to-swap-Option-and-Command.patch
>>>   0022-gitlab-ci-Support-macOS-12-via-cirrus-run.patch
>>>
>>> Since v6:
>>> - Dropped merged patches
>>> - Addressed Akihiko Odaki comments (squashed 2 patches, added R/T-b)
>>> - Dropped 'configure: Disable out-of-line atomic operations on Aarch64'
>>> - Add few macos patches on the list pending for 7.0 so tested by CI
>>
>>
>> Hi Philippe, I did not find v6 somehow,
>>
>> and I was looking for patch:
>>
>> "[PATCH v5 06/16] hvf: Enable RDTSCP support"
>>
>> was it dropped / merged with something else? I do not see it in latest git, nor in this respin,
>> maybe it is in your tree somewhere?
> 
> The patch stayed unreviewed during 2 months, so I dropped it.
> 
> Now it got at least a Tested-by tag from Silvio, I'll include it in the
> next PR.
> 
> Regards,
> 
> Phil.
> 

Awesome, thanks for the update!

Claudio