KVM: x86: Add helper to consolidate "raw" reserved GPA mask calculations
authorSean Christopherson <seanjc@google.com>
Thu, 4 Feb 2021 00:01:15 +0000 (16:01 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 14:27:30 +0000 (09:27 -0500)
commita8ac864a7d6dbc2fc43081b1eecd9e0183065d47
treeeef1dceffffb8792929b3f953093552373ef03cb
parent6f8e65a60168567cc59f9b99980ea9112d4152f5
KVM: x86: Add helper to consolidate "raw" reserved GPA mask calculations

Add a helper to generate the mask of reserved GPA bits _without_ any
adjustments for repurposed bits, and use it to replace a variety of
open coded variants in the MTRR and APIC_BASE flows.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210204000117.3303214-11-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/cpuid.h
arch/x86/kvm/mtrr.c
arch/x86/kvm/x86.c