aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-04-21 10:44:59 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:46 -0400
commit5df56646472c42495dd2412c8d8aa72e59efe79a (patch)
tree3284be6ed8ef8d0f9e9bcfef9cd428c866ce71a3 /arch
parent1f21e79aaced0a041e9399346960ce26ae0f5a4e (diff)
KVM: Use kvm_arch_interrupt_allowed() instead of checking interrupt_window_open directly
kvm_arch_interrupt_allowed() also checks IF so drop the check. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a84c96a7ea5e..ae6250b19726 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3071,8 +3071,7 @@ static int dm_request_for_irq_injection(struct kvm_vcpu *vcpu,
3071{ 3071{
3072 return (!irqchip_in_kernel(vcpu->kvm) && !kvm_cpu_has_interrupt(vcpu) && 3072 return (!irqchip_in_kernel(vcpu->kvm) && !kvm_cpu_has_interrupt(vcpu) &&
3073 kvm_run->request_interrupt_window && 3073 kvm_run->request_interrupt_window &&
3074 vcpu->arch.interrupt_window_open && 3074 kvm_arch_interrupt_allowed(vcpu));
3075 (kvm_x86_ops->get_rflags(vcpu) & X86_EFLAGS_IF));
3076} 3075}
3077 3076
3078static void post_kvm_run_save(struct kvm_vcpu *vcpu, 3077static void post_kvm_run_save(struct kvm_vcpu *vcpu,
@@ -3085,7 +3084,7 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu,
3085 kvm_run->ready_for_interrupt_injection = 1; 3084 kvm_run->ready_for_interrupt_injection = 1;
3086 else 3085 else
3087 kvm_run->ready_for_interrupt_injection = 3086 kvm_run->ready_for_interrupt_injection =
3088 (vcpu->arch.interrupt_window_open && 3087 (kvm_arch_interrupt_allowed(vcpu) &&
3089 !kvm_cpu_has_interrupt(vcpu)); 3088 !kvm_cpu_has_interrupt(vcpu));
3090} 3089}
3091 3090