Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp15381rdb; Wed, 4 Oct 2023 18:30:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTK9691Gjd7D1q3YvNYEDTSR/Mce3EMxCBm5lHYUjlB4W2YM7cqDNwoisPkrIsR41qevrX X-Received: by 2002:a05:6a20:d417:b0:15d:4a4d:ecf7 with SMTP id il23-20020a056a20d41700b0015d4a4decf7mr3420381pzb.36.1696469454108; Wed, 04 Oct 2023 18:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696469454; cv=none; d=google.com; s=arc-20160816; b=iexZjLVhBuwggz72iYqjxjgl2Dd+7FqOUMqNVblxZLYZ27W7p1omy19tXaHG8bSg2O fbyV3FhbWkzyhaiE/3RnzsAkWGAqHvpRoqM/TvkduxgA7vzN7ThbOErPhHt4oR+yDhfb pso6+i8VJtR5c5Sd7vyarM8v2nWFepUQ+hTCJNX/2cC3qK3GLbHTNt4B4DeJqiF56mz1 QlcegJZExrFnpmh/i3Rf7VGrNw1xacYuP82klJJKnii6q4m0N0eUySxFlZVkHbhkiqZ9 lmGgLR6KtLpXUGAL9o+4Tl2EJHEKedI7zIekf786Ipwrk8o71AaUeP1rdB2iCIXfoNmT xYcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=Xqc981CBMLWk+FQW6EA7FJZRSQfVRhbIKI7MGCKnNEk=; fh=4GZkwQojzWKA353cibBrr4DLc3C/IGxxXURP9yfk81g=; b=EeIJUDw0ynIQiQ6lbvRJzWfuK/PbAhScruB1XF72Bw/n4MWEAQ+BvNWiQKevUNv+Lx smha1xEteDSIxsfvnze2YnWC/IPcBS5mgPGC/1k6QcMDnGDKgoSOvzMlqUCOMK+tpBZm Jbg8GfyXlpKWWN91K1GWZ9vpB1Rx22Z4cd9MtEVM+FCb5/O6TW/ThrGkYW2G0mnc0Fpb KkAzPo7kNZGFpGEYGnWD8qEXaWkPD2qrcPMomnvjhSy3ll7kkrRNHbQM1SlIMYKnP37m 2deByPAweZRqnGZ8b97o3CUbIbt73ooo3D31LAaGcKwGMSS5oQiqm/4eJOkj9fOoY1cZ PZYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=T6h5sEE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ds4-20020a056a004ac400b00690d8405fe6si324758pfb.317.2023.10.04.18.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 18:30:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=T6h5sEE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 6CAB18092C92; Wed, 4 Oct 2023 18:30:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244140AbjJEBaJ (ORCPT + 99 others); Wed, 4 Oct 2023 21:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231650AbjJEBaI (ORCPT ); Wed, 4 Oct 2023 21:30:08 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98696F0 for ; Wed, 4 Oct 2023 18:30:04 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5a23fed55d7so5404487b3.2 for ; Wed, 04 Oct 2023 18:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696469403; x=1697074203; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Xqc981CBMLWk+FQW6EA7FJZRSQfVRhbIKI7MGCKnNEk=; b=T6h5sEE9DJdh1aGUjFcv1tEmbSk8YF6vXZMe+fIu4/y0nb3hXT9242HxPQJe+GaUvu F083OG5cxSbrvrk/Sx90Kx5XWNJdj9nCfGq5lrvvLjIzTf9O9GjIzIxotDa/E4MfiITA xnnXkAvudwSbQDhkvt3yFwnvzQLF0pwztwuqLYmF9HP8+mFMbgCgxpEA/z1N6mT+i1Si wI8Jh+1/OQgSxcmDY59N10sDegx/JUJP/HV+1Ts58jlh8aCyMgHPyUVHjw7aN9FrIp1Z hvWPxscALaRXQ398nwOXrcQhz7/NvKSH+8j4E3LNUcnodxchqSNvulRaDLMSKvpavAtt gb4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696469403; x=1697074203; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xqc981CBMLWk+FQW6EA7FJZRSQfVRhbIKI7MGCKnNEk=; b=UzBGMHLLfifmV3UNdR9GoB+MUBHq4qN2dFx35+uUuM2R5BUeThk4NgTBU9EX8Cb3+d PAqTuG5YMnZzmMqPa7cH2r1QROX6eg0hl8ipQcvbVhcVov7AY5knvXEmWIXb6XoMcjwY PWnn0JeTXOHjgAIqRx0OQXbvExHdRCPDY57ZbmS++8w9VSGQuvPndZxI6UqgZDdZbyTv 4D/z2J+Ima7ng2ejUtzdbtKW7XeT+AYGEfzr/YS7oQCOIz/FlvMbb1CN8Ihv21Xb6kLx aAsSVfuJIUTqTbqFWOG/KgWr2hPVdKo5bjkFXpNs90CRjWx+mdnbb/MOSp8it/GHiap3 HiYA== X-Gm-Message-State: AOJu0Yy5L2coa1cR6UoDRW2hu7k7usk73HKt+EG6cqYagMSjImxqrJdb Kw5TAFfCboZ2l6s2sPpX79wtgg5d2uU= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:431d:0:b0:59b:e684:3c76 with SMTP id q29-20020a81431d000000b0059be6843c76mr66748ywa.2.1696469403561; Wed, 04 Oct 2023 18:30:03 -0700 (PDT) Date: Wed, 4 Oct 2023 18:29:23 -0700 In-Reply-To: <20230928001956.924301-1-seanjc@google.com> Mime-Version: 1.0 References: <20230928001956.924301-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.582.g8ccd20d70d-goog Message-ID: <169644980223.2754169.1786296654866171118.b4-ty@google.com> Subject: Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI From: Sean Christopherson To: Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Paolo Bonzini , Shuah Khan , Nathan Chancellor , Nick Desaulniers Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, Tyler Stachecki , Leonardo Bras Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 18:30:28 -0700 (PDT) On Wed, 27 Sep 2023 17:19:51 -0700, Sean Christopherson wrote: > Rework how KVM limits guest-unsupported xfeatures to effectively hide > only when saving state for userspace (KVM_GET_XSAVE), i.e. to let userspace > load all host-supported xfeatures (via KVM_SET_XSAVE) irrespective of > what features have been exposed to the guest. > > The effect on KVM_SET_XSAVE was knowingly done by commit ad856280ddea > ("x86/kvm/fpu: Limit guest user_xfeatures to supported bits of XCR0"): > > [...] Applied to kvm-x86 fpu, even though there is still ongoing discussion. I want to get this exposure in -next sooner than later. I'll keep this in its own branch so it'll be easier to rewrite/discard if necessary. [1/5] x86/fpu: Allow caller to constrain xfeatures when copying to uabi buffer https://github.com/kvm-x86/linux/commit/2d287ec65e79 [2/5] KVM: x86: Constrain guest-supported xfeatures only at KVM_GET_XSAVE{2} https://github.com/kvm-x86/linux/commit/27526efb5cff [3/5] KVM: selftests: Touch relevant XSAVE state in guest for state test https://github.com/kvm-x86/linux/commit/ff0654c71fb6 [4/5] KVM: selftests: Load XSAVE state into untouched vCPU during state test https://github.com/kvm-x86/linux/commit/d7b8762ec4a3 [5/5] KVM: selftests: Force load all supported XSAVE state in state test https://github.com/kvm-x86/linux/commit/afb2c7e27a7f -- https://github.com/kvm-x86/linux/tree/next