From: Paolo Bonzini Subject: Re: [PATCH] x86,kvm: move qemu/guest FPU switching out to vcpu_run Date: Wed, 15 Nov 2017 09:34:20 +0100 Message-ID: References: <20171114001223.441ea2ca@annuminas.surriel.com> <1510682877.30057.1.camel@redhat.com> <6f73cff1-eddf-7dc6-a93c-31c20e8520d7@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rkrcmar@redhat.com, borntraeger@de.ibm.com To: David Hildenbrand , Rik van Riel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46964 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756514AbdKOIee (ORCPT ); Wed, 15 Nov 2017 03:34:34 -0500 In-Reply-To: <6f73cff1-eddf-7dc6-a93c-31c20e8520d7@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 14/11/2017 20:40, David Hildenbrand wrote: > I think we should check all get/put_fpu callers if they need > preempt_disable(). > > E.g. em_fxrstor() needs disabled preemption as we temporarily > save + restore some host register (via fxsave + fxrstor) under some > circumstances that are not saved/restored when switching to/back from > another process. We should double check. Rik may correct me, but I believe that you don't need preempt_disable/enable because preempt notifiers do this for you. Paolo