On 26/01/21 14:48, Vitaly Kuznetsov wrote:
+static inline u32 to_hv_vpindex(struct kvm_vcpu *vcpu) +{ + struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu); + + return hv_vcpu ? hv_vcpu->vp_index : kvm_vcpu_get_idx(vcpu); +} +
I'd rather restrict to_* names for pointer conversions. kvm_hv_get_vpindex is a better choice here.
Paolo