x86/vioapic: clear remote IRR when switching RTE to edge triggered mode
PATCH 1/1 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.
xen/arch/x86/hvm/vioapic.c +3 -2
@@ -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] ) {
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.
xen/arch/x86/hvm/vioapic.c +3 -2
@@ -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] ) {
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Jan Beulich
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 <[email protected]>Tested-by Olaf Hering <[email protected]>
Quoted 21 lines
xen/arch/x86/hvm/vioapic.c +3
-2@@ -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] ) {_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 11 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 6 lines · Jan Beulich
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 <[email protected]>Tested-by Olaf Hering <[email protected]>Acked-by Keir Fraser <[email protected]>
Committed. Could that also be added to the older maintained trees, please (once it made it though stage testing)?
Thanks, Jan
Quoted 21 lines
Quoted 21 lines
xen/arch/x86/hvm/vioapic.c +3
-2@@ -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] ) {_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 4 lines · Jan Beulich
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.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Jan Beulich <[email protected]>Tested-by Olaf Hering <[email protected]>Acked-by Keir Fraser <[email protected]>Committed. Could that also be added to the older maintained trees, please (once it made it though stage testing)?
Will do. I think we're still having test problems, possibly another regression from Jean's patch series.
Quoted 26 lines
Thanks, Jan
Quoted 21 lines
Quoted 21 lines
xen/arch/x86/hvm/vioapic.c +3
-2@@ -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] ) {_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel