From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66128C4727E for ; Thu, 1 Oct 2020 21:43:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 077802074B for ; Thu, 1 Oct 2020 21:43:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="LLhPXUuW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727209AbgJAVm7 (ORCPT ); Thu, 1 Oct 2020 17:42:59 -0400 Received: from esa1.hc3370-68.iphmx.com ([216.71.145.142]:24239 "EHLO esa1.hc3370-68.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbgJAVm7 (ORCPT ); Thu, 1 Oct 2020 17:42:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1601588580; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=z6b/r3hHL+5K5thUZG5Lk9eZ7y9ACsF0mo+j/bOxxXw=; b=LLhPXUuWnV5TOiz0ml5LGS/YuvZmnUuXHdQN6q02mxGeprJbdJsA3ntI m5kbK38d5ktDwfsJ75Gl3Jc+NUCSInolJssa9OBhuAiAs4/NOiW4sJG5w p4Zd3PqIpVi2DxhN8CMNrWaFqHmpgDE0Jxj6WKg1HnVndDmSlx72nH2Lz s=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: IVgPxBubx9IFKOZVlPysbMtnRXL4ZpfFLZGy8JIIMu4gYAF5uHeGUVV/6cv17L3FtuE6Lzfdn+ 3IOUzTTBxxICGU2Lydv8XL0UBulK0Jidy7qr28PB/wuCrRR8ewCWD+6taLi60v/SlHgxVAjfVS Lwn3g2oYkxiqqIlDy2klQRgXBV7BUy4hcK6cRc78LAswrVh3hRxCsulsUVDUMCvNbVFQE35Co7 RMwrOyrsCOmTHj5k6EFGrQ2Xyf+QoS4DnJgd3EsqcfYgFB4Uiqe9aYk/qMQfRJNn5UsGjDD9LO sEc= X-SBRS: None X-MesageID: 28456287 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,325,1596513600"; d="scan'208";a="28456287" Subject: Re: How should we handle illegal task FPU state? To: Sean Christopherson , "Yu, Yu-cheng" CC: Andy Lutomirski , Dave Hansen , LKML , X86 ML , Rik van Riel References: <71682bce-a925-d3bd-18ef-d2e4eb8ebc8e@intel.com> <20201001205857.GH7474@linux.intel.com> From: Andrew Cooper Message-ID: <93999eea-468c-c4a7-d793-b6c82e4b26a4@citrix.com> Date: Thu, 1 Oct 2020 22:42:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201001205857.GH7474@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To FTLPEX02CL05.citrite.net (10.13.108.178) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/10/2020 21:58, Sean Christopherson wrote: > On Thu, Oct 01, 2020 at 01:32:04PM -0700, Yu, Yu-cheng wrote: >> On 10/1/2020 10:43 AM, Andy Lutomirski wrote: >>> The question is: what do we do about it? We have two basic choices, I think. >>> >>> a) Decide that the saved FPU for a task *must* be valid at all times. >>> If there's a failure to restore state, kill the task. >>> >>> b) Improve our failed restoration handling and maybe even >>> intentionally make it possible to create illegal state to allow >>> testing. >>> >>> (a) sounds like a nice concept, but I'm not convinced it's practical. >>> For example, I'm not even convinced that the set of valid SSP values >>> is documented. > Eh, crappy SDM writing isn't a good reason to make our lives harder. The > SSP MSRs are canonical MSRs and follow the same rules as the SYSCALL, > FS/GS BASE, etc... MSRs. I'll file an SDM bug. Don't forget the added constraint of being 4 byte aligned. ;) But the SDM is fine in this regard, at least as far as Vol4 goes, even if does have an excessively verbose way of expressing itself. ~Andrew