• Andy Lutomirski's avatar
    x86/kvm/vmx: Simplify segment_base() · 8c2e41f7
    Andy Lutomirski authored
    Use actual pointer types for pointers (instead of unsigned long) and
    replace hardcoded constants with the appropriate self-documenting
    macros.
    
    The function is still a bit messy, but this seems a lot better than
    before to me.
    
    This is mostly borrowed from a patch by Thomas Garnier.
    
    Cc: Thomas Garnier <thgarnie@google.com>
    Cc: Jim Mattson <jmattson@google.com>
    Cc: Radim Krčmář <rkrcmar@redhat.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    8c2e41f7
vmx.c 329 KB