Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp604171pxb; Wed, 27 Jan 2021 16:29:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVm19O9Jl2bEma5reo36FeKOkHtDjUwy3M82u0WH6WQkpqvdwOSO8ZRMaf8xRt1Y4/8nDO X-Received: by 2002:a17:906:abd7:: with SMTP id kq23mr6957701ejb.292.1611793740847; Wed, 27 Jan 2021 16:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611793740; cv=none; d=google.com; s=arc-20160816; b=yvdu86rO8fVw5qPlJP5kzRDilxJOHioqTbgI5J26pZ/ffP20TPpJmuN4dhEjToAyJD oGqHs3Sja8InOndlNU63V7/OFrNh+UBbWV11GQbvZHVvoc1w9coaker7cA82mJIrOBy5 iKfhFPw7EqlZlDybM4Q2c1f+njUUmg9x/c9AOksKnqX4qteJGwhKD0j6y1omE6RUr18X o8V7gGBgvfUoDkCbBqxJe7HBz848gGGrf1dqm/byGCcLgmZ6JupKdgScwpoW/SjDGPQQ YPR8VjN6YmGtEcq0AMCLiPdVBfWzmZDir6NM0ShyiIWXt6YVF2jbPK2cDi3UGLLcp5HT Wk9w== 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=h/5giWFO3wXBwHEfC55BSYMxpJoJpAHOtOFoV5lHHRA=; b=Q9YNSDUsorq9eiCqQOn2D4zQd+PahbEI0eKaGYgbV9Ev1KUFYR0+ZH4KRm5w3w5BtS HCu8nywr8F2F8RBkJyTUBonwWnsJhCGgLHpCeihFFPuU9ZOJ24oOEY+XdF7v5WQ6nrFa EkLX5nxst7K0xrMzzeYMUuOAQL+XvJa8IRsIekmOgXy/zZ8B1OsXglBymwgr0ij9MurW iYQCunOIiX77m87EFEq0pC6dcnW95WKSdtMDdZr/9FP7V/9wZ72I7VxflkL8hpFtUH0u Jb0B+RWBXecg7muohIARoyI34FaedlmlTY4VlDqIDkemjZPhr3/wU/tuvFRlYdGUrr/D DovA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JPqZdhXy; 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 sa14si1462060ejb.355.2021.01.27.16.28.37; Wed, 27 Jan 2021 16:29:00 -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=JPqZdhXy; 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 S233835AbhA0U6Z (ORCPT + 99 others); Wed, 27 Jan 2021 15:58:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233810AbhA0U6D (ORCPT ); Wed, 27 Jan 2021 15:58:03 -0500 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB318C06174A for ; Wed, 27 Jan 2021 12:57:22 -0800 (PST) Received: by mail-oi1-x232.google.com with SMTP id m13so3669096oig.8 for ; Wed, 27 Jan 2021 12:57:22 -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=h/5giWFO3wXBwHEfC55BSYMxpJoJpAHOtOFoV5lHHRA=; b=JPqZdhXyX1eoR5kq9AJVmmHtPIf8+TmY20tZ1iOVqrJYJ8CuKijXF/eZokWKR/JE3f pHt3FTS0eCKoOE/7mlq0BvkQcwRekHJnRDaWObJkDEXu66CB4Fjk8laq9J8Pr8kHpapi 2mI5B64ZVH7Le+0FqQ2JifJ1RFea6Iinj32vjRKuel2gBlWEyfa2HzLtgQCcMIdYyY2D AAyCUagm8BquLXLh9+mRd0+cuCcLlCIf6VO6LjJQpG7MF7yVh2HuCMDHP4YqnmvrkhLT nQlayhBo0NS6DgzZ4knY55DrQLM0MRC6fIDyPWyjzQ3hJnZF+0/LirccUXYO/ypeNRVV ZJvg== 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=h/5giWFO3wXBwHEfC55BSYMxpJoJpAHOtOFoV5lHHRA=; b=frxsy5xWPjlKiK1YGl3Qe1d+jc2ZwmPTj8qLE6sE3kSzp53XlpnxFDKwXzftSrdOqi Xw8R4qOPYd6Ov/aFOHGSHJb9Xj4i3PGOdCbnQ3a0A85KIMqeQfJ47qJSnt8/QPG4RFBG GTwwAz0r3TG17ZBv1RvQh9ff4jOUBr4IhZsn0R7zTXSEzWvns04KKSD6N0a1iM0F01EZ T0YDnZUmBfkbdryGBIjftUtKNsxRFUm+ONWtIrCd7k447Mgamern1e/z8FSaEHW25DXf z8YAlIMnG7hs1HuM9d56VqD40JbzwnqUfsuZsVIAZ6k4CdarXat7K9h9P8Y+EmpKEbSe 6g1w== X-Gm-Message-State: AOAM533on4bcdUKhoHS8kE3UAE0Rka9LB48z5z1ZGLBmhHG5ZoW2MeKx mSj33anCB3uu4TvTKWtHrrrNfzfE2L8B/3GbwrADAg== X-Received: by 2002:a05:6808:8fa:: with SMTP id d26mr4522331oic.6.1611781041985; Wed, 27 Jan 2021 12:57:21 -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: From: Jim Mattson Date: Wed, 27 Jan 2021 12:57:10 -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: Mohammed Gamal , kvm list , LKML , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , Aaron Lewis , Sean Christopherson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2021 at 1:16 PM Jim Mattson wrote: > > On Fri, Jan 15, 2021 at 11:35 AM Jim Mattson wrote: > > > > 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? > > Paolo, > If you're not working on this, do you mind if I ask Aaron to take a look at it? Ugh. The advanced EPT exit qualification contains nothing useful here, AFAICT. It only contains x86 page protection information--nothing about the access itself.