From: Jan Beulich Date: Tue, 22 Nov 2011 13:36:27 +0000 (+0000) Subject: x86/vioapic: clear remote IRR when switching RTE to edge triggered mode X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=698e5532f15ebc6f2e9d752bdab91fa255fe10f4;p=people%2Fvhanquez%2Fxen.git x86/vioapic: clear remote IRR when switching RTE to edge triggered mode 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 xen-unstable changeset: 24168:9c350ab8d3ea xen-unstable date: Mon Nov 21 09:29:31 2011 +0100 Committed-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c index 6e6b94ea7..eed90f909 100644 --- 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 == VIOAPIC_LEVEL_TRIG) && - !ent.fields.mask && + else if ( ent.fields.trig_mode == VIOAPIC_EDGE_TRIG ) + pent->fields.remote_irr = 0; + else if ( !ent.fields.mask && !ent.fields.remote_irr && hvm_irq->gsi_assert_count[idx] ) {