]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kvm/kvm_fw.c
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / arch / ia64 / kvm / kvm_fw.c
index 091f936c44853d83dab753d37d1d930eaee6740d..cb7600bdff9d3a81bcf76648e0859a4061820a0f 100644 (file)
@@ -130,7 +130,7 @@ static struct ia64_pal_retval pal_cache_flush(struct kvm_vcpu *vcpu)
        args.cache_type = gr29;
        args.operation = gr30;
        smp_call_function(remote_pal_cache_flush,
-                               (void *)&args, 1, 1);
+                               (void *)&args, 1);
        if (args.status != 0)
                printk(KERN_ERR"pal_cache_flush error!,"
                                "status:0x%lx\n", args.status);
@@ -286,6 +286,12 @@ static  u64 kvm_get_pal_call_index(struct kvm_vcpu *vcpu)
        return index;
 }
 
+static void prepare_for_halt(struct kvm_vcpu *vcpu)
+{
+       vcpu->arch.timer_pending = 1;
+       vcpu->arch.timer_fired = 0;
+}
+
 int kvm_pal_emul(struct kvm_vcpu *vcpu, struct kvm_run *run)
 {
 
@@ -304,11 +310,10 @@ int kvm_pal_emul(struct kvm_vcpu *vcpu, struct kvm_run *run)
                break;
        case PAL_HALT_LIGHT:
        {
-               vcpu->arch.timer_pending = 1;
                INIT_PAL_STATUS_SUCCESS(result);
+               prepare_for_halt(vcpu);
                if (kvm_highest_pending_irq(vcpu) == -1)
                        ret = kvm_emulate_halt(vcpu);
-
        }
                break;