Re: kvm/ia64: Fix halt emulation logic.

Avi Kivity
2008-10-16T08:53:27Z

> Hi, Avi
> This is the key fix for 2.6.28 merge. Without this patch, guest
> may hang once configured with more than 2 vcpus, it is because x86 side
> changed the halt handling's common logic, but it misses to change ia64
> side.
>

> @@ -398,8 +400,11 @@ static int handle_global_purge(struct kvm_vcpu
> *vcpu, struct kvm_run *kvm_run)
>
> if (kvm->vcpus[i]->cpu != -1) {
> call_data.vcpu = kvm->vcpus[i];
> - smp_call_function_single(kvm->vcpus[i]->cpu,
> + if (kvm->vcpus[i]->cpu != smp_processor_id())
> +
> smp_call_function_single(kvm->vcpus[i]->cpu,
> vcpu_global_purge, &call_data,
> 1);
> + else
> + vcpu_global_purge(&call_data);
>

smp_call_function_single() will call the function on the current cpu if
instructed, so this change is unneeded.

--
error compiling committee.c: too many arguments to function