MIPS KVM trap & emulate guest kernels have a different segment layout compared with traditional MIPS kernels, to allow both the user and kernel code to run from the user address segment without repeatedly trapping to KVM. QEMU currently supports this layout only for KVM, but its sometimes useful to be able to run these kernels in QEMU on a PC. This patchset enables it for TCG too. This also paves the way for MIPS KVM VZ support (which uses the normal virtual memory layout) by abstracting whether user mode kernel segments are in use. Cc: Yongbok Kim <yongbok.kim@xxxxxxxxxx> Cc: Aurelien Jarno <aurelien@xxxxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: kvm@xxxxxxxxxxxxxxx James Hogan (2): mips: Improve segment defs for KVM T&E guests mips: Add KVM T&E segment support for TCG hw/mips/addr.c | 12 ++++++++++++ hw/mips/mips_malta.c | 17 +++++++---------- include/hw/mips/cpudevs.h | 5 +++-- target/mips/helper.c | 27 +++++++++++++-------------- target/mips/translate.c | 4 ++-- 5 files changed, 37 insertions(+), 28 deletions(-) -- git-series 0.8.10