On Thu, 2007-07-26 at 18:35 +0300, Avi Kivity wrote: > A race indeed, good catch. > > I think the race is only on the per_cpu(current_vmcs) variable, no? The > actual vmcs ptr (as loaded by vmptrld) is handled by the processor.
Correct. > > > Disabling interrupts was chosen as the sync-primitive, because the code > > will always be on the CPU in question. > > > > > > Looks a bit heavy handed. How about replacing (in __vcpu_clear()) > > if (per_cpu(current_vmcs, cpu) == vcpu->vmcs) > per_cpu(current_vmcs, cpu) = NULL; > > by > > cmpxchg_local(&per_cpu(current_vmcs, cpu), vcpu->vmcs, NULL); > > ? Hmm...possibly. I've never worked with the cmpxchg subsystem so let me look into it a little bit and get back to you. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel