[oe-commits] [openembedded-core] 33/35: qemu: apic: fallthrough to PIC

git at git.openembedded.org git at git.openembedded.org
Wed Aug 9 22:50:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a4ee198f8de5639e2f5063ee7729e7d43bf9bc40
Author: He Zhe <zhe.he at windriver.com>
AuthorDate: Wed Aug 9 18:00:48 2017 +0800

    qemu: apic: fallthrough to PIC
    
    Backport a commit from qemu upstream to fix a protection fault
    
    https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html
    
    Signed-off-by: He Zhe <zhe.he at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 .../qemu/qemu/apic-fixup-fallthrough-to-PIC.patch  | 46 ++++++++++++++++++++++
 meta/recipes-devtools/qemu/qemu_2.8.1.1.bb         |  1 +
 2 files changed, 47 insertions(+)

diff --git a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
new file mode 100644
index 0000000..9bbbc6f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -0,0 +1,46 @@
+From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine at windriver.com>
+Date: Tue, 26 Feb 2013 11:43:28 -0500
+Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
+
+Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
+interrupts through the local APIC if the local APIC config says so.]
+missed a check to ensure the local APIC is enabled. Since if the local
+APIC is disabled it doesn't matter what the local APIC config says.
+
+If this check isn't done and the guest has disabled the local APIC the
+guest will receive a general protection fault, similar to what is seen
+here:
+
+https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html
+
+The GPF is caused by an attempt to service interrupt 0xffffffff. This
+comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr()
+(with the local APIC disabled apic_get_interrupt() returns -1).
+apic_accept_pic_intr() returns 0 and thus the interrupt number which
+is returned from cpu_get_pic_interrupt(), and which is attempted to be
+serviced, is -1.
+
+Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
+Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
+Signed-off-by: He Zhe <zhe.he at windriver.com>
+---
+ hw/intc/apic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/intc/apic.c b/hw/intc/apic.c
+index 45887d99..c5ae4087 100644
+--- a/hw/intc/apic.c
++++ b/hw/intc/apic.c
+@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+     APICCommonState *s = APIC_COMMON(dev);
+     uint32_t lvt0;
+ 
+-    if (!s)
++    if (!s || !(s->spurious_vec & APIC_SV_ENABLE))
+         return -1;
+ 
+     lvt0 = s->lvt[APIC_LVT_LINT0];
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
index a5dc704..a4ddb7f 100644
--- a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
@@ -27,6 +27,7 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
            file://CVE-2016-9908.patch \
            file://CVE-2016-9912.patch \
            file://0001-replace-struct-ucontext-with-ucontext_t-type.patch \
+           file://apic-fixup-fallthrough-to-PIC.patch \
            "
 
 SRC_URI_append_class-native = " \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list