Message ID | 20250220070002.1478849-1-amachhiw@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v3] KVM: PPC: Enable CAP_SPAPR_TCE_VFIO on pSeries KVM guests | expand |
On Thu, 20 Feb 2025 12:30:02 +0530, Amit Machhiwal wrote: > Currently on book3s-hv, the capability KVM_CAP_SPAPR_TCE_VFIO is only > available for KVM Guests running on PowerNV and not for the KVM guests > running on pSeries hypervisors. This prevents a pSeries L2 guest from > leveraging the in-kernel acceleration for H_PUT_TCE_INDIRECT and > H_STUFF_TCE hcalls that results in slow startup times for large memory > guests. > > [...] Applied to powerpc/next. [1/1] KVM: PPC: Enable CAP_SPAPR_TCE_VFIO on pSeries KVM guests https://git.kernel.org/powerpc/c/b4392813bbc3b05fc01a33c64d8b8c6c62c32cfa Thanks
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index ce1d91eed231..a7138eb18d59 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -543,26 +543,23 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) r = !hv_enabled; break; #ifdef CONFIG_KVM_MPIC case KVM_CAP_IRQ_MPIC: r = 1; break; #endif #ifdef CONFIG_PPC_BOOK3S_64 case KVM_CAP_SPAPR_TCE: + fallthrough; case KVM_CAP_SPAPR_TCE_64: - r = 1; - break; case KVM_CAP_SPAPR_TCE_VFIO: - r = !!cpu_has_feature(CPU_FTR_HVMODE); - break; case KVM_CAP_PPC_RTAS: case KVM_CAP_PPC_FIXUP_HCALL: case KVM_CAP_PPC_ENABLE_HCALL: #ifdef CONFIG_KVM_XICS case KVM_CAP_IRQ_XICS: #endif case KVM_CAP_PPC_GET_CPU_CHAR: r = 1; break; #ifdef CONFIG_KVM_XIVE