Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4661473pxa; Mon, 10 Aug 2020 15:00:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtvbRp/z2FGoZcmHReQIQ+Sh+U7qjC9anPUyYrYplT5zPgoODHJVMM9vnKU4v1OXnHG4cO X-Received: by 2002:a17:906:6146:: with SMTP id p6mr24267883ejl.211.1597096840737; Mon, 10 Aug 2020 15:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597096840; cv=none; d=google.com; s=arc-20160816; b=WPupgW4bKtSGzc0rYZ0aqHuZhcT+kY3dRI9xZ74yC0LySTisfwMhNRkUW+FfC76iLe l6faxrRFtI0OOujQTaisHm+F1MCYhEinpQ2BqMwd5zuzbX8YSHUXxM0uylnXvadcqYE/ 8hhCjwke/6TYuimvmPGDDUFVFGYbQckVPW4BlriWkITF6veUatn71czP870eX4xZoeVf qM5Pv66tR9urDqbuRxPQRVJDDWmQPQuOQiSaPF/zjnNX5ZctxbLchnFV8oPne3lwaNz2 1dBKYe1E8q2Ngdo5yd0+3USpisdNVLEHkcZyjFv2iopZ7gthMPapwifFrR9S9GJIY0Fz NpTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vlEq2Dpha15y0ydLscbk8ovts5dUH9uys7Vvw2mMr1U=; b=EpS492QhPbBreP73uOnBonGUlJYKndPJOF54tRmDgpFKeLOceTM3syz70nrT4fMqnC 7BvtLX61VOKkDiqpzMvGIwyHPo+YpM9XGi7cTq46+J5kavCLcE9WS6JkraNUNcI0cxzh 1JzwXIXSi/6dyiizBhFS1iuNcjM5FTnqNm3IgSBFZGGIngMvT3WQtccewBYbyDePvXMK iC1yQ9bKH4C5BNzvbsiYikw1PcyYeUyA2s4mNquiWZw/ZJi9uOo3IvPcTte/KkWqJYaF fu/sMWZglhw8FtQ7bLATHrR24+akJ/NiGgDuioL35oPw52EFNWV7f3c85dq1OXIZ1i+g Xpmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CQdU0Zj3; 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 h2si10801817edq.450.2020.08.10.15.00.17; Mon, 10 Aug 2020 15:00:40 -0700 (PDT) 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=CQdU0Zj3; 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 S1726697AbgHJV7T (ORCPT + 99 others); Mon, 10 Aug 2020 17:59:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726626AbgHJV7S (ORCPT ); Mon, 10 Aug 2020 17:59:18 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5A42C061787 for ; Mon, 10 Aug 2020 14:59:18 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id u24so10341402oiv.7 for ; Mon, 10 Aug 2020 14:59:18 -0700 (PDT) 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:content-transfer-encoding; bh=vlEq2Dpha15y0ydLscbk8ovts5dUH9uys7Vvw2mMr1U=; b=CQdU0Zj3KV4YFfYLuNp2l0iGi/XCf1EB3qgvYjBRajbbDv1b/6CfLGKGP/v2RPGOw9 FJbM6Kuz3rbx8chfTXiQeM4dfr4IdX7J4PnTFUVc0vDgH6m2inCY5hhsESUKG+rsid+D BiVgujInT4P4N8Im2b3QnoeQL//flLZ1O/xr3ir4+Bn4yXSvPLwUeBqcF5LoR7IXG+T+ r5/cWeSQBAo/FX0LcRC3+MZ2zy+dyCE4lNsjNKsD/D/7JpElMIh8kRkoE5/5yQvLBSg/ VxjSPrwqMvH5QYS0TsWozDgC8SOiTPWCMTIp87Uq9HMbQp5XzxY3YY3ojd1IRngkC9pQ Z5Vg== 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:content-transfer-encoding; bh=vlEq2Dpha15y0ydLscbk8ovts5dUH9uys7Vvw2mMr1U=; b=mXOsd+zshU3mw8V0p7BC9jrvOEARfYLG1/TL40VnTFIuclf+HNN3/WP8V5Ueg4Lweb +4630IyEMdzCVkELyVsvIeJZ9pWN8hiIcaop72KuY5nmUItepOol5yWjKIN+AaTgtXvq kF2hhhcYO13M+2PyYfYWNrIvEM7BIkg5BZc0SVCvAWBXLT58f/gq5wsyKL1pS0lP2Ayo qmylKwwNiLmF2/UxcRFJsvlgWJzHdvzNB3ZFM1sZqi/+TmRojUQn3qW+YL5YnjxNN8fW NUCHyw3deGEP7gryMVAsiNZnXPIzcyCYrToRhTBBbuEKJYpBggFb1ul3H4f+yrcQbTvW GT8g== X-Gm-Message-State: AOAM530kI9lgOenvztxfBcO/2LaHvplIqxHTDH2qNpgZYp17qPFxIsu4 BWgde3Aqlry7lPBriY7VVwJ5G7w4Ij5/J4J0Qtp/kQ== X-Received: by 2002:a54:4795:: with SMTP id o21mr1141052oic.13.1597096757767; Mon, 10 Aug 2020 14:59:17 -0700 (PDT) MIME-Version: 1.0 References: <159676101387.12805.18038347880482984693.stgit@bmoger-ubuntu> <159676126090.12805.5961438692882905158.stgit@bmoger-ubuntu> In-Reply-To: <159676126090.12805.5961438692882905158.stgit@bmoger-ubuntu> From: Jim Mattson Date: Mon, 10 Aug 2020 14:59:06 -0700 Message-ID: Subject: Re: [PATCH v4 12/12] KVM:SVM: Enable INVPCID feature on AMD To: Babu Moger Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Sean Christopherson , kvm list , Joerg Roedel , "the arch/x86 maintainers" , LKML , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 6, 2020 at 5:47 PM Babu Moger wrote: > > The following intercept bit has been added to support VMEXIT > for INVPCID instruction: > Code Name Cause > A2h VMEXIT_INVPCID INVPCID instruction > > The following bit has been added to the VMCB layout control area > to control intercept of INVPCID: > Byte Offset Bit(s) Function > 14h 2 intercept INVPCID > > Enable the interceptions when the the guest is running with shadow > page table enabled and handle the tlbflush based on the invpcid > instruction type. > > For the guests with nested page table (NPT) support, the INVPCID > feature works as running it natively. KVM does not need to do any > special handling in this case. > > AMD documentation for INVPCID feature is available at "AMD64 > Architecture Programmer=E2=80=99s Manual Volume 2: System Programming, > Pub. 24593 Rev. 3.34(or later)" > > The documentation can be obtained at the links below: > Link: https://www.amd.com/system/files/TechDocs/24593.pdf > Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D206537 > > Signed-off-by: Babu Moger Reviewed-by: Jim Mattson