summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2014-11-27 20:03:13 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-04 15:29:08 +0100
commit45c3094a6424614e6fea135e4e1afd8e0a65f468 (patch)
treea238fbc1bd5e8e83b2cd68973a62b3c273713e26 /arch/x86/kvm/lapic.h
parent25995e5b4aa308e5264cf7cf3e86871acf6a8b8c (diff)
downloadlinux-45c3094a6424614e6fea135e4e1afd8e0a65f468.tar.bz2
KVM: x86: allow 256 logical x2APICs again
While fixing an x2apic bug, 17d68b7 KVM: x86: fix guest-initiated crash with x2apic (CVE-2013-6376) we've made only one cluster available. This means that the amount of logically addressible x2APICs was reduced to 16 and VCPUs kept overwriting themselves in that region, so even the first cluster wasn't set up correctly. This patch extends x2APIC support back to the logical_map's limit, and keeps the CVE fixed as messages for non-present APICs are dropped. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r--arch/x86/kvm/lapic.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index d4365f21ea2e..c674fce53cf9 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -154,8 +154,6 @@ static inline u16 apic_cluster_id(struct kvm_apic_map *map, u32 ldr)
ldr >>= 32 - map->ldr_bits;
cid = (ldr >> map->cid_shift) & map->cid_mask;
- BUG_ON(cid >= ARRAY_SIZE(map->logical_map));
-
return cid;
}