diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2016-07-12 22:09:19 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-14 09:03:52 +0200 |
commit | e45115b62f9abb143a03036dbde05faf5864aa01 (patch) | |
tree | ebb3802f82ded6a134190ec496a3202bd315a215 /arch/x86/include | |
parent | 64aa47bfc45323040d5db8f30cbd6851f2606c7d (diff) | |
download | talos-obmc-linux-e45115b62f9abb143a03036dbde05faf5864aa01.tar.gz talos-obmc-linux-e45115b62f9abb143a03036dbde05faf5864aa01.zip |
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')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 6 |
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 */ |