• Marc Orr's avatar
    kvm: x86: Use task structs fpu field for user · 240c35a3
    Marc Orr authored
    Previously, x86's instantiation of 'struct kvm_vcpu_arch' added an fpu
    field to save/restore fpu-related architectural state, which will differ
    from kvm's fpu state. However, this is redundant to the 'struct fpu'
    field, called fpu, embedded in the task struct, via the thread field.
    Thus, this patch removes the user_fpu field from the kvm_vcpu_arch
    struct and replaces it with the task struct's fpu field.
    
    This change is significant because the fpu struct is actually quite
    large. For example, on the system used to develop this patch, this
    change reduces the size of the vcpu_vmx struct from 23680 bytes down to
    19520 bytes, when building the kernel with kvmconfig. This reduction in
    the size of the vcpu_vmx struct moves us closer to being able to
    allocate the struct at order 2, rather than order 3.
    Suggested-by: default avatarDave Hansen <dave.hansen@intel.com>
    Signed-off-by: default avatarMarc Orr <marcorr@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    240c35a3
x86.c 252 KB