direct-io.hg

changeset 10415:511ced948390

[IA64] work around for skbuff_ctor() on non-privileged domain

populate physmap/increase reservation hypercall fail with
extent order > 0 on non-privileged domain.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Thu Jun 15 09:10:14 2006 -0600 (2006-06-15)
parents a5bf90abcbe8
children 0f3bd7d23737
files linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c	Thu Jun 15 08:56:47 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c	Thu Jun 15 09:10:14 2006 -0600
     1.3 @@ -76,6 +76,15 @@ ia64_xenmem_reservation_op(unsigned long
     1.4  			}
     1.5  			break;
     1.6  		}
     1.7 +		if (tmp_ret == 0) {
     1.8 +			//XXX dirty work around for skbuff_ctor()
     1.9 +			//    of a non-privileged domain, 
    1.10 +			if ((op == XENMEM_increase_reservation ||
    1.11 +			     op == XENMEM_populate_physmap) &&
    1.12 +			    !(xen_start_info->flags & SIF_PRIVILEGED) &&
    1.13 +			    reservation.extent_order > 0)
    1.14 +				return ret;
    1.15 +		}
    1.16  		frame_list += tmp_ret;
    1.17  		nr_extents -= tmp_ret;
    1.18  		ret += tmp_ret;
    1.19 @@ -165,7 +174,12 @@ HYPERVISOR_populate_physmap(unsigned lon
    1.20          };
    1.21  	set_xen_guest_handle(reservation.extent_start, &gpfn);
    1.22  	ret = HYPERVISOR_memory_op(XENMEM_populate_physmap, &reservation);
    1.23 -	BUG_ON(ret != 1);
    1.24 +	// it may fail on non-privileged domain with extent_order > 0.
    1.25 +	BUG_ON(ret != 1 &&
    1.26 +	       !(ret == 0 && !(xen_start_info->flags & SIF_PRIVILEGED) &&
    1.27 +		 extent_order > 0));
    1.28 +	if (ret != 1)
    1.29 +		return -EINVAL;//XXX
    1.30  	return 0;
    1.31  }
    1.32