]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: vmx: Reduce size of vmcs_field_to_offset_table
authorJim Mattson <jmattson@google.com>
Fri, 22 Dec 2017 20:13:13 +0000 (12:13 -0800)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 16 Jan 2018 15:50:03 +0000 (16:50 +0100)
commit40d5438ad84b3147cd5675ffeac348906dfbf64f
tree2828defb787c7e968bff024facdc2370b9a4a69e
parenta2cd208ede231f85cc3e9e6ce79cf8187ab16e8d
kvm: vmx: Reduce size of vmcs_field_to_offset_table

The vmcs_field_to_offset_table was a rather sparse table of short
integers with a maximum index of 0x6c16, amounting to 55342 bytes. Now
that we are considering support for multiple VMCS12 formats, it would
be unfortunate to replicate that large, sparse table. Rotating the
field encoding (as a 16-bit integer) left by 6 reduces that table to
5926 bytes.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c