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

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

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

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

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

2020-12-07 Thread Roman Bolshakov
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 command [2]

[PATCH] tpm: tpm_spapr: Remove unused tracepoint

2020-12-06 Thread Roman Bolshakov
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 - 2 files

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

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

2020-12-04 Thread Roman Bolshakov
der 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 v4 11/11] hvf: arm: Implement -cpu host

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

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 10/11] hvf: arm: Add support for GICv3

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

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 missing > it entir

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

2020-12-04 Thread Roman Bolshakov
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-effects of this so it's something w

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 03/11] hvf: Move common code out

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

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

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

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

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

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

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

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

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

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

2020-11-27 Thread Roman Bolshakov
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 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 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 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

Re: [PATCH for-6.0 0/6] Add HMP/QMP commands to query accelerator

2020-11-19 Thread Roman Bolshakov
On Thu, Nov 19, 2020 at 03:41:53PM +0100, Claudio Fontana wrote: > On 11/16/20 2:10 PM, Roman Bolshakov wrote: > > Management applications have no way to determine if certain accelerator > > is available. That complicates discovery of non-KVM accelerators. > > are we think

Re: [PATCH] hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET

2020-11-18 Thread Roman Bolshakov
if (!(cap & CPU_BASED2_RDTSCP)) { > +edx &= ~CPUID_EXT2_RDTSCP; > +} > hv_vmx_read_capability(HV_VMX_CAP_PROCBASED, ); > if (!(cap & CPU_BASED_TSC_OFFSET)) { > edx &= ~CPUID_EXT2_RDTSCP; > -- > 2.28.0 > Reviewed-by: Roman Bolshakov Thanks, Roman

Re: [PATCH] hvf: Fix segment selector format

2020-11-18 Thread Roman Bolshakov
On Wed, Nov 18, 2020 at 09:58:37AM +0100, Paolo Bonzini wrote: > On 16/11/20 21:04, Jessica Clarke wrote: > > The Requested Privilege Level field is 2 bits, the Table Indicator field > > is 1 bit and the Index field is the remaining 15 bits, with TI=0 meaning > > GDT and TI=1 meaning LDT. > > > >

Re: [PATCH] hvf: Fix segment selector format

2020-11-18 Thread Roman Bolshakov
> typedef struct x68_segment_selector { > union { > uint16_t sel; > struct { > -uint16_t rpl:3; > +uint16_t rpl:2; > uint16_t ti:1; > -uint16_t index:12; > +uint16_t index:13; > }; &g

Re: [PATCH] hvf: Fix value of MMU_PAGE_NX and add MMU_PAGE_RS

2020-11-18 Thread Roman Bolshakov
(1 << 3) > +#define MMU_PAGE_NX (1 << 4) > > bool mmu_gva_to_gpa(struct CPUState *cpu, target_ulong gva, uint64_t *gpa); > > -- > 2.28.0 > Reviewed-by: Roman Bolshakov But I agree with Paolo that eliminating HVF-only definition duplicates would be helpful. Thanks, Roman

Re: [RFC v3 4/9] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs

2020-11-18 Thread Roman Bolshakov
+ b/MAINTAINERS > @@ -443,7 +443,6 @@ M: Cameron Esfahani > M: Roman Bolshakov > W: https://wiki.qemu.org/Features/HVF > S: Maintained > -F: accel/stubs/hvf-stub.c > F: target/i386/hvf/ > F: include/sysemu/hvf.h > > -- > 2.26.2 > Reviewed-by: Roman Bolshakov Thanks, Roman

Re: [PATCH for-6.0 1/6] qapi: Add query-accel command

2020-11-18 Thread Roman Bolshakov
On Wed, Nov 18, 2020 at 02:08:21PM +0100, Markus Armbruster wrote: > Paolo Bonzini writes: > > On 18/11/20 09:36, Markus Armbruster wrote: > >> While figuring this out, I noticed that the TYPE_ACCEL instance we > >> create doesn't get its parent set. It's therefore not in the QOM > >>

Re: [PATCH for-6.0 1/6] qapi: Add query-accel command

2020-11-17 Thread Roman Bolshakov
On Tue, Nov 17, 2020 at 09:51:58AM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Mon, Nov 16, 2020 at 10:20:04AM -0600, Eric Blake wrote: > >> On 11/16/20 7:10 AM, Roman Bolshakov wrote: > >> > There's a problem for management app

Re: [PATCH for-6.0 1/6] qapi: Add query-accel command

2020-11-16 Thread Roman Bolshakov
On Mon, Nov 16, 2020 at 10:20:04AM -0600, Eric Blake wrote: > On 11/16/20 7:10 AM, Roman Bolshakov wrote: > > There's a problem for management applications to determine if certain > > accelerators available. Generic QMP command should help with that. > > > > Sig

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

2020-11-16 Thread Roman Bolshakov
'query-accel' QMP command should be used instead. Signed-off-by: Roman Bolshakov --- qapi/machine.json | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 5648d8d24d..130b0dbebc 100644 --- a/qapi/machine.json +++ b/qapi

[PATCH for-6.0 4/6] softmmu: Remove kvm_available()

2020-11-16 Thread Roman Bolshakov
The function isn't used anywhere after qmp_query_kvm() has been switched to invoke qmp_query_accel(). Signed-off-by: Roman Bolshakov --- include/sysemu/arch_init.h | 1 - softmmu/arch_init.c| 9 - 2 files changed, 10 deletions(-) diff --git a/include/sysemu/arch_init.h b

[PATCH for-6.0 5/6] hmp: Add 'info accel' command

2020-11-16 Thread Roman Bolshakov
accel hvf support: enabled (qemu) info accel kvm kvm support: not compiled (qemu) info accel tcg tcg support: disabled Signed-off-by: Roman Bolshakov --- hmp-commands-info.hx | 13 + include/monitor/hmp.h | 1 + monitor/hmp-cmds.c| 32

[PATCH for-6.0 3/6] qapi: Use qmp_query_accel() in qmp_query_kvm()

2020-11-16 Thread Roman Bolshakov
qmp_query_accel() is generic and can be used instead of open-coding qmp_query_kvm(). Signed-off-by: Roman Bolshakov --- monitor/qmp-cmds.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index f5d50afa9c..5a5f3a65f4 100644

[PATCH for-6.0 2/6] qapi: Rename KvmInfo to AccelInfo

2020-11-16 Thread Roman Bolshakov
There's nothing specific to KVM in the structure. A more generic name would be more appropriate. Signed-off-by: Roman Bolshakov --- monitor/hmp-cmds.c | 4 ++-- monitor/qmp-cmds.c | 8 qapi/machine.json | 18 +- 3 files changed, 15 insertions(+), 15 deletions

[PATCH for-6.0 1/6] qapi: Add query-accel command

2020-11-16 Thread Roman Bolshakov
There's a problem for management applications to determine if certain accelerators available. Generic QMP command should help with that. Signed-off-by: Roman Bolshakov --- monitor/qmp-cmds.c | 15 +++ qapi/machine.json | 19 +++ 2 files changed, 34 insertions

[PATCH for-6.0 0/6] Add HMP/QMP commands to query accelerator

2020-11-16 Thread Roman Bolshakov
kvm' in future. Thanks, Roman Roman Bolshakov (6): qapi: Add query-accel command qapi: Rename KvmInfo to AccelInfo qapi: Use qmp_query_accel() in qmp_query_kvm() softmmu: Remove kvm_available() hmp: Add 'info accel' command qapi: Deprecate 'query-kvm' hmp-commands-info.hx | 13

[Bug 1759333] Re: Illegal Instruction with HVF when encountering SSE instructions in the emulator

2020-11-16 Thread Roman Bolshakov
Thomas, I think the issue is there. SSE/MMX weren't yet added for 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/1759333 Title: Illegal Instruction with HVF when encountering SSE instructions

Re: [RFC PATCH 19/21] contrib/gitdm: Add Yadro to the domain map

2020-10-05 Thread Roman Bolshakov
On Sun, Oct 04, 2020 at 08:04:41PM +0200, Philippe Mathieu-Daudé wrote: > There is a number of contributions from this domain, > add its own entry to the gitdm domain map. > > Cc: Igor Kononenko > Cc: Roman Bolshakov > Signed-off-by: Philippe Mathieu-Daudé > --- > One

Re: [PATCH] configure: move cocoa option to Meson

2020-09-18 Thread Roman Bolshakov
On Wed, Sep 16, 2020 at 04:11:30AM -0400, Paolo Bonzini wrote: > While detection of the framework was already there, moving > the option allows for better error reporting. > > Reported-by: Christophe de Dinechin > Signed-off-by: Paolo Bonzini > --- > configure | 17 +++-- >

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

2020-09-17 Thread Roman Bolshakov
On Wed, Sep 16, 2020 at 04:11:31AM -0400, Paolo Bonzini wrote: > Because the target/i386/hvf/meson.build rule culls hvf support > on non-Darwin systems, a --enable-hvf build is succeeding. > To fix this, just try the compilation test every time someone > passes --enable-hvf. > > Reported-by:

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

Re: qemu panic on OSX 10.15.6

2020-09-03 Thread Roman Bolshakov
On Wed, Sep 02, 2020 at 10:17:01AM +0200, Christian Schoenebeck wrote: > On Dienstag, 1. September 2020 14:45:55 CEST David Cohen wrote: > > Hi, > > > > I'm trying to use qemu on OSX Catalina using HVF hypervisor, but it's > > currently panic'ing upon booting Linux guest. > > > > These are the

Re: [PATCH v6 12/16] cpus: add handle_interrupt to the CpusAccel interface

2020-09-01 Thread Roman Bolshakov
On Tue, Sep 01, 2020 at 09:21:57AM +0200, Claudio Fontana wrote: > kvm: uses the generic handler > qtest: uses the generic handler > whpx: changed to use the generic handler (identical implementation) > hax: changed to use the generic handler (identical implementation) > hvf: changed to use the

Re: [PATCH v6 11/16] cpus: remove checks for non-NULL cpus_accel

2020-09-01 Thread Roman Bolshakov
t; -/* accelerator already implements the CpusAccel interface */ > -cpus_accel->create_vcpu_thread(cpu); > -} else { > -g_assert_not_reached(); > -} > +/* accelerators all implement the CpusAccel interface */ > +g_assert(cpus_accel != NULL && cpus_accel->create_vcpu_thread != NULL); > +cpus_accel->create_vcpu_thread(cpu); > > while (!cpu->created) { > qemu_cond_wait(_cpu_cond, _global_mutex); > -- > 2.26.2 > Reviewed-by: Roman Bolshakov but I still find the condition (if cpus_accel->func) redundant, is it feasible to drop it? Regards, Roman

Re: [PATCH v6 13/16] hvf: remove hvf specific functions from global includes

2020-09-01 Thread Roman Bolshakov
> target/i386/hvf/hvf-cpus.h | 8 > target/i386/hvf/x86hvf.c | 2 ++ > target/i386/hvf/x86hvf.h | 1 - > 6 files changed, 10 insertions(+), 40 deletions(-) > delete mode 100644 accel/stubs/hvf-stub.c > Reviewed-by: Roman Bolshakov Thanks, Roman

Re: [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate

2020-08-26 Thread Roman Bolshakov
On Wed, Aug 26, 2020 at 07:18:15AM -0400, Eduardo Habkost wrote: > On Wed, Aug 26, 2020 at 01:22:38PM +0300, Roman Bolshakov wrote: > > On Tue, Aug 25, 2020 at 03:19:56PM -0400, Eduardo Habkost wrote: > > > git tree for this series: > > > https://github.com/ehabkost/qemu

Re: [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate

2020-08-26 Thread Roman Bolshakov
On Tue, Aug 25, 2020 at 03:19:56PM -0400, Eduardo Habkost wrote: > git tree for this series: > https://github.com/ehabkost/qemu-hacks/tree/work/qom-macros-autoconvert > Hi Eduardo, another assert fires during QEMU start: $ lldb -- $QEMU -cpu nahelem -M q35,accel=hvf -cdrom test.iso (lldb)

[PATCH v2 1/4] configure: Use discovered make for in-source build

2020-08-25 Thread Roman Bolshakov
A recursive make is invoked if in-source build is used but $(MAKE) is the same as the one used in the original make invocation. Some platforms have preference to use gmake, or a make passed as an option to "configure". Honor the choice. Signed-off-by: Roman Bolshakov --- con

[PATCH v2 4/4] configure: Test if $make actually exists

2020-08-25 Thread Roman Bolshakov
configure doesn't detect if $make is installed on the build host. This is also helpful for hosts where an alias for make is used, i.e. configure would fail if gmake is not present on macOS. Reviewed-by: Daniel P. Berrangé Signed-off-by: Roman Bolshakov --- configure | 4 1 file changed, 4

[PATCH v2 3/4] configure: Prefer gmake on darwin

2020-08-25 Thread Roman Bolshakov
New meson/make build requires GNU make 3.82+ but macOS ships 3.81 even on Big Sur while homebrew provides GNU make 4.3 as 'gmake' in $PATH. With the change, 'make' switches over to gmake implicitly. Signed-off-by: Roman Bolshakov --- configure | 26 ++ 1 file changed

[PATCH v2 0/4] Compatibility make fixes for meson

2020-08-25 Thread Roman Bolshakov
ed configure (Eric B.) - Added an empty rule for config-host.mak to avoid second call of recursive make (which happened because of implicit force rule) Roman Bolshakov (4): configure: Use discovered make for in-source build Makefile: Require GNU make 3.82+ configure: Prefer gmake on darw

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

2020-08-25 Thread Roman Bolshakov
QEMU build fails with cryptic messages if make is too old: Makefile.ninja:2655: *** multiple target patterns. Stop. To avoid the confusion it's worth to fail the build right away and print a friendly error message. Reviewed-by: Daniel P. Berrangé Signed-off-by: Roman Bolshakov

Re: [PATCH 1/4] configure: Use discovered make for in-source build

2020-08-25 Thread Roman Bolshakov
On Tue, Aug 25, 2020 at 01:07:55AM +0300, Roman Bolshakov wrote: > On Mon, Aug 24, 2020 at 09:37:07AM -0500, Eric Blake wrote: > > On 8/22/20 4:21 PM, Roman Bolshakov wrote: > > > @@ -38,6 +38,8 @@ then > > > # This file is auto-generated by configure to support in-

Re: [PATCH 3/4] configure: Prefer gmake on darwin

2020-08-25 Thread Roman Bolshakov
On Mon, Aug 24, 2020 at 04:57:31PM +0100, Peter Maydell wrote: > On Mon, 24 Aug 2020 at 15:51, Eric Blake wrote: > > > > On 8/22/20 4:21 PM, Roman Bolshakov wrote: > > > New meson/make build requires GNU make 3.82+ but macOS ships 3.81 even > > > on Big Sur whi

Re: [PATCH] meson: Don't make object files for dtrace on macOS

2020-08-25 Thread Roman Bolshakov
On Mon, Aug 24, 2020 at 03:24:31PM +0100, Daniel P. Berrangé wrote: > On Sun, Aug 23, 2020 at 12:05:47PM +0300, Roman Bolshakov wrote: > > dtrace on macOS uses unresolved symbols with a special prefix to define > > probes [1], only headers should be generated for

Re: [PATCH 1/4] configure: Use discovered make for in-source build

2020-08-24 Thread Roman Bolshakov
On Mon, Aug 24, 2020 at 09:37:07AM -0500, Eric Blake wrote: > On 8/22/20 4:21 PM, Roman Bolshakov wrote: > > @@ -38,6 +38,8 @@ then > > # This file is auto-generated by configure to support in-source tree > > # 'make' command invocation > > +include build/config-ho

Re: Suspicious QOM types without instance/class size

2020-08-24 Thread Roman Bolshakov
On Mon, Aug 24, 2020 at 12:45:52PM -0400, Eduardo Habkost wrote: > On Mon, Aug 24, 2020 at 07:41:34PM +0300, Roman Bolshakov wrote: > > On Fri, Aug 21, 2020 at 01:48:02PM -0400, Eduardo Habkost wrote: > > > Signed-off-by: Eduardo Habkost > > > --- > > > diff --

Re: Suspicious QOM types without instance/class size

2020-08-24 Thread Roman Bolshakov
On Fri, Aug 21, 2020 at 01:48:02PM -0400, Eduardo Habkost wrote: > On Fri, Aug 21, 2020 at 01:29:38PM -0400, Eduardo Habkost wrote: > > On Fri, Aug 21, 2020 at 01:53:52PM +0300, Roman Bolshakov wrote: > > > On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: &g

[PATCH] meson: Don't make object files for dtrace on macOS

2020-08-23 Thread Roman Bolshakov
://markmail.org/message/5xrxt2w5m42nojkz Cc: Daniel P. Berrangé Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- trace/meson.build | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) This is an update of the previous patch that is no longer valid due to conversion of the build

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

2020-08-22 Thread Roman Bolshakov
QEMU build fails with cryptic messages if make is too old: Makefile.ninja:2655: *** multiple target patterns. Stop. To avoid the confusion it's worth to fail the build right away and print a friendly error message. Signed-off-by: Roman Bolshakov --- Makefile | 5 + 1 file changed, 5

[PATCH 1/4] configure: Use discovered make for in-source build

2020-08-22 Thread Roman Bolshakov
A recursive make is inovked if in-source build is used but $(MAKE) is the same as the one used in the original make invocaton. Some platforms have preference to use gmake, or a make passed as an option to "configure". Honor the choice. Signed-off-by: Roman Bolshakov --- configure

[PATCH 0/4] Compatibility make fixes for meson

2020-08-22 Thread Roman Bolshakov
The set of changes addresses "Diagnose "make is too old" in configure (or in the makefile?)" from https://wiki.qemu.org/Features/Meson#Easy. It also provides cleaner backwards compatible build invocation on macOS. Roman Bolshakov (4): configure: Use discovered make

[PATCH 4/4] configure: Test if $make actually exists

2020-08-22 Thread Roman Bolshakov
configure doesn't detect if $make is installed on the build host. This is also helpful for hosts where an alias for make is used, i.e. configure would fail if gmake is not present on macOS. Signed-off-by: Roman Bolshakov --- configure | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 3/4] configure: Prefer gmake on darwin

2020-08-22 Thread Roman Bolshakov
New meson/make build requires GNU make 3.82+ but macOS ships 3.81 even on Big Sur while homebrew provides GNU make 4.3 as 'gmake' in $PATH. With the change, 'make' switches over to gmake implicitly. Signed-off-by: Roman Bolshakov --- configure | 22 ++ 1 file changed, 22

Re: [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h

2020-08-21 Thread Roman Bolshakov
hanges v1 -> v2: none > > --- > Cc: Cameron Esfahani > Cc: Roman Bolshakov > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: qemu-devel@nongnu.org > --- > include/sysemu/hvf.h | 1 + > target/i386/hvf/hvf-i386.h | 4 ++-- > 2 fi

Re: [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h

2020-08-21 Thread Roman Bolshakov
hanges v1 -> v2: none > > --- > Cc: Cameron Esfahani > Cc: Roman Bolshakov > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: qemu-devel@nongnu.org > --- > include/sysemu/hvf.h | 1 + > target/i386/hvf/hvf-i386.h | 4 ++-- > 2 fi

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Roman Bolshakov
On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: > While trying to convert TypeInfo declarations to the new > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > where instance_size or class_size is not set, despite having type > checker macros that use a specific

Re: [PATCH 13/41] hvf: Add missing include

2020-08-18 Thread Roman Bolshakov
emu/hvf.h | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Roman Bolshakov

Re: [PATCH 00/41] qom: Automated conversion of type checking boilerplate

2020-08-18 Thread Roman Bolshakov
On Thu, Aug 13, 2020 at 06:25:44PM -0400, Eduardo Habkost wrote: > This is an extension of the series previously submitted by > Daniel[1], including a script that will convert existing type > checker macros automatically. > Hi Eduardo, do you have a repo where it can be checked it out? Thanks,

Re: [PATCH v5 10/14] cpus: add handle_interrupt to the CpusAccel interface

2020-08-17 Thread Roman Bolshakov
On Fri, Aug 14, 2020 at 02:01:01PM -0700, Richard Henderson wrote: > On 8/12/20 11:32 AM, Claudio Fontana wrote: > > +static void generic_handle_interrupt(CPUState *cpu, int mask) > > +{ > > +cpu->interrupt_request |= mask; > > + > > +if (!qemu_cpu_is_self(cpu)) { > > +

Re: [PATCH v2 000/150] Meson integration for 5.2

2020-08-17 Thread Roman Bolshakov
On Mon, Aug 17, 2020 at 01:24:50PM +0200, Paolo Bonzini wrote: > On 17/08/20 13:02, Roman Bolshakov wrote: > > > > Tested-by: Roman Bolshakov > > > > On the next step, it might be good to drop configure in favor of meson > > configuration, so configure, build a

Re: [PATCH 025/150] libqemuutil, qapi, trace: convert to meson

2020-08-17 Thread Roman Bolshakov
On Fri, Aug 14, 2020 at 05:11:21AM -0400, Paolo Bonzini wrote: > This shows how to do some "computations" in meson.build using its array > and dictionary data structures, and also a basic usage of the sourceset > module for conditional compilation. > > [...] > diff --git a/trace/meson.build

Re: [PATCH v2 000/150] Meson integration for 5.2

2020-08-17 Thread Roman Bolshakov
ni/qemu branch meson-poc-next. > > Paolo > Hi Paolo, for macOS/darwin, Tested-by: Roman Bolshakov On the next step, it might be good to drop configure in favor of meson configuration, so configure, build and test commands would be similar to libvirt: meson build ninja -C build meson test -C build Thanks, Roman

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

[PATCH v4] i386: hvf: Implement CPU kick

2020-07-29 Thread Roman Bolshakov
, i.e. kicks are coalesced with interrupts. 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: Roman Bolshakov --- Hi, The version is just for r

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint

2020-07-29 Thread Roman Bolshakov
On Tue, Jul 21, 2020 at 03:06:57PM +0100, Daniel P. Berrangé wrote: > On Sat, Jul 18, 2020 at 05:58:56PM +, Zhang, Chen wrote: > > > > > > > -Original Message- > > > From: Roman Bolshakov > > > Sent: Friday, July 17, 2020 5:35 PM > >

Re: [PATCH v2 3/4] build: Don't make object files for dtrace on macOS

2020-07-24 Thread Roman Bolshakov
On Fri, Jul 17, 2020 at 12:35:16PM +0300, Roman Bolshakov wrote: > dtrace on macOS uses unresolved symbols with a special prefix to define > probes [1], only headers should be generated for USDT (dtrace(1)). But > it doesn't support backwards compatible no-op -G flag [2] and implicit >

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint

2020-07-20 Thread Roman Bolshakov
On Sat, Jul 18, 2020 at 05:58:56PM +, Zhang, Chen wrote: > > -Original Message- > > From: Roman Bolshakov > > Sent: Friday, July 17, 2020 5:35 PM > > @@ -533,12 +535,12 @@ static int colo_packet_compare_udp(Packet *spkt, > > Packet *ppkt) > >

Re: [PATCH v2 1/4] scripts/tracetool: Fix dtrace generation for macOS

2020-07-20 Thread Roman Bolshakov
On Sun, Jul 19, 2020 at 03:52:08PM +0200, Philippe Mathieu-Daudé wrote: > On 7/17/20 11:35 AM, Roman Bolshakov wrote: > > dtrace USDT is fully supported since OS X 10.6. There are a few > > peculiarities compared to other dtrace flavors. > > > > 1. It doesn't accept emp

[PATCH v2 3/4] build: Don't make object files for dtrace on macOS

2020-07-17 Thread Roman Bolshakov
://markmail.org/message/5xrxt2w5m42nojkz Reviewed-by: Daniel P. Berrangé Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov --- Makefile.objs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.objs b/Makefile.objs index d22b3b45d7..982f15ba30 100644 --- a/Makefile.objs +++ b/Makefile.objs

<    1   2   3   4   >