Thread (2 messages) 2 messages, 1 author, 2009-11-26

Re: [PATCH] PPC: Sync guest visible MMU state

From: Alexander Graf <hidden>
Date: 2009-11-26 21:56:15
Also in: kvm

Am 26.11.2009 um 16:24 schrieb Alexander Graf [off-list ref]:
quoted hunk ↗ jump to hunk
Currently userspace has no chance to find out which virtual address  
space we're
in and resolve addresses. While that is a big problem for migration,  
it's also
unpleasent when debugging, as gdb and the monitor don't work on  
virtual
addresses.

This patch exports enough of the MMU segment state to userspace to  
make
debugging work and thus also includes the groundwork for migration.

Signed-off-by: Alexander Graf <redacted>

---

Ben, please take this patch in your tree.

v2 -> v3:

 - don't use anonymous unions/structs
---
arch/powerpc/include/asm/kvm.h        |   20 +++++++++++-
arch/powerpc/include/asm/kvm_asm.h |    1 +
arch/powerpc/include/asm/kvm_book3s.h |    3 ++
arch/powerpc/kvm/book3s.c             |   53 ++++++++++++++++++++++++ 
+++++++-
arch/powerpc/kvm/book3s_64_emulate.c  |   38 ++++++++++++++---------
arch/powerpc/kvm/book3s_64_mmu.c |    2 +
arch/powerpc/kvm/powerpc.c            |    3 ++
include/linux/kvm.h                   |    3 ++
8 files changed, 104 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/ 
asm/kvm.h
index c9ca97f..cb6ad08 100644
--- a/arch/powerpc/include/asm/kvm.h
+++ b/arch/powerpc/include/asm/kvm.h
@@ -46,8 +46,24 @@ struct kvm_regs {
};

struct kvm_sregs {
-    __u32 pvr;
-    char pad[1020];
+    union {
+        struct {
+            __u32 pvr;
Meh this breaks old userspace. Better patch following tomorrow.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help