From: David Vrabel <david.vrabel@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCHv2 0/2] xen/privcmd: prevent page migration for hypercall buffers
Date: Mon, 22 Aug 2016 18:25:29 +0100 [thread overview]
Message-ID: <57BB3589.4010801@citrix.com> (raw)
In-Reply-To: <1470323800-9481-1-git-send-email-david.vrabel@citrix.com>
On 04/08/16 16:16, David Vrabel wrote:
> Currently libxencall using mlocked buffers for hypercall buffers.
> This pages are subject to compaction and page migration. A userspace
> process may see a hypercall fail with -EFAULT if a page backing a
> hypercall buffer is in the process of being migrated.
>
> Page migration can be prevented by taking an additional reference to
> the page.
>
> There are three possible ways to do this:
>
> 1. Add a new device which when mmap()'d populated the VMA with
> suitable memory that has an additional reference. This would give
> VMAs that have appropriate properties set (e.g., VM_DONTCOPY)
> without having to do additional madvise() calls.
>
> 2. Add a new ioctl to privcmd to populate a VMA with suitably
> ref-counted pages. However, mmap() on privcmd is already used for
> foreign mappings and the VMA properties for hypercall buffers and
> foreign mappings might need to be different and the handling of
> unmap will need to be different. This might be tricky.
>
> 3. Add a pair of ioctls to privcmd to lock/unlock a buffer by
> getting/putting an additional reference to the page. This is
> what's implemented in this series.
>
> Any thoughts on which is the best approach?
Did no one have an opinions on these three options?
David
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-22 17:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 15:16 [PATCHv2 0/2] xen/privcmd: prevent page migration for hypercall buffers David Vrabel
2016-08-04 15:16 ` [PATCHv2 1/2] xen/prvicmd: use ENOTTY if the IOCTL is not supported David Vrabel
2016-08-08 10:35 ` Juergen Gross
2016-08-04 15:16 ` [PATCHv2 2/2] xen/privcmd: add ioctls for locking/unlocking hypercall buffers David Vrabel
2016-08-04 16:02 ` Jan Beulich
2016-08-22 17:24 ` David Vrabel
2016-08-23 8:46 ` Jan Beulich
2016-08-23 8:54 ` Andrew Cooper
2016-08-22 17:25 ` David Vrabel [this message]
2016-08-25 5:41 ` [PATCHv2 0/2] xen/privcmd: prevent page migration for " Juergen Gross
2016-10-10 13:45 ` David Vrabel
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=57BB3589.4010801@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--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.