[PATCH 5/5] arm/arm64: KVM: Turn off vcpus and flush stage-2 pgtables on sytem exit events

Peter Maydell peter.maydell at linaro.org
Tue Dec 2 07:42:20 PST 2014


On 2 December 2014 at 15:01, Christoffer Dall
<christoffer.dall at linaro.org> wrote:
> On Thu, Nov 27, 2014 at 11:10:14PM +0000, Peter Maydell wrote:
>> Also, the clarification we want here should not I think be architecture
>> specific -- the handling of the exit system event in QEMU is in common
>> code. What you want to say is something like:
>>
>> "Valid values for 'type' are:
>>   KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the
>>    VM. Userspace is not obliged to honour this, and if it does honour
>>    this does not need to destroy the VM synchronously (ie it may call
>>    KVM_RUN again before shutdown finally occurs).
>>   KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM.
>>    As with SHUTDOWN, userspace is permitted to ignore the request, or
>>    to schedule the reset to occur in the future and may call KVM_RUN again."
>
> ok, this is pretty good, but do we need to say that userspace is
> permitted to do this or that?  The kernel never relies on user space for
> correct functionality, so do you mean 'for the run a vm semantics to
> still otherwise be functional'?

I meant "permitted" in the sense of "the kernel won't kill the VM,
return errnos to subsequent KVM_RUN requests or otherwise treat
this userspace behaviour as buggy". If you want to rephrase it
somehow I don't object, as long as the docs make it clear that
it's a valid implementation strategy for userspace to do that.

-- PMM



More information about the linux-arm-kernel mailing list