Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp830437lqo; Fri, 17 May 2024 02:57:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVk3fFcpA5xvC6tV03AQRPnpxxMyn+REfUi5yox5BTjM5eb5Lg8c7+u8u0NZjsdmtRcjTqQJR44sgIMIqG2G0ZhGnKMiVgnxMZ+XxF/Ew== X-Google-Smtp-Source: AGHT+IFkix6qPoeRpGCzU6Gz6On/LGIgJdS35YeKam1vNTB+04jwbJdEifnJZwmvo8IeAYnYiG1a X-Received: by 2002:a50:9991:0:b0:56b:dd0f:52e0 with SMTP id 4fb4d7f45d1cf-5734d5c2ec9mr14397634a12.18.1715939824868; Fri, 17 May 2024 02:57:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715939824; cv=pass; d=google.com; s=arc-20160816; b=a1AH2+6BSm3HcqhQmhla/8jurN4+T6WsrmVxSuYfYKFUAlzrHu/ZK8L5qU5z87HHBq 1EYiXUP4k5aiWU3ZNuuEXJzHHDUf6TDrlWB5ruFDoKSNSJGxmDpVsgQ5y4Y43MHkvaLk n78bJkddI6wGw5nvU+D7Xmfux0OloOavRggsb4Y4FotickquZrEzjTGuea1isvvt3w0f 27PrIf42mNOcxOA72inZKHMTZ3jkozsTIDIOzBUtxp/5f7e4GMRgaOtOwdHlTjlm45nu 2F6WI9upc4tXo0Nudsn4PsX0YLTixu17se9WP0KeqcwLHF1wRt3dFzvmJ2Dy+UA/bN4p isAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NzDzgy+gMpUUuD6+VQao8ddsrTkyEtWsbE3BzM8cYqI=; fh=/I4mxOzVvZmx3y2pFSaKRS9Egm1WbjaYXlSgEySYW/U=; b=nCIzpYnaAIQ49FkatCoGdZ23akoimijeos8Ot21EtJ5wefdJuJufl4JQ7nwVnaP0/m 95u5n9urcAt1eEcUFoGDp61eVMk+btbbxs7Kr1wyVbg5sR2tUYWfBU0q1+SDpYsz/gaQ E4MKjcrtZ/7hDmR9W6wt896a8dN51tFPjEjEGK5KXlQ57H1Zx6URMG7rvq5kdIhJojoI YtX2med48oLn7niLEz5XVxlXn2Xo9bvdVIVe0X9n5XF9Mdicpbne4Tap/mA5Akdj3/a3 3wzPeCL/7D6dAvsSD7d+RHnTcQE4TheTdmG3fgdAoEm5H0QvF7qiLky7NZUU5j1/B0YH ygjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nbBbDwom; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-181962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 4fb4d7f45d1cf-574eb0fe10fsi3731055a12.261.2024.05.17.02.57.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 02:57:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181962-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=@intel.com header.s=Intel header.b=nbBbDwom; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-181962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 7AE661F241CA for ; Fri, 17 May 2024 09:57:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17A8F2C84F; Fri, 17 May 2024 09:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nbBbDwom" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 F1A072561F; Fri, 17 May 2024 09:56:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715939813; cv=none; b=HUuC9hW6hM80EhKu1QbxZgalt4QSYd0ueyMvDD5GvdeKnEwrjTh2era1I2LTxYIT6FmrK9JM+231n6uLh0vT6WcJVOk/0I8oI1N9Q62OTPcKH7AQ/FrRe4JzPayoM2ZLQjwhAgK4IbQ/6h7+voghHlWs08kaAf5KwZxFSgXWavE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715939813; c=relaxed/simple; bh=KUl64RGT5p1k4DfrRgABpkdROBGYZ7VEd5IkWTHMINw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ssA6V2XMrAQ6BH9mIFfPfHIdHMw7U4RZfI6O4t5pOmdP/0r1xdA/duUGs87gWiIEoPXMP/i1V88Vat7JJyqPBQSnGVw0lVfXYBoBGbCxfXYYVYI1vJ+zhor1A8d/yH07TT51AFXB0uq+k8svXN3LmgjBufv0Xq0lqbKYzusWzYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nbBbDwom; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715939812; x=1747475812; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=KUl64RGT5p1k4DfrRgABpkdROBGYZ7VEd5IkWTHMINw=; b=nbBbDwomt3PT8FDUdfTH/kNtUQrMw6domVJhkoakKkc00L/SOQYOMRk/ WFcOmpvRgP3UjDvWc7rG3akU6tyK6ufawTiWUkOBRKlMQOG+c03YvHZXh V0CeZVoReNg1NFYpYJOb+UL19P19Fe3cKjjMcuwMkDNzpcVuQ+NZ3B+zW IMY5XYbN5kPbAvB8aY7ZR313abaoqk+WgrMcR8Y4NiVVWjjiKyxKAzIJE Xos0LYLBNqIKwo5lJy51GCDmA3j+gqCZJCDM7aO+xTyalOmiWqjyXQ9NK oWYr4zZ+Maln47ZOe1u87HPV8QMOtumo0CjUdDGLZwudPUt+2z9rGHIh+ A==; X-CSE-ConnectionGUID: EI9PrTJwSHSy09c0zpM2Ew== X-CSE-MsgGUID: lvS1hlnYRkmOyOaWeUCd8g== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="12218195" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="12218195" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 02:56:51 -0700 X-CSE-ConnectionGUID: yTxcteB6QFaIFYfsYrnX0Q== X-CSE-MsgGUID: PRUoyf06SmaUfh/6w6JRSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="32163178" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 02:56:50 -0700 Date: Fri, 17 May 2024 02:56:49 -0700 From: Isaku Yamahata To: Sean Christopherson Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Isaku Yamahata , rick.p.edgecombe@intel.com Subject: Re: [PATCH 7/7] KVM: VMX: Introduce test mode related to EPT violation VE Message-ID: <20240517095649.GB412700@ls.amr.corp.intel.com> References: <20240507154459.3950778-1-pbonzini@redhat.com> <20240507154459.3950778-8-pbonzini@redhat.com> 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-Disposition: inline In-Reply-To: On Thu, May 16, 2024 at 06:40:02PM -0700, Sean Christopherson wrote: > On Wed, May 15, 2024, Sean Christopherson wrote: > > On Tue, May 07, 2024, Paolo Bonzini wrote: > > > @@ -5200,6 +5215,9 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu) > > > if (is_invalid_opcode(intr_info)) > > > return handle_ud(vcpu); > > > > > > + if (KVM_BUG_ON(is_ve_fault(intr_info), vcpu->kvm)) > > > + return -EIO; > > > > I've hit this three times now when running KVM-Unit-Tests (I'm pretty sure it's > > the EPT test, unsurprisingly). And unless I screwed up my testing, I verified it > > still fires with Isaku's fix[*], though I'm suddenly having problems repro'ing. > > > > I'll update tomorrow as to whether I botched my testing of Isaku's fix, or if > > there's another bug lurking. > > *sigh* > > AFAICT, I'm hitting a hardware issue. The #VE occurs when the CPU does an A/D > assist on an entry in the L2's PML4 (L2 GPA 0x109fff8). EPT A/D bits are disabled, > and KVM has write-protected the GPA (hooray for shadowing EPT entries). The CPU > tries to write the PML4 entry to do the A/D assist and generates what appears to > be a spurious #VE. > > Isaku, please forward this to the necessary folks at Intel. I doubt whatever > is broken will block TDX, but it would be nice to get a root cause so we at least > know whether or not TDX is a ticking time bomb. Sure, let me forward it. I tested it lightly myself. but I couldn't reproduce it. -- Isaku Yamahata