32-on-64: Fixes to previous changeset.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2007-12-06 13:56:00 +00:00
1 parent 5cc77f9098
commit cdac12a18c
4 files changed
+15 -9

No files matched your search

+9 -5
View File
@@ -1031,6 +1031,7 @@ gnttab_transfer(
grant_entry_t *sha;
struct gnttab_transfer gop;
unsigned long mfn;
unsigned int max_bitsize;
for ( i = 0; i < count; i++ )
{
@@ -1081,24 +1082,27 @@ gnttab_transfer(
if ( xsm_grant_transfer(d, e) )
{
gop.status = GNTST_permission_denied;
unlock_and_copyback:
rcu_unlock_domain(e);
page->count_info &= ~(PGC_count_mask|PGC_allocated);
free_domheap_page(page);
gop.status = GNTST_permission_denied;
goto copyback;
}
if ( (1UL << domain_clamp_alloc_bitsize(e, BITS_PER_LONG-1)) <= mfn )
max_bitsize = domain_clamp_alloc_bitsize(
e, BITS_PER_LONG+PAGE_SHIFT-1);
if ( (1UL << (max_bitsize - PAGE_SHIFT)) <= mfn )
{
struct page_info *new_page;
void *sp, *dp;
new_page = alloc_domheap_pages(
NULL, 0,
MEMF_bits(domain_clamp_alloc_bitsize(e, BITS_PER_LONG-1)));
new_page = alloc_domheap_pages(NULL, 0, MEMF_bits(max_bitsize));
if ( new_page == NULL )
{
gop.status = GNTST_address_too_big;
goto unlock_and_copyback;
}
sp = map_domain_page(mfn);
dp = map_domain_page(page_to_mfn(new_page));
+1 -1
View File
@@ -342,7 +342,7 @@ static long memory_exchange(XEN_GUEST_HANDLE(xen_memory_exchange_t) arg)
d = current->domain;
memflags |= MEMF_bits(domain_clamp_alloc_bitsize(
d, exch.out.address_bits ? : BITS_PER_LONG));
d, exch.out.address_bits ? : (BITS_PER_LONG+PAGE_SHIFT)));
cpu = select_local_cpu(d);
+1 -1
View File
@@ -786,7 +786,7 @@ struct page_info *__alloc_domheap_pages(
ASSERT(!in_irq());
bits = domain_clamp_alloc_bitsize(d, bits ? : BITS_PER_LONG);
bits = domain_clamp_alloc_bitsize(d, bits ? : (BITS_PER_LONG+PAGE_SHIFT));
if ( bits <= (PAGE_SHIFT + 1) )
return NULL;
+4 -2
View File
@@ -400,7 +400,8 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and_replace_t);
#define GNTST_no_device_space (-7) /* Out of space in I/O MMU. */
#define GNTST_permission_denied (-8) /* Not enough privilege for operation. */
#define GNTST_bad_page (-9) /* Specified page was invalid for op. */
#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary */
#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary. */
#define GNTST_address_too_big (-11) /* transfer page address too large. */
#define GNTTABOP_error_msgs { \
"okay", \
@@ -413,7 +414,8 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_and_replace_t);
"no spare translation slot in the I/O MMU", \
"permission denied", \
"bad page", \
"copy arguments cross page boundary" \
"copy arguments cross page boundary", \
"page address size too large" \
}
#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.