Isaku Yamahata <yamahata@xxxxxxxxxxxxx> writes:
> On Wed, Sep 05, 2007 at 06:36:54PM +0200, Markus Armbruster wrote:
>> The patch converts only those uses of xc_map_foreign_batch() to
>> xc_map_foreign_pages() where I'm 100% sure it's safe. For the others,
>> I'd rather have a second opinion from somebody familiar with the code.
>>
>> Discussion of uses:
> ...
>> * main() in tools/ioemu/vl.c, in __ia64__ code
>>
>> Doesn't test for mapping failure. Likely candidate for
>> xc_map_foreign_pages().
>
> This can't be replaced because some pages, e.g. VGA area [0xA0000, 0xC0000),
> can't be mapped.
Is it okay not to check for success?
>> * copy_from_GFW_to_nvram() in tools/libxc/ia64/xc_ia64_hvm_build.c
>>
>> Doesn't test for mapping failure. Likely candidate for
>> xc_map_foreign_pages(), but I have no way to test it.
>
> This can be replaced with xc_map_foreign_pages()
> This change will go through xen-ia64-devel.hg.
> I'll send the patch to xen-ia64-devel.
Thanks!
>> * xc_core_arch_map_p2m() in tools/libxc/xc_core_x86.c
>>
>> This maps a two level page directory: first a a page of pfns for the
>> page directory (live_p2m_frame_list_list), using that pages of pfns
>> for the pages themselves (live_p2m_frame_list), and using that the
>> actual pages.
>>
>> Doesn't test for mapping failure. Likely candidate for
>> xc_map_foreign_pages().
>
> This can be replaced with xc_map_foreign_pages().
Obvious patch for that:
diff -r 9071521d4864 tools/libxc/xc_core_x86.c
--- a/tools/libxc/xc_core_x86.c Fri Sep 07 11:39:10 2007 +0100
+++ b/tools/libxc/xc_core_x86.c Mon Sep 10 15:26:26 2007 +0200
@@ -86,7 +86,7 @@ xc_core_arch_map_p2m(int xc_handle, xc_d
}
live_p2m_frame_list =
- xc_map_foreign_batch(xc_handle, dom, PROT_READ,
+ xc_map_foreign_pages(xc_handle, dom, PROT_READ,
live_p2m_frame_list_list,
P2M_FLL_ENTRIES);
@@ -96,7 +96,7 @@ xc_core_arch_map_p2m(int xc_handle, xc_d
goto out;
}
- *live_p2m = xc_map_foreign_batch(xc_handle, dom, PROT_READ,
+ *live_p2m = xc_map_foreign_pages(xc_handle, dom, PROT_READ,
live_p2m_frame_list,
P2M_FL_ENTRIES);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|