x86/vLAPIC: avoid speculative out of bounds accesses
authorJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2019 09:50:58 +0000 (11:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2019 09:50:58 +0000 (11:50 +0200)
commitf7f7cd5c585ab2d6f4bbc17b8fbec52dde1a5715
treecd61da5d0cf0ddfa066c4231dcc6deb065dfc0b6
parente5e876f4afb781921f56d3c42812ae1da40a894f
x86/vLAPIC: avoid speculative out of bounds accesses

Array indexes used in the MSR read/write emulation functions as well as
the direct VMX / APIC-V hook are derived from guest controlled values.
Restrict their ranges to limit the side effects of speculative
execution.

Along these lines also constrain the vlapic_lvt_mask[] access.

Remove the unused vlapic_lvt_{vector,dm}() instead of adjusting them.

This is part of the speculative hardening effort.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vlapic.c