aboutsummaryrefslogtreecommitdiff
path: root/include/hw/mips
diff options
context:
space:
mode:
authorSanjay Lal <sanjayl@kymasys.com>2014-06-17 23:10:28 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-06-18 16:58:10 +0200
commit253fffe725e8ecc0147a4c6f0893493c1393f0f7 (patch)
treebd4f5a7e321bafe71e9d5020bfda73c12ce2b937 /include/hw/mips
parent353a243e22fae2b993ab7f2d123c2b81013b3c5d (diff)
hw/mips: Add API to convert KVM guest KSEG0 <-> GPA
Add API for converting physical addresses to KVM guest KSEG0 addresses, and fix the existing API for converting KSEG0 addresses to physical addresses to work in the KVM case. Both have the same sized KSEG0, so it's just a case of fixing the mask. In KVM trap and emulate mode both the guest kernel and guest userspace execute in useg: Guest User address space: 0x00000000..0x3fffffff Guest Kernel Unmapped: 0x40000000..0x5fffffff Guest Kernel Mapped: 0x60000000..0x7fffffff Signed-off-by: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/mips')
-rw-r--r--include/hw/mips/cpudevs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/mips/cpudevs.h b/include/hw/mips/cpudevs.h
index 6bea24bf10..b2626f2922 100644
--- a/include/hw/mips/cpudevs.h
+++ b/include/hw/mips/cpudevs.h
@@ -5,6 +5,8 @@
/* mips_addr.c */
uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr);
uint64_t cpu_mips_phys_to_kseg0(void *opaque, uint64_t addr);
+uint64_t cpu_mips_kvm_um_phys_to_kseg0(void *opaque, uint64_t addr);
+
/* mips_int.c */
void cpu_mips_irq_init_cpu(CPUMIPSState *env);