]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
commit58e9ffae5efd3ee9b655ee36702f02c36d51ead9
tree2828defb787c7e968bff024facdc2370b9a4a69e
parentd37f4267a79f7d423103cb9fdd67a4a3a8194335
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