Re: [PATCH v3 19/23] kvm: arm64: Intercept host's CPU_ON SMCs

2020-12-01 Thread David Brazdil
Hey Sudeep, > > +static unsigned int find_cpu_id(u64 mpidr) > > +{ > > + unsigned int i; > > + > > + /* Reject invalid MPIDRs */ > > + if (mpidr & ~MPIDR_HWID_BITMASK) > > + return INVALID_CPU_ID; > > + > > + for (i = 0; i < NR_CPUS; i++) { > > I may not have understood the flow

Re: [PATCH v3 19/23] kvm: arm64: Intercept host's CPU_ON SMCs

2020-11-27 Thread Sudeep Holla
On Thu, Nov 26, 2020 at 03:54:17PM +, David Brazdil wrote: > Add a handler of the CPU_ON PSCI call from host. When invoked, it looks > up the logical CPU ID corresponding to the provided MPIDR and populates > the state struct of the target CPU with the provided x0, pc. It then > calls CPU_ON it

[PATCH v3 19/23] kvm: arm64: Intercept host's CPU_ON SMCs

2020-11-26 Thread David Brazdil
Add a handler of the CPU_ON PSCI call from host. When invoked, it looks up the logical CPU ID corresponding to the provided MPIDR and populates the state struct of the target CPU with the provided x0, pc. It then calls CPU_ON itself, with an entry point in hyp that initializes EL2 state before retu