xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Big Strong <fangtuo90@gmail.com>
To: xen-devel <xen-devel@lists.xen.org>
Cc: Tamas Lengyel <tamas.k.lengyel@gmail.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: how to set up a #VE
Date: Thu, 28 Apr 2016 22:36:28 +0800	[thread overview]
Message-ID: <CAFnE1f1n0+kaLRgEkexiSSEEipT5zJwBO3MZ5=8+-7OE3kemxw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1549 bytes --]

I want to set up an EPT page so as to trigger the #VE for testing purpose.
However, some problems are met.

As the Intel Manual said, there are many conditions to trigger a #VE:

a)      If an access to a guest-physical address causes an EPT violation, bit
63 (0) of exactly one of the EPT paging-structure entries used to translate
that address is used to determine *whether the EPT violation is convertible*:
either an entry that is not present (if the guest-physical address does not
translate to a physical address) or an entry that maps a page (if it does).

b)      A convertible EPT violation instead causes a virtualization
exception if the following all hold:

• CR0.PE = 1;

• the logical processor is not in the process of delivering an event
through the IDT; and

• the 32 bits at offset 4 in the virtualization-exception information area
are all 0.
In xc_altp2m.c <http://In xc_altp2m.c, there is a function
xc_altp2m_set_vcpu_enable_notify which is used to set up the #VE
information area. However, as the>, there is a function
xc_altp2m_set_vcpu_enable_notify which is used to set up the #VE
information area. However, as the arguments gfn is a physical address (of
the guest?), how can I safely assign an unused physical memory space to
store #VE info?

Besides, there is no xenctrl interface for setting the suprress_ve bit (63)
of the EPT PTE, which is needed to trigger #VE. Even though I can set that
with ept_set_entry function, this is an internal function of Xen and
unavailble to dom0.

[-- Attachment #1.2: Type: text/html, Size: 3127 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2016-04-28 14:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 14:36 Big Strong [this message]
2016-04-28 15:07 ` how to set up a #VE Tamas K Lengyel
2016-04-29  4:27   ` Big Strong
2016-04-29 19:25     ` Tamas K Lengyel

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='CAFnE1f1n0+kaLRgEkexiSSEEipT5zJwBO3MZ5=8+-7OE3kemxw@mail.gmail.com' \
    --to=fangtuo90@gmail.com \
    --cc=ian.campbell@citrix.com \
    --cc=tamas.k.lengyel@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /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;
as well as URLs for NNTP newsgroup(s).