[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <533075F9.3050007@redhat.com>
Date: Mon, 24 Mar 2014 19:14:17 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Radim Krčmář <rkrcmar@...hat.com>
CC: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, gleb@...nel.org,
mtosatti@...hat.com, alex.williamson@...hat.com,
jan.kiszka@...mens.com
Subject: Re: [PATCH v2 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP
Il 24/03/2014 18:58, Radim Krčmář ha scritto:
>> > + rtc_irq_eoi_tracking_reset(ioapic);
>> > + for_each_set_bit(idx, &irr, IOAPIC_NUM_PINS)
>> > + ioapic_set_irq(ioapic, idx, 1, true);
>> > +
>> > + kvm_rtc_eoi_tracking_restore_all(ioapic);
> (We shouldn't have RTC interrupt with pending EOI in irr, so the
> function could be independent.
If the RTC state gets out of sync you get a BUG_ON, so I preferred to be
safe and first inject the interrupts without any recorded recipient of
GSI 8; and then put everything together based on both LAPIC and IOAPIC
state.
> I'd prefer 'ioapic->irr = 0' here ...)
The point is that "ioapic->irr = 0" is overriding the previous memcpy,
because state->irr is used as argument to kvm_ioapic_inject_all instead.
So I think "iopic->irr = 0" should stay close to the memcpy.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists