diff options
Diffstat (limited to 'hw/mips')
-rw-r--r-- | hw/mips/mips_malta.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 3305a25..cfb60af 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -792,9 +792,23 @@ static int64_t load_kernel (void) loaderparams.kernel_filename); exit(1); } + + /* Sanity check where the kernel has been linked */ if (kvm_enabled()) { + if (kernel_entry & 0x80000000ll) { + error_report("KVM guest kernels must be linked in useg. " + "Did you forget to enable CONFIG_KVM_GUEST?"); + exit(1); + } + xlate_to_kseg0 = cpu_mips_kvm_um_phys_to_kseg0; } else { + if (!(kernel_entry & 0x80000000ll)) { + error_report("KVM guest kernels aren't supported with TCG. " + "Did you unintentionally enable CONFIG_KVM_GUEST?"); + exit(1); + } + xlate_to_kseg0 = cpu_mips_phys_to_kseg0; } |