From: "Jan Beulich" Subject: [PATCH] x86/vioapic: clear remote IRR when switching RTE to edge triggered mode Date: Mon, 21 Nov 2011 08:17:37 +0000 Message-ID: <4ECA17310200007800062083@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartD4FB5D31.1__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" Cc: Olaf Hering List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartD4FB5D31.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Xen itself (as much as Linux) relies on this behavior, so it should also emulate it properly. Not doing so reportedly gets in the way of kexec inside a HVM guest. Signed-off-by: Jan Beulich Tested-by: Olaf Hering --- a/xen/arch/x86/hvm/vioapic.c +++ b/xen/arch/x86/hvm/vioapic.c @@ -154,8 +154,9 @@ static void vioapic_write_redirent( { vlapic_adjust_i8259_target(d); } - else if ( (ent.fields.trig_mode =3D=3D VIOAPIC_LEVEL_TRIG) && - !ent.fields.mask && + else if ( ent.fields.trig_mode =3D=3D VIOAPIC_EDGE_TRIG ) + pent->fields.remote_irr =3D 0; + else if ( !ent.fields.mask && !ent.fields.remote_irr && hvm_irq->gsi_assert_count[idx] ) { --=__PartD4FB5D31.1__= Content-Type: text/plain; name="x86-vioapic-clear-remote_irr.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-vioapic-clear-remote_irr.patch" x86/vioapic: clear remote IRR when switching RTE to edge triggered = mode=0A=0AXen itself (as much as Linux) relies on this behavior, so it = should=0Aalso emulate it properly. Not doing so reportedly gets in the way = of=0Akexec inside a HVM guest.=0A=0ASigned-off-by: Jan Beulich =0ATested-by: Olaf Hering =0A=0A--- a/xen/arch/x86/h= vm/vioapic.c=0A+++ b/xen/arch/x86/hvm/vioapic.c=0A@@ -154,8 +154,9 @@ = static void vioapic_write_redirent(=0A {=0A vlapic_adjust_i8259= _target(d);=0A }=0A- else if ( (ent.fields.trig_mode =3D=3D = VIOAPIC_LEVEL_TRIG) &&=0A- !ent.fields.mask &&=0A+ else if = ( ent.fields.trig_mode =3D=3D VIOAPIC_EDGE_TRIG )=0A+ pent->fields.r= emote_irr =3D 0;=0A+ else if ( !ent.fields.mask &&=0A = !ent.fields.remote_irr &&=0A hvm_irq->gsi_assert_count[idx] = )=0A {=0A --=__PartD4FB5D31.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartD4FB5D31.1__=--