Re: [PATCH 2/2] KVM: Protect race-condition betweenVMCS and current_vmcs on VMX hardware

Gregory Haskins
2007-07-31T11:55:24Z

On Tue, 2007-07-31 at 17:18 +0800, Dong, Eddie wrote:

>
> I may miss something, why does that matter?

As it turns out, it doesn't ;) So we have dropped the patch. But not
for the reason you are suggesting.

> __vcpu_clear will eventually
> get executed though it is a little bit delayed. vmclear will eventually
> dump
> internal state of VM-a VMCS to memory and VM-b get its own VMCS
> loaded. Here the point is vmclear has a parameter to identify which
> VM's VMCS to dump, not only a memory address. Jun, please correct me if
> I am wrong.

The race is against per_cpu(current_vmcs), not the actual VMCS.
However, Avi pointed out that the race is benign so the race doesn't
matter.

-Greg