From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH v2 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP Date: Mon, 24 Mar 2014 20:28:27 +0100 Message-ID: <20140324192826.GB9440@potion.brq.redhat.com> References: <1395394081-16252-1-git-send-email-pbonzini@redhat.com> <1395394081-16252-5-git-send-email-pbonzini@redhat.com> <20140324175830.GA8721@potion.brq.redhat.com> <533075F9.3050007@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, gleb@kernel.org, mtosatti@redhat.com, alex.williamson@redhat.com, jan.kiszka@siemens.com To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <533075F9.3050007@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2014-03-24 19:14+0100, Paolo Bonzini: > Il 24/03/2014 18:58, Radim Kr=C4=8Dm=C3=A1=C5=99 ha scritto: > > I'd prefer 'ioapic->irr =3D 0' here ...) >=20 > The point is that "ioapic->irr =3D 0" is overriding the previous > memcpy, because state->irr is used as argument to > kvm_ioapic_inject_all instead. So I think "iopic->irr =3D 0" should > stay close to the memcpy. Yeah, I was just spouting ... my reasoning was that we clear irr only because it's going to be recomputed, so that code is more related. (The function name would need to change though.)