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-ia64-devel

[Xen-ia64-devel] [PATCH] implement xencomm routine for HVMOP_track_dirty

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] implement xencomm routine for HVMOP_track_dirty_vram.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 8 May 2008 20:37:50 +0900
Delivery-date: Thu, 08 May 2008 04:38:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1210245916 -32400
# Node ID f2d1cf8d4daf78ded03b978e2cc40360ef247fe1
# Parent  9e6566a48768ce872d6ae77208ce20be00dfe0ce
[IA64] implement xencomm routine for HVMOP_track_dirty_vram.

This patches implement xencomm routine for HVMOP_track_dirty_vram hypercall.
Without this, using vfb results in annoying messages in dom0 as
> xencomm_privcmd_hvm_op: unknown HVMOP 6
xen/ia64 doesn't implement the hypercall at this moment so that
it simply returns -ENOSYS. So the xencomm routine returns -ENOSYS
directly without issuing the useless hypercall.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/arch/ia64/xen/xcom_privcmd.c b/arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c
+++ b/arch/ia64/xen/xcom_privcmd.c
@@ -661,6 +661,41 @@
 }
 
 static int
+xencomm_privcmd_hvm_op_track_dirty_vram(privcmd_hypercall_t *hypercall)
+{
+#if 1
+       /*
+        * At this moment HVMOP_track_dirty_vram isn't implemented
+        * on xen/ia64 so that it just returns -ENOSYS.
+        * Don't issue hypercall to get -ENOSYS.
+        * When the hypercall is implemented, enable the following codes.
+        */
+       return -ENOSYS;
+#else
+       int cmd = hypercall->arg[0];
+       struct xen_hvm_track_dirty_vram *user_op = (void*)hypercall->arg[1];
+       struct xen_hvm_track_dirty_vram kern_op;
+       struct xencomm_handle *desc;
+       struct xencomm_handle *bitmap_desc;
+       int ret;
+
+       BUG_ON(cmd != HVMOP_track_dirty_vram);
+       if (copy_from_user(&kern_op, user_op, sizeof(kern_op)))
+               return -EFAULT;
+       desc = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
+       bitmap_desc = xencomm_map(xen_guest_handle(kern_op.dirty_bitmap),
+                                 kern_op.nr * sizeof(uint8_t));
+       if (bitmap_desc == NULL)
+               return -ENOMEM;
+       set_xen_guest_handle(kern_op.dirty_bitmap, (void*)bitmap_desc);
+       ret = xencomm_arch_hypercall_hvm_op(cmd, desc);
+       xencomm_free(bitmap_desc);
+
+       return ret;
+#endif
+}
+
+static int
 xencomm_privcmd_hvm_op(privcmd_hypercall_t *hypercall)
 {
        int cmd = hypercall->arg[0];
@@ -682,6 +717,17 @@
        case HVMOP_set_pci_link_route:
                argsize = sizeof(xen_hvm_set_pci_link_route_t);
                break;
+
+/*
+ * work around until include/xen/interface/hvm/hvm_op.h is updated.
+ * Once it is updated, this will be removed.
+ */
+#ifndef HVMOP_track_dirty_vram
+#define HVMOP_track_dirty_vram 6
+#endif
+
+       case HVMOP_track_dirty_vram:
+               return xencomm_privcmd_hvm_op_track_dirty_vram(hypercall);
 
        default:
                printk("%s: unknown HVMOP %d\n", __func__, cmd);


-- 
yamahata

Attachment: 538_f2d1cf8d4daf.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] implement xencomm routine for HVMOP_track_dirty_vram., Isaku Yamahata <=