Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F29C433FE for ; Thu, 25 Nov 2021 20:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356857AbhKYUP5 (ORCPT ); Thu, 25 Nov 2021 15:15:57 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:54454 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357004AbhKYUO6 (ORCPT ); Thu, 25 Nov 2021 15:14:58 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637871106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZTKZJgeChVw3msWWtox35n2YclWaURqA0d/qHBiO2oE=; b=2iPkaZQ/urf1bPFs4a47nZl9oa2O+v+/iksCK9asihSKSkmW8+fmdRyHzaMLi3RgNJELD+ 7LzyU19xAKmx3GqRa7VvZ5jtOEjSY0x+evJVgA8aToBVDnb6DwlX/SXb5TMgbB7a4bQXUg q2cKKO6W1gqccsq534KJ5VfSDkkUbLUdpbWEShQOzJaEUd4vz06C0Y12+rzpTxnPqbhjsD QCxYs3AOsLnJ5m2a2ks9XZ9xU+RFus8UMo09cUK8XXNgTcBMkqHtAY/RyZxawiMr6a/Qms WwSteBNB/Q+l3bVSInje00jaLEQO79p5mN0xqoebmNCDPq3w+RR/SQj8tj70nA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637871106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZTKZJgeChVw3msWWtox35n2YclWaURqA0d/qHBiO2oE=; b=nTPnhvTYFDSVx8AbuNboxqeest7LOSNS6E4mE9tVQeTRLfKriAttgCWpAvwi8/ev1zrk5S qb03fo5JXVmFcdCw== To: isaku.yamahata@intel.com, Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , erdemaktas@google.com, Connor Kuehl , Sean Christopherson , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Sean Christopherson Subject: Re: [RFC PATCH v3 46/59] KVM: VMX: Move register caching logic to common code In-Reply-To: <2f3c1207f66f44fdd2f3eb0809d552f5632e4b41.1637799475.git.isaku.yamahata@intel.com> References: <2f3c1207f66f44fdd2f3eb0809d552f5632e4b41.1637799475.git.isaku.yamahata@intel.com> Date: Thu, 25 Nov 2021 21:11:45 +0100 Message-ID: <87mtlshu66.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 24 2021 at 16:20, isaku yamahata wrote: > From: Sean Christopherson > > Move the guts of vmx_cache_reg() to vt_cache_reg() in preparation for > reusing the bulk of the code for TDX, which can access guest state for > debug TDs. > > Use kvm_x86_ops.cache_reg() in ept_update_paging_mode_cr0() rather than > trying to expose vt_cache_reg() to vmx.c, even though it means taking a > retpoline. The code runs if and only if EPT is enabled but unrestricted > guest. This sentence does not parse because it's not a proper sentence. > Only one generation of CPU, Nehalem, supports EPT but not > unrestricted guest, and disabling unrestricted guest without also > disabling EPT is, to put it bluntly, dumb. This one is only significantly better and lacks an explanation what this means for the dumb case. Thanks, tglx