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

[Xen-devel] [PATCH 03/15] 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>
---
 xen/arch/arm/domctl.c |   17 +++++++++++++++++
 xen/arch/arm/dummy.S  |    1 -
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index cf16791..76f31ce 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -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,
@@ -16,6 +17,22 @@ long arch_do_domctl(struct xen_domctl *domctl,
     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 --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index bfd948a..5ac6af9 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -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);
 
-- 
1.7.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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