aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-04-21 10:44:56 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:45 -0400
commit8061823a25218174f30c3dd943989e1d72f7d06e (patch)
treeee94e6ac86efe3c0bdeb933b8538ae06e99f6fe3 /arch/x86/kvm/x86.c
parent3438253926822a6bf8487b4f7d82f26a2c0b2388 (diff)
KVM: Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too
At the vector level, kernel and userspace irqchip are fairly similar. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2bad49b535c8..4c2eb7c0e1fb 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3069,7 +3069,7 @@ EXPORT_SYMBOL_GPL(kvm_emulate_cpuid);
3069static int dm_request_for_irq_injection(struct kvm_vcpu *vcpu, 3069static int dm_request_for_irq_injection(struct kvm_vcpu *vcpu,
3070 struct kvm_run *kvm_run) 3070 struct kvm_run *kvm_run)
3071{ 3071{
3072 return (!vcpu->arch.irq_summary && 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 vcpu->arch.interrupt_window_open &&
3075 (kvm_x86_ops->get_rflags(vcpu) & X86_EFLAGS_IF)); 3075 (kvm_x86_ops->get_rflags(vcpu) & X86_EFLAGS_IF));
@@ -3086,7 +3086,7 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu,
3086 else 3086 else
3087 kvm_run->ready_for_interrupt_injection = 3087 kvm_run->ready_for_interrupt_injection =
3088 (vcpu->arch.interrupt_window_open && 3088 (vcpu->arch.interrupt_window_open &&
3089 vcpu->arch.irq_summary == 0); 3089 !kvm_cpu_has_interrupt(vcpu));
3090} 3090}
3091 3091
3092static void vapic_enter(struct kvm_vcpu *vcpu) 3092static void vapic_enter(struct kvm_vcpu *vcpu)