Am 26.11.2009 um 16:24 schrieb Alexander Graf <agraf@xxxxxxx>:
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 <agraf@xxxxxxx>
---
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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html