All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: SEV: Fix a few small typos
@ 2022-09-28 17:31 Carlos Bilbao
  2022-10-11 18:51 ` Sean Christopherson
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos Bilbao @ 2022-09-28 17:31 UTC (permalink / raw)
  To: pbonzini, seanjc, vkuznets, wanpengli, jmattson, joro,
	linux-kernel, kvm, bilbao
  Cc: Carlos Bilbao

Fix some typos in file arch/x86/kvm/svm/sev.c.

Signed-off-by: Carlos Bilbao <carlos.bilbao@amd.com>
---
 arch/x86/kvm/svm/sev.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index f7fe0008bfd1..107fa0f442b2 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -668,7 +668,7 @@ static int sev_es_sync_vmsa(struct vcpu_svm *svm)
 	 */
 	memcpy(save, &svm->vmcb->save, sizeof(svm->vmcb->save));
 
-	/* Sync registgers */
+	/* Sync registers */
 	save->rax = svm->vcpu.arch.regs[VCPU_REGS_RAX];
 	save->rbx = svm->vcpu.arch.regs[VCPU_REGS_RBX];
 	save->rcx = svm->vcpu.arch.regs[VCPU_REGS_RCX];
@@ -2585,7 +2585,7 @@ void sev_free_vcpu(struct kvm_vcpu *vcpu)
 
 	/*
 	 * If its an SNP guest, then VMSA was added in the RMP entry as
-	 * a guest owned page. Transition the page to hyperivosr state
+	 * a guest owned page. Transition the page to hypervisor state
 	 * before releasing it back to the system.
 	 */
 	if (sev_snp_guest(vcpu->kvm) &&
@@ -3150,7 +3150,7 @@ static int __snp_handle_page_state_change(struct kvm_vcpu *vcpu, enum psc_op op,
 				return PSC_UNDEF_ERR;
 
 			/*
-			 * Mark the userspace range unmerable before adding the pages
+			 * Mark the userspace range unmergable before adding the pages
 			 * in the RMP table.
 			 */
 			mmap_write_lock(kvm->mm);
@@ -3510,7 +3510,7 @@ bool sev_snp_init_protected_guest_state(struct kvm_vcpu *vcpu)
 
 	ret = __sev_snp_update_protected_guest_state(vcpu);
 	if (ret)
-		vcpu_unimpl(vcpu, "snp: AP state update on init failed\n");
+		vcpu_unimpl(vcpu, "SNP: AP state update on init failed\n");
 
 unlock:
 	mutex_unlock(&svm->snp_vmsa_mutex);
@@ -4170,7 +4170,7 @@ void sev_es_prepare_guest_switch(struct vcpu_svm *svm, unsigned int cpu)
 	/* PKRU is restored on VMEXIT, save the current host value */
 	hostsa->pkru = read_pkru();
 
-	/* MSR_IA32_XSS is restored on VMEXIT, save the currnet host value */
+	/* MSR_IA32_XSS is restored on VMEXIT, save the current host value */
 	hostsa->xss = host_xss;
 }
 
@@ -4223,7 +4223,7 @@ struct page *snp_safe_alloc_page(struct kvm_vcpu *vcpu)
 	 * Allocate an SNP safe page to workaround the SNP erratum where
 	 * the CPU will incorrectly signal an RMP violation  #PF if a
 	 * hugepage (2mb or 1gb) collides with the RMP entry of VMCB, VMSA
-	 * or AVIC backing page. The recommeded workaround is to not use the
+	 * or AVIC backing page. The recommended workaround is to not use the
 	 * hugepage.
 	 *
 	 * Allocate one extra page, use a page which is not 2mb aligned
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: SEV: Fix a few small typos
  2022-09-28 17:31 [PATCH] KVM: SEV: Fix a few small typos Carlos Bilbao
@ 2022-10-11 18:51 ` Sean Christopherson
  2022-10-11 19:22   ` Carlos Bilbao
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Christopherson @ 2022-10-11 18:51 UTC (permalink / raw)
  To: Carlos Bilbao
  Cc: pbonzini, vkuznets, wanpengli, jmattson, joro, linux-kernel, kvm, bilbao

On Wed, Sep 28, 2022, Carlos Bilbao wrote:
> @@ -3510,7 +3510,7 @@ bool sev_snp_init_protected_guest_state(struct kvm_vcpu *vcpu)
>  
>  	ret = __sev_snp_update_protected_guest_state(vcpu);
>  	if (ret)
> -		vcpu_unimpl(vcpu, "snp: AP state update on init failed\n");
> +		vcpu_unimpl(vcpu, "SNP: AP state update on init failed\n");
>  
>  unlock:
>  	mutex_unlock(&svm->snp_vmsa_mutex);
> @@ -4170,7 +4170,7 @@ void sev_es_prepare_guest_switch(struct vcpu_svm *svm, unsigned int cpu)
>  	/* PKRU is restored on VMEXIT, save the current host value */
>  	hostsa->pkru = read_pkru();
>  
> -	/* MSR_IA32_XSS is restored on VMEXIT, save the currnet host value */
> +	/* MSR_IA32_XSS is restored on VMEXIT, save the current host value */
>  	hostsa->xss = host_xss;
>  }
>  
> @@ -4223,7 +4223,7 @@ struct page *snp_safe_alloc_page(struct kvm_vcpu *vcpu)
>  	 * Allocate an SNP safe page to workaround the SNP erratum where
>  	 * the CPU will incorrectly signal an RMP violation  #PF if a
>  	 * hugepage (2mb or 1gb) collides with the RMP entry of VMCB, VMSA
> -	 * or AVIC backing page. The recommeded workaround is to not use the
> +	 * or AVIC backing page. The recommended workaround is to not use the
>  	 * hugepage.
>  	 *
>  	 * Allocate one extra page, use a page which is not 2mb aligned

SNP support doesn't exist upstream, looks like this was generated against an SNP
branch.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: SEV: Fix a few small typos
  2022-10-11 18:51 ` Sean Christopherson
@ 2022-10-11 19:22   ` Carlos Bilbao
  2022-10-11 19:45     ` Sean Christopherson
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos Bilbao @ 2022-10-11 19:22 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: pbonzini, vkuznets, wanpengli, jmattson, joro, linux-kernel, kvm, bilbao

On 10/11/22 13:51, Sean Christopherson wrote:

> On Wed, Sep 28, 2022, Carlos Bilbao wrote:
>> @@ -3510,7 +3510,7 @@ bool sev_snp_init_protected_guest_state(struct kvm_vcpu *vcpu)
>>   
>>   	ret = __sev_snp_update_protected_guest_state(vcpu);
>>   	if (ret)
>> -		vcpu_unimpl(vcpu, "snp: AP state update on init failed\n");
>> +		vcpu_unimpl(vcpu, "SNP: AP state update on init failed\n");
>>   
>>   unlock:
>>   	mutex_unlock(&svm->snp_vmsa_mutex);
>> @@ -4170,7 +4170,7 @@ void sev_es_prepare_guest_switch(struct vcpu_svm *svm, unsigned int cpu)
>>   	/* PKRU is restored on VMEXIT, save the current host value */
>>   	hostsa->pkru = read_pkru();
>>   
>> -	/* MSR_IA32_XSS is restored on VMEXIT, save the currnet host value */
>> +	/* MSR_IA32_XSS is restored on VMEXIT, save the current host value */
>>   	hostsa->xss = host_xss;
>>   }
>>   
>> @@ -4223,7 +4223,7 @@ struct page *snp_safe_alloc_page(struct kvm_vcpu *vcpu)
>>   	 * Allocate an SNP safe page to workaround the SNP erratum where
>>   	 * the CPU will incorrectly signal an RMP violation  #PF if a
>>   	 * hugepage (2mb or 1gb) collides with the RMP entry of VMCB, VMSA
>> -	 * or AVIC backing page. The recommeded workaround is to not use the
>> +	 * or AVIC backing page. The recommended workaround is to not use the
>>   	 * hugepage.
>>   	 *
>>   	 * Allocate one extra page, use a page which is not 2mb aligned
> SNP support doesn't exist upstream, looks like this was generated against an SNP
> branch.
You're absolutely right. The only typo that's upstream is "currnet" in
sev_es_prepare_switch_to_guest(). Not a big deal.

Thanks,
Carlos

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: SEV: Fix a few small typos
  2022-10-11 19:22   ` Carlos Bilbao
@ 2022-10-11 19:45     ` Sean Christopherson
  0 siblings, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2022-10-11 19:45 UTC (permalink / raw)
  To: Carlos Bilbao
  Cc: pbonzini, vkuznets, wanpengli, jmattson, joro, linux-kernel, kvm, bilbao

On Tue, Oct 11, 2022, Carlos Bilbao wrote:
> On 10/11/22 13:51, Sean Christopherson wrote:
> 
> > On Wed, Sep 28, 2022, Carlos Bilbao wrote:
> > > @@ -3510,7 +3510,7 @@ bool sev_snp_init_protected_guest_state(struct kvm_vcpu *vcpu)
> > >   	ret = __sev_snp_update_protected_guest_state(vcpu);
> > >   	if (ret)
> > > -		vcpu_unimpl(vcpu, "snp: AP state update on init failed\n");
> > > +		vcpu_unimpl(vcpu, "SNP: AP state update on init failed\n");
> > >   unlock:
> > >   	mutex_unlock(&svm->snp_vmsa_mutex);
> > > @@ -4170,7 +4170,7 @@ void sev_es_prepare_guest_switch(struct vcpu_svm *svm, unsigned int cpu)
> > >   	/* PKRU is restored on VMEXIT, save the current host value */
> > >   	hostsa->pkru = read_pkru();
> > > -	/* MSR_IA32_XSS is restored on VMEXIT, save the currnet host value */
> > > +	/* MSR_IA32_XSS is restored on VMEXIT, save the current host value */
> > >   	hostsa->xss = host_xss;
> > >   }
> > > @@ -4223,7 +4223,7 @@ struct page *snp_safe_alloc_page(struct kvm_vcpu *vcpu)
> > >   	 * Allocate an SNP safe page to workaround the SNP erratum where
> > >   	 * the CPU will incorrectly signal an RMP violation  #PF if a
> > >   	 * hugepage (2mb or 1gb) collides with the RMP entry of VMCB, VMSA
> > > -	 * or AVIC backing page. The recommeded workaround is to not use the
> > > +	 * or AVIC backing page. The recommended workaround is to not use the
> > >   	 * hugepage.
> > >   	 *
> > >   	 * Allocate one extra page, use a page which is not 2mb aligned
> > SNP support doesn't exist upstream, looks like this was generated against an SNP
> > branch.
> You're absolutely right. The only typo that's upstream is "currnet" in
> sev_es_prepare_switch_to_guest(). Not a big deal.

Ya, and that typo should (eventually) go away entirely:
https://lore.kernel.org/all/YzOTOzUzKPQSqURo@google.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-11 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 17:31 [PATCH] KVM: SEV: Fix a few small typos Carlos Bilbao
2022-10-11 18:51 ` Sean Christopherson
2022-10-11 19:22   ` Carlos Bilbao
2022-10-11 19:45     ` Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.