* [PATCH v2] kvm:vmx: Fix typos comment in __loaded_vmcs_clear()
@ 2022-02-22 10:40 Peng Hao
2022-02-22 15:18 ` Sean Christopherson
2022-02-24 14:24 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Peng Hao @ 2022-02-22 10:40 UTC (permalink / raw)
To: pbonzini, seanjc; +Cc: kvm, linux-kernel
From: Peng Hao <flyingpeng@tencent.com>
Fix a comment documenting the memory barrier related to clearing a
loaded_vmcs; loaded_vmcs tracks the host CPU the VMCS is loaded on via
the field 'cpu', it doesn't have a 'vcpu' field.
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peng Hao <flyingpeng@tencent.com>
---
arch/x86/kvm/vmx/vmx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 6101c2980a9c..75ed7d6f35cc 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -644,10 +644,10 @@ static void __loaded_vmcs_clear(void *arg)
/*
* Ensure all writes to loaded_vmcs, including deleting it from its
- * current percpu list, complete before setting loaded_vmcs->vcpu to
- * -1, otherwise a different cpu can see vcpu == -1 first and add
- * loaded_vmcs to its percpu list before it's deleted from this cpu's
- * list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
+ * current percpu list, complete before setting loaded_vmcs->cpu to
+ * -1, otherwise a different cpu can see loaded_vmcs->cpu == -1 first
+ * and add loaded_vmcs to its percpu list before it's deleted from this
+ * cpu's list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
*/
smp_wmb();
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] kvm:vmx: Fix typos comment in __loaded_vmcs_clear()
2022-02-22 10:40 [PATCH v2] kvm:vmx: Fix typos comment in __loaded_vmcs_clear() Peng Hao
@ 2022-02-22 15:18 ` Sean Christopherson
2022-02-24 14:24 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2022-02-22 15:18 UTC (permalink / raw)
To: Peng Hao; +Cc: pbonzini, kvm, linux-kernel
Needs a space on this shortlog too. And please capitalize both KVM and VMX.
Again, no need to send another version.
On Tue, Feb 22, 2022, Peng Hao wrote:
> From: Peng Hao <flyingpeng@tencent.com>
>
> Fix a comment documenting the memory barrier related to clearing a
> loaded_vmcs; loaded_vmcs tracks the host CPU the VMCS is loaded on via
> the field 'cpu', it doesn't have a 'vcpu' field.
>
> Reviewed-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Peng Hao <flyingpeng@tencent.com>
> ---
> arch/x86/kvm/vmx/vmx.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 6101c2980a9c..75ed7d6f35cc 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -644,10 +644,10 @@ static void __loaded_vmcs_clear(void *arg)
>
> /*
> * Ensure all writes to loaded_vmcs, including deleting it from its
> - * current percpu list, complete before setting loaded_vmcs->vcpu to
> - * -1, otherwise a different cpu can see vcpu == -1 first and add
> - * loaded_vmcs to its percpu list before it's deleted from this cpu's
> - * list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
> + * current percpu list, complete before setting loaded_vmcs->cpu to
> + * -1, otherwise a different cpu can see loaded_vmcs->cpu == -1 first
> + * and add loaded_vmcs to its percpu list before it's deleted from this
> + * cpu's list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
> */
> smp_wmb();
>
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] kvm:vmx: Fix typos comment in __loaded_vmcs_clear()
2022-02-22 10:40 [PATCH v2] kvm:vmx: Fix typos comment in __loaded_vmcs_clear() Peng Hao
2022-02-22 15:18 ` Sean Christopherson
@ 2022-02-24 14:24 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2022-02-24 14:24 UTC (permalink / raw)
To: Peng Hao, seanjc; +Cc: kvm, linux-kernel
On 2/22/22 11:40, Peng Hao wrote:
> From: Peng Hao <flyingpeng@tencent.com>
>
> Fix a comment documenting the memory barrier related to clearing a
> loaded_vmcs; loaded_vmcs tracks the host CPU the VMCS is loaded on via
> the field 'cpu', it doesn't have a 'vcpu' field.
>
> Reviewed-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Peng Hao <flyingpeng@tencent.com>
> ---
> arch/x86/kvm/vmx/vmx.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 6101c2980a9c..75ed7d6f35cc 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -644,10 +644,10 @@ static void __loaded_vmcs_clear(void *arg)
>
> /*
> * Ensure all writes to loaded_vmcs, including deleting it from its
> - * current percpu list, complete before setting loaded_vmcs->vcpu to
> - * -1, otherwise a different cpu can see vcpu == -1 first and add
> - * loaded_vmcs to its percpu list before it's deleted from this cpu's
> - * list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
> + * current percpu list, complete before setting loaded_vmcs->cpu to
> + * -1, otherwise a different cpu can see loaded_vmcs->cpu == -1 first
> + * and add loaded_vmcs to its percpu list before it's deleted from this
> + * cpu's list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
> */
> smp_wmb();
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-24 14:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-22 10:40 [PATCH v2] kvm:vmx: Fix typos comment in __loaded_vmcs_clear() Peng Hao
2022-02-22 15:18 ` Sean Christopherson
2022-02-24 14:24 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox