]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
KVM: x86: Move call to update_exception_bitmap() into VMX code
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 30 Sep 2020 04:16:57 +0000 (21:16 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 21 Oct 2020 21:48:50 +0000 (17:48 -0400)
Now that vcpu_after_set_cpuid() and update_exception_bitmap() are called
back-to-back, subsume the exception bitmap update into the common CPUID
update.  Drop the SVM invocation entirely as SVM's exception bitmap
doesn't vary with respect to guest CPUID.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200930041659.28181-4-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/vmx/vmx.c

index 35223eb63242835b7e02be93c20278e14cca82f3..06a278b3701d127b7f7096f23091f69891467362 100644 (file)
@@ -171,7 +171,6 @@ static void kvm_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
 
        /* Invoke the vendor callback only after the above state is updated. */
        kvm_x86_ops.vcpu_after_set_cpuid(vcpu);
-       kvm_x86_ops.update_exception_bitmap(vcpu);
 }
 
 static int is_efer_nx(void)
index a3d63ea5a090bcde14858b961aa27968675154f8..b74b59cba22ca4fb6b25c19b7574c91f0c3fa399 100644 (file)
@@ -7248,6 +7248,9 @@ static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
                        vmx_set_guest_uret_msr(vmx, msr, enabled ? 0 : TSX_CTRL_RTM_DISABLE);
                }
        }
+
+       /* Refresh #PF interception to account for MAXPHYADDR changes. */
+       update_exception_bitmap(vcpu);
 }
 
 static __init void vmx_set_cpu_caps(void)