In this commit we move the declaration of the function
vm_event_toggle_singlestep from to and
implement the associated functionality on ARM.
Signed-off-by: Sergej Proskurin
---
Cc: Razvan Cojocaru
Cc: Tamas K Lengyel
Cc: Stefano Stabellini
Cc: Julien Grall
Cc: Jan Beulich
Cc: Andrew Cooper
---
xen/arch/arm/vm_event.c| 11 +++
xen/include/asm-arm/vm_event.h | 6 --
xen/include/asm-x86/vm_event.h | 3 ---
xen/include/xen/vm_event.h | 3 +++
4 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/xen/arch/arm/vm_event.c b/xen/arch/arm/vm_event.c
index eaac92078d..a3bb525e9e 100644
--- a/xen/arch/arm/vm_event.c
+++ b/xen/arch/arm/vm_event.c
@@ -47,6 +47,17 @@ void vm_event_monitor_next_interrupt(struct vcpu *v)
/* Not supported on ARM. */
}
+void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v,
+vm_event_response_t *rsp)
+{
+if ( !(rsp->flags & VM_EVENT_FLAG_TOGGLE_SINGLESTEP) )
+return;
+
+ASSERT(atomic_read(&v->vm_event_pause_count));
+
+v->arch.single_step = !v->arch.single_step;
+}
+
/*
* Local variables:
* mode: C
diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h
index 66f2474fe1..0d7a5446f2 100644
--- a/xen/include/asm-arm/vm_event.h
+++ b/xen/include/asm-arm/vm_event.h
@@ -34,12 +34,6 @@ static inline void vm_event_cleanup_domain(struct domain *d)
memset(&d->monitor, 0, sizeof(d->monitor));
}
-static inline void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v,
- vm_event_response_t *rsp)
-{
-/* Not supported on ARM. */
-}
-
static inline
void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *rsp)
{
diff --git a/xen/include/asm-x86/vm_event.h b/xen/include/asm-x86/vm_event.h
index 39e73c83ca..139867178a 100644
--- a/xen/include/asm-x86/vm_event.h
+++ b/xen/include/asm-x86/vm_event.h
@@ -40,9 +40,6 @@ int vm_event_init_domain(struct domain *d);
void vm_event_cleanup_domain(struct domain *d);
-void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v,
-vm_event_response_t *rsp);
-
void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *rsp);
void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp);
diff --git a/xen/include/xen/vm_event.h b/xen/include/xen/vm_event.h
index 2fb39519b1..210aab1b37 100644
--- a/xen/include/xen/vm_event.h
+++ b/xen/include/xen/vm_event.h
@@ -80,6 +80,9 @@ void vm_event_set_registers(struct vcpu *v,
vm_event_response_t *rsp);
void vm_event_monitor_next_interrupt(struct vcpu *v);
+void vm_event_toggle_singlestep(struct domain *d, struct vcpu *v,
+vm_event_response_t *rsp);
+
#endif /* __VM_EVENT_H__ */
/*
--
2.13.3
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel