Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2685189rdb; Wed, 4 Oct 2023 08:29:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNMfFE81MULZX7rA1ho9BeMVHuXyjwsC5YR7zTfz3GrV9XZgWc3CwdS2aVlQXG0tmL3Bgl X-Received: by 2002:a05:6a00:2305:b0:690:1857:333e with SMTP id h5-20020a056a00230500b006901857333emr3167854pfh.26.1696433366113; Wed, 04 Oct 2023 08:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696433366; cv=none; d=google.com; s=arc-20160816; b=FOordjuSLZIQcJlKdqs56Qt4wHq2p0vDQV/4YzdQGfwxjw+IX9lxWAIwT69oJ/hhHO /lqWpTWnrhZkKy+fkTT8x2Gel7kgRSekXQqb/elNQtquw0Xbv+HTS7hYdGWBVAaKJptB fkAPjDRv1RaI9rnFozANx+zwADzY/BRXwgJNNIQI/8gmMgLmJquSi0hYyZEcLcDZfuDL Z9rgMs9rsdT9PUlxeAvKn2Jgc7P9lrMRwawMFyVEU1bmuSJDSpyYeI/lRJn4eS1nqwRl arbNZ92nhSegwlcmccF+CH2/xyc/ikSQpUl2XazvT4kaQytrbOVqMWhr1PCboWtJdj3w +3bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1pp3fcQ7FJOqborLPqxKyTwdh4X5c9UMKg0BftM+5OM=; fh=byGkyhd8EWSV4khl+S3RDex0WyA99G98tla7gQQ+FkA=; b=iZ+n4blJEWij5oGi8aEJU15t4+YLmiZiuOZRkpQsQOCqXSf61m4r5gsatT3ffyUAWt 29j97Z+iZZ7BA74ReaqMxOU9omncO3ckmSof9GGdikH4wk/7dmPe1Si9Hqz0ir8xDe79 6OTtPB7pLzUtZzzrQP2bBzFaA52hCrbPNYrz0QhMI7DwfUmOUufcrZdCo/q41Ti/fCBn zokNEwgWxteB6tW1MtUvzCpryUk8rGjyOmxuGG0/UodsVUGpkYCGCVkYr8ujH0GiOjfo dQLOCTMIBLP0m94jM+rl0X10tEAeUJbKTZatSZEC0cfHC16WXWwCgRKcX2e701lNr9r/ ZA4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D0cRnCZ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h20-20020a056a001a5400b00690d9cd7b56si4087107pfv.66.2023.10.04.08.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D0cRnCZ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CA20D822CE33; Wed, 4 Oct 2023 08:29:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233443AbjJDP3W (ORCPT + 99 others); Wed, 4 Oct 2023 11:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233085AbjJDP3V (ORCPT ); Wed, 4 Oct 2023 11:29:21 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C254BD; Wed, 4 Oct 2023 08:29:18 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-77386822cfbso155807885a.0; Wed, 04 Oct 2023 08:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696433357; x=1697038157; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1pp3fcQ7FJOqborLPqxKyTwdh4X5c9UMKg0BftM+5OM=; b=D0cRnCZ6EAgPJJsIAD+Vrb8LGO2ZPCO+UiOdXvcAim2+sy4id9KYk/shwA4wqqB6fE oy5WfigpF/YMsmlbg3X7RQGPqbF+xEvGfdllnxJUIqCQix5t0JIo5R1jyW8jq16xeEuP Mpdq6KBDeVbBUCXoF5t7rVzWqijbBODpaCcBCmSf5KomrGVP0+cZLhhB5Ctfwfe8oeTi n5uoLFzODcG2cjVP4zhO6Tn4URQC0S6Qc6NTZ/kfFduY1VbDHuZ6lBVztJR/GP5jd2Rc B0uCqXAgX4jAP8AbI0gMdL8S2WR7i94wH3nknK0xS+wPik+b+qKpX4CRcEcsSJ7Y1VC6 6ZSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696433357; x=1697038157; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1pp3fcQ7FJOqborLPqxKyTwdh4X5c9UMKg0BftM+5OM=; b=JOcI8GTrn1nIbimKr0brncOwBYSg1phdodruHKB0/a1Zp3P9rRTus+kpAKO9Tmsi0q qnw07Q6akgZZLWCoQyZdM73ZuCMLfms2ssCBNWp0FZGlEQIygHqQ33VwOYGMpjl9Fsjq eW6Vj0RVRc2kwgWP7dP+dS15mUXOuW6dieo1pfRNY88/OHkKPzDMWV4zEn4OW7rhB11+ BMrGRP+YR+Z59QaguIveb5ZReJxdibp3KpBDDhdyndEN2tHMqZ579A9rwMw5qzbtOZlH X6oLIdKpG8pBogHqRNF8nWTNlknTL3tja8KzUkgWosjbKQT0rp8Hwyj999DPdkOzWm38 IuFQ== X-Gm-Message-State: AOJu0YzIV0qn07AIwhp/CGBK2bXeTehnXF+GEm2nVSNOlUssTfhPdscP ivIQ1GpTD/QFY+LBudqVdZM= X-Received: by 2002:a05:6214:3019:b0:65b:150e:604b with SMTP id ke25-20020a056214301900b0065b150e604bmr2806646qvb.49.1696433357301; Wed, 04 Oct 2023 08:29:17 -0700 (PDT) Received: from luigi.stachecki.net ([65.115.226.163]) by smtp.gmail.com with ESMTPSA id c12-20020a0cca0c000000b0065b21b232bfsm1389520qvk.138.2023.10.04.08.29.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:29:16 -0700 (PDT) Date: Wed, 4 Oct 2023 11:29:13 -0400 From: Tyler Stachecki To: Sean Christopherson Cc: Leonardo Bras , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Paolo Bonzini , Shuah Khan , Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI Message-ID: References: <20230928001956.924301-1-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 08:29:25 -0700 (PDT) On Wed, Oct 04, 2023 at 07:51:17AM -0700, Sean Christopherson wrote: > KVM's ABI has no formal notion of guest boot=>shutdown or live migration. The > myriad KVM_GET_* APIs allow taking a snapshot of guest state, and the KVM_SET_* > APIs allow loading a snapshot of guest state. Live migration is probably the most > common use of those APIs, but there are other use cases. I think the lightbulb just clicked, it is really this: > No, the VM will not have less features, because KVM_SET_XSAVE loads *data*, not > features [...] I think I'm conflating the data vs. features aspect here and will have to revisit my understanding of the code... > > Ultimately, this problem is not really fixable if said features cannot be > > removed. > It's not about removing features. The change you're asking for is to have KVM > *silently* drop data. Aside from the fact that such a change would break KVM's > ABI, silently ignoring data that userspace has explicitly requested be loaded for > a vCPU is incredibly dangerous. Sorry if it came off that way - I fully understand and am resigned to the "you break it, you keep both halves" nature of what I had initially proposed and that it is not a generally tractable solution. That being said, I genuinely appreciate your jump to action on this problem! Thanks, Tyler