Re: [PATCH kvmtool 00/21] arm64: Handle PSCI calls in userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Joey,

Thanks for the review and taking the patches for a spin.

On Wed, Jun 14, 2023 at 01:05:03PM +0100, Joey Gouly wrote:
> `kvm_cpu__configure_features` in kvmtool is failing because Linux returns an
> error if SVE was already finalised (arch/arm64/kvm/reset.c):
> 
> ```
> int kvm_arm_vcpu_finalize(struct kvm_vcpu *vcpu, int feature)
> {
>         switch (feature) {
>         case KVM_ARM_VCPU_SVE:
>                 if (!vcpu_has_sve(vcpu))
>                         return -EINVAL;
> 
>                 if (kvm_arm_vcpu_sve_finalized(vcpu))
>                         return -EPERM; // <---- returns here
> 
>                 return kvm_vcpu_finalize_sve(vcpu);
>         }
> 
>         return -EINVAL;
> }
> ```
> 
> It's not immediately obvious to me why finalising SVE twice is an error.
> Changing that to `return 0;` gets the test passing, but not sure if there
> are other implications.

This is utterly mindless on my part, apologies. The SVE feature
shouldn't be finalised (again). I'll probably drop patch 8 altogether
and replace its usage with a direct call to KVM_ARM_VCPU_INIT.

-- 
Thanks,
Oliver



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux