summaryrefslogtreecommitdiff
path: root/kvm_x86.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-04-21 17:11:08 -0700
committerRobert Mustacchi <rm@joyent.com>2011-04-21 17:11:08 -0700
commit54f1bf425595840d35bdf7f25e614dfe91b87fbc (patch)
tree442dc54846d05f9362a2605c3b31a06fb40be266 /kvm_x86.c
parent1e04adb8401853c2690eb1dfcca7ba328bffc80e (diff)
downloadillumos-kvm-54f1bf425595840d35bdf7f25e614dfe91b87fbc.tar.gz
HVM-112 Need something for kvm_vcpu_block
Diffstat (limited to 'kvm_x86.c')
-rw-r--r--kvm_x86.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kvm_x86.c b/kvm_x86.c
index 8dc6218..1fc41b3 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -4709,3 +4709,14 @@ kvm_vm_ioctl(struct kvm *kvmp, unsigned int ioctl, unsigned long arg, int mode)
out:
return (r);
}
+
+int
+kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
+{
+ return (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE
+ || vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED
+ || vcpu->arch.nmi_pending ||
+ (kvm_arch_interrupt_allowed(vcpu) &&
+ kvm_cpu_has_interrupt(vcpu)));
+}
+