[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F2CBF3009FA73547804AE4C663CAB28E527B05@shsmsx102.ccr.corp.intel.com>
Date: Wed, 20 May 2015 03:00:24 +0000
From: "Li, Liang Z" <liang.z.li@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"Zhang, Yang Z" <yang.z.zhang@...el.com>,
"gleb@...nel.org" <gleb@...nel.org>
Subject: RE: [PATCH] kvm/fpu: Enable eager restore kvm FPU for MPX
Correct Gleb's email address.
Liang
> -----Original Message-----
> From: Li, Liang Z
> Sent: Wednesday, May 20, 2015 10:36 PM
> To: kvm@...r.kernel.org; linux-kernel@...r.kernel.org
> Cc: gleb@...nel.or; pbonzini@...hat.com; tglx@...utronix.de;
> mingo@...hat.com; hpa@...or.com; x86@...nel.org; Zhang, Yang Z; Li,
> Liang Z
> Subject: [PATCH] kvm/fpu: Enable eager restore kvm FPU for MPX
>
> The MPX feature requires eager KVM FPU restore support. We have verified
> that MPX cannot work correctly with the current lazy KVM FPU restore
> mechanism. Eager KVM FPU restore should be enabled if the MPX feature is
> exposed to VM.
>
> Signed-off-by: Liang Li <liang.z.li@...el.com>
> ---
> arch/x86/kvm/vmx.c | 2 ++
> arch/x86/kvm/x86.c | 3 ++-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index
> f7b6168..e2cccbe 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -8445,6 +8445,8 @@ static struct kvm_vcpu *vmx_create_vcpu(struct
> kvm *kvm, unsigned int id)
> goto free_vmcs;
> }
>
> + if (vmx_mpx_supported())
> + vmx_fpu_activate(&vmx->vcpu);
> return &vmx->vcpu;
>
> free_vmcs:
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5f38188..5993f5f
> 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -7060,7 +7060,8 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
> fpu_save_init(&vcpu->arch.guest_fpu);
> __kernel_fpu_end();
> ++vcpu->stat.fpu_reload;
> - kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu);
> + if (!kvm_x86_ops->mpx_supported())
> + kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu);
> trace_kvm_fpu(0);
> }
>
> --
> 1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists