Skip to content

Commit 66a0201

Browse files
Lara Lazierbonzini
authored andcommitted
target/i386: Added ignore TPR check in ctl_has_irq
The APM2 states that if V_IGN_TPR is nonzero, the current virtual interrupt ignores the (virtual) TPR. Signed-off-by: Lara Lazier <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent b67e279 commit 66a0201

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

target/i386/tcg/sysemu/svm_helper.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ static inline bool ctl_has_irq(CPUX86State *env)
8383

8484
int_prio = (env->int_ctl & V_INTR_PRIO_MASK) >> V_INTR_PRIO_SHIFT;
8585
tpr = env->int_ctl & V_TPR_MASK;
86+
87+
if (env->int_ctl & V_IGN_TPR_MASK) {
88+
return env->int_ctl & V_IRQ_MASK;
89+
}
90+
8691
return (env->int_ctl & V_IRQ_MASK) && (int_prio >= tpr);
8792
}
8893

0 commit comments

Comments
 (0)