[RFC PATCH 2/5] ARM/ARM64: KVM: Forward PSCI SYSTEM_OFF and SYSTEM_RESET to user space
Marc Zyngier
marc.zyngier at arm.com
Thu Oct 17 07:13:28 EDT 2013
On 17/10/13 12:07, Anup Patel wrote:
> On Thu, Oct 17, 2013 at 2:40 PM, Peter Maydell <peter.maydell at linaro.org> wrote:
>> On 17 October 2013 09:37, Marc Zyngier <marc.zyngier at arm.com> wrote:
>>> On 16/10/13 18:02, Anup Patel wrote:
>>>> The PSCI SYSTEM_OFF and SYSTEM_RESET functions are VM or Guest level
>>>> functions hence cannot be emulated by the in-kernel PSCI emulation code.
>>>
>>> Why can't we implement system-wide functionality in the kernel? I fail
>>> to see the issue here.
>>
>> Because the kernel isn't emulating the whole board, and you need
>> to power off or reset the whole board, not just the CPUs.
>>
>>> I'm really not keen on this approach. Having part of the PSCI
>>> implementation offloaded to userspace means we don't have a complete
>>> implementation in KVM anymore, and we end-up duplicating functionality
>>> all over the place.
>>>
>>> Also, OFF and RESET are not PSCI specific concepts, and could be
>>> implemented in various ways. I'm more inclined to return a
>>> *standardized* exit code that the various platforms can interpret.
>>
>> Maybe we should have a more generic "kernel can't handle this,
>> toss it to userspace" API? That might also fit in with supporting
>> guests that want to make SMC calls to an emulated monitor...
>
> Excatly, that is what this patch does by forwarding PSCI SYSTEM_OFF
> and SYSTEM_RESET to user space (QEMU or KVMTOOL).
I think you missed the words standardized and generic above.
M.
--
Jazz is not dead. It just smells funny...
More information about the linux-arm-kernel
mailing list