mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Dakinevich <jan.dakinevich@gmail.com>,
	Wanpeng Li <kernellwp@gmail.com>
Cc: kvm <kvm@vger.kernel.org>, Radim Krcmar <rkrcmar@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	ynorov@caviumnetworks.com
Subject: Re: [PATCH] KVM: nVMX: pass valid guest linear-address to the L1
Date: Mon, 5 Sep 2016 15:16:09 +0200	[thread overview]
Message-ID: <60fc4f75-7e46-fdb4-e790-f434d9aefbeb@redhat.com> (raw)
In-Reply-To: <9db16fce-3813-2882-bec5-abd279a8a3a1@gmail.com>



On 05/09/2016 15:02, Jan Dakinevich wrote:
> > No, nested_ept_inject_page_fault() will set
> > vmcs12->guest_linear_address after L0 walks L1's EPT page table and
> > finds that the mapping is invalid if nested EPT is enabled.
>
> Acctually, nested_ept_inject_page_fault() doesn't do that, the routine
> sets only vmcs12->guest_physical_address, but
> vmcs12->guest_linear_address remains untouched. As result, after EPT
> fault from L2, vmcs_readl(GUEST_LINEAR_ADDRESS) in L1 always returns 0.
> 
> > prepare_vmcs12() just copies the vmcs field that could have changed by
> > the L2 guest or the exit-information etc instead of all fields since
> > other fields are modified by L1 with VMWRITE, which already writes to
> > vmcs12 directly.
> 
> Yes, and guest linear-address considered as a part of exit information,
> provided by hardware.

I agree.  The patch seems okay to me, but I'll leave a couple days more
to Wanpeng.

Paolo

  reply	other threads:[~2016-09-05 13:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-04 18:22 Jan Dakinevich
2016-09-05  0:49 ` Wanpeng Li
2016-09-05 13:02   ` Jan Dakinevich
2016-09-05 13:16     ` Paolo Bonzini [this message]
2016-09-06  0:45     ` Wanpeng Li

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=60fc4f75-7e46-fdb4-e790-f434d9aefbeb@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jan.dakinevich@gmail.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=ynorov@caviumnetworks.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®