diff options
author | Robert Mustacchi <rm@joyent.com> | 2011-04-21 17:11:08 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2011-04-21 17:11:08 -0700 |
commit | 54f1bf425595840d35bdf7f25e614dfe91b87fbc (patch) | |
tree | 442dc54846d05f9362a2605c3b31a06fb40be266 /kvm_x86.c | |
parent | 1e04adb8401853c2690eb1dfcca7ba328bffc80e (diff) | |
download | illumos-kvm-54f1bf425595840d35bdf7f25e614dfe91b87fbc.tar.gz |
HVM-112 Need something for kvm_vcpu_block
Diffstat (limited to 'kvm_x86.c')
-rw-r--r-- | kvm_x86.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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))); +} + |