qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qemu: x86: report lapic version as 0x14 instead of


From: Gabriel L. Somlo
Subject: [Qemu-devel] [PATCH] qemu: x86: report lapic version as 0x14 instead of 0x11
Date: Fri, 28 Feb 2014 14:14:25 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Some guests (e.g. 0S X) insist on a minimum lapic version of 0x14.
This patch bumps the emulated lapic version to 0x14 to accomodate that.

Signed-off-by: Gabriel L. Somlo <address@hidden>
---

Along with the TCG ioapic polarity fix, this allows me to boot OS X
without KVM acceleration.

I dug around the Intel docs and searched the Web, and there was nothing
there to indicate any difference in functionality between lapic versions
0x11 and 0x14. It appears to me that lapic version is loosely correlated
with the "generation" of the CPU it's attached to, and Apple simply decided
to include an extra check that basically says "we don't support CPUs older
than <foo>", where the oldest <foo> they support ships with lapics that
were versioned to 0x14 :) For example:

http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/osfmk/i386/lapic.c

Let me know what you think.

Thanks,
  Gabriel

 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 361ae90..67365b7 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -675,7 +675,7 @@ static uint32_t apic_mem_readl(void *opaque, hwaddr addr)
         val = s->id << 24;
         break;
     case 0x03: /* version */
-        val = 0x11 | ((APIC_LVT_NB - 1) << 16); /* version 0x11 */
+        val = 0x14 | ((APIC_LVT_NB - 1) << 16); /* version 0x14 */
         break;
     case 0x08:
         apic_sync_vapic(s, SYNC_FROM_VAPIC);
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]