All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@cloudius-systems.com>
To: Zhang Haoyu <zhanghy@sangfor.com>
Cc: kvm <kvm@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S.Tsirkin" <mst@redhat.com>
Subject: Re: What's the difference between EPT_MISCONFIG and EPT_VIOLATION?
Date: Wed, 3 Dec 2014 11:56:01 +0200	[thread overview]
Message-ID: <20141203095601.GJ18509@cloudius-systems.com> (raw)
In-Reply-To: <201412031750333199219@sangfor.com>

On Wed, Dec 03, 2014 at 05:50:33PM +0800, Zhang Haoyu wrote:
> Hi,
> 
> EXIT_REASON_EPT_VIOLATION's corresponding handle is handle_ept_violation(),
> and EXIT_REASON_EPT_MISCONFIG's corresponding handle is handle_ept_misconfig(),
> what's the difference between them?
> 
> I read the SDM-3C 28.2.3 EPT-Induced VM Exits, and found below description,
> "An EPT misconfiguration occurs when, in the course of translating 
> a guest-physical address, the logical processor encounters an EPT 
> paging-structure entry that contains an unsupported value. An EPT 
> violation occurs when there is no EPT misconfiguration but the EPT 
> paging-structure entries disallow an access using the guest physical
> address."
> 
> According to above description, EPT-MISCONFIG is from error settings ,
> but from the its exit-handle handle_ept_misconfig(),
> it seems that handle_ept_misconfig() handles mmio pagefault,
> I'm really confused, I think I'm missing something,
> any advices?
> 
EXIT_REASON_EPT_VIOLATION is similar to a "page not present" pagefault
EXIT_REASON_EPT_MISCONFIG is similar to a "reserved bit set" pagefault.
handle_ept_misconfig() handles mmio pagefault because KVM has an
optimization that uses reserved bits to mark mmio regions.

--
			Gleb.

  reply	other threads:[~2014-12-03  9:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  9:50 What's the difference between EPT_MISCONFIG and EPT_VIOLATION? Zhang Haoyu
2014-12-03  9:56 ` Gleb Natapov [this message]
2014-12-03 10:12   ` Zhang Haoyu
2014-12-03 10:23     ` Gleb Natapov
2014-12-03 10:24     ` Paolo Bonzini

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=20141203095601.GJ18509@cloudius-systems.com \
    --to=gleb@cloudius-systems.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=zhanghy@sangfor.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.