Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1330244
| From | Radim Krčmář <rkrcmar@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence |
| Date | 2016-02-09 15:00 +0100 |
| Message-ID | <r0gZI-4N6-5@gated-at.bofh.it> (permalink) |
| References | <qZWHD-7Fq-13@gated-at.bofh.it> <qZWHD-7Fq-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-02-08 17:15+0100, Paolo Bonzini:
> Usually the in-kernel APIC's existence is checked in the caller. Do not
> bother checking it again in lapic.c.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
> @@ -1601,8 +1595,7 @@ static int apic_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this,
>
> void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu)
> {
> - if (kvm_vcpu_has_lapic(vcpu))
> - apic_reg_write(vcpu->arch.apic, APIC_EOI, 0);
> + apic_reg_write(vcpu->arch.apic, APIC_EOI, 0);
This is most likely going to bug on the following path:
handle_apic_access -> kvm_lapic_set_eoi
Before the change, handle_apic_access would just drop EOIs that should
have gone to user space ... I'm not sure if we tested it, or the path is
really never taken.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence Paolo Bonzini <pbonzini@redhat.com> - 2016-02-08 17:20 +0100
Re: [PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence Radim Krčmář <rkrcmar@redhat.com> - 2016-02-09 15:00 +0100
Re: [PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence Paolo Bonzini <pbonzini@redhat.com> - 2016-02-09 16:10 +0100
Re: [PATCH 1/3] KVM: APIC: remove unnecessary double checks on APIC existence Radim Krčmář <rkrcmar@redhat.com> - 2016-02-09 16:20 +0100
csiph-web