All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aravindh Puthiyaparambil <aravindp@cisco.com>
To: xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Jackson <ian.jackson@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH RFC 0/4] Add mem_access support for PV domains
Date: Mon, 28 Apr 2014 21:45:01 -0700	[thread overview]
Message-ID: <1398746705-6658-1-git-send-email-aravindp@cisco.com> (raw)

This patch series adds mem_access support for PV domains. To do this the PV
domain domain has to be run with shadow paging. A new shadow mode, PG_mem_access
has been added for this. A p2m implementation for mem_access has also been
added to track the access permissions. Since special ring pages are not created
for PV domains, a new libxc API has been added to do this. The mem_access
listener has to call this API before trying to enable mem_access. This page
is freed when mem_access is disabled or when the domain is destroyed. 

When mem_access is enabled for a PV domain, PG_mem_access shadow is turned on and
all the shadows are dropped. In the resulting pagefaults, the entries are created
with the default access permissions. On future pagefaults, if there is a violation,
a mem_event is sent to the mem_access listener who will then resolve it. 

To get the access permissions for individual pages, the p2m access look up table
is referenced. To set the access permission of individual pages, the new
permission is set in the lookup table and the shadow for the gmfn is dropped and
on the resulting fault, the new PTE entry will be created with the new permission.
It should be noted that a mem_access listener for a PV domain does not need to
convert all pages in the PV domain to the default permission during setup and
teardown as this is done implicitly when enabling and disabling mem_access.

Patches are based on top of commit 31ee95.

Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

  x86/mm: Shadow and p2m changes for PV mem_access
  x86/mem_access: mem_access and mem_event changes to support PV domains
  tools/libxc: Add APIs to create and get the PV ring page
  tool/xen-access: Add support for PV domains

 tools/libxc/xc_mem_access.c         |  29 ++++
 tools/libxc/xenctrl.h               |  17 ++-
 tools/tests/xen-access/xen-access.c | 122 +++++++++------
 xen/arch/x86/domain.c               |  12 ++
 xen/arch/x86/mm/Makefile            |   2 +-
 xen/arch/x86/mm/mem_access.c        | 146 ++++++++++++++++--
 xen/arch/x86/mm/mem_event.c         |  77 ++++++++--
 xen/arch/x86/mm/p2m-ma.c            | 286 ++++++++++++++++++++++++++++++++++++
 xen/arch/x86/mm/p2m.c               |  19 ++-
 xen/arch/x86/mm/paging.c            |  16 ++
 xen/arch/x86/mm/shadow/common.c     |  63 +++++++-
 xen/arch/x86/mm/shadow/multi.c      | 104 ++++++++++++-
 xen/include/asm-x86/domain.h        |   3 +
 xen/include/asm-x86/mem_access.h    |   4 +
 xen/include/asm-x86/p2m.h           |  51 +++++++
 xen/include/asm-x86/paging.h        |   3 +
 xen/include/asm-x86/shadow.h        |  11 ++
 xen/include/public/domctl.h         |   4 +
 xen/include/public/memory.h         |   2 +
 19 files changed, 897 insertions(+), 74 deletions(-)
 create mode 100644 xen/arch/x86/mm/p2m-ma.c

-- 
1.9.1

             reply	other threads:[~2014-04-29  4:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29  4:45 Aravindh Puthiyaparambil [this message]
2014-04-29  4:45 ` [PATCH RFC 1/4] x86/mm: Shadow and p2m changes for PV mem_access Aravindh Puthiyaparambil
2014-04-29  8:50   ` Jan Beulich
2014-04-29 23:10     ` Aravindh Puthiyaparambil (aravindp)
2014-04-30  6:32       ` Jan Beulich
2014-04-30 22:20         ` Aravindh Puthiyaparambil (aravindp)
2014-05-01  1:11           ` Andres Lagar-Cavilla
2014-05-01  3:18             ` Aravindh Puthiyaparambil (aravindp)
2014-05-01 14:18           ` Tim Deegan
2014-05-01 19:14             ` Aravindh Puthiyaparambil (aravindp)
2014-05-08 12:44               ` Tim Deegan
2014-05-02  8:26           ` Jan Beulich
2014-05-02 16:28             ` Aravindh Puthiyaparambil (aravindp)
2014-04-29 12:05   ` Tamas Lengyel
2014-04-29 23:36     ` Aravindh Puthiyaparambil (aravindp)
2014-05-01 14:39   ` Tim Deegan
2014-05-01 19:26     ` Aravindh Puthiyaparambil (aravindp)
2014-04-29  4:45 ` [PATCH RFC 2/4] x86/mem_access: mem_access and mem_event changes to support PV domains Aravindh Puthiyaparambil
2014-04-29  4:45 ` [PATCH RFC 3/4] tools/libxc: Add APIs to create and get the PV ring page Aravindh Puthiyaparambil
2014-05-02 12:41   ` Ian Campbell
2014-04-29  4:45 ` [PATCH RFC 4/4] tool/xen-access: Add support for PV domains Aravindh Puthiyaparambil
2014-05-02 12:43   ` Ian Campbell

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=1398746705-6658-1-git-send-email-aravindp@cisco.com \
    --to=aravindp@cisco.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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 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.