]> 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)
commit1d26ffffa83ae851ca4c8f4e3982762ace9b6c37
tree2828defb787c7e968bff024facdc2370b9a4a69e
parentcf66e852ff7d0d890e29bf3cdfa016c3b458d5f5
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