qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] qemu: x86: report lapic version as 0x14 instead of 0x11
Date: Sat, 01 Mar 2014 15:46:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 28/02/2014 20:14, Gabriel L. Somlo ha scritto:
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);


Looks good, but you have to make this a qdev property so that older versions keep using version 0x11.

Paolo



reply via email to

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