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

Philippe Mathieu-Daudé posted 22 patches 2 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220306231753.50277-1-philippe.mathieu.daude@gmail.com
Test checkpatch passed
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Akihiko Odaki <akihiko.odaki@gmail.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <r.bolshakov@yadro.com>, Aurelien Jarno <aurelien@aurel32.net>, Peter Maydell <peter.maydell@linaro.org>
.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%)
[PATCH v7 00/22] host: Support macOS 12
Posted by Philippe Mathieu-Daudé 2 years, 2 months ago
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%)

-- 
2.34.1


Re: [PATCH v7 00/22] host: Support macOS 12
Posted by Claudio Fontana 2 years ago
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%)
> 


Re: [PATCH v7 00/22] host: Support macOS 12
Posted by Philippe Mathieu-Daudé via 1 year, 12 months ago
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.

Re: [PATCH v7 00/22] host: Support macOS 12
Posted by Claudio Fontana 1 year, 12 months ago
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


Re: [PATCH v7 00/22] host: Support macOS 12
Posted by Philippe Mathieu-Daudé 2 years, 1 month ago
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.