Re: [PATCH v4 2/4] KVM: SVM: Use unsigned integers when dealing with ASIDs

From: Sean Christopherson
Date: Thu Feb 01 2024 - 12:02:28 EST


On Thu, Feb 01, 2024, Tom Lendacky wrote:
> On 1/31/24 17:56, Sean Christopherson wrote:
> > @@ -2312,7 +2314,7 @@ int sev_cpu_init(struct svm_cpu_data *sd)
> > */
> > static void sev_flush_encrypted_page(struct kvm_vcpu *vcpu, void *va)
> > {
> > - int asid = to_kvm_svm(vcpu->kvm)->sev_info.asid;
> > + unsigned int asid = to_kvm_svm(vcpu->kvm)->sev_info.asid;
>
> Since you're touching this, you could switch this to:
>
> unsigned int asid = sev_get_asid(vcpu->kvm);

Ah, good call, will do when applying.

Thanks!