Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp804531lqo; Fri, 17 May 2024 01:57:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWghBnPvaBffy3Vq1RrzJYzYOTgzuNDiEi7d+b+hbjSlIFmkWnN//ixgz7zhfeMjAtR5mTZkm9awuo0izMDqlxrQ3ZKf0Ed0XVafBIN7A== X-Google-Smtp-Source: AGHT+IG7FpvkBYuMt+PvsyQCaKepIDEnMIxNrq0wcTIwP1yN4u+40qAgSo6TPK+Pyg2QA/JZrYrv X-Received: by 2002:a50:a695:0:b0:574:fcff:964b with SMTP id 4fb4d7f45d1cf-574fcff9e76mr4182555a12.8.1715936235232; Fri, 17 May 2024 01:57:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715936235; cv=pass; d=google.com; s=arc-20160816; b=sy9jIZFgCMHC3g5ircr1DAuOW7abhjouTP5US+ey71WLUQzoET21uQRPg/6SJoz6s2 /PRCb0QgnWhd2IOUH68LkU1AY0YE6BGajiwVofFT3GzLHwHO/v1NMjF3RDsTbjLE0Kcl mLYEU/ha4N4gF/s+WTrSB/0jv09c1Zqdw1RqslGI+ruBblDt+rD7SnzIumfRfNV20gX8 3wHd/kYz4mtnoNNomrZiGd83w9PF+5IciKTl+KlJ4bC9eei3ijG5aaSm8DVAsNGcV6tU eRMEC9uGD8zRA1dcCW2kun56Rx/Yl93VGf7NKjeUK5XIk/2WAfyRYePBg83Vb6Hgc6mV rTfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=tPppGGohGgr5AyKjt6H/6fL/nfQDYDybva5rQhqmn6w=; fh=jbwuUHgn7mYJFgx8jKso4xHWBz3R3Z8vS/tcvaZgw+Y=; b=vElo0ux5LeOR6WSHqRwfl5X4XvPKYOCCrMul339UVADRiFiZGjSVh3Av32kjG30VV8 tve/vABL8tV4HVGg8E5ZUhNb0wmWZfouPekUxxbkeozraa/ObIgBCMY+X+IOziPSjtwQ e9HbepED4Cse8mBIJADlWxFfa1D8CD77NIw6oVh90wZyLQYY0vMpBBE/mqGaUwTOTvkF r/xq6p07jeNd073bV6LLHsZZkrnwjwmQkuKRcRl0mpuL2UgRYBiFcS8mj5wWQxgswg+5 AajcP0P7ZP8GgDHdJ30NgObrFjlIMyv6ANcKrapobBO9+PGaoeEt5sVR/gXwMLfSq/i7 ZupA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZlPEPbgc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-181886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3276bbsi9527060a12.414.2024.05.17.01.57.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 01:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZlPEPbgc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-181886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CAEA01F21049 for ; Fri, 17 May 2024 08:57:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F0D31E4AE; Fri, 17 May 2024 08:57:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZlPEPbgc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="re9dqAbs" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E505ED535; Fri, 17 May 2024 08:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936227; cv=none; b=G0DGK/wrmG8pz9MgIjzwFMMJu3SldaR+22A/zhMuAFBW4EjShkz1517EGBMmHxhyPft4RdvNdhDRJC2g6xixPQWxtMgcJGWZsHh1N0l8XCpsvSrAt/MEnJjNphFNKqfsmL+6pgdCk5HzhHxIq9zibYMqs0i8KWMF471ODx9ZhIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936227; c=relaxed/simple; bh=KwABJcoXzv/apJpy2BiCEvtbilXsC/7jeJ66JE67Aik=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=E6a/ZAeouDpgNtbJ3LrO4q4fsYq8VPMCJhcp9UKoQtJRV3BpduX44uEcjykRAxxwzci4LuLRP34RcQHSmkGZ6kZvpoaTJAi67uwjxd4rsmhtkar+qXkP1rimWQyaP0Zt0zAdkYnHOyiFaTk5G4wn7HsWV7Re4Xa6wFN2r9i6h+Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZlPEPbgc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=re9dqAbs; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715936224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tPppGGohGgr5AyKjt6H/6fL/nfQDYDybva5rQhqmn6w=; b=ZlPEPbgca+2/UXHWxVg5R2Ac/qF9KCzwaVaAWZVcL0t9sk8CYHp0y+MeQA8J4ehkmKtFZR Guezx7XS2FDi+LV5/qrmwqlJTtFH35rboHYGLVHfHkDWof4oOwLBHDuu45V+Yj5m0CGA9R F5ecHBN4qj/yoa33coqmerSu2VJlkPLQU7FDI69EGjJG9wpwVb31jDXJKsKNMcVyb2lhuW vjgRBA6XlStJeUL4ByKxbMcCi3P2r2Zu1TtashO1Y/7gKnswBdMPe5pX2lT6P1Ump6a/nY KWHJ1GANS/jIS9xR9UzqpXDHEJhPIdRDtQOZu3ZRZ3YvmswmDpbvSGnaa+zdew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715936224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tPppGGohGgr5AyKjt6H/6fL/nfQDYDybva5rQhqmn6w=; b=re9dqAbsB7DcbcViC9BF0L5Tzjwf33iNun07O+dNxgQeA10Zt5AQIv+O/3Jsp6pWTPNeUF J7zliwLSLABQcODg== To: Sean Christopherson , Weijiang Yang Cc: rick.p.edgecombe@intel.com, pbonzini@redhat.com, dave.hansen@intel.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, chao.gao@intel.com, mlevitsk@redhat.com, john.allen@amd.com Subject: Re: [PATCH v10 24/27] KVM: x86: Enable CET virtualization for VMX and advertise to userspace In-Reply-To: References: <20240219074733.122080-1-weijiang.yang@intel.com> <20240219074733.122080-25-weijiang.yang@intel.com> <39b95ac6-f163-4461-93f3-eaa653ab1355@intel.com> Date: Fri, 17 May 2024 10:57:03 +0200 Message-ID: <87r0e0ke8w.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, May 16 2024 at 07:39, Sean Christopherson wrote: > On Thu, May 16, 2024, Weijiang Yang wrote: >> We synced the issue internally, and got conclusion that KVM should honor= host >> IBT config. In this case IBT bit in boot_cpu_data should be honored.=C2= =A0 With >> this policy, it can avoid CPUID confusion to guest side due to host ibt= =3Doff >> config. > > What was the reasoning? CPUID confusion is a weak justification, e.g. it= 's not > like the guest has visibility into the host kernel, and raw CPUID will st= ill show > IBT support in the host. > > On the other hand, I can definitely see folks wanting to expose IBT to gu= ests > when running non-complaint host kernels, especially when live migration i= s in > play, i.e. when hiding IBT from the guest will actively cause problems. I have to disagree here violently. If the exposure of a CPUID bit to a guest requires host side support, e.g. in xstate handling, then exposing it to a guest is simply not possible. Just because virtualization allows to do that does not mean that it's correct in any way. Thanks, tglx