Skip to content

Instantly share code, notes, and snippets.

@Crazor
Created April 7, 2013 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Crazor/5332658 to your computer and use it in GitHub Desktop.
Save Crazor/5332658 to your computer and use it in GitHub Desktop.
Patch for QEMU to report APIC version 0x14. Needed to run OS X.
diff --git a/hw/apic.c b/hw/apic.c
index fd14b73..0a4a3bc 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -673,7 +673,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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment