Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1549922

Re: [PATCH v2 3/6] KVM: x86: make pic setup code look like ioapic setup

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/6] KVM: x86: make pic setup code look like ioapic setup
Date 2017-01-03 17:20 +0100
Message-ID <sVzYB-pP-13@gated-at.bofh.it> (permalink)
References <sP2sF-5nI-3@gated-at.bofh.it> <sP2sG-5nI-33@gated-at.bofh.it> <sVx0J-6NW-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 03/01/2017 14:04, David Hildenbrand wrote:
> Am 16.12.2016 um 16:10 schrieb Radim Krčmář:
>> We don't treat kvm->arch.vpic specially anymore, so the setup can look
>> like ioapic.  This gets a bit more information out of return values.
>
> This originally saved us from a race condition as far as I can
> reconstruct from the commit history. Think the problem was
> vpic being set but routes not being set up yet.
> 
> commit 71ba994c94a81c37185ef2fb5190844286ba9aca
> Author: Paolo Bonzini <pbonzini@redhat.com>
> Date:   Wed Jul 29 12:31:15 2015 +0200
> 
>     KVM: x86: clean/fix memory barriers in irqchip_in_kernel
> 
>     The memory barriers are trying to protect against concurrent RCU-based
>     interrupt injection, but the IRQ routing table is not valid at the time
>     kvm->arch.vpic is written.  Fix this by writing kvm->arch.vpic last.
>     kvm_destroy_pic then need not set kvm->arch.vpic to NULL; modify it
>     to take a struct kvm_pic* and reuse it if the IOAPIC creation fails.
> 
>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> I assume that this is now fixed via the irqchip_mode, as it is stored
> last? If so, I really like this patch :)

Yes, the previous patch referred to that when it said
"irqchip_in_kernel() tried to save a bit by reusing pic_irqchip()", and
what this commit message means by "not trteating kvm->arch.vpic
specially anymore".

Paolo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] KVM: x86: minor irqchip improvements (API change) Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
  [PATCH v2 2/6] KVM: x86: decouple irqchip_in_kernel() and pic_irqchip() Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
    Re: [PATCH v2 2/6] KVM: x86: decouple irqchip_in_kernel() and  pic_irqchip() Paolo Bonzini <pbonzini@redhat.com> - 2016-12-16 16:30 +0100
      Re: [PATCH v2 2/6] KVM: x86: decouple irqchip_in_kernel() and  pic_irqchip() Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:50 +0100
    Re: [PATCH v2 2/6] KVM: x86: decouple irqchip_in_kernel() and  pic_irqchip() David Hildenbrand <david@redhat.com> - 2017-01-03 14:00 +0100
      Re: [PATCH v2 2/6] KVM: x86: decouple irqchip_in_kernel() and  pic_irqchip() Peter Xu <peterx@redhat.com> - 2017-01-10 06:20 +0100
        Re: [PATCH v2 2/6] KVM: x86: decouple irqchip_in_kernel() and  pic_irqchip() Paolo Bonzini <pbonzini@redhat.com> - 2017-01-10 10:40 +0100
  [PATCH v2 4/6] KVM: x86: refactor pic setup in kvm_set_routing_entry Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
    Re: [PATCH v2 4/6] KVM: x86: refactor pic setup in  kvm_set_routing_entry David Hildenbrand <david@redhat.com> - 2017-01-03 14:10 +0100
  [PATCH v2 3/6] KVM: x86: make pic setup code look like ioapic setup Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
    Re: [PATCH v2 3/6] KVM: x86: make pic setup code look like ioapic  setup David Hildenbrand <david@redhat.com> - 2017-01-03 14:10 +0100
      Re: [PATCH v2 3/6] KVM: x86: make pic setup code look like ioapic  setup Paolo Bonzini <pbonzini@redhat.com> - 2017-01-03 17:20 +0100
        Re: [PATCH v2 3/6] KVM: x86: make pic setup code look like ioapic  setup David Hildenbrand <david@redhat.com> - 2017-01-04 10:20 +0100
  [PATCH v2 5/6] KVM: x86: prevent setup of invalid routes Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
    Re: [PATCH v2 5/6] KVM: x86: prevent setup of invalid routes David Hildenbrand <david@redhat.com> - 2017-01-03 14:10 +0100
    Re: [PATCH v2 5/6] KVM: x86: prevent setup of invalid routes Peter Xu <peterx@redhat.com> - 2017-01-10 06:30 +0100
      Re: [PATCH v2 5/6] KVM: x86: prevent setup of invalid routes Paolo Bonzini <pbonzini@redhat.com> - 2017-01-10 10:50 +0100
  [PATCH v2 6/6] KVM: x86: simplify conditions with split/kernel irqchip Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
    Re: [PATCH v2 6/6] KVM: x86: simplify conditions with split/kernel  irqchip David Hildenbrand <david@redhat.com> - 2017-01-03 16:20 +0100
  [PATCH v2 1/6] KVM: x86: don't allow kernel irqchip with split irqchip Radim Krčmář <rkrcmar@redhat.com> - 2016-12-16 16:20 +0100
    Re: [PATCH v2 1/6] KVM: x86: don't allow kernel irqchip with split  irqchip David Hildenbrand <david@redhat.com> - 2017-01-03 13:20 +0100

csiph-web