All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: kvm <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>,
	Jan Kiszka <jan.kiszka@web.de>
Subject: Re: Information of EPT violation VMEXIT
Date: Tue, 03 Sep 2013 17:31:48 +0200	[thread overview]
Message-ID: <522600E4.3090003@redhat.com> (raw)
In-Reply-To: <CABpY8MK2ESS7vOJK2071=cGDw3OJr-tGJE=GVv_my_k1YTs8zw@mail.gmail.com>

Il 03/09/2013 17:06, Arthur Chunqi Li ha scritto:
> Hi there,
> 
> When I testing EPT violation VMEXIT, I get some confusions in bit 7&8
> in "Exit Qualification for EPT Violations" (Table 27-7 in SDM).
> 
> Bit 7 means "Set if the guest linear-address field is valid." In which
> occasion will bit 7 clear? I don't quite understand the following
> statements in SDM "The guest linear-address field is valid for all EPT
> violations except those resulting from an attempt to load the guest
> PDPTEs as part of the execution of the MOV CR instruction."

I think it means it is loading the PDPT registers, so it would only
happen with a 32-bit PAE guest.  Testing this is a bit more complicated.
 You probably should setup the state completely in the VMCS, and only
have a "mov %eax, %cr0" instruction as the guest body.

> Bit 8 means the causes of EPT violation. But I don't understand what
> it is means when set and clear. I always get the exit qualification
> with this bit set, how to design a violation with this bit clear?

To get bit 8 = 0, you need to place a paging structure (page table, page
directory, PDPT or PML4) at a guest-physical address that is marked
non-present in the EPT page tables.  The same testing technique should
work here: as soon as you execute the first instruction of the guest
you'll get the EPT violation.

Paolo

      reply	other threads:[~2013-09-03 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 15:06 Information of EPT violation VMEXIT Arthur Chunqi Li
2013-09-03 15:31 ` 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=522600E4.3090003@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=yzt356@gmail.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.