qemu: initialize lapic

Recently qemu stopped doing a basic lapic setup and expects the
firmware to handle this properly (like on real hardware).  So
let's do that so coreboot works properly on qemu 2.4+.

Here is the qemu commit message for the change:

<quote>
  commit b8eb5512fd8a115f164edbbe897cdf8884920ccb
  Author: Nadav Amit <namit@cs.technion.ac.il>
  Date:   Mon Apr 13 02:32:08 2015 +0300

  target-i386: disable LINT0 after reset

  Due to old Seabios bug, QEMU reenable LINT0 after reset. This bug is long gone
  and therefore this hack is no longer needed.  Since it violates the
  specifications, it is removed.

  Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
  Message-Id: <1428881529-29459-2-git-send-email-namit@cs.technion.ac.il>
  Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
</quote>

Change-Id: I022f3742475d3f3477fc838b1e2bce69287b6b8e
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-on: http://review.coreboot.org/11611
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/src/cpu/qemu-x86/qemu.c b/src/cpu/qemu-x86/qemu.c
index 4704bb8..b6f0ad5 100644
--- a/src/cpu/qemu-x86/qemu.c
+++ b/src/cpu/qemu-x86/qemu.c
@@ -18,8 +18,15 @@
 
 #include <cpu/cpu.h>
 #include <device/device.h>
+#include <cpu/x86/lapic.h>
+
+static void qemu_cpu_init(struct device *dev)
+{
+	setup_lapic();
+}
 
 static struct device_operations cpu_dev_ops = {
+	.init = qemu_cpu_init,
 };
 
 static struct cpu_device_id cpu_table[] = {