mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, kvm@vger.kernel.org
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
	linux-kernel@vger.kernel.org,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Joerg Roedel" <joro@8bytes.org>
Subject: Re: [PATCH] KVM: x86: nSVM: fix switch to guest mmu
Date: Wed, 19 Dec 2018 22:20:49 +0100	[thread overview]
Message-ID: <b9a36adb-7754-ebd4-0db0-f2219215a976@redhat.com> (raw)
In-Reply-To: <20181219162514.30453-1-vkuznets@redhat.com>

On 19/12/18 17:25, Vitaly Kuznetsov wrote:
> Recent optimizations in MMU code broke nested SVM with NPT in L1
> completely: when we do nested_svm_{,un}init_mmu_context() we want
> to switch from TDP MMU to shadow MMU, both init_kvm_tdp_mmu() and
> kvm_init_shadow_mmu() check if re-configuration is needed by looking
> at cache source data. The data, however, doesn't change - it's only
> the type of the MMU which changes. We end up not re-initializing
> guest MMU as shadow and everything goes off the rails.
> 
> The issue could have been fixed by putting MMU type into extended MMU
> role but this is not really needed. We can just split root and guest MMUs
> the exact same way we did for nVMX, their types never change in the
> lifetime of a vCPU.
> 
> There is still room for improvement: currently, we reset all MMU roots
> when switching from L1 to L2 and back and this is not needed.
> 
> Fixes: 7dcd57552008 ("x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

I'm queueing this to kvm-master.  Radim, please pick the other patches
from him to kvm/next and let me know when you're done---the tree is
yours; I'll handle the merge window pull request.

Paolo

      reply	other threads:[~2018-12-19 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 16:25 Vitaly Kuznetsov
2018-12-19 21:20 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9a36adb-7754-ebd4-0db0-f2219215a976@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®