All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: ian.campbell@citrix.com, andres@gridcentric.ca, tim@xen.org,
	JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca
Subject: [PATCH 0 of 8] Mem event ring interface setup update, V3
Date: Tue, 06 Mar 2012 18:50:22 -0500	[thread overview]
Message-ID: <patchbomb.1331077822@xdev.gridcentric.ca> (raw)

Changes from previous posting, dated Feb 29th:
- Added Acked-by Ian Campbell for tools bits
- Turned ((void)0) define for non-x86 architectures into "empty" static inlines
- Added patch #8 to remove the ring from the guest physmap's once successfully 
  mapped by the helper

Headers from previous posting follow below

------------------------------------------------------------------------------
Feb 29th: Changes from previous posting
- Added Acked-by Tim Deegan for hypervisor side
- Added Acked-by Olaf Hering, okaying the ABI/API change
- +ve errno value when sanity-checking the port pointer within libxc
- not clearing errno before calling the ring setup ioctl.

------------------------------------------------------------------------------

Update the interface for setting up mem event rings (for sharing, mem access or
paging).

Remove the "shared page", which was a waste of a whole page for a single event
channel port value.

More importantly, both the shared page and the ring page were dom0 user-space
process pages mapped by the hypervisor. If the dom0 process does not clean up,
the hypervisor keeps posting events (and holding a map) to a page now belonging
to another process.

Solutions proposed:
- Pass the event channel port explicitly as part of the domctl payload.
- Reserve a pfn in the guest physmap for a each mem event ring.  Set/retrieve
these pfns via hvm params. Ensure they are set during build and restore, and
retrieved during save. Ensure these pages don't leak and domains are left
zombie.

In all cases mem events consumers in-tree (xenpaging and xen-access) have been
updated.

Updating the interface to deal with these problems requires
backwards-incompatible changes on both the helper<->libxc and
libxc<->hypervisor interfaces.

Take advantage of the interface update to plumb setting up of the sharing ring,
which was missing.

All patches touch x86/mm hypervisor bits. Patches 1, 3 and 5 are tools patches
as well.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>

 tools/libxc/xc_mem_access.c         |  10 +++-
 tools/libxc/xc_mem_event.c          |  12 +++--
 tools/libxc/xc_mem_paging.c         |  10 +++-
 tools/libxc/xenctrl.h               |   6 +-
 tools/tests/xen-access/xen-access.c |  22 +--------
 tools/xenpaging/xenpaging.c         |  18 +------
 tools/xenpaging/xenpaging.h         |   2 +-
 xen/arch/x86/mm/mem_event.c         |  33 +-------------
 xen/include/public/domctl.h         |   4 +-
 xen/include/public/mem_event.h      |   4 -
 xen/include/xen/sched.h             |   2 -
 xen/arch/x86/hvm/hvm.c              |  48 ++++++++++++++++-----
 xen/include/asm-x86/hvm/hvm.h       |   7 +++
 tools/libxc/xc_domain_restore.c     |  42 ++++++++++++++++++
 tools/libxc/xc_domain_save.c        |  36 ++++++++++++++++
 tools/libxc/xc_hvm_build.c          |  21 ++++++--
 tools/libxc/xc_mem_access.c         |   6 +-
 tools/libxc/xc_mem_event.c          |   3 +-
 tools/libxc/xc_mem_paging.c         |   6 +-
 tools/libxc/xenctrl.h               |   8 +--
 tools/libxc/xg_save_restore.h       |   4 +
 tools/tests/xen-access/xen-access.c |  83 +++++++++++++++++-------------------
 tools/xenpaging/xenpaging.c         |  52 ++++++++++++++++------
 xen/arch/x86/mm/mem_event.c         |  50 ++++++++++------------
 xen/include/public/domctl.h         |   1 -
 xen/include/public/hvm/params.h     |   7 ++-
 xen/include/xen/sched.h             |   1 +
 xen/arch/x86/mm/mem_event.c         |  41 ++++++++++++++++++
 xen/include/public/domctl.h         |  20 ++++++++-
 xen/include/xen/sched.h             |   3 +
 tools/libxc/xc_memshr.c             |  25 +++++++++++
 tools/libxc/xenctrl.h               |   5 ++
 xen/arch/x86/mm/mem_event.c         |  11 ++++
 xen/common/domain.c                 |   3 +
 xen/include/asm-arm/mm.h            |   3 +-
 xen/include/asm-ia64/mm.h           |   3 +-
 xen/include/asm-x86/mm.h            |   6 ++
 xen/arch/x86/mm/mem_event.c         |   6 +-
 tools/tests/xen-access/xen-access.c |   5 ++
 tools/xenpaging/xenpaging.c         |   5 ++
 40 files changed, 426 insertions(+), 208 deletions(-)

             reply	other threads:[~2012-03-06 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 23:50 Andres Lagar-Cavilla [this message]
2012-03-06 23:50 ` [PATCH 1 of 8] Tools: Remove shared page from mem_event/access/paging interfaces Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 2 of 8] x86/hvm: refactor calls to prepare and tear down a helper ring Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 3 of 8] Use a reserved pfn in the guest address space to store mem event rings Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 4 of 8] x86/mm: wire up sharing ring Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 5 of 8] Tools: libxc side for setting up the mem " Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 6 of 8] x86/mm: Clean up mem event structures on domain destruction Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 7 of 8] x86/mm: Fix mem event error message typos Andres Lagar-Cavilla
2012-03-06 23:50 ` [PATCH 8 of 8] Tools: After a helper maps a ring, yank it from the guest physmap Andres Lagar-Cavilla
2012-03-08 15:42   ` Ian Campbell
2012-03-12 11:23   ` Ian Jackson
2012-03-08 13:23 ` [PATCH 0 of 8] Mem event ring interface setup update, V3 Tim Deegan
2012-03-08 14:50   ` Andres Lagar-Cavilla

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=patchbomb.1331077822@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=JBeulich@suse.com \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xensource.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.