mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
KVM: VMX: Use interrupt queue for !irqchip_in_kernel
Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
29415c37f0
commit
ecfc79c700
1 changed files with 5 additions and 6 deletions
|
@ -2173,7 +2173,7 @@ static void kvm_do_inject_irq(struct kvm_vcpu *vcpu)
|
||||||
clear_bit(bit_index, &vcpu->arch.irq_pending[word_index]);
|
clear_bit(bit_index, &vcpu->arch.irq_pending[word_index]);
|
||||||
if (!vcpu->arch.irq_pending[word_index])
|
if (!vcpu->arch.irq_pending[word_index])
|
||||||
clear_bit(word_index, &vcpu->arch.irq_summary);
|
clear_bit(word_index, &vcpu->arch.irq_summary);
|
||||||
vmx_inject_irq(vcpu, irq);
|
kvm_queue_interrupt(vcpu, irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2187,13 +2187,12 @@ static void do_interrupt_requests(struct kvm_vcpu *vcpu,
|
||||||
(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0);
|
(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0);
|
||||||
|
|
||||||
if (vcpu->arch.interrupt_window_open &&
|
if (vcpu->arch.interrupt_window_open &&
|
||||||
vcpu->arch.irq_summary &&
|
vcpu->arch.irq_summary && !vcpu->arch.interrupt.pending)
|
||||||
!(vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) & INTR_INFO_VALID_MASK))
|
|
||||||
/*
|
|
||||||
* If interrupts enabled, and not blocked by sti or mov ss. Good.
|
|
||||||
*/
|
|
||||||
kvm_do_inject_irq(vcpu);
|
kvm_do_inject_irq(vcpu);
|
||||||
|
|
||||||
|
if (vcpu->arch.interrupt_window_open && vcpu->arch.interrupt.pending)
|
||||||
|
vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr);
|
||||||
|
|
||||||
cpu_based_vm_exec_control = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL);
|
cpu_based_vm_exec_control = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL);
|
||||||
if (!vcpu->arch.interrupt_window_open &&
|
if (!vcpu->arch.interrupt_window_open &&
|
||||||
(vcpu->arch.irq_summary || kvm_run->request_interrupt_window))
|
(vcpu->arch.irq_summary || kvm_run->request_interrupt_window))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue