arm64: Query steal-time support on the VM fd

Commit 1688c26f837b ("arm64: Query per-VM capabilities when selecting
vCPU features") moved kvm_cpu__select_features()'s feature probes
(SVE, PMU, EL1_32BIT, PTRAUTH) from the system fd to the VM fd,
because vCPU feature availability is a per-VM property that the
system fd cannot reflect. kvm_cpu__setup_pvtime() still probes
KVM_CAP_STEAL_TIME with kvm__supports_extension() on the system fd;
steal-time is the same kind of per-VM capability.

The gap is user visible under pKVM: the system fd tells kvmtool
steal-time is available even for a protected VM, so kvmtool proceeds
to KVM_HAS_DEVICE_ATTR, hits the kernel's -EPERM for that VM class,
and dies in kvm_cpu__arch_init():

  Fatal: Unable to initialise vcpu

Switch to kvm__supports_vm_extension(), completing the VM-fd
conversion for the one per-VM capability probe it missed. kvmtool
then correctly takes its existing no_pvtime skip path when the VM fd
reports no support.

Signed-off-by: Fuad Tabba <tabba@google.com>
1 file changed