KVM: SVM: Rename svm_flush_tlb() to svm_flush_tlb_current()
Rename svm_flush_tlb() to svm_flush_tlb_current() so that at least one of the flushing operations in svm_x86_ops can be filled via kvm-x86-ops.h, and to document the scope of the flush (specifically that it doesn't flush "all"). Opportunistically make svm_tlb_flush_current(), was svm_flush_tlb(), static. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220128005208.4008533-17-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
872e0c5308
commit
4d9c83f5a0
|
@ -265,6 +265,8 @@ u32 svm_msrpm_offset(u32 msr)
|
|||
|
||||
#define MAX_INST_SIZE 15
|
||||
|
||||
static void svm_flush_tlb_current(struct kvm_vcpu *vcpu);
|
||||
|
||||
static int get_npt_level(void)
|
||||
{
|
||||
#ifdef CONFIG_X86_64
|
||||
|
@ -1658,7 +1660,7 @@ void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
|
|||
unsigned long old_cr4 = vcpu->arch.cr4;
|
||||
|
||||
if (npt_enabled && ((old_cr4 ^ cr4) & X86_CR4_PGE))
|
||||
svm_flush_tlb(vcpu);
|
||||
svm_flush_tlb_current(vcpu);
|
||||
|
||||
vcpu->arch.cr4 = cr4;
|
||||
if (!npt_enabled) {
|
||||
|
@ -3503,7 +3505,7 @@ static int svm_set_identity_map_addr(struct kvm *kvm, u64 ident_addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void svm_flush_tlb(struct kvm_vcpu *vcpu)
|
||||
static void svm_flush_tlb_current(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct vcpu_svm *svm = to_svm(vcpu);
|
||||
|
||||
|
@ -4536,10 +4538,10 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
|
|||
.set_rflags = svm_set_rflags,
|
||||
.get_if_flag = svm_get_if_flag,
|
||||
|
||||
.flush_tlb_all = svm_flush_tlb,
|
||||
.flush_tlb_current = svm_flush_tlb,
|
||||
.flush_tlb_all = svm_flush_tlb_current,
|
||||
.flush_tlb_current = svm_flush_tlb_current,
|
||||
.flush_tlb_gva = svm_flush_tlb_gva,
|
||||
.flush_tlb_guest = svm_flush_tlb,
|
||||
.flush_tlb_guest = svm_flush_tlb_current,
|
||||
|
||||
.vcpu_pre_run = svm_vcpu_pre_run,
|
||||
.vcpu_run = svm_vcpu_run,
|
||||
|
|
|
@ -480,7 +480,6 @@ void svm_vcpu_free_msrpm(u32 *msrpm);
|
|||
int svm_set_efer(struct kvm_vcpu *vcpu, u64 efer);
|
||||
void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0);
|
||||
void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4);
|
||||
void svm_flush_tlb(struct kvm_vcpu *vcpu);
|
||||
void disable_nmi_singlestep(struct vcpu_svm *svm);
|
||||
bool svm_smi_blocked(struct kvm_vcpu *vcpu);
|
||||
bool svm_nmi_blocked(struct kvm_vcpu *vcpu);
|
||||
|
|
Loading…
Reference in New Issue