OSDN Git Service

KVM: x86/mmu: Use low available bits for removed SPTEs
authorSean Christopherson <seanjc@google.com>
Thu, 25 Feb 2021 20:47:48 +0000 (12:47 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:43:54 +0000 (04:43 -0400)
commit715f1079eee12f629b2de5c8a9489124a5af0a18
tree531f1f6c35c82a6f18bf0287baf2a54c0a226984
parent7a51393ae0f6287f9b2bdd138f5a091b7c302c1f
KVM: x86/mmu: Use low available bits for removed SPTEs

Use low "available" bits to tag REMOVED SPTEs.  Using a high bit is
moderately costly as it often causes the compiler to generate a 64-bit
immediate.  More importantly, this makes it very clear REMOVED_SPTE is
a value, not a flag.

Cc: Ben Gardon <bgardon@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210225204749.1512652-24-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/spte.c
arch/x86/kvm/mmu/spte.h