Skip to content

Commit

Permalink
KVM: VMX: Simplify vcpu_clear()
Browse files Browse the repository at this point in the history
Now that smp_call_function_single() knows how to call a function on the
current cpu, there's no need to check explicitly.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Jan 30, 2008
1 parent eae5ecb commit f566e09
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,7 @@ static void vcpu_clear(struct vcpu_vmx *vmx)
{
if (vmx->vcpu.cpu == -1)
return;
if (vmx->vcpu.cpu != raw_smp_processor_id())
smp_call_function_single(vmx->vcpu.cpu, __vcpu_clear,
vmx, 0, 1);
else
__vcpu_clear(vmx);
smp_call_function_single(vmx->vcpu.cpu, __vcpu_clear, vmx, 0, 1);
vmx->launched = 0;
}

Expand Down

0 comments on commit f566e09

Please sign in to comment.