On Wed, 10 Feb 2021 at 22:21, Alexander Graf <ag...@csgraf.de> wrote: > > > On 28.01.21 16:52, Peter Maydell wrote: > > On Wed, 20 Jan 2021 at 22:44, Alexander Graf <ag...@csgraf.de> wrote: > >> + break; > >> + case EC_AA64_SMC: > >> + cpu_synchronize_state(cpu); > >> + if (arm_is_psci_call(arm_cpu, EXCP_SMC)) { > >> + arm_handle_psci_call(arm_cpu); > > Have you checked that all the PSCI code really can cope > > with being called from a non-TCG accelerator? (As an example > > the CPU_SUSPEND implementation calls the TCG wfi helper...) > > > I have not explicitly tried it, but I don't see why the TCG > implementation of wfi should in principle break with hvf.
Because the TCG implementation of wfi is "set some state fields and then longjump out to the TCG exec_cpu code-execution loop", and hvf doesn't use that loop. > >> + } else { > >> + DPRINTF("unknown SMC! %016llx", env->xregs[0]); > >> + env->xregs[0] = -1; > > This should inject an UNDEF exception into the guest. (Compare > > the pre_smc helper in target/arm/op_helper.c for TCG.) > > > That would break Windows, which is one of the main use cases for hvf > support in QEMU. Why is Windows making bogus SMC calls ? thanks -- PMM