Re: [PATCH for-6.0 6/6] qapi: Deprecate 'query-kvm'

2020-11-27 Thread Roman Bolshakov
On Fri, Nov 27, 2020 at 12:21:54PM +0100, Peter Krempa wrote: > On Fri, Nov 27, 2020 at 10:50:59 +, Daniel Berrange wrote: > > Copying libvir-list for the deprecation warning. > > > > > > On Mon, Nov 16, 2020 at 04:10:11PM +0300, Roman Bolshakov wrote: > > &

Re: [PATCH 1/8] hvf: Add hypervisor entitlement to output binaries

2020-11-27 Thread Roman Bolshakov
On Thu, Nov 26, 2020 at 10:50:10PM +0100, Alexander Graf wrote: > In macOS 11, QEMU only gets access to Hypervisor.framework if it has the > respective entitlement. Add an entitlement template and automatically self > sign and apply the entitlement in the build. > > Signed-off-by: Alexander Graf

Re: [PATCH 2/8] hvf: Move common code out

2020-11-27 Thread Roman Bolshakov
ccel/hvf/meson.build > create mode 100644 include/sysemu/hvf_int.h > delete mode 100644 target/i386/hvf/hvf-cpus.c > delete mode 100644 target/i386/hvf/hvf-cpus.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index 68bc160f41..ca4b6d9279 100644 > --- a/MAINTAINERS

Re: [PATCH 2/8] hvf: Move common code out

2020-11-30 Thread Roman Bolshakov
On Mon, Nov 30, 2020 at 10:40:49PM +0100, Alexander Graf wrote: > Hi Peter, > > On 30.11.20 22:08, Peter Collingbourne wrote: > > On Mon, Nov 30, 2020 at 12:56 PM Frank Yang wrote: > > > > > > > > > On Mon, Nov 30, 2020 at 12:34 PM Alexander Graf wrote: > > > > Hi Frank, > > > > > > > > Thank

Re: [PATCH v3] hvf: guard xgetbv call.

2021-01-19 Thread Roman Bolshakov
eedback. > > target/i386/hvf/x86_cpuid.c | 34 ++ > 1 file changed, 22 insertions(+), 12 deletions(-) > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman > diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cp

Re: [PATCH v2] target/i386/hvf: add vmware-cpuid-freq cpu feature

2021-01-19 Thread Roman Bolshakov
On Thu, Jan 14, 2021 at 10:47:03PM +0300, yaroshchuk2...@gmail.com wrote: > From: Vladislav Yaroshchuk > > For `-accel hvf` cpu_x86_cpuid() is wrapped with hvf_cpu_x86_cpuid() to > add paravirtualization cpuid leaf 0x4010 > https://lkml.org/lkml/2008/10/1/246 > > Leaf 0x4010, Timing Info

Re: [PATCH v1 1/3] hvf: use standard CR0 and CR4 register definitions

2020-04-05 Thread Roman Bolshakov
On Mon, Mar 30, 2020 at 05:16:04PM -0700, Cameron Esfahani wrote: > Signed-off-by: Cameron Esfahani > --- > target/i386/cpu.h | 2 ++ > target/i386/hvf/hvf.c | 1 + > target/i386/hvf/vmx.h | 15 --- > target/i386/hvf/x86.c | 6 +++--- > target/i386/hvf/x86.h

Re: [PATCH v1 2/3] hvf: Make long mode enter and exit code clearer.

2020-04-05 Thread Roman Bolshakov
_EFER.LMA and VMCS Entry Controls in compatibility mode, instead it does so only when the actual switch out of long mode happens. (It's worth to mention any other issues the patch helps to address, if any). The comment in the previous patch may be dropped here IMO. Besides that, Reviewed-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v1 3/3] hvf: Support AVX512 guests on capable hardware

2020-04-08 Thread Roman Bolshakov
On Mon, Mar 30, 2020 at 05:16:06PM -0700, Cameron Esfahani wrote: > macOS lazily enables AVX512. Explicitly enable it if the processor > supports it. > > cpu_x86_cpuid() tries to handle OSXSAVE but refers to env->cr[4] for the > guest copy of CR4. HVF doesn't support caching CPUID values like KV

Re: [PATCH v2] hvf: use standard CR0 and CR4 register definitions

2020-04-15 Thread Roman Bolshakov
x86.h | 34 -- > target/i386/hvf/x86_mmu.c | 2 +- > target/i386/hvf/x86_task.c | 3 ++- > 7 files changed, 17 insertions(+), 47 deletions(-) > Hi Cameron, Reviewed-by: Roman Bolshakov Thanks, Roman

[Bug 1823831] Re: BSD bootloader halts with hypervisor.framework

2020-05-12 Thread Roman Bolshakov
Hi Chen, Do you see the issue on the latest version of QEMU (v5.0 or master)? The fix addressed incorrect IRQ inhibition: https://git.qemu.org/?p=qemu.git;a=commit;h=ddd31732a7379e056749836ff37ff57718083ddb Thanks, Roman ** Changed in: qemu Status: New => Fix Released -- You received t

[Bug 1823831] Re: BSD bootloader halts with hypervisor.framework

2020-05-12 Thread Roman Bolshakov
Yes, I've verified. It boots after countdown and responds to keyboard events. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1823831 Title: BSD bootloader halts with hypervisor.framework Status in

Re: QEMU + HVF Fails to start OVMF.fd (hang before displaying logo)

2020-05-12 Thread Roman Bolshakov
On Mon, May 11, 2020 at 12:38:26PM +0200, Philippe Mathieu-Daudé wrote: > Hi Olivier, > > Cc'ing the HVF maintainers. > > On 5/11/20 12:26 PM, LAHAYE Olivier wrote: > > Hi, > > > > I’m facing a similar problem to this one, but I’m unable to find any > > solution via google. > > > > https://www.

[Bug 1823831] Re: BSD bootloader halts with hypervisor.framework

2020-05-12 Thread Roman Bolshakov
** Changed in: qemu Assignee: (unassigned) => Roman Bolshakov (roolebo) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1823831 Title: BSD bootloader halts with hypervisor.framework Status

[Bug 1844946] Re: macOS HVF broken with WinXP after Aug 21 2018 92d5f1a414

2020-05-12 Thread Roman Bolshakov
*** This bug is a duplicate of bug 1823831 *** https://bugs.launchpad.net/bugs/1823831 ** Tags added: hvf ** Changed in: qemu Status: New => Fix Released ** This bug has been marked a duplicate of bug 1823831 BSD bootloader halts with hypervisor.framework -- You received this bug

[Bug 1872644] Re: MacOS host qemu-system-x86_64 -cpu host not working

2020-05-12 Thread Roman Bolshakov
** Tags added: hvf -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1872644 Title: MacOS host qemu-system-x86_64 -cpu host not working Status in QEMU: New Bug description: MacOS: 10.15.4 uname

Re: [PATCH 04/11] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-16 Thread Roman Bolshakov
ed on macOS user-space DriverKit framework Best regards, Roman On Mon, Mar 16, 2020 at 01:00:42PM +0100, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > Cc: Reviewed-by: Nikita Leshenko > Cc: Sergio Andres Gomez Del Real > Cc: Roman Bolshakov >

[PATCH] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-16 Thread Roman Bolshakov
Cc: Nikita Leshenko Cc: Sergio Andres Gomez Del Real Cc: Patrick Colp Cc: Cameron Esfahani Cc: Liran Alon Cc: Heiher Signed-off-by: Roman Bolshakov --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 32867bc636..e544f3012e 100644

[PATCH v2] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-16 Thread Roman Bolshakov
Cc: Nikita Leshenko Cc: Sergio Andres Gomez Del Real Cc: Patrick Colp Cc: Cameron Esfahani Cc: Liran Alon Cc: Heiher Signed-off-by: Roman Bolshakov --- Changes since v1: Status is changed to Maintained instead of Supported. MAINTAINERS | 7 +++ 1 file changed, 7 insertions

Re: [PATCH 04/11] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-19 Thread Roman Bolshakov
On Tue, Mar 17, 2020 at 04:24:44PM -0700, Cameron Esfahani wrote: > Sorry I didn't see this yesterday. > > We've (Apple) signed up for taking over HVF ownership. I didn't realize I > needed to add to the MAINTAINERS list. > > Roman, we also have a bunch of pending fixes for some of the issues y

Re: [PATCH v2] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-19 Thread Roman Bolshakov
On Wed, Mar 18, 2020 at 11:47:15AM +0100, Paolo Bonzini wrote: > > Queued, thanks. > Hi Paolo, I'm going to send v3 shortly to include Cameron as maintainer. Thanks, Roman

[PATCH v3] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-19 Thread Roman Bolshakov
Cameron signed up for taking HVF ownership. Cc: Cameron Esfahani Cc: Nikita Leshenko Cc: Sergio Andres Gomez Del Real Cc: Patrick Colp Cc: Liran Alon Cc: Heiher Signed-off-by: Roman Bolshakov --- Changes since v2: Removed myself from the list of maintainers, added Cameron from Apple

Re: [PATCH v3] MAINTAINERS: Add an entry for the HVF accelerator

2020-03-19 Thread Roman Bolshakov
On Thu, Mar 19, 2020 at 06:06:15PM +0100, Philippe Mathieu-Daudé wrote: > On 3/19/20 2:55 PM, Roman Bolshakov wrote: > > Cameron signed up for taking HVF ownership. > > > > Cc: Cameron Esfahani > > Cc: Nikita Leshenko > > Cc: Sergio Andres Gomez Del Real &g

Re: [PATCH 02/13] i386: hvf: Drop useless declarations in sysemu

2020-06-05 Thread Roman Bolshakov
On Thu, Jun 04, 2020 at 11:53:53AM +0200, Claudio Fontana wrote: > On 5/28/20 9:37 PM, Roman Bolshakov wrote: > > They're either declared elsewhere or have no use. > > > > While at it, rename _hvf_cpu_synchronize_post_init() to > > do_hvf_cpu_synchronize_post_init(

Re: [PATCH 12/13] i386: hvf: Move mmio_buf into CPUX86State

2020-06-05 Thread Roman Bolshakov
On Thu, Jun 04, 2020 at 08:27:37PM +0200, Paolo Bonzini wrote: > On 28/05/20 21:37, Roman Bolshakov wrote: > > There's no similar field in CPUX86State, but it's needed for MMIO traps. > > > > It should be possible to get rid of the buffer altogether, but it

[Bug 1827005] Re: hvf: ubuntu iso boot menu issue

2020-06-05 Thread Roman Bolshakov
** Tags added: hvf -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1827005 Title: hvf: ubuntu iso boot menu issue Status in QEMU: New Bug description: With hvf acceleration on macOS, ubuntu ser

[Bug 1815263] Re: hvf accelerator crashes on quest boot

2020-06-05 Thread Roman Bolshakov
** Tags added: hvf -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1815263 Title: hvf accelerator crashes on quest boot Status in QEMU: New Bug description: Host OS: macOS High Sierra (10.13.6)

Re: [PATCH] util/oslib-posix : qemu_init_exec_dir implementation for MacOS

2020-06-07 Thread Roman Bolshakov
On Tue, May 26, 2020 at 09:40:27PM +0100, David CARLIER wrote: > From b24a6702beb2a4e2a9c1c03b69c6d1dd07d4cf08 Mon Sep 17 00:00:00 2001 > From: David Carlier > Date: Tue, 26 May 2020 21:35:27 +0100 > Subject: [PATCH] util/oslib: current process full path resolution on MacOS > > Using existing lib

Re: [RFC v3 4/4] cpus: extract out accel-specific code to each accel

2020-05-26 Thread Roman Bolshakov
On Mon, May 25, 2020 at 04:54:40PM +0200, Claudio Fontana wrote: > each accelerator registers a new "CpusAccelInterface" > on initialization, providing functions for starting a vcpu, > kicking a vcpu, and sychronizing state. > > This way the code in cpus.cc is now all general softmmu code, > nothi

Re: [PATCH v2 3/7] sysemu/hvf: Only declare hvf_allowed when HVF is available

2020-05-26 Thread Roman Bolshakov
pported_cpuid(func, idx, reg) 0 > -#endif > +#endif /* !CONFIG_HVF */ > > /* hvf_slot flags */ > #define HVF_SLOT_LOG (1 << 0) > -- > 2.21.3 > Reviewed-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v2 1/7] sysemu/accel: Restrict machine methods to system-mode

2020-05-26 Thread Roman Bolshakov
hwaddr start_addr, hwaddr size); > +#endif > bool *allowed; > /* > * Array of global properties that would be applied when specific > -- > 2.21.3 > Reviewed-by: Roman Bolshakov Thanks, Roman

[PATCH 02/13] i386: hvf: Drop useless declarations in sysemu

2020-05-28 Thread Roman Bolshakov
They're either declared elsewhere or have no use. While at it, rename _hvf_cpu_synchronize_post_init() to do_hvf_cpu_synchronize_post_init(). Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 22 -- target/i386/hvf/hvf.c | 7 --- 2 files changed, 4 inser

[PATCH 01/13] i386: hvf: Move HVFState definition into hvf

2020-05-28 Thread Roman Bolshakov
included by "hvf.c" and "x86_task.c". Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 37 - target/i386/hvf/hvf-i386.h | 35 +++ 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/inclu

[PATCH 03/13] i386: hvf: Clean stray includes in sysemu

2020-05-28 Thread Roman Bolshakov
They have no use. Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h index 03f3cd7db3..cf579e1592 100644 --- a/include/sysemu/hvf.h +++ b/include/sysemu/hvf.h @@ -13,15 +13,8 @@ #ifndef

[PATCH 06/13] i386: hvf: Use IP from CPUX86State

2020-05-28 Thread Roman Bolshakov
Drop and replace rip field from HVFX86EmulatorState in favor of eip from common CPUX86State. Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c| 6 +-- target/i386/hvf/x86.h| 3 -- target/i386/hvf/x86_decode.c | 6 +-- target/i386/hvf/x86_emu.c| 86

[PATCH 00/13] i386: hvf: Remove HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
s://lists.gnu.org/archive/html/qemu-devel/2020-05/msg07449.html Thanks, Roman Roman Bolshakov (13): i386: hvf: Move HVFState definition into hvf i386: hvf: Drop useless declarations in sysemu i386: hvf: Clean stray includes in sysemu i386: hvf: Drop unused variable i386: hvf: Use ins_len

[PATCH 07/13] i386: hvf: Drop fetch_rip from HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
printed in decode_invalid(). It prints an address before the unknown instruction. Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c| 6 -- target/i386/hvf/x86.h| 1 - target/i386/hvf/x86_decode.c | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/targ

[PATCH 04/13] i386: hvf: Drop unused variable

2020-05-28 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h index c95d5b2116..56fcde13c6 100644 --- a/target/i386/hvf/x86.h +++ b/target/i386/hvf/x86.h @@ -293,7 +293,6 @@ typedef struct lazy_flags

[PATCH 05/13] i386: hvf: Use ins_len to advance IP

2020-05-28 Thread Roman Bolshakov
There's no need to read VMCS twice, instruction length is already available in ins_len. Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 9ccdb7e7c7..8ff1d25521 1

[PATCH 10/13] i386: hvf: Drop regs in HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
HVFX86EmulatorState carries it's own copy of x86 registers. It can be dropped in favor of regs in generic CPUX86State. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86.h | 13 +++-- target/i386/hvf/x86_emu.c | 18 +- 2 files changed, 16 insertions(+

[PATCH 11/13] i386: hvf: Move lazy_flags into CPUX86State

2020-05-28 Thread Roman Bolshakov
The lazy flags are still needed for instruction decoder. Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h| 7 + target/i386/cpu.h | 2 ++ target/i386/hvf/x86.h | 6 target/i386/hvf/x86_flags.c | 57 ++--- 4 files changed

[PATCH 12/13] i386: hvf: Move mmio_buf into CPUX86State

2020-05-28 Thread Roman Bolshakov
There's no similar field in CPUX86State, but it's needed for MMIO traps. Signed-off-by: Roman Bolshakov --- target/i386/cpu.h | 1 + target/i386/hvf/hvf.c | 5 + target/i386/hvf/x86.h | 1 - target/i386/hvf/x86_emu.c | 12 ++-- 4 files changed, 12 insert

[PATCH 08/13] i386: hvf: Drop rflags from HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
HVFX86EmulatorState carries it's own copy of x86 flags. It can be dropped in favor of eflags in generic CPUX86State. Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 5 ++--- target/i386/hvf/x86.c | 2 +- target/i386/hvf/x86.h

[PATCH 09/13] i386: hvf: Drop copy of RFLAGS defines

2020-05-28 Thread Roman Bolshakov
Use the ones provided in target/i386/cpu.h instead. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86.c| 2 +- target/i386/hvf/x86.h| 20 target/i386/hvf/x86_decode.c | 16 +++- target/i386/hvf/x86_task.c | 2 +- 4 files changed, 9

[PATCH 13/13] i386: hvf: Drop HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- include/qemu/typedefs.h | 1 - target/i386/cpu.h | 1 - target/i386/hvf/hvf.c | 1 - target/i386/hvf/x86.h | 4 4 files changed, 7 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index ecf3cde26c..6ce0356f2c 100644

[PATCH] configure: Don't warn about lack of PIE on macOS

2020-06-01 Thread Roman Bolshakov
ld64 is making PIE executables for 10.7 and above by default, as documented in ld(1). Signed-off-by: Roman Bolshakov --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index af2ba83f0e..6dddbca4b2 100755 --- a/configure +++ b/configure @@ -2137,6 +2137,8

Re: [PATCH 0/7] Add vmnet.framework based network backend

2021-08-11 Thread Roman Bolshakov
On Thu, Jun 17, 2021 at 05:32:39PM +0300, Vladislav Yaroshchuk wrote: > macOS provides networking API for VMs called vmnet.framework. > I tried to add it as a network backend. All three modes are supported: > > -shared: > allows the guest to comminicate with other guests in shared mode and > a

[PATCH] tcg: Fix execution on Apple Silicon

2021-01-02 Thread Roman Bolshakov
Pages can't be both write and executable at the same time on Apple Silicon. macOS provides public API to switch write protection [1] for JIT applications, like TCG. 1. https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon Signed-off-by:

[PATCH RESEND] configure: Don't warn about lack of PIE on macOS

2021-01-02 Thread Roman Bolshakov
ld64 is making PIE executables for 10.7 and above by default, as documented in ld(1). Reviewed-by: Cameron Esfahani Signed-off-by: Roman Bolshakov --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 881af4b6be..942e20dfe7 100755 --- a/configure +++ b

[PATCH] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-02 Thread Roman Bolshakov
stead.", macos(10.0, 11.0)); ^ Signed-off-by: Roman Bolshakov --- ui/cocoa.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index f32adc3074..5909758a09 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1178,6 +1178,7 @@ QemuCocoaView *cocoaView; /*

[PATCH] meson: Propagate gnutls dependency

2021-01-02 Thread Roman Bolshakov
-by: Roman Bolshakov --- block/meson.build | 2 +- io/meson.build | 2 +- meson.build| 5 +++-- storage-daemon/meson.build | 2 +- tests/meson.build | 6 +++--- ui/meson.build | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-02 Thread Roman Bolshakov
On Sat, Jan 02, 2021 at 01:25:07PM +, Peter Maydell wrote: > On Sat, 2 Jan 2021 at 12:54, Roman Bolshakov wrote: > > > > crypto/tlscreds.h includes GnuTLS headers if CONFIG_GNUTLS is set, but > > GNUTLS_CFLAGS, that describe include path, are not propagated > > t

Re: [PATCH] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-02 Thread Roman Bolshakov
On Sat, Jan 02, 2021 at 01:16:48PM +, Peter Maydell wrote: > On Sat, 2 Jan 2021 at 12:52, Roman Bolshakov wrote: > > > > ui/cocoa.m:1188:44: warning: 'openFile:' is deprecated: first deprecated in > > macOS 11.0 - Use -[NSWorkspace openURL:] instead. >

[PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-02 Thread Roman Bolshakov
stead.", macos(10.0, 11.0)); ^ Signed-off-by: Roman Bolshakov --- Changes since v1: - Changed URLWithString: to fileURLWithPath:isDirectory: (Peter) ui/cocoa.m | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index f32adc3074..ea3b845b53 100644 ---

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-02 Thread Roman Bolshakov
On Sat, Jan 02, 2021 at 03:21:02PM +0300, Roman Bolshakov wrote: > Pages can't be both write and executable at the same time on Apple > Silicon. macOS provides public API to switch write protection [1] for > JIT applications, like TCG. > > 1. > https://developer.

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Roman Bolshakov
x27;s JavaScriptCore. In v2, I'm not changing permission back and force unless it's needed to avoid EXC_BAD_ACCESS. Regards, Roman > -j > > On Sat, Jan 2, 2021 at 8:13 AM Roman Bolshakov wrote: > > > > On Sat, Jan 02, 2021 at 03:21:02PM +0300, Roman Bolshakov wrote:

[PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Roman Bolshakov
Pages can't be both write and executable at the same time on Apple Silicon. macOS provides public API to switch write protection [1] for JIT applications, like TCG. 1. https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon Signed-off-by:

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Roman Bolshakov
On Sun, Jan 03, 2021 at 08:52:52AM -0800, Joelle van Dyne wrote: > MAC_OS_VERSION_11_0 is always defined. You can see in > usr/include/AvailabilityVersions.h > It's not defined on my old MPB that has Catalina (10.15.7). The last entries are: #define MAC_OS_X_VERSION_10_15 101500 #define MAC

Re: [PATCH] tcg: Fix execution on Apple Silicon

2021-01-03 Thread Roman Bolshakov
xec permissions. And then, move change of permissions to rw inside do_tb_phys_invalidate() just before TB spin lock is acquired. Regards, Roman > -j > > On Sun, Jan 3, 2021 at 6:20 AM Roman Bolshakov wrote: > > > > On Sat, Jan 02, 2021 at 11:55:29AM -0800, Joelle van Dyne wrote: > > &g

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-04 Thread Roman Bolshakov
On Sat, Jan 02, 2021 at 08:43:51PM +0100, Paolo Bonzini wrote: > On 02/01/21 14:25, Peter Maydell wrote: > > Question to Paolo -- it seems pretty fragile to have to explicitly > > list "these source files need these extra CFLAGS" in half a dozen > > meson.build files, because it's pretty non-obviou

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 09:50:32PM +0100, Paolo Bonzini wrote: > On 04/01/21 18:24, Roman Bolshakov wrote: > > Hi Paolo, > > > > I'm sorry I didn't reply earlier. As I showed in an example to Peter > > (https://lists.gnu.org/archive/html/qemu-devel/2021-01/m

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 03:23:07PM +, Alex Bennée wrote: > > Roman Bolshakov writes: > > > Pages can't be both write and executable at the same time on Apple > > Silicon. macOS provides public API to switch write protection [1] for > > JIT applications,

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 07:39:13PM +0100, Alexander Graf wrote: > > On 04.01.21 16:23, Alex Bennée wrote: > > Roman Bolshakov writes: > > > > > Pages can't be both write and executable at the same time on Apple > > > Silicon. macOS provides publ

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
On Mon, Jan 04, 2021 at 08:28:08PM +, Alex Bennée wrote: > > Alexander Graf writes: > > > On 04.01.21 16:23, Alex Bennée wrote: > >> Roman Bolshakov writes: > >> > >>> Pages can't be both write and executable at the same time on Apple

Re: [PATCH v2] tcg: Fix execution on Apple Silicon

2021-01-05 Thread Roman Bolshakov
(__builtin_available(macOS 11, *)) { > pthread_jit_write_protect_np(); > } > > You still need a compile time check like MAC_OS_VERSION_11_0 to > support linking with older SDKs. > I'll address the issue in v3. Thanks for catching it. Regards, Roman >

Re: [PATCH v5 00/11] hvf: Implement Apple Silicon Support

2021-01-06 Thread Roman Bolshakov
l > going on that. With this applied, I can successfully run both Linux and > Windows as guests. I am not aware of any limitations specific to > Hypervisor.framework apart from: > > - Live migration / savevm > - gdbstub debugging (SP register) > > > Enjoy! > Hi

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-07 Thread Roman Bolshakov
On Thu, Jan 07, 2021 at 12:41:40PM +0100, Paolo Bonzini wrote: > On 05/01/21 15:37, Roman Bolshakov wrote: > > Does it work if you do: > > > > crypto_ss.add(authz, qom) > > libcrypto = static_library('crypto', crypto_ss.sources() + genh, > &g

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-07 Thread Roman Bolshakov
On Thu, Jan 07, 2021 at 05:23:54PM +0100, Paolo Bonzini wrote: > On 07/01/21 16:56, Roman Bolshakov wrote: > > IMO duplication of dependencies shouldn't be needed for a build system. > > Meta build system should allow private and public dependencies. Different > >

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-07 Thread Roman Bolshakov
On Thu, Jan 07, 2021 at 07:22:06PM +0100, Paolo Bonzini wrote: > On 07/01/21 19:18, Roman Bolshakov wrote: > > > > > The real issue is that Meson's implementation of link_whole for > > > library-in-library makes sense for one use case (convenience library that &g

Re: [PATCH] meson: Propagate gnutls dependency

2021-01-08 Thread Roman Bolshakov
On Thu, Jan 07, 2021 at 08:41:50PM +0100, Paolo Bonzini wrote: > Il gio 7 gen 2021, 20:36 Roman Bolshakov ha scritto: > > > > No I think that Meson should simply explode link_whole libraries to their > > > constituent objects. This way duplicates are avoided. >

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-08 Thread Roman Bolshakov
On Fri, Jan 08, 2021 at 03:00:07PM +, Peter Maydell wrote: > On Fri, 8 Jan 2021 at 13:50, Peter Maydell wrote: > > > > On Sat, 2 Jan 2021 at 15:14, Roman Bolshakov wrote: > > > > > > ui/cocoa.m:1188:44: warning: 'openFile:' is deprecated:

[PATCH] ui/cocoa: Update path to docs in build tree

2021-01-08 Thread Roman Bolshakov
QEMU documentation can't be opened if QEMU is run from build tree because executables are placed in the top of build tree after conversion to meson. Signed-off-by: Roman Bolshakov --- ui/cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-08 Thread Roman Bolshakov
On Fri, Jan 08, 2021 at 03:05:55PM +, Peter Maydell wrote: > On Fri, 8 Jan 2021 at 15:00, Peter Maydell wrote: > > > > On Fri, 8 Jan 2021 at 13:50, Peter Maydell wrote: > > > > > > On Sat, 2 Jan 2021 at 15:14, Roman Bolshakov > > > wrote: &

Re: [PATCH] hvf: guard xgetbv call.

2021-01-08 Thread Roman Bolshakov
On Fri, Dec 18, 2020 at 06:13:47PM -0800, Hill Ma wrote: > This prevents illegal instruction on cpus do not support xgetbv. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1758819 > Signed-off-by: Hill Ma > --- > target/i386/hvf/x86_cpuid.c | 11 --- > 1 file changed, 8 insertions(+),

Re: [PATCH] ui/cocoa: Update path to docs in build tree

2021-01-08 Thread Roman Bolshakov
On Sat, Jan 09, 2021 at 12:38:15AM +0300, Roman Bolshakov wrote: > QEMU documentation can't be opened if QEMU is run from build tree > because executables are placed in the top of build tree after conversion > to meson. > > Signed-off-by: Roman Bolshakov > --- > u

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-09 Thread Roman Bolshakov
On Sat, Jan 09, 2021 at 12:13:36AM +0100, BALATON Zoltan wrote: > On Sat, 9 Jan 2021, Roman Bolshakov wrote: > > On Fri, Jan 08, 2021 at 03:00:07PM +, Peter Maydell wrote: > > > On Fri, 8 Jan 2021 at 13:50, Peter Maydell > > > wrote: > > > > >

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-09 Thread Roman Bolshakov
On Sat, Jan 09, 2021 at 01:25:44PM +0100, Christian Schoenebeck via wrote: > On Samstag, 9. Januar 2021 00:13:36 CET BALATON Zoltan wrote: > > On Sat, 9 Jan 2021, Roman Bolshakov wrote: > > > On Fri, Jan 08, 2021 at 03:00:07PM +, Peter Maydell wrote: > > >> On F

Re: [PATCH] hvf: guard xgetbv call.

2021-01-09 Thread Roman Bolshakov
On Sat, Jan 09, 2021 at 11:42:18AM +, Peter Maydell wrote: > On Sat, 9 Jan 2021 at 05:49, Roman Bolshakov wrote: > > > > On Fri, Dec 18, 2020 at 06:13:47PM -0800, Hill Ma wrote: > > > This prevents illegal instruction on cpus do not support xgetbv. &g

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-09 Thread Roman Bolshakov
On Sun, Jan 10, 2021 at 02:13:48AM +0100, BALATON Zoltan wrote: > On Sun, 10 Jan 2021, Roman Bolshakov wrote: > > On Sat, Jan 09, 2021 at 12:13:36AM +0100, BALATON Zoltan wrote: > > > On Sat, 9 Jan 2021, Roman Bolshakov wrote: > > > > On Fri, Jan 08, 2021 at 03:00:0

Re: [PATCH] hvf: guard xgetbv call.

2021-01-10 Thread Roman Bolshakov
On Sun, Jan 10, 2021 at 08:38:36AM -1000, Richard Henderson wrote: > On 1/10/21 8:34 AM, Richard Henderson wrote: > > On 1/9/21 3:46 PM, Roman Bolshakov wrote: > >> +static int xgetbv(uint32_t cpuid_ecx, uint32_t idx, uint64_t *xcr) > >> { > >> -uint32

Re: [PATCH v2] hvf: guard xgetbv call.

2021-01-10 Thread Roman Bolshakov
On Sun, Jan 10, 2021 at 01:08:54PM -0800, Hill Ma wrote: > This prevents illegal instruction on cpus do not support xgetbv. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1758819 > Signed-off-by: Hill Ma > --- > v2: xgetbv() modified based on feedback. > > target/i386/hvf/x86_cpuid.c | 28 +

Re: [PATCH v2] hvf: guard xgetbv call.

2021-01-11 Thread Roman Bolshakov
On Mon, Jan 11, 2021 at 09:44:40PM -0800, Hill Ma wrote: > On Sun, Jan 10, 2021 at 8:38 PM Roman Bolshakov wrote: > > I'm not sure if eax should be modified with mask because the mask has no > > value per se. I.e. eax &= supp_xcr0 from below should be placed inside

Re: [PATCH] hvf: guard xgetbv call.

2021-01-11 Thread Roman Bolshakov
On Mon, Jan 11, 2021 at 07:06:22AM -1000, Richard Henderson wrote: > On 1/10/21 6:31 PM, Roman Bolshakov wrote: > >> Also, if we're going to put this some place common, forcing the caller to > >> do > >> the cpuid that feeds this, then we should probably make

[PATCH v3] tcg: Fix execution on Apple Silicon

2021-01-12 Thread Roman Bolshakov
Pages can't be both write and executable at the same time on Apple Silicon. macOS provides public API to switch write protection [1] for JIT applications, like TCG. 1. https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon Signed-off-by:

Re: [Qemu-devel] [PATCH RESEND v2 1/2] hvf: declare hvf_handle_io if NEED_CPU_H is defined

2019-04-10 Thread Roman Bolshakov
On Sun, Apr 07, 2019 at 05:28:38PM +0530, Sukrit Bhatnagar wrote: > hvf_handle_io needs the poisoned type CPUArchState as its argument. > Declaring it if NEED_CPU_H is defined enables include/sysemu/hvf.h > to be included for common object compilation as well. > Reviewed-by: Rom

Re: [Qemu-devel] [PATCH RESEND v2 2/2] cpus: move hvf_cpu_synchronize* calls to cpu_synchronize* functions

2019-04-10 Thread Roman Bolshakov
On Sun, Apr 07, 2019 at 05:28:39PM +0530, Sukrit Bhatnagar wrote: > Keep the calls made to synchronize cpu by all hypervisors in one place > inside cpu_synchronize_* functions in include/sysemu/hw_accel.h > > Cc: Richard Henderson > Cc: Paolo Bonzini > Signed-off-by: Sukrit Bhatnagar > --- > c

Re: [Qemu-devel] [PATCH RESEND v2 2/2] cpus: move hvf_cpu_synchronize* calls to cpu_synchronize* functions

2019-04-10 Thread Roman Bolshakov
On Wed, Apr 10, 2019 at 05:35:23PM +0530, Sukrit Bhatnagar wrote: > On Wed, 10 Apr 2019 at 17:20, Roman Bolshakov wrote: > > > > On Sun, Apr 07, 2019 at 05:28:39PM +0530, Sukrit Bhatnagar wrote: > > > Keep the calls made to synchronize cpu by all hypervisors i

[Qemu-devel] [Bug 1818937] Re: Crash with HV_ERROR on macOS host

2019-07-19 Thread Roman Bolshakov
I'm looking into the issue... HV_ERROR is a high-level return value and doesn't give enough details about the nature of the error. The error is returned from vmexit handler in AppleHV.kext (which implements kernel part of Hypervisor.framework). Perhaps we should extract more data from the VMCS and

[Qemu-devel] [Bug 1818937] Re: Crash with HV_ERROR on macOS host

2019-07-22 Thread Roman Bolshakov
For the triage of the issue we need the following VMCS fields: * instruction error * exit reason * exit qualification On my machine (with macOS 10.14.5) each time QEMU exits with HV_ERROR, AppleHV spills the following error into system log: 2019-07-06 10:38:56.148547+0300 0x1e3ee4 Default 0

[Qemu-devel] [Bug 1818937] Re: Crash with HV_ERROR on macOS host

2019-07-22 Thread Roman Bolshakov
The log line I've got is the following: ➜ vms ~/dev/qemu/x86_64-softmmu/qemu-system-x86_64 -accel hvf -m 2G -cdrom ~/Downloads/ubuntu-18.04.2-desktop-amd64.iso -hda ubuntu.qc ow2 qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.8001H:ECX.svm [bit 2] qemu-system-x86_

Re: [Qemu-devel] [PATCH v2 1/7] ui/cocoa: Ensure we have the iothread lock when calling into QEMU

2019-02-22 Thread Roman Bolshakov
On Thu, Feb 14, 2019 at 10:28:10AM +, Peter Maydell wrote: > The Cocoa UI should run on the main thread; this is enforced > in OSX Mojave. In order to be able to run on the main thread, > we need to make sure we hold the iothread lock whenever we > call into various QEMU UI midlayer functions.

Re: [Qemu-devel] [PATCH v2 2/7] ui/cocoa: Use the pixman image directly in switchSurface

2019-02-22 Thread Roman Bolshakov
changed, 9 insertions(+), 8 deletions(-) > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [Qemu-devel] [PATCH v2 3/7] ui/cocoa: Factor out initial menu creation

2019-02-22 Thread Roman Bolshakov
> ui/cocoa.m | 78 -- > 1 file changed, 41 insertions(+), 37 deletions(-) > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov -- Roman

Re: [Qemu-devel] [PATCH v2 4/7] ui/cocoa: Move console/device menu creation code up in file

2019-02-22 Thread Roman Bolshakov
> the next patch. > > This commit is a pure code move with no other changes. > > Signed-off-by: Peter Maydell > --- > ui/cocoa.m | 184 ++--- > 1 file changed, 92 insertions(+), 92 deletions(-) > Reviewed-by: Roman Bo

Re: [Qemu-devel] [PATCH v2 5/7] ui/cocoa: Don't call NSApp sendEvent directly from handleEvent

2019-02-22 Thread Roman Bolshakov
l); > [pool release]; > -- > 2.17.2 (Apple Git-113) > I like the patch. It makes clear that cocoa_refresh performs the work of [NSApp run]. Besides the trailing whitespace issue, Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [Qemu-devel] [PATCH v2 6/7] ui/cocoa: Subclass NSApplication so we can implement sendEvent

2019-02-22 Thread Roman Bolshakov
; Signed-off-by: Peter Maydell > --- > New patch in v2 > --- > ui/cocoa.m | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-22 Thread Roman Bolshakov
gt; @end > if (!cocoaView || ![cocoaView handleEvent:event]) { can be written as if (![cocoaView handleEvent:event]) { It's valid to send a message to nil and it will return 0/false/NO. Thank you for working on the patch series. It definitely improves UI event handling. Besides the pixman_image leak, Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Roman

Re: [Qemu-devel] [PATCH v2 1/7] ui/cocoa: Ensure we have the iothread lock when calling into QEMU

2019-02-22 Thread Roman Bolshakov
On Fri, Feb 22, 2019 at 03:41:05PM +, Peter Maydell wrote: > On Fri, 22 Feb 2019 at 15:19, Roman Bolshakov wrote: > > > > On Thu, Feb 14, 2019 at 10:28:10AM +, Peter Maydell wrote: > > > The Cocoa UI should run on the main thread; this is enforced > > > i

[Qemu-devel] [PATCH] i386: hvf: Don't miss 16-bit displacement

2019-01-25 Thread Roman Bolshakov
f '18 advent calendar. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c index 5f513c5563..9ef7d7513f 100644 --- a/target/i386/hvf/x86_decode.c ++

Re: [PATCH] configure: do not limit Hypervisor.framework test to Darwin

2020-09-17 Thread Roman Bolshakov
uot; ] ; then >cat > $TMPC << EOF > #include > int main() { return 0;} > EOF >if ! compile_object ""; then > +if test "$hvf" = "yes"; then > + error_exit "Hypervisor.framework not available" > +fi > hvf='no' >else > hvf='yes' > -QEMU_LDFLAGS="-framework Hypervisor $QEMU_LDFLAGS" >fi > fi > > -- > 2.26.2 > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

<    1   2   3   4   >