target/i386: fix typo in ctl_has_irq

The shift constant was incorrect, causing int_prio to always be zero.

Signed-off-by: Lara Lazier <laramglazier@gmail.com>
[Rewritten commit message since v1 had already been included. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-07-29 09:56:38 +02:00
parent eceb4f0112
commit f594bfb79f

View File

@ -70,7 +70,7 @@ static inline bool ctl_has_irq(uint32_t int_ctl)
uint32_t int_prio; uint32_t int_prio;
uint32_t tpr; uint32_t tpr;
int_prio = (int_ctl & V_INTR_PRIO_MASK) >> V_INTR_MASKING_SHIFT; int_prio = (int_ctl & V_INTR_PRIO_MASK) >> V_INTR_PRIO_SHIFT;
tpr = int_ctl & V_TPR_MASK; tpr = int_ctl & V_TPR_MASK;
return (int_ctl & V_IRQ_MASK) && (int_prio >= tpr); return (int_ctl & V_IRQ_MASK) && (int_prio >= tpr);
} }