summary refs log tree commit diff stats
path: root/include/hw/i386/apic_internal.h
diff options
context:
space:
mode:
authorBui Quang Minh <minhquangbui99@gmail.com>2024-01-11 22:43:59 +0700
committerMichael S. Tsirkin <mst@redhat.com>2024-02-14 06:09:32 -0500
commitb5ee0468e9d28c6bd47cce70f90b5032dd10ecc2 (patch)
treec423b901c9b931ba9f44c69524fb5c11dc65b4a0 /include/hw/i386/apic_internal.h
parentb2101358e591c9f0a93739dd3aee72935a79af80 (diff)
downloadfocaccia-qemu-b5ee0468e9d28c6bd47cce70f90b5032dd10ecc2.tar.gz
focaccia-qemu-b5ee0468e9d28c6bd47cce70f90b5032dd10ecc2.zip
apic: add support for x2APIC mode
This commit extends the APIC ID to 32-bit long and remove the 255 max APIC
ID limit in userspace APIC. The array that manages local APICs is now
dynamically allocated based on the max APIC ID of created x86 machine.
Also, new x2APIC IPI destination determination scheme, self IPI and x2APIC
mode register access are supported.

Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Message-Id: <20240111154404.5333-3-minhquangbui99@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/i386/apic_internal.h')
-rw-r--r--include/hw/i386/apic_internal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_internal.h
index 5f2ba24bfc..e796e6cae3 100644
--- a/include/hw/i386/apic_internal.h
+++ b/include/hw/i386/apic_internal.h
@@ -46,8 +46,10 @@
 #define APIC_DM_EXTINT                  7
 
 /* APIC destination mode */
-#define APIC_DESTMODE_FLAT              0xf
-#define APIC_DESTMODE_CLUSTER           1
+#define APIC_DESTMODE_PHYSICAL          0
+#define APIC_DESTMODE_LOGICAL           1
+#define APIC_DESTMODE_LOGICAL_FLAT      0xf
+#define APIC_DESTMODE_LOGICAL_CLUSTER   0
 
 #define APIC_TRIGGER_EDGE               0
 #define APIC_TRIGGER_LEVEL              1
@@ -187,6 +189,7 @@ struct APICCommonState {
     DeviceState *vapic;
     hwaddr vapic_paddr; /* note: persistence via kvmvapic */
     bool legacy_instance_id;
+    uint32_t extended_log_dest;
 };
 
 typedef struct VAPICState {