kvm:vmx: Fix typos comment in __loaded_vmcs_clear()
PATCH v2 1/1 kvm:vmx: Fix typos comment in __loaded_vmcs_clear()
From: Peng Hao <[email protected]>
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.
--- arch/x86/kvm/vmx/vmx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kvm/vmx/vmx.c +4 -4
@@ -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 ();
Signature · 1 line
2.27.0
Sean Christopherson
maintainerNeeds a space on this shortlog too. And please capitalize both KVM and VMX. Again, no need to send another version.
Quoted 34 lines · Peng Hao
From: Peng Hao <[email protected]>
Fix a comment documenting the memory barrier related to clearing a
loaded_vmcs;loaded_vmcstracks the host CPU the VMCS is loaded on via the field 'cpu', it doesn't have a 'vcpu' field.Reviewed-by Sean Christopherson <[email protected]>Signed-off-by Peng Hao <[email protected]>--- arch/x86/kvm/vmx/vmx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/x86/kvm/vmx/vmx.c +4
-4@@ -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 ();Signature · 1 line
2.27.0
Quoted 21 lines · Peng Hao
From: Peng Hao <[email protected]>
Fix a comment documenting the memory barrier related to clearing a
loaded_vmcs;loaded_vmcstracks the host CPU the VMCS is loaded on via the field 'cpu', it doesn't have a 'vcpu' field.Reviewed-by Sean Christopherson <[email protected]>Signed-off-by Peng Hao <[email protected]>--- arch/x86/kvm/vmx/vmx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/x86/kvm/vmx/vmx.c +0
-1@@ -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
arch/x86/kvm/vmx/vmx.c static void __loaded_vmcs_clear(void *arg) · line 653
Quoted 10 lines
arch/x86/kvm/vmx/vmx.c +4
-3-* -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