summaryrefslogtreecommitdiffstats
path: root/hw/intc/apic.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin2018-01-11 21:01:17 +0100
committerMichael S. Tsirkin2018-01-11 21:03:50 +0100
commitacc95bc85036c443da8bf7159a77edf9f00dcd80 (patch)
tree21965c6e60a2e29664b7685e52feacdb6a86e0bd /hw/intc/apic.c
parentsmbus: do not immediately complete commands (diff)
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180111'... (diff)
downloadqemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.tar.gz
qemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.tar.xz
qemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.zip
Merge remote-tracking branch 'origin/master' into HEAD
Resolve conflicts around apb. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/intc/apic.c')
-rw-r--r--hw/intc/apic.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index fe15fb6024..6fda52b86c 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -305,6 +305,18 @@ static void apic_set_tpr(APICCommonState *s, uint8_t val)
}
}
+int apic_get_highest_priority_irr(DeviceState *dev)
+{
+ APICCommonState *s;
+
+ if (!dev) {
+ /* no interrupts */
+ return -1;
+ }
+ s = APIC_COMMON(dev);
+ return get_highest_priority_int(s->irr);
+}
+
static uint8_t apic_get_tpr(APICCommonState *s)
{
apic_sync_vapic(s, SYNC_FROM_VAPIC);