Re: [PATCH v2 4/4] KVM: PPC: Introduce new capability for 2nd DAWR
From: Paul Mackerras
Date: Tue Dec 08 2020 - 23:37:58 EST
On Tue, Nov 24, 2020 at 04:29:53PM +0530, Ravi Bangoria wrote:
> Introduce KVM_CAP_PPC_DAWR1 which can be used by Qemu to query whether
> kvm supports 2nd DAWR or not.
This should be described in Documentation/virt/kvm/api.rst.
Strictly speaking, it should be a capability which is disabled by
default, so the guest can only do the H_SET_MODE to set DAWR[X]1 if it
has been explicitly permitted to do so by userspace (QEMU). This is
because we want as little as possible of the VM configuration to come
from the host capabilities rather than from what userspace configures.
So what we really need here is for this to be a capability which can
be queried by userspace to find out if it is possible, and then
enabled by userspace if it wants. See how KVM_CAP_PPC_NESTED_HV is
handled for example.
Paul.