Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1241283 > unrolled thread
| Started by | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| First post | 2015-10-07 11:30 +0200 |
| Last post | 2015-10-07 17:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2] KVM: x86: fix edge EOI and IOAPIC reconfig race Paolo Bonzini <pbonzini@redhat.com> - 2015-10-07 11:30 +0200
Re: [PATCH 2/2] KVM: x86: fix edge EOI and IOAPIC reconfig race Radim Krčmář <rkrcmar@redhat.com> - 2015-10-07 17:10 +0200
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2015-10-07 11:30 +0200 |
| Subject | Re: [PATCH 2/2] KVM: x86: fix edge EOI and IOAPIC reconfig race |
| Message-ID | <qgTcS-DX-23@gated-at.bofh.it> |
On 13/08/2015 15:46, Radim Krčmář wrote: > + if (kvm_x86_ops->sync_pir_to_irr(vcpu)) > + kvm_make_request(KVM_REQ_EVENT, vcpu); > + The call to sync_pir_to_irr belongs more in vcpu_scan_ioapic, I think. More importantly, I think that KVM_REQ_EVENT is a latent bug for kvm_vcpu_ioctl_get_lapic as well, so the call to kvm_make_request should go in vmx_sync_pir_to_irr or in a new kvm_sync_pir_to_irr wrapper. > + (e->fields.trig_mode == IOAPIC_EDGE_TRIG && > + kvm_apic_pending_eoi(vcpu, e->fields.vector))) Should we test again here that kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC, index), to avoid unnecessarily marking other edge-triggered interrupts? Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Radim Krčmář <rkrcmar@redhat.com> |
|---|---|
| Date | 2015-10-07 17:10 +0200 |
| Message-ID | <qgYvU-8pw-1@gated-at.bofh.it> |
| In reply to | #1241283 |
2015-10-07 11:29+0200, Paolo Bonzini:
> On 13/08/2015 15:46, Radim Krčmář wrote:
>> + if (kvm_x86_ops->sync_pir_to_irr(vcpu))
>> + kvm_make_request(KVM_REQ_EVENT, vcpu);
>> +
>
> The call to sync_pir_to_irr belongs more in vcpu_scan_ioapic, I think.
Will do so in v2.
> More importantly, I think that KVM_REQ_EVENT is a latent bug for
> kvm_vcpu_ioctl_get_lapic as well, so the call to kvm_make_request should
> go in vmx_sync_pir_to_irr or in a new kvm_sync_pir_to_irr wrapper.
True, thanks. I'll make the request in kvm_apic_update_irr (unless
you'd prefer to have it in new kvm_sync_pir_to_irr).
>> + (e->fields.trig_mode == IOAPIC_EDGE_TRIG &&
>> + kvm_apic_pending_eoi(vcpu, e->fields.vector)))
>
> Should we test again here that kvm_irq_has_notifier(ioapic->kvm,
> KVM_IRQCHIP_IOAPIC, index), to avoid unnecessarily marking other
> edge-triggered interrupts?
Other edge-triggered interrupts are skipped by a previous condition:
if (e->fields.trig_mode == IOAPIC_LEVEL_TRIG ||
kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC, index) ||
index == RTC_GSI)
[we're here]
I think it is ok to ignore level-triggered RTC, but we do want to
include edge-triggered.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web