summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/kvm_fw.c
diff options
context:
space:
mode:
authorXiantao Zhang <xiantao.zhang@intel.com>2008-10-16 15:58:15 +0800
committerAvi Kivity <avi@redhat.com>2008-10-28 14:22:14 +0200
commitdecc90162a99b4e51c534ab63f9b6fc5cb0f2596 (patch)
tree61f590370e93a3f0ed34881c2c7a954ce1c21b57 /arch/ia64/kvm/kvm_fw.c
parent5550af4df179e52753d3a43a788a113ad8cd95cd (diff)
downloadop-kernel-dev-decc90162a99b4e51c534ab63f9b6fc5cb0f2596.zip
op-kernel-dev-decc90162a99b4e51c534ab63f9b6fc5cb0f2596.tar.gz
KVM: ia64: Fix halt emulation logic
Common halt logic was changed by x86 and did not update ia64. This patch updates halt for ia64. Fixes a regression causing guests to hang with more than 2 vcpus. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/ia64/kvm/kvm_fw.c')
-rw-r--r--arch/ia64/kvm/kvm_fw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/ia64/kvm/kvm_fw.c b/arch/ia64/kvm/kvm_fw.c
index 0c69d9e..cb7600b 100644
--- a/arch/ia64/kvm/kvm_fw.c
+++ b/arch/ia64/kvm/kvm_fw.c
@@ -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;
OpenPOWER on IntegriCloud