Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp235923pxb; Fri, 15 Jan 2021 11:38:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1Tn3Hz8vMOSsAs6rT/j4qR7jmfy4M2bt3eeC5CC8m9UnnVzNbsbCCz45xr++b3CUAZOkp X-Received: by 2002:aa7:c3d3:: with SMTP id l19mr11319826edr.366.1610739515799; Fri, 15 Jan 2021 11:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610739515; cv=none; d=google.com; s=arc-20160816; b=MTkcLc/EQn+X6PMqSJ9w0qTru3goAXDIjgVN56wHlMlJGOezhJ9LsfvymdBGxJhcQj 9BuwcN7oT7jIHQatFayFoqsofjwX8aBxZwhv7p1HM5/MfZB2SRQyPMaEYwYFSUPNdIsQ mOXjjaCO9REzf6f4Xlj1rVS3G4taIfM3Zh3LkYeeW57N35rLPkz7yHgLz5xwLlh+HObA q3y+RTB1MEQ53oeYyAR9JbsxCtxvratyxaW3xPXs1PxrgRY4hPSqLxjC9mH5Q7oBmAJy IN8KymprZ1NXJ8IyVJA+SYtRDDj/8RkrVY8N7/6hInSyINbwVBv/9wflbgrtcKt5Kw8a Mz+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=L6A2UzRCRt8w1pfam8I4qqQpYsRwRHB2ucWTZwYFSKQ=; b=PKCZjdlxTszN1jUjrOq/lqZZGKRsme804AMlBcR8+Dm5yY4LHYyAYYyt0PeGyJTsDJ m/ME5v/ZUUPp7mdPkyimIy4x012NpdQFpX5fr2W5gSln5l0NjmPZiJZO5vTQpq/pM3bf ExcKzSeCHVkXHgTedT2F3yGtHL0pbm/ZFYSI+/Fd2VXhsFPXKydkcpEqfQ1YeNoS5Gh7 wLwv2kqDNeNRVZkS0qtSmtAD4AwnQQqwvy/ATuLsQf3O/WqanWmU+zxbcc0ReU8R5Ye9 Vzsts3fEyyzO8eNnEFLrtokjs4FR0MwtkPrPjPLFdfiIEz6GxT5WWfmCpiVPYArNB6E7 QCLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lctjjCHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si4304997edm.144.2021.01.15.11.38.12; Fri, 15 Jan 2021 11:38:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lctjjCHd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388312AbhAOTgx (ORCPT + 99 others); Fri, 15 Jan 2021 14:36:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728895AbhAOTgh (ORCPT ); Fri, 15 Jan 2021 14:36:37 -0500 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2FB3C061794 for ; Fri, 15 Jan 2021 11:35:54 -0800 (PST) Received: by mail-ot1-x334.google.com with SMTP id i20so1841755otl.7 for ; Fri, 15 Jan 2021 11:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L6A2UzRCRt8w1pfam8I4qqQpYsRwRHB2ucWTZwYFSKQ=; b=lctjjCHd0mRY2yIaitglAwYI2VLnEOj7PX0bK0OAUF2luT4iEjTsICtK2KkRrobrDz +UMXUqT0SsGRUFWtMrnoRTv5kCN0WWPxzs5WEswE/gTHrQox0PquyzX9Ll31YnzImFzN som/A3BEKakMzIl+N4OImMr9U7k0W1se4y2pfU9YRY86xFGZuyVIaQJx+2yBNdAJRH2o 8Um304ttLN0u2hpXrctJrKwoKC87rCJIj8TsmoBV/GdRxcldGOMTqLQj9f+yru66x3tS fTxBbX9rLrEb9EqV+QfXErsh3Bl1qN4x8EMZAMh5zyRUhkZMr4Yucb833V4S/R9lFXun SEJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L6A2UzRCRt8w1pfam8I4qqQpYsRwRHB2ucWTZwYFSKQ=; b=n66fCHVdHle2lq52HK9nLbK23Ee/IU3H8P9tlCmHZ3TfBxYxa3P7XWDQcPSATpyIHS kKEI5HQ9dnfUSfp9DtamXo7dOGcPd1uSvQn2wcxh5y3hBokMFYAdWb0e+1pLRXVv7kWW VV2kljl5hsSNA3jHPPpgxzBjLnSChh8SyRMmP/aywAm1Qfq3SV6Ae78oP0Bn0YnM4Dvy jkc4M4IyK6OfQamzKNWzkbcjTQxPC7So7jLvfyZxXr8kGmVwq9dW/GGWEGyWcyN3VZYT CoFO7S+YQYzcfEQXdejeL/rfqud6KIggH9BVmU361JUdp/ZI9HEhzyOSALsdJoLlTNOl S1AQ== X-Gm-Message-State: AOAM531E68C2BprxW3ASDGxi4qShu/5RrCaWscFfSOXYegsmO8p7oZ/z xzv/pwJpu4baMiag146VsLqgbanm/lu5H6oPQrLRzA== X-Received: by 2002:a9d:5f9a:: with SMTP id g26mr9622406oti.241.1610739354185; Fri, 15 Jan 2021 11:35:54 -0800 (PST) MIME-Version: 1.0 References: <20200710154811.418214-1-mgamal@redhat.com> <20200710154811.418214-8-mgamal@redhat.com> <20201023031433.GF23681@linux.intel.com> <498cfe12-f3e4-c4a2-f36b-159ccc10cdc4@redhat.com> <4463f391-0a25-017e-f913-69c297e13c5e@redhat.com> In-Reply-To: <4463f391-0a25-017e-f913-69c297e13c5e@redhat.com> From: Jim Mattson Date: Fri, 15 Jan 2021 11:35:42 -0800 Message-ID: Subject: Re: [PATCH v3 7/9] KVM: VMX: Add guest physical address check in EPT violation and misconfig To: Paolo Bonzini Cc: Sean Christopherson , Mohammed Gamal , kvm list , LKML , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , Aaron Lewis Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 10:43 AM Paolo Bonzini wrote: > > On 23/10/20 19:23, Jim Mattson wrote: > >> The information that we need is _not_ that provided by the advanced > >> VM-exit information (or by a page walk). If a page is neither writable > >> nor executable, the advanced information doesn't say if the injected #PF > >> should be a W=1 or a F=1 fault. We need the information in bits 0..2 of > >> the exit qualification for the final access, which however is not > >> available for the paging-structure access. > >> > > Are you planning to extend the emulator, then, to support all > > instructions? I'm not sure where you are going with this. > > I'm going to fix the bit 8=1 case, but for bit 8=0 there's not much that > you can do. In all likelihood the guest is buggy anyway. Did this drop off your radar? Are you still planning to fix the bit8=1 case to use advanced EPT exit qualification information? Or did I just miss it? > It would be possible to only do the decode part of the emulator to get > the PFEC (matching the GVA from the vmexit to the memory operand, for > example, and retrying if the instruction is unexpected). Then one would > only need enough VEX/EVEX parsing to process the decoding. > > Paolo >