summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2016-07-12 22:09:19 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-07-14 09:03:52 +0200
commite45115b62f9abb143a03036dbde05faf5864aa01 (patch)
treeebb3802f82ded6a134190ec496a3202bd315a215 /arch/x86/include/asm/kvm_host.h
parent64aa47bfc45323040d5db8f30cbd6851f2606c7d (diff)
KVM: x86: use physical LAPIC array for logical x2APIC
Logical x2APIC IDs map injectively to physical x2APIC IDs, so we can reuse the physical array for them. This allows us to save space by sizing the logical maps according to the needs of xAPIC. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 5f90dce6fbd1..623089c4e1a7 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -683,8 +683,10 @@ struct kvm_apic_map {
struct rcu_head rcu;
u8 mode;
struct kvm_lapic *phys_map[256];
- /* first index is cluster id second is cpu id in a cluster */
- struct kvm_lapic *logical_map[16][16];
+ union {
+ struct kvm_lapic *xapic_flat_map[8];
+ struct kvm_lapic *xapic_cluster_map[16][4];
+ };
};
/* Hyper-V emulation context */