From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxxIl-0001WF-MH for qemu-devel@nongnu.org; Fri, 20 Jun 2014 07:48:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxxIh-0002zL-7u for qemu-devel@nongnu.org; Fri, 20 Jun 2014 07:48:15 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:17097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxxIh-0002zH-1l for qemu-devel@nongnu.org; Fri, 20 Jun 2014 07:48:11 -0400 From: James Hogan Date: Fri, 20 Jun 2014 12:47:59 +0100 Message-ID: <1403264879-13247-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] hw/mips: malta: Don't boot from flash with KVM T&E List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , James Hogan , Aurelien Jarno In KVM trap & emulate (T&E) mode the flash reset region at 0xbfc00000 isn't executable, which is why the minimal kernel bootloader is loaded and executed from the last 1MB of DRAM instead. Therefore if no kernel is provided on the command line and KVM is enabled, exit with an error since booting from flash will fail. Reported-by: Aurelien Jarno Signed-off-by: James Hogan Cc: Paolo Bonzini --- hw/mips/mips_malta.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 8bc5392b4223..91b0ce566111 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1052,6 +1052,12 @@ void mips_malta_init(MachineState *machine) bootloader_run_addr, kernel_entry); } } else { + /* The flash region isn't executable from a KVM T&E guest */ + if (kvm_enabled()) { + error_report("KVM enabled but no -kernel argument was specified. " + "Booting from flash is not supported with KVM T&E."); + exit(1); + } /* Load firmware from flash. */ if (!dinfo) { /* Load a BIOS image. */ -- 1.9.3