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 pres

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

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

2020-06-25 Thread Roman Bolshakov
On Thu, Jun 25, 2020 at 09:07:04AM +0200, Claudio Fontana wrote: > Hi Roman, > > On 6/25/20 12:58 AM, Roman Bolshakov wrote: > > HVF doesn't have a CPU kick and without it it's not possible to perform > > an action on CPU thread until a VMEXIT happens. The kic

Re: [PATCH 6/8] i386: hvf: Drop hvf_reset_vcpu()

2020-06-25 Thread Roman Bolshakov
On Thu, Jun 25, 2020 at 12:31:49PM +0200, Paolo Bonzini wrote: > On 25/06/20 00:58, Roman Bolshakov wrote: > > +uint64_t pdpte[4] = {0, 0, 0, 0}; > > +int i; > > + > > +/* Reset IA-32e mode guest (LMA) */ > > +wvmcs(cpu->hvf_fd, VMCS_ENTRY_CTL

Re: [PATCH 6/8] i386: hvf: Drop hvf_reset_vcpu()

2020-06-25 Thread Roman Bolshakov
On Thu, Jun 25, 2020 at 03:30:38PM +0200, Paolo Bonzini wrote: > On 25/06/20 14:36, Roman Bolshakov wrote: > > > > Yes, there's such a place. post-init and post-reset invoke > > hvf_put_registers() and the latter one calls hvf_put_segments(). > > hvf_put

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

2020-06-25 Thread Roman Bolshakov
On Thu, Jun 25, 2020 at 12:28:26PM +0200, Paolo Bonzini wrote: > On 25/06/20 00:58, Roman Bolshakov wrote: > > HVF doesn't have a CPU kick and without it it's not possible to perform > > an action on CPU thread until a VMEXIT happens. The kick is also needed > >

Re: [PATCH] timer: Handle decrements of PIT counter

2020-06-26 Thread Roman Bolshakov
On Tue, Jun 23, 2020 at 11:00:24PM -0400, Kevin O'Connor wrote: > On Sat, Jun 13, 2020 at 02:19:12PM +0300, Roman Bolshakov wrote: > > There's a fallback to PIT if TSC is not present but it doesn't work > > properly. It prevents boot from floppy on isapc and 48

[PATCH v2] timer: Handle decrements of PIT counter

2020-06-26 Thread Roman Bolshakov
("Unify pmtimer_read() and pittimer_read() code.") Reported-by: Philippe Mathieu-Daudé Signed-off-by: Roman Bolshakov --- Changes since v1: - Simplified change of counter direction (Kevin) src/hw/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw/

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

2020-06-29 Thread Roman Bolshakov
On Thu, Jun 25, 2020 at 08:34:14PM +0200, Paolo Bonzini wrote: > On 25/06/20 17:57, Roman Bolshakov wrote: > > So, the kick is not delivered to self and in case if destination cpu is > > not running. I think it can't interrupt subsequent hv_vcpu_run. > > Yes. > >

Re: [PATCH 6/8] i386: hvf: Drop hvf_reset_vcpu()

2020-06-29 Thread Roman Bolshakov
On Thu, Jun 25, 2020 at 03:30:38PM +0200, Paolo Bonzini wrote: > On 25/06/20 14:36, Roman Bolshakov wrote: > > I don't know any alternative for PDPTE and VMCS Entry Controls in > > CPUX86State, that's why I left explicit reset of the VMCS fields in > > post-reset.

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

2020-06-29 Thread Roman Bolshakov
On Mon, Jun 29, 2020 at 03:03:20PM +0200, Paolo Bonzini wrote: > On 29/06/20 13:31, Roman Bolshakov wrote: > > I implemented what you proposed using VMX-preemption timer in Pin-based > > controls and regular hv_vcpu_run(). It works fine without noticable > > regressions,

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

2020-06-29 Thread Roman Bolshakov
On Mon, Jun 29, 2020 at 03:35:16PM +0200, Paolo Bonzini wrote: > On 29/06/20 15:29, Roman Bolshakov wrote: > >>> macOS 11.0 Beta deprecated hv_vcpu_run() and introduced a special > >>> declaration for hv_vcpu_run_until(), that's not available 10.15 - > >>&g

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 0/9] Improve synchronization between QEMU and HVF

2020-06-30 Thread Roman Bolshakov
Added 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

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

[PATCH v2 3/9] i386: hvf: Add hvf_cpu_synchronize_pre_loadvm()

2020-06-30 Thread Roman Bolshakov
hvf lacks an implementation of cpu_synchronize_pre_loadvm(). Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h | 1 + include/sysemu/hw_accel.h | 3 +++ target/i386/hvf/hvf.c | 11 +++ 3 files changed, 15 insertions(+) diff --git a/include/sysemu

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

2020-06-30 Thread Roman Bolshakov
the validity of 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 ---

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

2020-06-30 Thread Roman Bolshakov
ared. 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
mption timer is 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

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

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

2020-06-30 Thread Roman Bolshakov
On Tue, Jun 30, 2020 at 02:33:42PM +0200, Paolo Bonzini wrote: > On 30/06/20 12:28, Roman Bolshakov wrote: > > @@ -966,6 +964,20 @@ int hvf_vcpu_exec(CPUState *cpu) > > return ret; > > } > > > > +void hvf_vcpu_kick(CPUState *cpu) > > +{

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

2020-07-01 Thread Roman Bolshakov
On Tue, Jun 30, 2020 at 06:04:23PM +0200, Paolo Bonzini wrote: > On 30/06/20 17:50, Roman Bolshakov wrote: > > On Tue, Jun 30, 2020 at 02:33:42PM +0200, Paolo Bonzini wrote: > >> Can a signal interrupt hv_vcpu_run? If so you actually don't need > >> hv_vcpu_int

Re: [PATCH] target/i386: implement undocumented "smsw r32" behavior

2020-07-02 Thread Roman Bolshakov
or. > > Signed-off-by: Paolo Bonzini Hi Paolo, It seems to be a follow-up to the kvm-unit-tests patch: https://patchwork.kernel.org/patch/11590445/ Could you please add: Reported-by: Roman Bolshakov > --- > target/i386/translate.c | 13 +++-- > 1 file changed, 7 insertio

[PATCH v3] i386: hvf: Implement CPU kick

2020-07-02 Thread Roman Bolshakov
https://opensource.apple.com/source/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. Unfortuna

Re: [PATCH v3 for-6.0 2/2] tcg: Workaround macOS 11.2 mprotect bug

2021-03-22 Thread Roman Bolshakov
mprotect > > + * rejects a permission change from RWX -> NONE. Guard pages are > > + * nice for bug detection but are not essential; ignore any > > failure. > > + */ > > +(void)qemu_mprotect_none(end, page_size); > > } > > > > tcg_region_trees_init(); > > > I agree with Philippe, it's worth to keep the bug detection on non-buggy platforms. Otherwise: Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v3 for-6.0 1/2] tcg: Do not set guard pages on the rx portion of code_gen_buffer

2021-03-22 Thread Roman Bolshakov
guards pages for rx on all platforms except darwin? (that would make it similar to what Philippe proposed in the comments to patch 2). - What does mean that rx might be covered by huge pages? (perhaps I'm missing some context) Otherwise, Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov BR, Roman

[Bug 1914849] Re: mprotect fails after MacOS 11.2 on arm mac

2021-04-14 Thread Roman Bolshakov
** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1914849 Title: mprotect fails after MacOS 11.2 on arm mac Status in QEMU: Fix Committe

Re: [PATCH v2 00/29] tcg: Workaround macOS 11.2 mprotect bug

2021-03-15 Thread Roman Bolshakov
gt; Hi Richard, Thanks for doing the changes! I'm not sure if I'll find enough time for thorough review but the series helps qemu on Big Sur 11.2.3, so: Tested-by: Roman Bolshakov Regards, Roman > r~ > > > Richard Henderson (29): > meson: Split out tcg/meson.bu

Re: [PATCH v2 02/29] meson: Split out fpu/meson.build

2021-03-15 Thread Roman Bolshakov
On Sun, Mar 14, 2021 at 03:26:57PM -0600, Richard Henderson wrote: > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- Reviewed-by: Roman Bolshakov Thanks, Roman > meson.build | 4 +--- > fpu/meson.build | 1 + > 2 files changed, 2 insertio

Re: [PATCH v2 01/29] meson: Split out tcg/meson.build

2021-03-15 Thread Roman Bolshakov
On Sun, Mar 14, 2021 at 03:26:56PM -0600, Richard Henderson wrote: > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- Reviewed-by: Roman Bolshakov Thanks, Roman > meson.build | 9 ++--- > tcg/meson.build | 13 + > 2

Re: [PATCH v2 03/29] tcg: Re-order tcg_region_init vs tcg_prologue_init

2021-03-15 Thread Roman Bolshakov
On Sun, Mar 14, 2021 at 03:26:58PM -0600, Richard Henderson wrote: > Instead of delaying tcg_region_init until after tcg_prologue_init > is complete, do tcg_region_init first and let tcg_prologue_init > shrink the first region by the size of the generated prologue. > > Signed-off-by: Richard Hende

Re: [PATCH 2/2] cirrus.yml: Update the FreeBSD task to version 12.2

2021-03-17 Thread Roman Bolshakov
On Wed, Mar 17, 2021 at 01:44:05PM +0100, Thomas Huth wrote: > On 17/03/2021 12.16, Peter Maydell wrote: > > On Wed, 17 Mar 2021 at 11:09, Thomas Huth wrote: > > > > > > FreeBSD version 12.1 is out of service now, and the task in the > > > Cirrus-CI is failing. Update to 12.2 to get it working ag

Re: [PATCH v2] FreeBSD: Upgrade to 12.2 release

2021-03-08 Thread Roman Bolshakov
> 8 марта 2021 г., в 18:41, Thomas Huth написал(а): > > On 08/03/2021 16.26, Warner Losh wrote: >> On Mon, Mar 8, 2021 at 6:30 AM Thomas Huth > > wrote: >>On 07/03/2021 16.56, Warner Losh wrote: >> > FreeBSD 12.1 has reached end of life. Use 12.2 instead so that

Re: [PATCH] util/osdep: Avoid mprotect() RWX->NONE on Big Sur 11.2

2021-03-09 Thread Roman Bolshakov
On Sun, Mar 07, 2021 at 10:47:06PM -0800, Joelle van Dyne wrote: > On Wed, Feb 10, 2021 at 2:55 AM Roman Bolshakov wrote: > > > > There's a change in mprotect() behaviour [1] in the latest macOS on M1 > > and it's not yet clear if it's going to be fixe

Re: [PATCH v4] net/macos: implement vmnet-based netdev

2021-02-23 Thread Roman Bolshakov
On Thu, Feb 18, 2021 at 02:49:47PM +0100, phillip.en...@gmail.com wrote: > From: Phillip Tennen > > This patch implements a new netdev device, reachable via -netdev > vmnet-macos, that’s backed by macOS’s vmnet framework. > > The vmnet framework provides native bridging support, and its usage in

Re: [PATCH v4] tcg: Toggle page execution for Apple Silicon

2021-01-23 Thread Roman Bolshakov
On Thu, Jan 21, 2021 at 08:47:52AM -1000, Richard Henderson wrote: > From: 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 T

Re: [PATCH v4] tcg: Toggle page execution for Apple Silicon

2021-01-23 Thread Roman Bolshakov
On Sat, Jan 23, 2021 at 02:53:49PM +0300, Roman Bolshakov wrote: > On Thu, Jan 21, 2021 at 08:47:52AM -1000, Richard Henderson wrote: > > From: Roman Bolshakov > > > > Pages can't be both write and executable at the same time on Apple > > Silicon. macOS pro

Re: [PATCH v4] tcg: Toggle page execution for Apple Silicon

2021-01-23 Thread Roman Bolshakov
On Sat, Jan 23, 2021 at 07:33:37PM +0100, BALATON Zoltan wrote: > On Sat, 23 Jan 2021, Roman Bolshakov wrote: > > On Sat, Jan 23, 2021 at 02:53:49PM +0300, Roman Bolshakov wrote: > > > On Thu, Jan 21, 2021 at 08:47:52AM -1000, Richard Henderson wrote: > > &

[Bug 1912065] Re: Segfaults in tcg/optimize.c:212 after commit 7c79721606be11b5bc556449e5bcbc331ef6867d

2021-01-23 Thread Roman Bolshakov
Richard, thanks for providing the workaround. It helps. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1912065 Title: Segfaults in tcg/optimize.c:212 after commit 7c79721606be11b5bc556449e5bcbc331

Re: [PULL v2 10/10] tcg: Restart code generation when we run out of temps

2021-01-25 Thread Roman Bolshakov
tcg_debug_assert(n < TCG_MAX_TEMPS); > + > +if (n >= TCG_MAX_TEMPS) { > +/* Signal overflow, starting over with fewer guest insns. */ > +siglongjmp(s->jmp_trans, -2); > +} > return memset(&s->temps[n], 0, sizeof(TCGTemp)); > } > > -s

[Bug 1909256] Re: compile failure if gnutls headers not on default include path

2021-01-25 Thread Roman Bolshakov
The fix is committed in 3eacf70bb5a8. ** Changed in: qemu Status: New => Fix Committed ** 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.

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

2021-01-28 Thread Roman Bolshakov
On Thu, Jan 28, 2021 at 04:59:47PM +, Peter Maydell wrote: > On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: > > > > Now that Apple Silicon is widely available, people are obviously excited > > to try and run virtualized workloads on them, such as Linux and Windows. > > > > This patch set

Re: macOS (Big Sur, Apple Silicon) 'make check' fails in test-crypto-tlscredsx509

2021-01-29 Thread Roman Bolshakov
On Wed, Jan 27, 2021 at 06:59:17PM +, Daniel P. Berrangé wrote: > On Wed, Jan 27, 2021 at 07:56:16PM +0100, Stefan Weil wrote: > > Am 27.01.21 um 19:17 schrieb Daniel P. Berrangé: > > > > > On Wed, Jan 27, 2021 at 06:05:08PM +0100, Stefan Weil wrote: > > > > Am 27.01.21 um 17:53 schrieb Daniel

libtasn1 test suite fails on macOS Bug Sur with Apple Silicon

2021-01-29 Thread Roman Bolshakov
Hello, I'm seeing the test failures on macOS and there's a concern that the behaviour might affect GnuTLS and ultimately QEMU test suite. Are there any ideas of what might be causing it? Any help is appreciated. Thanks, Roman === GNU Libtasn1 4.16.

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

2021-01-29 Thread Roman Bolshakov
On Fri, Jan 29, 2021 at 10:18:58AM -1000, Richard Henderson wrote: > On 1/21/21 8:34 AM, Richard Henderson wrote: > > On 1/12/21 5:28 PM, Roman Bolshakov wrote: > >> @@ -1083,6 +1083,12 @@ static bool alloc_code_gen_buffer_anon(size_t size, > >> int prot,

Re: macOS (Big Sur, Apple Silicon) 'make check' fails in test-crypto-tlscredsx509

2021-02-01 Thread Roman Bolshakov
On Fri, Jan 29, 2021 at 09:53:27AM +, Daniel P. Berrangé wrote: > On Fri, Jan 29, 2021 at 11:43:32AM +0300, Roman Bolshakov wrote: > > On Wed, Jan 27, 2021 at 06:59:17PM +, Daniel P. Berrangé wrote: > > > On Wed, Jan 27, 2021 at 07:56:16PM +0100, Stefan Weil wrote: >

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

2021-02-02 Thread Roman Bolshakov
On Fri, Jan 29, 2021 at 07:27:57PM -1000, Richard Henderson wrote: > On 1/29/21 10:50 AM, Roman Bolshakov wrote: > > > > I thought you already added MAP_JIT in 6f70ddee19e. It's getting enabled > > on my M1 laptop. Was it intended or not? > > > > /* A

Re: macOS (Big Sur, Apple Silicon) 'make check' fails in test-crypto-tlscredsx509

2021-02-03 Thread Roman Bolshakov
On Tue, Feb 02, 2021 at 08:50:24AM -0600, Eric Blake wrote: > On 2/1/21 11:19 PM, Roman Bolshakov wrote: > > > After a session of debugging I believe there's an issue with Clang 12. > > Here's a test program (it reproduces unexpected ASN1_VALUE_NOT_VALID > >

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

2021-02-04 Thread Roman Bolshakov
| 96 ++- > 1 file changed, 95 insertions(+), 1 deletion(-) > I'd prefer to have generic expose-accel option for CPU and vmware-cpuid-freq=on would depend on expose-accel=on. Regardless of that, Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

[Bug 1914849] Re: mprotect fails after MacOS 11.2 on arm mac

2021-02-06 Thread Roman Bolshakov
Thanks for submitting the ticket. I've just stumbled upon it after updating to 11.2. The question was already asked on apple developer forums: https://developer.apple.com/forums/thread/672804 And there's a thread going on with regard to broken nodejs on 11.2: https://github.com/nodejs/node/issues

[Bug 1914849] Re: mprotect fails after MacOS 11.2 on arm mac

2021-02-08 Thread Roman Bolshakov
The patch can be used as a workaround for now: diff --git a/util/osdep.c b/util/osdep.c index 66d01b9160..76be8c295b 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -110,6 +110,9 @@ int qemu_mprotect_none(void *addr, size_t size) { #ifdef _WIN32 return qemu_mprotect__osdep(addr, size, PAGE_N

Re: [PATCH v6 02/11] hvf: x86: Remove unused definitions

2021-02-09 Thread Roman Bolshakov
On Wed, Jan 20, 2021 at 11:44:35PM +0100, Alexander Graf wrote: > The hvf i386 has a few struct and cpp definitions that are never > used. Remove them. > > Suggested-by: Roman Bolshakov > Signed-off-by: Alexander Graf > Reviewed-by: Roman Bolshakov > Tested-by: Roman Bol

Re: [PATCH] hvf: Fetch cr4 before evaluating CPUID(1)

2021-02-09 Thread Roman Bolshakov
On Sat, Jan 23, 2021 at 01:41:29AM +0100, Alexander Graf wrote: > The CPUID function 1 has a bit called OSXSAVE which tells user space the > status of the CR4.OSXSAVE bit. Our generic CPUID function injects that bit > based on the status of CR4. > > With Hypervisor.framework, we do not synchronize

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

2021-02-09 Thread Roman Bolshakov
On Fri, Jan 22, 2021 at 06:05:18PM +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] target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT

2021-02-09 Thread Roman Bolshakov
On Wed, Jan 13, 2021 at 11:53:23PM +0300, yaroshchuk2...@gmail.com wrote: > From: Vladislav Yaroshchuk > > Some guests (ex. Darwin-XNU) can attemp to read this MSR to retrieve and > validate CPU topology comparing it to ACPI MADT content > > MSR description from Intel Manual: > 35H: MSR_CORE_THR

[PULL hvf 2/5] target/i386/hvf: add vmware-cpuid-freq cpu feature

2021-02-09 Thread Roman Bolshakov
not exposes HVF leaving hypervisor signature empty Signed-off-by: Vladislav Yaroshchuk Message-Id: <20210122150518.3551-1-yaroshchuk2...@gmail.com> Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 96 ++- 1 file changed, 95 insertions

[PULL hvf 0/5] HVF updates for 2021-02-09

2021-02-09 Thread Roman Bolshakov
Hi Paolo, Please apply the PR to i386 queue (not for master). It contains bug fixes, cleanups and improvements for HVF accel: - Added support of older HW (Hill) - Fixed OSXSAVE reporting in CPUID (Alex) - Improved Darwin-XNU support (Vladislav) - dead code removed (Alex) Test results: https:/

[PULL hvf 1/5] hvf: Guard xgetbv call

2021-02-09 Thread Roman Bolshakov
From: Hill Ma This prevents illegal instruction on cpus that do not support xgetbv. Buglink: https://bugs.launchpad.net/qemu/+bug/1758819 Reviewed-by: Cameron Esfahani Signed-off-by: Hill Ma Message-Id: Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86_cpuid.c | 34

[PULL hvf 3/5] hvf: x86: Remove unused definitions

2021-02-09 Thread Roman Bolshakov
From: Alexander Graf The hvf i386 has a few struct and cpp definitions that are never used. Remove them. Suggested-by: Roman Bolshakov Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alexander Graf Message-Id: <2021012022.71840-3-ag...@csgraf.de> Signed-off-by: Roman Bol

[PULL hvf 4/5] target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT

2021-02-09 Thread Roman Bolshakov
: <20210113205323.33310-1-yaroshchuk2...@gmail.com> [RB: reordered MSR definition and dropped u suffix from shift offset] Signed-off-by: Roman Bolshakov --- target/i386/cpu.h | 1 + target/i386/hvf/x86_emu.c | 5 + 2 files changed, 6 insertions(+) diff --git a/target/i386/cpu.h b/targe

[PULL hvf 5/5] hvf: Fetch cr4 before evaluating CPUID(1)

2021-02-09 Thread Roman Bolshakov
364-1-ag...@csgraf.de> [RB: resolved conflict with another CPUID change] Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 5a8914564b..d2fb680058 100644 --- a/target/i386/hvf/hvf.c +++ b/

[PATCH] util/osdep: Avoid mprotect() RWX->NONE on Big Sur 11.2

2021-02-10 Thread Roman Bolshakov
8a191f Buglink: https://bugs.launchpad.net/qemu/+bug/1914849 Apple-Feedback: FB8994773 Signed-off-by: Roman Bolshakov --- util/osdep.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/osdep.c b/util/osdep.c index 66d01b9160..1edd7b1caf 100644 --- a/util/osdep.c +++ b/util/osdep.c @@

[Bug 1913505] Re: Windows XP slow on Apple M1

2021-02-10 Thread Roman Bolshakov
@John please build from master and apply the patch https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg03527.html ** Tags added: macos tcg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1913505

Re: [PATCH v16 01/23] cpu: Introduce TCGCpuOperations struct

2021-02-10 Thread Roman Bolshakov
On Thu, Feb 04, 2021 at 05:39:09PM +0100, Claudio Fontana wrote: > From: Eduardo Habkost > > The TCG-specific CPU methods will be moved to a separate struct, > to make it easier to move accel-specific code outside generic CPU > code in the future. Start by moving tcg_initialize(). > > The new C

Re: [PATCH v16 02/23] target/riscv: remove CONFIG_TCG, as it is always TCG

2021-02-10 Thread Roman Bolshakov
On Thu, Feb 04, 2021 at 05:39:10PM +0100, Claudio Fontana wrote: > for now only TCG is allowed as an accelerator for riscv, > so remove the CONFIG_TCG use. > > Signed-off-by: Claudio Fontana > Reviewed-by: Alistair Francis > Reviewed-by: Alex Bennée > --- > target/riscv/cpu.c | 3 +-- > 1 file

Re: [PATCH v16 01/23] cpu: Introduce TCGCpuOperations struct

2021-02-10 Thread Roman Bolshakov
On Wed, Feb 10, 2021 at 07:32:55AM -0500, Eduardo Habkost wrote: > On Wed, Feb 10, 2021 at 03:21:51PM +0300, Roman Bolshakov wrote: > > On Thu, Feb 04, 2021 at 05:39:09PM +0100, Claudio Fontana wrote: > > > From: Eduardo Habkost > > > > > > The TCG-spe

Re: [PATCH v3 01/10] hvf: Add hypervisor entitlement to output binaries

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:03:59PM +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 v3 02/10] hvf: Move common code out

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:00PM +0100, Alexander Graf wrote: > Until now, Hypervisor.framework has only been available on x86_64 systems. > With Apple Silicon shipping now, it extends its reach to aarch64. To > prepare for support for multiple architectures, let's move common code out > into its

Re: [PATCH v3 03/10] hvf: Introduce hvf vcpu struct

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:01PM +0100, Alexander Graf wrote: > We will need more than a single field for hvf going forward. To keep > the global vcpu struct uncluttered, let's allocate a special hvf vcpu > struct, similar to how hax does it. > Reviewed-by: Roman Bolshakov

Re: [PATCH v3 04/10] arm: Set PSCI to 0.2 for HVF

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:02PM +0100, Alexander Graf wrote: > In Hypervisor.framework, we just pass PSCI calls straight on to the QEMU > emulation > of it. That means, if TCG is compatible with PSCI 0.2, so are we. Let's > transpose > that fact in code too. > > Signed-off-by: Alexander Graf

Re: [PATCH v3 05/10] hvf: arm: Mark CPU as dirty on reset

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:03PM +0100, Alexander Graf wrote: > When clearing internal state of a CPU, we should also make sure that HVF > knows about it and can push the new values down to vcpu state. > I'm sorry if I'm asking something dumb. But isn't cpu_synchronize_all_post_reset() is suppo

Re: [PATCH v3 06/10] hvf: Add Apple Silicon support

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:04PM +0100, Alexander Graf wrote: > With Apple Silicon available to the masses, it's a good time to add support > for driving its virtualization extensions from QEMU. > > This patch adds all necessary architecture specific code to get basic VMs > working. It's still p

Re: [PATCH v3 07/10] arm: Add Hypervisor.framework build target

2020-12-02 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:05PM +0100, Alexander Graf wrote: > Now that we have all logic in place that we need to handle > Hypervisor.framework > on Apple Silicon systems, let's add CONFIG_HVF for aarch64 as well so that we > can build it. > > Signed-off-by: Alexander Graf > > --- > > v1 -

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

2020-12-03 Thread Roman Bolshakov
On Mon, Nov 30, 2020 at 04:00:11PM -0800, Peter Collingbourne wrote: > On Mon, Nov 30, 2020 at 3:18 PM Alexander Graf wrote: > > > > > > On 01.12.20 00:01, Peter Collingbourne wrote: > > > On Mon, Nov 30, 2020 at 1:40 PM Alexander Graf wrote: > > >> Hi Peter, > > >> > > >> On 30.11.20 22:08, Pete

Re: [PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-03 Thread Roman Bolshakov
On Tue, Dec 01, 2020 at 10:59:50AM -0800, Peter Collingbourne wrote: > On Tue, Dec 1, 2020 at 3:16 AM Alexander Graf wrote: > > > > Hi Peter, > > > > On 01.12.20 09:21, Peter Collingbourne wrote: > > > Sleep on WFx until the VTIMER is due but allow ourselves to be woken > > > up on IPI. > > > > >

Re: [PATCH v3 08/10] arm/hvf: Add a WFI handler

2020-12-03 Thread Roman Bolshakov
On Wed, Dec 02, 2020 at 08:04:06PM +0100, Alexander Graf wrote: > From: Peter Collingbourne > > Sleep on WFI until the VTIMER is due but allow ourselves to be woken > up on IPI. > > Signed-off-by: Peter Collingbourne > [agraf: Remove unused 'set' variable, always advance PC on WFX trap] > Signe

Re: [PATCH v3 05/10] hvf: arm: Mark CPU as dirty on reset

2020-12-03 Thread Roman Bolshakov
On Thu, Dec 03, 2020 at 11:55:17AM +0100, Alexander Graf wrote: > > On 03.12.20 02:52, Roman Bolshakov wrote: > > On Wed, Dec 02, 2020 at 08:04:03PM +0100, Alexander Graf wrote: > > > When clearing internal state of a CPU, we should also make sure that HVF > > > k

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

2020-12-03 Thread Roman Bolshakov
On Thu, Dec 03, 2020 at 11:13:35PM +0100, Alexander Graf wrote: > > On 03.12.20 19:42, Peter Collingbourne wrote: > > On Thu, Dec 3, 2020 at 1:41 AM Roman Bolshakov > > wrote: > > > On Mon, Nov 30, 2020 at 04:00:11PM -0800, Peter Collingbourne wrote: > >

Re: [PATCH v4 01/11] hvf: Add hypervisor entitlement to output binaries

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:47AM +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. > Reviewed-by: Rom

Re: [PATCH v4 02/11] hvf: x86: Remove unused definitions

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:48AM +0100, Alexander Graf wrote: > The hvf i386 has a few struct and cpp definitions that are never > used. Remove them. > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v4 03/11] hvf: Move common code out

2020-12-04 Thread Roman Bolshakov
ode out > into its own accel directory. > Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v4 05/11] arm: Set PSCI to 0.2 for HVF

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:51AM +0100, Alexander Graf wrote: > In Hypervisor.framework, we just pass PSCI calls straight on to the QEMU > emulation > of it. That means, if TCG is compatible with PSCI 0.2, so are we. Let's > transpose > that fact in code too. > Reviewed-by: Roman Bolshakov

Re: [PATCH v4 06/11] hvf: Simplify post reset/init/loadvm hooks

2020-12-04 Thread Roman Bolshakov
#x27;d be good if Paolo or Eduardo would also peek at this change because it makes HVF a bit different from other accels. HVF's post_reset, post_init and pre_loadvm no longer result into QEMU state being pushed to HVF. I'm not sure I can fully grasp if there're undesired side-effec

Re: [PATCH v4 09/11] arm/hvf: Add a WFI handler

2020-12-04 Thread Roman Bolshakov
to atomically unblock the signal and begin sleeping. > The signal is sent unconditionally so there's no need to worry about > races between actually sleeping and the "we think we're sleeping" > state. It may lead to an extra wakeup but that's better than missin

Re: [PATCH v4 10/11] hvf: arm: Add support for GICv3

2020-12-04 Thread Roman Bolshakov
ers, so that > we can run with more than 8 vCPUs. > Acked-by: Roman Bolshakov Thanks, Roman

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

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:46AM +0100, Alexander Graf wrote: > Now that Apple Silicon is widely available, people are obviously excited > to try and run virtualized workloads on them, such as Linux and Windows. > > This patch set implements a fully functional version to get the ball > going on

Re: [PATCH v4 08/11] arm: Add Hypervisor.framework build target

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:54AM +0100, Alexander Graf wrote: > Now that we have all logic in place that we need to handle > Hypervisor.framework > on Apple Silicon systems, let's add CONFIG_HVF for aarch64 as well so that we > can build it. > Reviewed-by: Roman Bolshako

Re: [PATCH v4 11/11] hvf: arm: Implement -cpu host

2020-12-04 Thread Roman Bolshakov
27;s add a -cpu host option that allows them to explicitly pass all > CPU capabilities of their host CPU into the guest. > Acked-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v4 07/11] hvf: Add Apple Silicon support

2020-12-04 Thread Roman Bolshakov
by: Alexander Graf > For non-ARM specific bits, Reviewed-by: Roman Bolshakov Can't set Tested-by because I have no ARM machine yet, but x86 build/execution is fine on Catalina and Big Sur :) Thanks, Roman

Re: [PATCH v3 08/10] arm/hvf: Add a WFI handler

2020-12-04 Thread Roman Bolshakov
On Thu, Dec 03, 2020 at 10:18:14AM -0800, Peter Collingbourne wrote: > On Thu, Dec 3, 2020 at 2:39 AM Roman Bolshakov wrote: > > > > On Wed, Dec 02, 2020 at 08:04:06PM +0100, Alexander Graf wrote: > > > From: Peter Collingbourne > > > > > > Slee

[PATCH] tpm: tpm_spapr: Remove unused tracepoint

2020-12-06 Thread Roman Bolshakov
d probe to tracepoint"). In short, is-enabled probe can't be used without a matching trace probe. And for this particular case tpm_util_show_buffer probe should be enabled to print TPM buffer. Signed-off-by: Roman Bolshakov --- hw/tpm/tpm_spapr.c | 8 ++-- hw/tpm/trace-events | 1 -

[PATCH for-6.0] accel: Wire accel to /machine

2020-12-07 Thread Roman Bolshakov
Suggested-by: Markus Armbruster Suggested-by: Paolo Bonzini Signed-off-by: Roman Bolshakov --- Hi, this is a follow up patch that deprecates earlier series [1]. An outstanding issue is whether management applications can rely on the value of /machine/accel/type and output of qom-list-types c

Re: [PATCH for-6.0] accel: Wire accel to /machine

2020-12-07 Thread Roman Bolshakov
On Mon, Dec 07, 2020 at 05:44:19PM +, Daniel P. Berrangé wrote: > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote: > > An outstanding issue is whether management applications can rely on the > > value of /machine/accel/type and output of qom-list-types command [2

Re: [PATCH for-6.0] accel: Wire accel to /machine

2020-12-08 Thread Roman Bolshakov
On Mon, Dec 07, 2020 at 12:38:49PM -0500, Eduardo Habkost wrote: > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote: > > There's no generic way to query current accel and its properties via QOM > > because there's no link between an accel and current mac

Re: [PATCH for-6.0] accel: Wire accel to /machine

2020-12-08 Thread Roman Bolshakov
On Mon, Dec 07, 2020 at 06:50:07PM +0100, Peter Krempa wrote: > On Mon, Dec 07, 2020 at 12:38:49 -0500, Eduardo Habkost wrote: > > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote: > > > There's no generic way to query current accel and its properties via QO

Re: [PATCH v2 2/4] Makefile: Require GNU make 3.82+

2020-12-14 Thread Roman Bolshakov
On Sun, Dec 13, 2020 at 11:56:22PM +0100, Laurent Vivier wrote: > Le 13/12/2020 à 20:04, Peter Maydell a écrit : > > On Sun, 13 Dec 2020 at 17:22, Laurent Vivier wrote: > >> > >> Le 12/10/2020 à 11:47, Thomas Huth a écrit : > >>> On 25/08/2020 22.27, Roman B

Re: [PATCH v2 0/6] arch_init.c cleanup

2020-11-25 Thread Roman Bolshakov
On Wed, Nov 25, 2020 at 03:56:30PM -0500, Eduardo Habkost wrote: > This series gets rid of most of the code in arch_init.c. It > moves the QEMU_ARCH macro definitions to corresponding cpu.h > files, and gets rid of kvm_available() and xen_available(). > For the series: Review

<    1   2   3   4   >