Merge branch 'kvm-master' into kvm-next
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 May 2015 09:46:12 +0000 (11:46 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 May 2015 10:31:37 +0000 (12:31 +0200)
Grab MPX bugfix, and fix conflicts against Rik's adaptive FPU
deactivation patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1  2 
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/cpuid.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c

Simple merge
@@@ -95,6 -97,8 +97,8 @@@ int kvm_update_cpuid(struct kvm_vcpu *v
        if (best && (best->eax & (F(XSAVES) | F(XSAVEC))))
                best->ebx = xstate_required_size(vcpu->arch.xcr0, true);
  
 -      vcpu->arch.eager_fpu = guest_cpuid_has_mpx(vcpu);
++      vcpu->arch.eager_fpu = use_eager_fpu() || guest_cpuid_has_mpx(vcpu);
        /*
         * The existing code assumes virtual address is 48-bit in the canonical
         * address checks; exit if it is ever changed.
Simple merge
Simple merge
@@@ -7149,16 -7060,9 +7151,16 @@@ void kvm_put_guest_fpu(struct kvm_vcpu 
        fpu_save_init(&vcpu->arch.guest_fpu);
        __kernel_fpu_end();
        ++vcpu->stat.fpu_reload;
 -      if (!vcpu->arch.eager_fpu)
 -              kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu);
 -
 +      /*
 +       * If using eager FPU mode, or if the guest is a frequent user
 +       * of the FPU, just leave the FPU active for next time.
 +       * Every 255 times fpu_counter rolls over to 0; a guest that uses
 +       * the FPU in bursts will revert to loading it on demand.
 +       */
-       if (!use_eager_fpu()) {
++      if (!vcpu->arch.eager_fpu) {
 +              if (++vcpu->fpu_counter < 5)
 +                      kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu);
 +      }
        trace_kvm_fpu(0);
  }