diff options
author | Avi Kivity <avi@qumranet.com> | 2008-08-14 04:13:16 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-10-15 04:15:19 -0400 |
commit | ecfc79c700b02c5ad1ccae58718015caa84824be (patch) | |
tree | 181a9e4fbee5664c1a8e872e7a6050cd17b7c839 /arch/x86/kvm/vmx.c | |
parent | 29415c37f043d1d54dcf356601d738ff6633b72b (diff) |
KVM: VMX: Use interrupt queue for !irqchip_in_kernel
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 229e2d06fa2a..81db7d48ab80 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2173,7 +2173,7 @@ static void kvm_do_inject_irq(struct kvm_vcpu *vcpu) | |||
2173 | clear_bit(bit_index, &vcpu->arch.irq_pending[word_index]); | 2173 | clear_bit(bit_index, &vcpu->arch.irq_pending[word_index]); |
2174 | if (!vcpu->arch.irq_pending[word_index]) | 2174 | if (!vcpu->arch.irq_pending[word_index]) |
2175 | clear_bit(word_index, &vcpu->arch.irq_summary); | 2175 | clear_bit(word_index, &vcpu->arch.irq_summary); |
2176 | vmx_inject_irq(vcpu, irq); | 2176 | kvm_queue_interrupt(vcpu, irq); |
2177 | } | 2177 | } |
2178 | 2178 | ||
2179 | 2179 | ||
@@ -2187,13 +2187,12 @@ static void do_interrupt_requests(struct kvm_vcpu *vcpu, | |||
2187 | (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0); | 2187 | (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0); |
2188 | 2188 | ||
2189 | if (vcpu->arch.interrupt_window_open && | 2189 | if (vcpu->arch.interrupt_window_open && |
2190 | vcpu->arch.irq_summary && | 2190 | vcpu->arch.irq_summary && !vcpu->arch.interrupt.pending) |
2191 | !(vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) & INTR_INFO_VALID_MASK)) | ||
2192 | /* | ||
2193 | * If interrupts enabled, and not blocked by sti or mov ss. Good. | ||
2194 | */ | ||
2195 | kvm_do_inject_irq(vcpu); | 2191 | kvm_do_inject_irq(vcpu); |
2196 | 2192 | ||
2193 | if (vcpu->arch.interrupt_window_open && vcpu->arch.interrupt.pending) | ||
2194 | vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr); | ||
2195 | |||
2197 | cpu_based_vm_exec_control = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL); | 2196 | cpu_based_vm_exec_control = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL); |
2198 | if (!vcpu->arch.interrupt_window_open && | 2197 | if (!vcpu->arch.interrupt_window_open && |
2199 | (vcpu->arch.irq_summary || kvm_run->request_interrupt_window)) | 2198 | (vcpu->arch.irq_summary || kvm_run->request_interrupt_window)) |