public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	gleb@kernel.org, mtosatti@redhat.com, alex.williamson@redhat.com,
	jan.kiszka@siemens.com
Subject: Re: [PATCH v2 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP
Date: Mon, 24 Mar 2014 19:14:17 +0100	[thread overview]
Message-ID: <533075F9.3050007@redhat.com> (raw)
In-Reply-To: <20140324175830.GA8721@potion.brq.redhat.com>

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

  reply	other threads:[~2014-03-24 18:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21  9:27 [PATCH v2 0/4] KVM: cleanup ioapic and fix KVM_SET_IRQCHIP with irr != 0 Paolo Bonzini
2014-03-21  9:27 ` [PATCH v2 1/4] KVM: ioapic: merge ioapic_deliver into ioapic_service Paolo Bonzini
2014-03-21 17:39   ` Eduardo Habkost
2014-03-21  9:27 ` [PATCH v2 2/4] KVM: ioapic: clear IRR for edge-triggered interrupts at delivery Paolo Bonzini
2014-03-21 18:34   ` Eduardo Habkost
2014-03-22  7:48     ` Paolo Bonzini
2014-03-21  9:28 ` [PATCH v2 3/4] KVM: ioapic: extract body of kvm_ioapic_set_irq Paolo Bonzini
2014-03-21 18:58   ` Radim Krčmář
2014-03-23  8:44     ` Paolo Bonzini
2014-03-24 17:55       ` Radim Krčmář
2014-03-21  9:28 ` [PATCH v2 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP Paolo Bonzini
2014-03-21 14:00   ` Alex Williamson
2014-03-24 17:58   ` Radim Krčmář
2014-03-24 18:14     ` Paolo Bonzini [this message]
2014-03-24 19:28       ` Radim Krčmář
2014-03-24 17:59 ` [PATCH v2 0/4] KVM: cleanup ioapic and fix KVM_SET_IRQCHIP with irr != 0 Radim Krčmář

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533075F9.3050007@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=gleb@kernel.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox