Re: [Qemu-devel] [PATCH] char-pty: remove unnecessary #ifdef

2018-08-22 Thread Roman Bolshakov
On Wed, Aug 22, 2018 at 12:38:35PM +0200, Paolo Bonzini wrote: > For some reason __APPLE__ was not checked in pty code. However, the #ifdef > is redundant: this file is already compiled only if CONFIG_POSIX, same as > util/qemu-openpty.c which it uses. > Thanks Paolo! FWIW, qemu_openpty_raw

[Qemu-devel] [PATCH] char: Enable build of pty on macOS

2018-08-21 Thread Roman Bolshakov
For some reason __APPLE__ was not checked in pty code. pty chardev should be available on macOS, according to man page. Signed-off-by: Roman Bolshakov --- chardev/char-pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index

Re: [Qemu-devel] modern virtio on HVF

2018-10-17 Thread Roman Bolshakov
On Wed, Oct 17, 2018 at 10:47:40AM +0100, Stefan Hajnoczi wrote: > On Tue, Oct 16, 2018 at 06:27:12PM +0300, Roman Bolshakov wrote: > > > > It looks like virtio backend doesn't return 0 device status after > > vp_iowrite8 and vp_reset blocks udev: > > whi

[Qemu-devel] [PATCH] i386: hvf: Remove hvf_disabled

2018-10-18 Thread Roman Bolshakov
accel_init_machine sets *(acc->allowed) to true if acc->init_machine(ms) succeeds. There's no need to have both hvf_allowed and hvf_disabled. Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 4 ++-- target/i386/hvf/hvf.c | 9 + 2 files changed, 3 insertions(+), 10 del

[Qemu-devel] [Bug 1798451] Re: HVF linux on OSX hangs 2nd time started after adding socket

2018-10-22 Thread Roman Bolshakov
I have tried to run the OS and I can confirm that some instructions that require VMEXIT are not implemented. In your case that's 0F7F or MOVQ (mem from mmxreg) from MMX. In my case that's 0F11 or MOVUPS(xmmreg1 to mem) from SSE. I'd recommend you to run -cpu host,-mmx,-sse for a while, but the

[Qemu-devel] [PATCH] i386: hvf: Fix register refs if REX is present

2018-10-18 Thread Roman Bolshakov
is decoded as "mov %bh,(%rsi)". That caused an infinite loop in vp_reset: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03293.html Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86_decode.c | 67 target/i386/hvf/x86_decode.h | 6 +

[Qemu-devel] modern virtio on HVF

2018-10-16 Thread Roman Bolshakov
Hello dear subscribers, I'm running Linux in QEMU on macOS with hvf accel enabled and having an issue that is very similar to the KVM bug in nested KVM environments, where KVM is run under another hypervisor: https://bugs.launchpad.net/qemu/+bug/1636217 The symptomps are the same as in the bug

[Qemu-devel] [Bug 1798451] Re: HVF linux on OSX hangs 2nd time started after adding socket

2018-10-23 Thread Roman Bolshakov
Considering the fact that both Ubuntu and Elementary require SSE to boot, I'd wait to get decoding fixed. I wrote a test kernel module that reliably reproduces your issue on qemu edu device. Whenever QEMU prints Unimplemented handler Instruction pointer only moves two bytes further, instead of the

[Qemu-devel] [Bug 1798451] Re: HVF linux on OSX hangs 2nd time started after adding socket

2018-10-20 Thread Roman Bolshakov
I've had issues with multiple vcpus previously. But I've tried that recently and it worked fine with the fix: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03864.html. And I've checked your command, no issues. Could you please try to install qemu from my tap and check if it's gone?

Re: [Qemu-devel] [PATCH] char-pty: remove unnecessary #ifdef

2018-08-30 Thread Roman Bolshakov
On Wed, Aug 22, 2018 at 12:38:35PM +0200, Paolo Bonzini wrote: > For some reason __APPLE__ was not checked in pty code. However, the #ifdef > is redundant: this file is already compiled only if CONFIG_POSIX, same as > util/qemu-openpty.c which it uses. > Hi Paolo, Is it possible to apply the

Re: [Qemu-devel] [PATCH for-3.1 2/2] i386: hvf: drop debug printf in decode_sldtgroup

2018-12-12 Thread Roman Bolshakov
On Mon, Dec 03, 2018 at 01:04:15PM +0300, Roman Bolshakov wrote: > It's going to clutter QEMU logs if 0x0f00 is trapped. > > Signed-off-by: Roman Bolshakov > --- > target/i386/hvf/x86_decode.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/target/i386/hvf/x8

[Qemu-devel] [RFC 2/2] qemu-thread: Don't block SEGV, ILL and FPE

2018-12-17 Thread Roman Bolshakov
. An ability to retrieve SIGBUS via signalfd(2) is used by QEMU for memory preallocation therefore we can't unblock it without consequences. But it's important to leave a remark that the signal is lost on macOS. Signed-off-by: Roman Bolshakov --- util/qemu-thread-posix.c | 5 + 1 file changed

[Qemu-devel] [RFC 1/2] util: Implement debug-threads for macOS

2018-12-17 Thread Roman Bolshakov
macOS provides pthread_setname_np that doesn't have thread id argument. Signed-off-by: Roman Bolshakov --- configure| 32 ++-- qemu-options.hx | 4 ++-- util/qemu-thread-posix.c | 6 +- 3 files changed, 33 insertions(+), 9 deletions

[Qemu-devel] [RFC 0/2] Improve qemu-thread support on macOS

2018-12-17 Thread Roman Bolshakov
(signalfd_compat and rcu_call) are created before debug-threads=on is parsed and don't get their names though. Thank you, Roman Roman Bolshakov (2): util: Implement debug-threads for macOS qemu-thread: Don't block SEGV, ILL and FPE configure| 32 ++-- qemu

Re: [Qemu-devel] [PATCH v2] ui/cocoa: Include less of the generated modular QAPI headers

2018-12-20 Thread Roman Bolshakov
On Thu, Dec 20, 2018 at 09:45:59AM +0100, Markus Armbruster wrote: > Avoids pointless recompilation. Missed in commit 112ed241f5d. > > Signed-off-by: Markus Armbruster > --- > ui/cocoa.m | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: Ro

Re: [Qemu-devel] [RFC 41/48] configure: add --enable-plugins

2018-11-28 Thread Roman Bolshakov
On Tue, Nov 27, 2018 at 06:13:57PM -0500, Emilio G. Cota wrote: > On Tue, Nov 27, 2018 at 15:43:52 +0300, Roman Bolshakov wrote: > > ld64 on macOS has similar -exported_symbols_list option. Here's the > > reference: > > > > -exported_symbols_list filename >

Re: [Qemu-devel] [RFC 48/48] plugin: add a couple of very simple examples

2018-11-29 Thread Roman Bolshakov
On Thu, Oct 25, 2018 at 01:20:57PM -0400, Emilio G. Cota wrote: > + > +lib%.so: %.o > + $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS) The rule should be a bit different for macOS: %.bundle: %.o $(CC) -bundle -Wl,-bundle_loader,PATH_TO_QEMU_EXE -o $@ $^ $(LDLIBS) "-bundle" flag is

Re: [Qemu-devel] [RFC 41/48] configure: add --enable-plugins

2018-11-29 Thread Roman Bolshakov
On Thu, Nov 29, 2018 at 12:49:27PM -0500, Emilio G. Cota wrote: > On Thu, Nov 29, 2018 at 12:00:55 -0500, Emilio G. Cota wrote: > > On Thu, Nov 29, 2018 at 12:57:16 +0300, Roman Bolshakov wrote: > > > Hi Emilio, > > > > > > I think there's an issue with "

[Qemu-devel] [PATCH for-3.1 2/2] i386: hvf: drop debug printf in decode_sldtgroup

2018-12-03 Thread Roman Bolshakov
It's going to clutter QEMU logs if 0x0f00 is trapped. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86_decode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c index d125a6ef83..5f513c5563 100644 --- a/target/i386/hvf

[Qemu-devel] [PATCH for-3.1 1/2] i386: hvf: Fix overrun of _decode_tbl1

2018-12-03 Thread Roman Bolshakov
at it correct maximum length for _decode_tbl2 and _decode_tbl3. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86_decode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c index 2e33b69541..d125a6ef83 100644

Re: [Qemu-devel] [RFC 41/48] configure: add --enable-plugins

2018-11-29 Thread Roman Bolshakov
On Wed, Nov 28, 2018 at 12:23:32PM -0500, Emilio G. Cota wrote: > On Wed, Nov 28, 2018 at 13:43:30 +0300, Roman Bolshakov wrote: > > qemu-ga fails to link because it doesn't have symbols declared in > > qemu-plugins-ld64.symbols. Perhaps "-Wl,-exported_symbols_list" s

[Qemu-devel] [Bug 1802684] Re: QEMU gui crashes on macOS Mojave

2018-11-30 Thread Roman Bolshakov
I've tried to run two x86 guests with Cocoa display on 3.1 rc3, the GUI doesn't crash. I've tried to change screen resolution on openSUSE 15, it also works without an issue. My command line is: ./x86_64-softmmu/qemu-system-x86_64 -accel hvf -cpu host -hda /path/to/disk -m MEMORY -- You

[Qemu-devel] [Bug 1802684] Re: QEMU gui crashes on macOS Mojave

2018-11-29 Thread Roman Bolshakov
Can you try to build it without SDL/GTK support? I'm not having any issues with Cocoa display. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1802684 Title: QEMU gui crashes on macOS Mojave Status

[Qemu-devel] [PATCH] roms: seabios: Rename CROSS_COMPILE to CROSS_PREFIX

2018-11-21 Thread Roman Bolshakov
-by: Roman Bolshakov --- roms/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index f4141e1d96..a6043eff37 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -83,12 +83,12 @@ build-seabios-config-%: config.% cp $< seabios/bui

[Qemu-devel] [Bug 1798451] Re: MMX emulation is missing on HVF Acceleration

2018-11-19 Thread Roman Bolshakov
** Summary changed: - HVF linux on OSX hangs 2nd time started after adding socket + MMX emulation is missing on HVF Acceleration ** Description changed: - Robs-MacBook-Pro-2:~ robmaskell$ qemu-system-x86_64 --version QEMU emulator version 3.0.0 Host: MacOS - 10.13.6 Model Name:

Re: [Qemu-devel] [RFC 41/48] configure: add --enable-plugins

2018-11-27 Thread Roman Bolshakov
On Thu, Oct 25, 2018 at 01:20:50PM -0400, Emilio G. Cota wrote: > For now only add it for ELF platforms, since we rely on the linker's > --dynamic-list flag to pass a list of symbols to be exported to the > executable. An alternative would be to use -rdynamic, but that would > expose all of QEMU's

Re: [Qemu-devel] [PATCH] target-i386: hvf: remove MPX support

2019-01-09 Thread Roman Bolshakov
rm that as I have only Ivy Bridge and Haswell-based laptops. Reviewed-by: Roman Bolshakov Thanks, Roman

Re: [Qemu-devel] [PATCH] ui/cocoa: Include less of the generated modular QAPI headers

2018-12-19 Thread Roman Bolshakov
On Wed, Dec 19, 2018 at 10:12:48AM +0100, Markus Armbruster wrote: > Avoids pointless recompilation. Missed in commit 112ed241f5d. > > Signed-off-by: Markus Armbruster > --- > Untested; I don't have access to a Mac. > > ui/cocoa.m | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

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 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 2/7] ui/cocoa: Use the pixman image directly in switchSurface

2019-02-22 Thread Roman Bolshakov
9 insertions(+), 8 deletions(-) > 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 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 Bolshak

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 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-22 Thread Roman Bolshakov
} > @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
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 +++ b/target

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

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-27 Thread Roman Bolshakov
My guess is that RFLAGS.ZF == 1 and one or a few of the checks on VMX controls have failed. So far I have verified the following checks (26-2 and 26-3 in Intel SDM Vol. 3C): * Reserved bits in Pin-based VM execution controls are set according to associated capabilities MSR * Reserved bits in

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

2019-07-30 Thread Roman Bolshakov
During the inspection of Apple reference, I have noticed that Guest CR0 and CR0 Guest/Host Mask has incorrect value. Apple defines that Guest CR0 is writable only if: CR0.CD and CR0.NW are unset But hvf accel code follows Intel SDM "Table 9-1. IA-32 and Intel 64 Processor States Following

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

2019-07-30 Thread Roman Bolshakov
It's not possible to allocate MSR bitmap in userspace because it requires a physical address to be stored in the VMCS field. However, the bitmap page is already allocated inside kernel part of Hypervisor.framework. The 4k bitmap region is aligned to page boundary. It's worth to continue inspection

[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

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

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

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

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

2020-03-16 Thread Roman Bolshakov
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 > Cc:

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

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

2020-04-05 Thread Roman Bolshakov
A32_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

[PATCH] i386: hvf: Reset IRQ inhibition after moving RIP

2020-03-28 Thread Roman Bolshakov
locked up forever in qemu_wait_io_event() (cpu_thread_is_idle() evaluates inhibition flag and considers the CPU idle if the flag is set). Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- target/i386/hvf/vmx.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/hvf/vmx.h b

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

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

[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

[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

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

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

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

2020-05-28 Thread Roman Bolshakov
/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 to advance IP i386: hvf: Use

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

2020-05-28 Thread Roman Bolshakov
rinted 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/target/i3

[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(+), 15

[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 01/13] i386: hvf: Move HVFState definition into hvf

2020-05-28 Thread Roman Bolshakov
ded 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/include/sy

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

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

[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 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 insertions(+), 7

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

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

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

Re: [PATCH-for-5.1] net/colo: Remove unused trace event

2020-07-15 Thread Roman Bolshakov
On Wed, Jul 15, 2020 at 04:31:30PM +0200, Philippe Mathieu-Daudé wrote: > Unused trace event cause build failure when using the dtrace backend: > > "probe colo_compare_miscompare doesn't exist" > > Fixes: f4b618360e ("colo-compare: add TCP, UDP, ICMP packet com

Re: [PATCH-for-5.1] net/colo: Remove unused trace event

2020-07-15 Thread Roman Bolshakov
sn't exist" > > > > Fixes: f4b618360e ("colo-compare: add TCP, UDP, ICMP packet comparison") > > Reported-by: Roman Bolshakov > > Note Roman indicated on IRC that this is seen with dtrace on macOS and > there were other problems too. > > Unless someone knows

[Bug 1840719] Re: win98se floppy fails to boot with isapc machine

2020-08-14 Thread Roman Bolshakov
** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1840719 Title: win98se floppy fails to boot with isapc machine Status in QEMU: Fix

Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface

2020-08-11 Thread Roman Bolshakov
On Mon, Aug 03, 2020 at 11:05:27AM +0200, Claudio Fontana wrote: > The new interface starts unused, will start being used by the > next patches. > > It provides methods for each accelerator to start a vcpu, kick a vcpu, > synchronize state, get cpu virtual clock and elapsed ticks. > >

Re: [RFC v3 8/8] cpus: extract out hvf-specific code to target/i386/hvf/

2020-08-11 Thread Roman Bolshakov
/target/i386/hvf/Makefile.objs > @@ -1,2 +1,2 @@ > -obj-y += hvf.o > +obj-y += hvf.o hvf-cpus.o > obj-y += x86.o x86_cpuid.o x86_decode.o x86_descr.o x86_emu.o x86_flags.o > x86_mmu.o x86hvf.o x86_task.o > diff --git a/target/i386/hvf/hvf-cpus.c b/target/i386/hvf/hvf-cpus.c > new file mode 100644 > index 00..9540157f1e > --- /dev/null > +++ b/target/i386/hvf/hvf-cpus.c I'd prefer singular form in variables and file names. More on that in the comment to patch 2. Besides that it works fine, Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Regards, Roman

Re: [PATCH 000/147] Meson integration for 5.2

2020-08-11 Thread Roman Bolshakov
On Mon, Aug 10, 2020 at 07:06:38PM +0200, Paolo Bonzini wrote: > This version is substantially less "draft-like", and the diffstat > is actually quite large with Thursday's draft. > > The changes are as follows: > - updated oss-fuzz build script > - various cases fixed that broke depending on

Re: [PATCH 000/147] Meson integration for 5.2

2020-08-11 Thread Roman Bolshakov
On Tue, Aug 11, 2020 at 02:59:53PM +0200, Paolo Bonzini wrote: > On 11/08/20 14:04, Roman Bolshakov wrote: > > Compilation seems to partially succeed but linking of QEMU binary fails: > > > > [3691/5594] Linking target qemu-system-aarch64 > > FAILED: qemu-system-aa

[PATCH v3] i386: hvf: Implement CPU kick

2020-07-02 Thread Roman Bolshakov
e/xnu/xnu-6153.81.5/osfmk/i386/mp.c Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- This is a rework of a kick patch in v2 of the series (https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg09899.html) based on the comments from Paolo. Unfortunately the race is still there

[PATCH v2 0/9] Improve synchronization between QEMU and HVF

2020-06-30 Thread Roman Bolshakov
an old patch from Cameron that improves readibility - Moved LMA Guest Entry control sync to macvm_set_cr0() (Paolo) - Dropped hvf_vcpu_reset() and PDPTE's initialization in one patch Cameron Esfahani (1): i386: hvf: Make long mode enter and exit clearer Roman Bolshakov (8): i386: hvf: Set

[PATCH v2 2/9] i386: hvf: Move synchronize functions to sysemu

2020-06-30 Thread Roman Bolshakov
Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- cpus.c| 12 include/sysemu/hw_accel.h | 10 ++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cpus.c b/cpus.c index 41d1c5099f..d94456ed29 100644 --- a/cpus.c +++ b/cpus.c

[PATCH v2 8/9] i386: hvf: Clean up synchronize functions

2020-06-30 Thread Roman Bolshakov
Make them more concise and consitent with the rest of the code in the file and drop non-relevant TODO. Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/target

[PATCH v2 9/9] MAINTAINERS: Add Cameron as HVF co-maintainer

2020-06-30 Thread Roman Bolshakov
Similar patch was sent a while ago but got lost. While at it, add a status wiki page. Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index dec252f38b..b6d4f62ba2 100644 --- a/MAINTAINERS +++ b

[PATCH v2 5/9] i386: hvf: Make long mode enter and exit clearer

2020-06-30 Thread Roman Bolshakov
cleared. Signed-off-by: Cameron Esfahani Signed-off-by: Roman Bolshakov --- target/i386/hvf/vmx.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 1e8b29bf7d..437238f11d 100644 --- a/target/i386/hvf/vmx.h +++ b/t

[PATCH v2 4/9] i386: hvf: Implement CPU kick

2020-06-30 Thread Roman Bolshakov
used (if available) to avoid kick loss if the kick is delivered outside of hv_vcpu_run(). While at it, correct type of hvf_fd to the type of hv_vcpuid_t to avoid compilation warnings. 1. https://opensource.apple.com/source/xnu/xnu-6153.81.5/osfmk/i386/mp.c Cc: Cameron Esfahani Signed-off-by:

[PATCH v2 7/9] i386: hvf: Don't duplicate register reset

2020-06-30 Thread Roman Bolshakov
f any PDPTEs." And if PAE is used, PDPTE's are initialized from CR3 in macvm_set_cr0(). Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 1 - target/i386/cpu.c | 3 -- target/i386/hvf/hvf.c | 89 --- 3 files changed, 93

Re: [PATCH 4/8] i386: hvf: Implement CPU kick

2020-06-30 Thread Roman Bolshakov
On Mon, Jun 29, 2020 at 04:18:46PM +0200, Paolo Bonzini wrote: > On 29/06/20 16:04, Roman Bolshakov wrote: > > My approach is based > > hv_vcpu_run() and should hopefully work almost anywhere where > > Hypervisor.framework is available because Hypervisor framework ex

[PATCH v2 6/9] i386: hvf: Move Guest LMA reset to macvm_set_cr0()

2020-06-30 Thread Roman Bolshakov
2_EFER.LME = 1, according to Intel SDM "9.8.5 Initializing IA-32e Mode" and "9.8.5.4 Switching Out of IA-32e Mode Operation", otherwise the entry control can be safely cleared. Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 1 - target/i3

[PATCH v2 1/9] i386: hvf: Set env->eip in macvm_set_rip()

2020-06-30 Thread Roman Bolshakov
points to the I/O write instruction. Execution of the CPU gets stuck on the instruction. The issue can be avoided if eip doesn't contain stale value when dirty flag is set on cpu. Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- target/i386/hvf/vmx.h | 1 + 1 file changed, 1 insertion(+)

  1   2   >