All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>,
	Cathy Avery <cavery@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: vkuznets@redhat.com, wei.huang2@amd.com
Subject: Re: [PATCH] KVM: SVM: Use a separate vmcb for the nested L2 guest
Date: Thu, 8 Oct 2020 07:52:46 +0200	[thread overview]
Message-ID: <aaaadb29-6299-5537-47a9-072ca34ba512@redhat.com> (raw)
In-Reply-To: <587d1da1a037dd3ab7844c5cacc50bfda5ce6021.camel@redhat.com>

On 08/10/20 00:14, Maxim Levitsky wrote:
>>
>> +	if (svm->vmcb01->control.asid == 0)
>> +		svm->vmcb01->control.asid = svm->nested.vmcb02->control.asid;
> 
> I think that the above should be done always. The asid field is currently host
> controlled only (that is L2 value is ignored, selective ASID tlb flush is not
> advertized to the guest and lnvlpga is emulated as invlpg). 

Yes, in fact I suggested that ASID should be in svm->asid and moved to
svm->vmcb->asid in svm_vcpu_run.  Then there's no need to special case
it in nested code.

This should be a patch coming before this one.

> 
> 1. Something wrong with memory types - like guest is using UC memory for everything.
>     I can't completely rule that out yet

You can print g_pat and see if it is all zeroes.

In general I think it's better to be explicit with vmcb01 vs. vmcb02,
like Cathy did, but I can see it's a matter of personal preference to
some extent.

Paolo


  reply	other threads:[~2020-10-08  5:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 19:23 [PATCH] KVM: SVM: Use a separate vmcb for the nested L2 guest Cathy Avery
2020-09-18 15:16 ` Babu Moger
2020-09-18 15:27   ` Cathy Avery
2020-09-18 16:46     ` Babu Moger
2020-09-18 21:11 ` Wei Huang
2020-09-21 14:07   ` Cathy Avery
2020-09-22 15:02     ` Paolo Bonzini
2020-09-22 15:04 ` Paolo Bonzini
2020-09-24 15:17 ` Maxim Levitsky
2020-10-07 22:14 ` Maxim Levitsky
2020-10-08  5:52   ` Paolo Bonzini [this message]
2020-10-08 10:23     ` Maxim Levitsky
2020-10-08 10:39       ` Maxim Levitsky
2020-10-08 10:54         ` Maxim Levitsky
2020-10-08 12:46           ` Cathy Avery
2020-10-08 13:11             ` Maxim Levitsky
2020-10-08 13:52               ` Cathy Avery
2020-10-08 14:19                 ` Maxim Levitsky
2020-10-09 12:31       ` Cathy Avery

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=aaaadb29-6299-5537-47a9-072ca34ba512@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=cavery@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.huang2@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.