From: Xiao Guangrong Date: Wed, 28 Nov 2012 12:54:14 +0000 (+0800) Subject: KVM: VMX: fix memory order between loading vmcs and clearing vmcs X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~27^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a560f8b5ed361c7be783d5a671ea26ca4d6fa01;p=pandora-kernel.git KVM: VMX: fix memory order between loading vmcs and clearing vmcs vmcs->cpu indicates whether it exists on the target cpu, -1 means the vmcs does not exist on any vcpu If vcpu load vmcs with vmcs.cpu = -1, it can be directly added to cpu's percpu list. The list can be corrupted if the cpu prefetch the vmcs's list before reading vmcs->cpu. Meanwhile, we should remove vmcs from the list before making vmcs->vcpu == -1 be visible Signed-off-by: Xiao Guangrong Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed