Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp323506lqs; Thu, 13 Jun 2024 11:01:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvQ9tXtEHs3ZIKZ/E3SicCmJ9NrSjUTBBZnhoyl9hpmmgSl8QrO6hA3LoiA0AcX7NFhESABlimIwzUad/8csqVkQ2oka/tV+qSDrdjSw== X-Google-Smtp-Source: AGHT+IHHFqEUu1Nefdl8b3PU8tlMkNguUrJun89RwFHLg7qRvM7/DQzveuVM2ugbFl7AQxB7fdX+ X-Received: by 2002:a17:906:c005:b0:a6f:390e:2e15 with SMTP id a640c23a62f3a-a6f60dcb11cmr34333266b.60.1718301676747; Thu, 13 Jun 2024 11:01:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718301676; cv=pass; d=google.com; s=arc-20160816; b=GxxEpEFoJdsUmH6mGrxN+RpUAYDCthGKXXq8o/ZcHOFex6eIqW+8C6IWfi9pvAgVq/ JRCLaNx+iKJwGat0q8Uln0bmu5Bwp/+vPVbf9gZ80wrVmGa6nS4KO28cMRSseq386Y0o iW6JE5ZgUZTA3enede36FHL+i4yKPBDHnzHUwZ07mHRYDL/nbb1JwDPPhNGCabVrQirg 3E/MEpD1n/Tr7CD7EVgopCjveVU057rf+7iIcZW2sSfBk8x6w1d4uRyQQoJLu1k4RWrc PBJp+556WeYF45XQCuVmxOmILjEolR+K+xDYG/15QScD4JVKpGvaMBOMRwO8QNbUMOxf lUCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=pwOI9B4Rf0kKuFHv5dDa3w4fwvMaD7f4mQqGVSuxMFM=; fh=F9DxzWUjz4QgBt7jmn9fe+ifAEUvM2aj7gpefr7lEfQ=; b=q2ttRRvBXDAd4P11ExnJk9l4X2IzijnBP8o1lra8o7G9yE3c4RWDrLZNjyl9YVxv6k v0Qa0GowC5vupXaXX8LahHWUZvDAt5oOTlbCT1IeQMXYbyERaLYoskZH0996NRNv979R BL2ef401RZ0GJlhnEm0D7iXOMkDy8OJkKuon7/9+D1Pj7fBtPPFBVwAYubeDOc0BctRA 92bENMvrKzv5MeVwFGhMcoEaNM5zBulh29BEhks/OHRA5SDZWsNDVBD9VH7+nXkr9M6m n3AxtrZNEyY1i0EEqzalXHr77dAlKnurWTWNNpU65wNSwW6xUI+B9920Svs6J+h4Dyhx IJ7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=b4Uve9c7; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-213789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d4d1aasi96960766b.254.2024.06.13.11.01.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 11:01:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=b4Uve9c7; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-213789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 74B461F236D5 for ; Thu, 13 Jun 2024 18:01:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFA3C14B948; Thu, 13 Jun 2024 18:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="b4Uve9c7" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CBF314A632 for ; Thu, 13 Jun 2024 18:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718301643; cv=none; b=M5BkcECPlohC1Gd2eIMJJoTdEe1X8fJZEQlIpcIqi1Z2n372l86rPIfSlLde8DMxUKN4vhD8F2WaTLLZhcoD8bN9PDQ986gl/NVzCpQRxeCA1zXERehGTulOzK+P0LIpU3oz+oXVpbVndEAP2nhuibWC8baD767G/HkPQ5P8p7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718301643; c=relaxed/simple; bh=bMYdPDIxNJ3qhBrWqIO3ZN/KF1PRoqTufoa5UZq514c=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=MlRL/0Fb4zO0AlFSWD96abtJ2dHr075ogMeEuhwEhIiFbUzR3+PKYuMGiWOVGnqj9HzNz4v+yXJ6AmDIX3tIlYaeyVoClbfoZSP3jTPdjVjIN17NoX7F33QgdSBvxkrgJxhW2ecFYkLa1bWzmuJQk9MENo0JzuhJ8OvtyGpRnok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=b4Uve9c7; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dfe9ef3a637so2117312276.3 for ; Thu, 13 Jun 2024 11:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718301640; x=1718906440; 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=pwOI9B4Rf0kKuFHv5dDa3w4fwvMaD7f4mQqGVSuxMFM=; b=b4Uve9c7SxcAoumtv3KhzyhydbfRxh3VGo819luUN5NK/V4hQOJcQrzVzjar8PnTfh rbK8wV8xRC62QPI48kIifXA/rRMefNZEeW6PfiR+5MaaNVuqChFBSp0oWjUUB7uGvgre ZcDFMyi8CdU5vKBGk6q4bQAyYpnNzoimPhbkf+z0mc4H1Ag05mUWWJWejkXoylbecUJK p3Ib5AseD7pl3gKQf5G1OAl+chq55pB2ZofyGXnUiH2Kh+3owIYKGuhAPoXwAdef0HHH pKh/rbV7efLz7sAnxrzoTDtmxYrz43sx5czMQdtfkz7UYObC37sRufin6n4uX92qyGEU maHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718301640; x=1718906440; 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=pwOI9B4Rf0kKuFHv5dDa3w4fwvMaD7f4mQqGVSuxMFM=; b=OJmuXfdunCDfhgTedFJQcd2k3SQZ+iqOWH7zeU0M61pMUe4CL1Wm6mfHxUgBgKZhGa Igekgckfg14QgWb8dO4S22Hx0iud3Z9GrybQ6Xsg0lJQTkyHQIFLzOs9Fy1Qq8Du8wXq DLxXgk0WCF3p/9fSl2SCPLiHqew2E5b8mSXP2dRoEdxIlSFdi5HC9ffdMJSz1sQZA04b ayHBORpJXzLXPGVjm3Xtvz/Vxc8iVKYEAw92k1lFamCKEJ6g2Cs+rQyDeFUaa+TOsaSJ +eg8K3wMliT53n7ZhSovgr1cE9jWSyz8dl+Py8ewPKAcx8GOYSCP+qju/6/DY76/df8c v+6Q== X-Forwarded-Encrypted: i=1; AJvYcCVh9oJYBP/PlHpFlOaBJvgWtOlJiZnITyHphY8JZGDi8zeXCQ+NLMkZxmA3fwVfUj6Haan65CI3RQZ7ZCHBEtL3uIt8OGW9Kris0V3B X-Gm-Message-State: AOJu0YxwMb83yck5jC3oEvnUID8+BM9qUqWl4MnKx5dF2/gGGuphZ7av rEYyVOB3rMxtx0j+2YGvp/T7NHIw/2lVfDTeRPXo6EFoEplPVKp0OhTWbQCrC8p+lUXYYTbbU4l Pyg== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6902:1202:b0:df7:d322:97c6 with SMTP id 3f1490d57ef6-dff154744b2mr21904276.9.1718301640506; Thu, 13 Jun 2024 11:00:40 -0700 (PDT) Date: Thu, 13 Jun 2024 11:00:38 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240207172646.3981-1-xin3.li@intel.com> <20240207172646.3981-15-xin3.li@intel.com> Message-ID: Subject: Re: [PATCH v2 14/25] KVM: VMX: Disable FRED if FRED consistency checks fail From: Sean Christopherson To: Chao Gao Cc: Xin Li , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "pbonzini@redhat.com" , "corbet@lwn.net" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "shuah@kernel.org" , "vkuznets@redhat.com" , "peterz@infradead.org" , Ravi V Shankar , "xin@zytor.com" Content-Type: text/plain; charset="us-ascii" On Tue, Apr 30, 2024, Chao Gao wrote: > On Thu, Feb 08, 2024 at 01:26:34AM +0800, Xin Li wrote: > >Refuse to virtualize FRED if FRED consistency checks fail. > > After reading this, I realize some consistency checks are missing in > setup_vmcs_config(). Actually Sean requested some infrastructure for > vmcs_entry_exit_pairs to deal with secondary_vmexit_ctrl. Yeah, this belongs in setup_vmcs_config(), e.g. to guarantee that discrepancies between CPUs are detected. I would also strongly prefer this be squashed with the patch(es) that introduce recognition of the FRED fields, if only so that we can avoid "consistency checks" in the shortlog (I thought this patch was going to disable FRED if a VM-Enter consistency check failed, which would be... interesting).