From: "Jan Beulich" <JBeulich@novell.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH, RFC 3/4] qemu: use new (replacement) mmap-batch ioctl
Date: Wed, 13 Jan 2010 08:56:06 +0000 [thread overview]
Message-ID: <4B4D98B60200007800029A21@vpn.id2.novell.com> (raw)
In-Reply-To: <C77334BB.63DF%keir.fraser@eu.citrix.com>
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
>>> Keir Fraser <keir.fraser@eu.citrix.com> 13.01.10 09:28 >>>
>On 13/01/2010 08:03, "Jan Beulich" <JBeulich@novell.com> wrote:
>> Yes, that's correct. Should I re-spin the patch with the compatibility
>> handling entirely removed then?
>
>Yes please. I've committed the other patches by the way (not yet pushed
>though). Re-spin the qemu one and we'll get that in for -rc2 as well.
Here we go. Thanks!
Jan
[-- Attachment #2: xen-qemu-privcmd-mmap-new.patch --]
[-- Type: text/plain, Size: 2514 bytes --]
Subject: qemu: use new (replacement) mmap-batch ioctl
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- 2010-01-06.orig/qemu/hw/xen_machine_fv.c 2010-01-13 09:45:24.000000000 +0100
+++ 2010-01-06/qemu/hw/xen_machine_fv.c 2010-01-13 09:49:22.000000000 +0100
@@ -95,7 +95,8 @@ static void qemu_remap_bucket(struct map
unsigned long address_index)
{
uint8_t *vaddr_base;
- unsigned long pfns[MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT];
+ xen_pfn_t pfns[MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT];
+ int err[MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT];
unsigned int i, j;
if (entry->vaddr_base != NULL) {
@@ -109,10 +110,11 @@ static void qemu_remap_bucket(struct map
for (i = 0; i < MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT; i++)
pfns[i] = (address_index << (MCACHE_BUCKET_SHIFT-XC_PAGE_SHIFT)) + i;
- vaddr_base = xc_map_foreign_batch(xc_handle, domid, PROT_READ|PROT_WRITE,
- pfns, MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT);
+ vaddr_base = xc_map_foreign_bulk(xc_handle, domid, PROT_READ|PROT_WRITE,
+ pfns, err,
+ MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT);
if (vaddr_base == NULL) {
- fprintf(logfile, "xc_map_foreign_batch error %d\n", errno);
+ fprintf(logfile, "xc_map_foreign_bulk error %d\n", errno);
exit(-1);
}
@@ -124,7 +126,7 @@ static void qemu_remap_bucket(struct map
j = ((i + BITS_PER_LONG) > (MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT)) ?
(MCACHE_BUCKET_SIZE >> XC_PAGE_SHIFT) % BITS_PER_LONG : BITS_PER_LONG;
while (j > 0)
- word = (word << 1) | (((pfns[i + --j] >> 28) & 0xf) != 0xf);
+ word = (word << 1) | !err[i + --j];
entry->valid_mapping[i / BITS_PER_LONG] = word;
}
}
@@ -347,11 +349,11 @@ static void xen_init_fv(ram_addr_t ram_s
(STORE_PAGE_START >> XC_PAGE_SHIFT);
}
- phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
+ phys_ram_base = xc_map_foreign_pages(xc_handle, domid,
PROT_READ|PROT_WRITE,
page_array, nr_pages);
if (phys_ram_base == 0) {
- fprintf(logfile, "xc_map_foreign_batch returned error %d\n", errno);
+ fprintf(logfile, "xc_map_foreign_pages returned error %d\n", errno);
exit(-1);
}
free(page_array);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2010-01-13 8:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 14:50 [PATCH, RFC 3/4] qemu: use new (replacement) mmap-batch ioctl Jan Beulich
2010-01-12 17:25 ` Ian Jackson
2010-01-13 7:50 ` Jan Beulich
2010-01-13 7:59 ` Keir Fraser
2010-01-13 8:03 ` Jan Beulich
2010-01-13 8:28 ` Keir Fraser
2010-01-13 8:56 ` Jan Beulich [this message]
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=4B4D98B60200007800029A21@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=keir.fraser@eu.citrix.com \
--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 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).