From: Razvan Cojocaru <rzvncj@gmail.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Multiple-page mem_event ring buffer?
Date: Tue, 05 Mar 2013 15:21:38 +0200 [thread overview]
Message-ID: <5135F162.9060909@gmail.com> (raw)
Hello,
currently my code (and all the examples I could find in the Xen source
code) uses a single page mem_event ring buffer, using code along the
lines of:
/* Map the ring page */
unsigned long ring_pfn;
xc_get_hvm_param(xci_, domain_, HVM_PARAM_ACCESS_RING_PFN, &ring_pfn);
unsigned long mmap_pfn = ring_pfn;
ringPage_ = xc_map_foreign_batch(xci_, domain_, PROT_READ | PROT_WRITE,
&mmap_pfn, 1);
if (mmap_pfn & XEN_DOMCTL_PFINFO_XTAB) {
/* Map failed, populate ring page */
if (xc_domain_populate_physmap_exact(xci_, domain_,
1, 0, 0, &ring_pfn))
return SOME_ERROR;
mmap_pfn = ring_pfn;
ringPage = xc_map_foreign_batch(xci_, domain_,
PROT_READ | PROT_WRITE,
&mmap_pfn, 1);
if (mmap_pfn & XEN_DOMCTL_PFINFO_XTAB)
return SOME_OTHER ERROR;
}
Could I safely use more than one page for the ring buffer (passing '2'
as the last parameter of xc_map_foreign_batch(), and so on), or am I
limited to 1 page by design?
Thanks,
Razvan Cojocaru
next reply other threads:[~2013-03-05 13:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 13:21 Razvan Cojocaru [this message]
2013-03-05 14:21 ` Multiple-page mem_event ring buffer? Konrad Rzeszutek Wilk
2013-03-05 14:34 ` Razvan Cojocaru
2013-03-05 15:00 ` Razvan Cojocaru
[not found] <mailman.25393.1362491391.1399.xen-devel@lists.xen.org>
2013-03-05 15:25 ` Andres Lagar-Cavilla
2013-03-05 15:35 ` Razvan Cojocaru
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=5135F162.9060909@gmail.com \
--to=rzvncj@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 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.