Re: [RFC PATCH 18/26] kvm: arm64: Intercept PSCI_CPU_OFF host SMC calls

2020-11-05 Thread David Brazdil
Hi Marc, > > +static DEFINE_PER_CPU(hyp_spinlock_t, psci_cpu_lock); > > DEFINE_PER_CPU(enum kvm_nvhe_psci_state, psci_cpu_state); > > > > static u64 get_psci_func_id(struct kvm_cpu_context *host_ctxt) > > @@ -76,9 +79,32 @@ static __noreturn unsigned long > > psci_forward_noreturn(struct

Re: [RFC PATCH 18/26] kvm: arm64: Intercept PSCI_CPU_OFF host SMC calls

2020-11-05 Thread Marc Zyngier
On 2020-11-04 18:36, David Brazdil wrote: Add a handler of the CPU_OFF PSCI host SMC trapped in KVM nVHE hyp code. When invoked, it changes the recorded state of the core to OFF before forwarding the call to EL3. If the call fails, it changes the state back to ON and returns the error to the

[RFC PATCH 18/26] kvm: arm64: Intercept PSCI_CPU_OFF host SMC calls

2020-11-04 Thread David Brazdil
Add a handler of the CPU_OFF PSCI host SMC trapped in KVM nVHE hyp code. When invoked, it changes the recorded state of the core to OFF before forwarding the call to EL3. If the call fails, it changes the state back to ON and returns the error to the host. Signed-off-by: David Brazdil ---