aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-07-09 08:33:52 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:13 -0400
commita1b37100d9e29c1f8dc3e2f5490a205c80180e01 (patch)
tree0e1448e35c8da68b865816a1173540f8e05234e4 /arch/x86/kvm/x86.c
parent0b71785dc05f1f66e6268022b9953c0d6a9985c6 (diff)
KVM: Reduce runnability interface with arch support code
Remove kvm_cpu_has_interrupt() and kvm_arch_interrupt_allowed() from interface between general code and arch code. kvm_arch_vcpu_runnable() checks for interrupts instead. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 11cfd897aac6..b87d65d89a05 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4890,8 +4890,10 @@ void kvm_arch_flush_shadow(struct kvm *kvm)
4890int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) 4890int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
4891{ 4891{
4892 return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE 4892 return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE
4893 || vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED 4893 || vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED
4894 || vcpu->arch.nmi_pending; 4894 || vcpu->arch.nmi_pending ||
4895 (kvm_arch_interrupt_allowed(vcpu) &&
4896 kvm_cpu_has_interrupt(vcpu));
4895} 4897}
4896 4898
4897void kvm_vcpu_kick(struct kvm_vcpu *vcpu) 4899void kvm_vcpu_kick(struct kvm_vcpu *vcpu)