Commit 105e0c44 authored by Peng Hao's avatar Peng Hao Committed by Paolo Bonzini

kvm: vmx: Fix typos comment in __loaded_vmcs_clear()

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: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarPeng Hao <flyingpeng@tencent.com>
Message-Id: <20220222104029.70129-1-flyingpeng@tencent.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent fbc2dfe5
...@@ -640,10 +640,10 @@ static void __loaded_vmcs_clear(void *arg) ...@@ -640,10 +640,10 @@ static void __loaded_vmcs_clear(void *arg)
/* /*
* Ensure all writes to loaded_vmcs, including deleting it from its * Ensure all writes to loaded_vmcs, including deleting it from its
* current percpu list, complete before setting loaded_vmcs->vcpu to * current percpu list, complete before setting loaded_vmcs->cpu to
* -1, otherwise a different cpu can see vcpu == -1 first and add * -1, otherwise a different cpu can see loaded_vmcs->cpu == -1 first
* loaded_vmcs to its percpu list before it's deleted from this cpu's * and add loaded_vmcs to its percpu list before it's deleted from this
* list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs(). * cpu's list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
*/ */
smp_wmb(); smp_wmb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment