diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2018-06-01 10:29:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-04 15:15:00 +0100 |
commit | dfc9dd521bedc0ab2591c22d699be5cc6e159e57 (patch) | |
tree | c499c2e87c59ef6e3b5a55e9e0a8b1babb8a0d24 /meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch | |
parent | f1eb044403b543e1122656d89280ea5202783a78 (diff) | |
download | poky-dfc9dd521bedc0ab2591c22d699be5cc6e159e57.tar.gz |
qemu: refresh patches with devtool and make them applicable with git
(From OE-Core rev: e8fb42f3a54e8b8d68ae216a48534fa745ea99f1)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch new file mode 100644 index 0000000000..915bfdac58 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 945f428016f278fa8e38bc8d153397c3195f85a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Tue, 26 Feb 2013 11:43:28 -0500 | ||
4 | Subject: [PATCH] apic: fixup fallthrough to PIC | ||
5 | |||
6 | Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC | ||
7 | interrupts through the local APIC if the local APIC config says so.] | ||
8 | missed a check to ensure the local APIC is enabled. Since if the local | ||
9 | APIC is disabled it doesn't matter what the local APIC config says. | ||
10 | |||
11 | If this check isn't done and the guest has disabled the local APIC the | ||
12 | guest will receive a general protection fault, similar to what is seen | ||
13 | here: | ||
14 | |||
15 | https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html | ||
16 | |||
17 | The GPF is caused by an attempt to service interrupt 0xffffffff. This | ||
18 | comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr() | ||
19 | (with the local APIC disabled apic_get_interrupt() returns -1). | ||
20 | apic_accept_pic_intr() returns 0 and thus the interrupt number which | ||
21 | is returned from cpu_get_pic_interrupt(), and which is attempted to be | ||
22 | serviced, is -1. | ||
23 | |||
24 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
25 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html] | ||
26 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
27 | --- | ||
28 | hw/intc/apic.c | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/hw/intc/apic.c b/hw/intc/apic.c | ||
32 | index fe15fb6..8352c39 100644 | ||
33 | --- a/hw/intc/apic.c | ||
34 | +++ b/hw/intc/apic.c | ||
35 | @@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *dev) | ||
36 | APICCommonState *s = APIC(dev); | ||
37 | uint32_t lvt0; | ||
38 | |||
39 | - if (!s) | ||
40 | + if (!s || !(s->spurious_vec & APIC_SV_ENABLE)) | ||
41 | return -1; | ||
42 | |||
43 | lvt0 = s->lvt[APIC_LVT_LINT0]; | ||