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

[Xen-changelog] [xen-unstable] xen: arm: implement arch_get_info_guest


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 20 Dec 2012 16:11:11 +0000
  • Delivery-date: Thu, 20 Dec 2012 16:11:27 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1355926580 0
# Node ID d72be2fc7e755fbc9471a1e801d0b88b02971ce4
# Parent  41bf7e2d5e8b9606f279ef9d1530f62d12d38ce3
xen: arm: implement arch_get_info_guest

Untested, but basically the inverse of arch_set_info_guest.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 41bf7e2d5e8b -r d72be2fc7e75 xen/arch/arm/domctl.c
--- a/xen/arch/arm/domctl.c     Wed Dec 19 14:16:19 2012 +0000
+++ b/xen/arch/arm/domctl.c     Wed Dec 19 14:16:20 2012 +0000
@@ -8,6 +8,7 @@
 #include <xen/types.h>
 #include <xen/lib.h>
 #include <xen/errno.h>
+#include <xen/sched.h>
 #include <public/domctl.h>
 
 long arch_do_domctl(struct xen_domctl *domctl, struct domain *d,
@@ -16,6 +17,22 @@ long arch_do_domctl(struct xen_domctl *d
     return -ENOSYS;
 }
 
+void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
+{
+    struct vcpu_guest_context *ctxt = c.nat;
+    struct cpu_user_regs *regs = &c.nat->user_regs;
+
+    *regs = v->arch.cpu_info->guest_cpu_user_regs;
+
+    ctxt->sctlr = v->arch.sctlr;
+    ctxt->ttbr0 = v->arch.ttbr0;
+    ctxt->ttbr1 = v->arch.ttbr1;
+    ctxt->ttbcr = v->arch.ttbcr;
+
+    if ( !test_bit(_VPF_down, &v->pause_flags) )
+        ctxt->flags |= VGCF_online;
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 41bf7e2d5e8b -r d72be2fc7e75 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S      Wed Dec 19 14:16:19 2012 +0000
+++ b/xen/arch/arm/dummy.S      Wed Dec 19 14:16:20 2012 +0000
@@ -14,7 +14,6 @@ DUMMY(pirq_guest_unbind);
 DUMMY(pirq_set_affinity);
 
 /* VCPU */
-DUMMY(arch_get_info_guest);
 DUMMY(arch_vcpu_reset);
 NOP(update_vcpu_system_time);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.