Re: [PATCH v3 3/5] qga: replace qemu_gettimeofday() with g_get_real_time()

2022-03-06 Thread Thomas Huth
On 07/03/2022 08.03, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau GLib g_get_real_time() is an alternative to gettimeofday() which allows to simplify our code. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier --- qga/commands-posix.c | 14 --

Re: [PATCH v3 2/5] qtest: replace gettimeofday with GTimer

2022-03-06 Thread Thomas Huth
On 07/03/2022 08.03, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau glib provides a convenience helper to measure elapsed time. It isn't subject to wall-clock time changes. Note that this changes the initial OPENED time, which used to print the current time. [...] @@ -846,21

[PATCH v3 5/5] oslib: drop qemu_gettimeofday()

2022-03-06 Thread marcandre . lureau
From: Marc-André Lureau No longer used after the previous patches. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier Reviewed-by: Stefan Weil Reviewed-by: Richard Henderson --- include/sysemu/os-posix.h | 3 --- include/sysemu/os-win32.h | 6 -- util/oslib-win32.c|

[PATCH v3 3/5] qga: replace qemu_gettimeofday() with g_get_real_time()

2022-03-06 Thread marcandre . lureau
From: Marc-André Lureau GLib g_get_real_time() is an alternative to gettimeofday() which allows to simplify our code. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier --- qga/commands-posix.c | 14 -- qga/commands-win32.c | 19 --- qga/commands.c

[PATCH v3 4/5] Replace qemu_gettimeofday() with g_get_real_time()

2022-03-06 Thread marcandre . lureau
From: Marc-André Lureau GLib g_get_real_time() is an alternative to gettimeofday() which allows to simplify our code. For semihosting, a few bits are lost on POSIX host, but this shouldn't be a big concern. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier --- blockdev.c

[PATCH v3 1/5] m68k/nios2-semi: fix gettimeofday() result check

2022-03-06 Thread marcandre . lureau
From: Marc-André Lureau gettimeofday() returns 0 for success. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/m68k-semi.c | 2 +- target/nios2/nios2-semi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 0/5] Remove qemu_gettimeofday()

2022-03-06 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a few patches to replace qemu_gettimeofday() helper with functions provided by GLib. v3: - fix wrong qdict_from_jsonf() format change v2: - fix return of get-time in nanoseconds - qga: replace with a common get-time function for qga posix/win32 - split qga

[PATCH v3 2/5] qtest: replace gettimeofday with GTimer

2022-03-06 Thread marcandre . lureau
From: Marc-André Lureau glib provides a convenience helper to measure elapsed time. It isn't subject to wall-clock time changes. Note that this changes the initial OPENED time, which used to print the current time. Signed-off-by: Marc-André Lureau Reviewed-by: Laurent Vivier ---

Re: [PATCH v7 17/22] ui/cocoa: Constify qkeycode translation arrays

2022-03-06 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki On Mon, Mar 7, 2022 at 8:19 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Reported-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé > --- > ui/cocoa.m | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH v7 16/22] configure: Pass filtered QEMU_OBJCFLAGS to meson

2022-03-06 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki On Mon, Mar 7, 2022 at 8:19 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Filter unsupported Objective-C options, to avoid > 'unknown-warning-option' warnings when using Clang: > > [34/373] Compiling Objective-C

Re: [PATCH v7 14/22] meson: Resolve the entitlement.sh script once for good

2022-03-06 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki On Mon, Mar 7, 2022 at 8:19 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Commit 235b523dba ("meson: Use find_program() to resolve the > entitlement.sh script") didn't correctly fixed the issue, as > the script is

Re: [PATCH v7 15/22] meson: Log QEMU_CXXFLAGS content in summary

2022-03-06 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki On Mon, Mar 7, 2022 at 8:19 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Signed-off-by: Philippe Mathieu-Daudé > --- > meson.build | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meson.build b/meson.build

Re: [PATCH v7 13/22] osdep: Avoid using Clang-specific __builtin_available()

2022-03-06 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki On Mon, Mar 7, 2022 at 8:19 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Remove the Clang specific __builtin_available() to allow building > with GCC, otherwise we get: > > include/qemu/osdep.h: In function

[PATCH v7 22/22] gitlab-ci: Support macOS 12 via cirrus-run

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add support for macOS 12 build on Cirrus-CI, similarly to commit 0e103a65ba1 ("gitlab: support for ... macOS 11 via cirrus-run"), but with the following differences: - Enable modules (configure --enable-modules) - Do not run softfloat3 tests (make check-softfloat)

[PATCH v7 21/22] ui/cocoa: add option to swap Option and Command

2022-03-06 Thread Philippe Mathieu-Daudé
From: Gustavo Noronha Silva On Mac OS X the Option key maps to Alt and Command to Super/Meta. This change swaps them around so that Alt is the key closer to the space bar and Meta/Super is between Control and Alt, like on non-Mac keyboards. It is a cocoa display option, disabled by default.

[PATCH v7 20/22] ui/cocoa: capture all keys and combos when mouse is grabbed

2022-03-06 Thread Philippe Mathieu-Daudé
From: Gustavo Noronha Silva Applications such as Gnome may use Alt-Tab and Super-Tab for different purposes, some use Ctrl-arrows so we want to allow qemu to handle everything when it captures the mouse/keyboard. However, Mac OS handles some combos like Command-Tab and Ctrl-arrows at an earlier

[PATCH v7 16/22] configure: Pass filtered QEMU_OBJCFLAGS to meson

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Filter unsupported Objective-C options, to avoid 'unknown-warning-option' warnings when using Clang: [34/373] Compiling Objective-C object libcommon.fa.p/audio_coreaudio.m.o warning: unknown warning option '-Wold-style-declaration'; did you mean

[PATCH v7 19/22] ui/cocoa: release mouse when user switches away from QEMU window

2022-03-06 Thread Philippe Mathieu-Daudé
From: Carwyn Ellis This resolves an issue where using command-tab to switch between QEMU and other windows on the host can leave the mouse pointer visible. By releasing the mouse when the user switches away, the user must left click on the QEMU window when switching back in order to hide the

[PATCH v7 18/22] ui/cocoa: add option to disable left-command forwarding to guest

2022-03-06 Thread Philippe Mathieu-Daudé
From: Carwyn Ellis When switching between guest and host on a Mac using command-tab the command key is sent to the guest which can trigger functionality in the guest OS. Specifying left-command-key=off disables forwarding this key to the guest. Defaults to enabled. Also updated the cocoa

[PATCH v7 12/22] audio: Rename coreaudio extension to use Objective-C compiler

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The coreaudio library includes Objective-C declarations (using the caret '^' symbol to declare block references [*]). When building with a C compiler we get: [175/839] Compiling C object libcommon.fa.p/audio_coreaudio.c.o In file included from

[PATCH v7 10/22] audio: Log context for audio bug

2022-03-06 Thread Philippe Mathieu-Daudé
From: Akihiko Odaki Without this change audio_bug aborts when the bug condition is met, which discards following useful logs. Call abort after such logs. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220306063202.27331-1-akihiko.od...@gmail.com>

[PATCH v7 09/22] audio/dbus: Fix building with modules on macOS

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé When configuring QEMU with --enable-modules we get on macOS: --- stderr --- Dependency ui-dbus cannot be satisfied ui-dbus depends on pixman and opengl, so add these dependencies to audio-dbus. Fixes: 739362d420 ("audio: add "dbus" audio backend") Reviewed-by:

[PATCH v7 11/22] coreaudio: Always return 0 in handle_voice_change

2022-03-06 Thread Philippe Mathieu-Daudé
From: Akihiko Odaki handle_voice_change() is a CoreAudio callback function as of CoreAudio type AudioObjectPropertyListenerProc, and for the latter MacOSX.sdk/System/ Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h says "The return value is currently unused and should always be

[PATCH v7 07/22] block/file-posix: Remove a deprecation warning on macOS 12

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé When building on macOS 12 we get: block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] kernResult = IOMasterPort( MACH_PORT_NULL, ); ^~~~

[PATCH v7 05/22] hvf: Remove deprecated hv_vcpu_flush() calls

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé When building on macOS 11 [*], we get: In file included from ../target/i386/hvf/hvf.c:59: ../target/i386/hvf/vmx.h:174:5: error: 'hv_vcpu_flush' is deprecated: first deprecated in macOS 11.0 - This API has no effect and always returns HV_UNSUPPORTED

[PATCH v7 04/22] hvf: Make hvf_get_segments() / hvf_put_segments() local

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Both hvf_get_segments/hvf_put_segments() functions are only used within x86hvf.c: do not declare them as public API. Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86hvf.c | 4 ++--

[PATCH v7 08/22] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé When building on macOS 12 we get: audio/coreaudio.c:50:5: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations] kAudioObjectPropertyElementMaster ^

[PATCH v7 17/22] ui/cocoa: Constify qkeycode translation arrays

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Reported-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 8ab9ab5e84..a6db8ebfb6 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -671,7 +671,7

[PATCH v7 15/22] meson: Log QEMU_CXXFLAGS content in summary

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 8ca2b7c8c2..0d38b2e72a 100644 --- a/meson.build +++ b/meson.build @@ -3470,6 +3470,7 @@ if link_args.length() > 0

[PATCH v7 14/22] meson: Resolve the entitlement.sh script once for good

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Commit 235b523dba ("meson: Use find_program() to resolve the entitlement.sh script") didn't correctly fixed the issue, as the script is still resolved for each target. Move the check earlier, before processing each target. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v7 03/22] hvf: Use standard CR0 and CR4 register definitions

2022-03-06 Thread Philippe Mathieu-Daudé
From: Cameron Esfahani No need to have our own definitions of these registers. Signed-off-by: Cameron Esfahani Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/vmx.h | 17 + target/i386/hvf/x86.c | 6 +++---

[PATCH v7 13/22] osdep: Avoid using Clang-specific __builtin_available()

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Remove the Clang specific __builtin_available() to allow building with GCC, otherwise we get: include/qemu/osdep.h: In function 'qemu_thread_jit_write': include/qemu/osdep.h:787:9: warning: implicit declaration of function '__builtin_available'; did you mean

[PATCH v7 06/22] hvf: Fix OOB write in RDTSCP instruction decode

2022-03-06 Thread Philippe Mathieu-Daudé
From: Cameron Esfahani A guest could craft a specific stream of instructions that will have QEMU write 0xF9 to inappropriate locations in memory. Add additional asserts to check for this. Generate a #UD if there are more than 14 prefix bytes. Found by Julian Stecklina Signed-off-by: Cameron

[PATCH v7 02/22] tests/fp/berkeley-testfloat-3: Ignore ignored #pragma directives

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since we already use -Wno-unknown-pragmas, we can also use -Wno-ignored-pragmas. This silences hundred of warnings using clang 13 on macOS Monterey: [409/771] Compiling C object tests/fp/libtestfloat.a.p/berkeley-testfloat-3_source_test_az_f128_rx.c.o

[PATCH v7 01/22] configure: Allow passing extra Objective C compiler flags

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We can pass C/CPP/LD flags via CFLAGS/CXXFLAGS/LDFLAGS environment variables, or via configure --extra-cflags / --extra-cxxflags / --extra-ldflags options. Provide similar behavior for Objective C: use existing flags from $OBJCFLAGS, or passed via --extra-objcflags.

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

2022-03-06 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé 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