WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Properly return extents for hypervisor memory ops call

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Properly return extents for hypervisor memory ops call
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Sep 2005 20:02:11 +0000
Delivery-date: Thu, 22 Sep 2005 20:00:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID 8e7df3b10d85bd78b81d6dba78631cbeb288a893
# Parent  55bc6698c889e8b9b2c85269f142821088cab2ea
Properly return extents for hypervisor memory ops call
Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>

diff -r 55bc6698c889 -r 8e7df3b10d85 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c     Thu Sep 15 00:00:23 2005
+++ b/xen/arch/ia64/xen/hypercall.c     Thu Sep 15 16:53:34 2005
@@ -14,6 +14,7 @@
 
 #include <asm/vcpu.h>
 #include <asm/dom_fw.h>
+#include <public/memory.h>
 
 extern unsigned long translate_domain_mpaddr(unsigned long);
 extern struct ia64_pal_retval xen_pal_emulator(UINT64,UINT64,UINT64,UINT64);
@@ -152,9 +153,25 @@
                break;
 
            case __HYPERVISOR_memory_op:
-               //regs->r8 = do_dom_mem_op(regs->r14, regs->r15, regs->r16, 
regs->r17, regs->r18); 
                /* we don't handle reservations; just return success */
-               regs->r8 = regs->r16;
+               {
+                   struct xen_memory_reservation reservation;
+                   void *arg = regs->r15;
+
+                   switch(regs->r14) {
+                   case XENMEM_increase_reservation:
+                   case XENMEM_decrease_reservation:
+                       if (copy_from_user(&reservation, arg,
+                               sizeof(reservation)))
+                           regs->r8 = -EFAULT;
+                       else
+                           regs->r8 = reservation.nr_extents;
+                       break;
+                   default:
+                       regs->r8 = do_memory_op(regs->r14, regs->r15);
+                       break;
+                   }
+               }
                break;
 
            case __HYPERVISOR_event_channel_op:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Properly return extents for hypervisor memory ops call, Xen patchbot -unstable <=