Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM/x86: update the comment of memory barrier in the vcpu_enter_guest()

The barrier also orders the write to mode from any reads
to the page tables done and so update the comment.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Lan Tianyu and committed by
Paolo Bonzini
0f127d12 4ae3cb3a

+6 -2
+6 -2
arch/x86/kvm/x86.c
··· 6596 6596 6597 6597 srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); 6598 6598 6599 - /* We should set ->mode before check ->requests, 6600 - * see the comment in make_all_cpus_request. 6599 + /* 6600 + * We should set ->mode before check ->requests, 6601 + * Please see the comment in kvm_make_all_cpus_request. 6602 + * This also orders the write to mode from any reads 6603 + * to the page tables done while the VCPU is running. 6604 + * Please see the comment in kvm_flush_remote_tlbs. 6601 6605 */ 6602 6606 smp_mb__after_srcu_read_unlock(); 6603 6607