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

Re: [Minios-devel] [UNIKRAFT PATCH 12/17] arch/x86_64: Add function for stack pointer retrieval



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 27.03.2018 14:29, Costin Lupu wrote:
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
  include/uk/arch/x86_64/lcpu.h | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/include/uk/arch/x86_64/lcpu.h b/include/uk/arch/x86_64/lcpu.h
index 1750c6f..8c70540 100644
--- a/include/uk/arch/x86_64/lcpu.h
+++ b/include/uk/arch/x86_64/lcpu.h
@@ -47,3 +47,11 @@
  #ifndef nop
  #define nop()   __asm__ __volatile__ ("nop" : : : "memory")
  #endif
+
+static inline unsigned long ukarch_read_sp(void)
+{
+       unsigned long sp;
+
+       __asm__ __volatile__("mov %%rsp, %0" : "=r"(sp));
+       return sp;
+}


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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