diff options
author | Lara Lazier <laramglazier@gmail.com> | 2021-08-17 19:30:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-09-13 13:56:26 +0200 |
commit | 66a0201ba7a3143689014eb711a5942babca2585 (patch) | |
tree | 67260c0507e25efe3f3419c31345ac59fb3ed600 /target | |
parent | b67e2796a132f912533a879a4fbe6acad4cbac1e (diff) |
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 <laramglazier@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/tcg/sysemu/svm_helper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/svm_helper.c index 4612dae1ac..a35b79548a 100644 --- a/target/i386/tcg/sysemu/svm_helper.c +++ b/target/i386/tcg/sysemu/svm_helper.c @@ -83,6 +83,11 @@ static inline bool ctl_has_irq(CPUX86State *env) int_prio = (env->int_ctl & V_INTR_PRIO_MASK) >> V_INTR_PRIO_SHIFT; tpr = env->int_ctl & V_TPR_MASK; + + if (env->int_ctl & V_IGN_TPR_MASK) { + return env->int_ctl & V_IRQ_MASK; + } + return (env->int_ctl & V_IRQ_MASK) && (int_prio >= tpr); } |