Re: [PATCH 04/10] KVM: arm64: Introduce vcpu_sve_vq() helper

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

 



On Tue, Mar 16, 2021 at 10:13:06AM +0000, Marc Zyngier wrote:
> The KVM code contains a number of "sve_vq_from_vl(vcpu->arch.sve_max_vl)"
> instances, and we are about to add more.
> 
> Introduce vcpu_sve_vq() as a shorthand for this expression.
> 
> Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
> ---
>  arch/arm64/include/asm/kvm_host.h       | 4 +++-
>  arch/arm64/kvm/guest.c                  | 6 +++---
>  arch/arm64/kvm/hyp/include/hyp/switch.h | 2 +-
>  3 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index fb1d78299ba0..c4afe3d3397f 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -375,6 +375,8 @@ struct kvm_vcpu_arch {
>  #define vcpu_sve_pffr(vcpu) (kern_hyp_va((vcpu)->arch.sve_state) +	\
>  			     sve_ffr_offset((vcpu)->arch.sve_max_vl))
>  
> +#define vcpu_sve_vq(vcpu)	sve_vq_from_vl((vcpu)->arch.sve_max_vl)

nit: maybe vcpu_sve_max_vq() would be a better name?

Either way:

Acked-by: Will Deacon <will@xxxxxxxxxx>

Will
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux