From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934833AbcCPRL4 (ORCPT ); Wed, 16 Mar 2016 13:11:56 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:33078 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934635AbcCPRLo (ORCPT ); Wed, 16 Mar 2016 13:11:44 -0400 MIME-Version: 1.0 In-Reply-To: References: <1457729240-3846-1-git-send-email-dmatlack@google.com> <56E66C57.9080802@linux.intel.com> <56E8D679.9020305@linux.intel.com> From: David Matlack Date: Wed, 16 Mar 2016 10:11:24 -0700 Message-ID: Subject: Re: [PATCH 0/1] KVM: x86: using the fpu in interrupt context with a guest's xcr0 To: Andy Lutomirski Cc: Xiao Guangrong , "linux-kernel@vger.kernel.org" , X86 ML , kvm list , Paolo Bonzini , Ingo Molnar , Andy Lutomirski , "H. Peter Anvin" , Eric Northup Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 15, 2016 at 8:48 PM, Andy Lutomirski wrote: > > Why is it safe to rely on interrupted_kernel_fpu_idle? That function > is for interrupts, but is there any reason that KVM can't be preempted > (or explicitly schedule) with XCR0 having some funny value? KVM restores the host's xcr0 in the sched-out preempt notifier and prior to returning to userspace.