[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] work around for skbuff_ctor() on non-privileged domain



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 511ced94839002915b6f63d2b6d0a8765c80f3d6
# Parent  a5bf90abcbe88e59f3f24dcd6dafddfe37c38330
[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@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletion(-)

diff -r a5bf90abcbe8 -r 511ced948390 
linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c   Thu Jun 15 08:56:47 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c   Thu Jun 15 09:10:14 
2006 -0600
@@ -76,6 +76,15 @@ ia64_xenmem_reservation_op(unsigned long
                        }
                        break;
                }
+               if (tmp_ret == 0) {
+                       //XXX dirty work around for skbuff_ctor()
+                       //    of a non-privileged domain, 
+                       if ((op == XENMEM_increase_reservation ||
+                            op == XENMEM_populate_physmap) &&
+                           !(xen_start_info->flags & SIF_PRIVILEGED) &&
+                           reservation.extent_order > 0)
+                               return ret;
+               }
                frame_list += tmp_ret;
                nr_extents -= tmp_ret;
                ret += tmp_ret;
@@ -165,7 +174,12 @@ HYPERVISOR_populate_physmap(unsigned lon
         };
        set_xen_guest_handle(reservation.extent_start, &gpfn);
        ret = HYPERVISOR_memory_op(XENMEM_populate_physmap, &reservation);
-       BUG_ON(ret != 1);
+       // it may fail on non-privileged domain with extent_order > 0.
+       BUG_ON(ret != 1 &&
+              !(ret == 0 && !(xen_start_info->flags & SIF_PRIVILEGED) &&
+                extent_order > 0));
+       if (ret != 1)
+               return -EINVAL;//XXX
        return 0;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.