From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjZw5-0007cn-Ty for qemu-devel@nongnu.org; Mon, 03 Jun 2013 14:56:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjZXD-0006zV-Ts for qemu-devel@nongnu.org; Mon, 03 Jun 2013 14:31:15 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:38021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjYtR-0008Cz-3u for qemu-devel@nongnu.org; Mon, 03 Jun 2013 13:50:05 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Jun 2013 11:50:03 -0600 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 5DCD86E803A for ; Mon, 3 Jun 2013 13:49:58 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r53Ho148315434 for ; Mon, 3 Jun 2013 13:50:01 -0400 Received: from d01av05.pok.ibm.com (loopback [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r53Ho17S010998 for ; Mon, 3 Jun 2013 13:50:01 -0400 From: Anthony Liguori In-Reply-To: <11353237.fLVsHzmD7c@al> References: <11353237.fLVsHzmD7c@al> Date: Mon, 03 Jun 2013 12:49:57 -0500 Message-ID: <878v2rf5iy.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] QEMU aborts since "kvm: support using KVM_MEM_READONLY flag for regions" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Wu , Jordan Justen , qemu-devel@nongnu.org Cc: Paolo Bonzini , Xiao Guangrong Peter Wu writes: > Hi, > > With the current git source (f10acc8b38d65a66ffa0588a036489d7fa6a593e), > `qemu-system-x86_64 -enable-kvm` fails to run with the following error: > > kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument > > After this message, qemu aborts. Reverting the following commit on top of > master makes the bug go away. Removing the `-enable-kvm` option also > allows QEMU to operate, but without KVM. I also noted this on F19 this weekend. Is anyone else seeing this on more recent kernels? Regards, Anthony Liguori > > commit 235e8982ad393e5611cb892df54881c872eea9e1 > Author: Jordan Justen > Date: Wed May 29 01:27:26 2013 -0700 > > kvm: support using KVM_MEM_READONLY flag for regions > > For readonly memory regions and rom devices in romd_mode, > we make use of the KVM_MEM_READONLY. A slot that uses > KVM_MEM_READONLY can be read from and code can execute from the > region, but writes will exit to qemu. > > For rom devices with !romd_mode, we force the slot to be > removed so reads or writes to the region will exit to qemu. > (Note that a memory region in this state is not executable > within kvm.) > > QEMU was built using GCC 4.8.0, runs on Arch Linux 64-bit with a > custom kernel, Linux 3.9.1. CPU: i5-460M. A backtrace is provided > on the bottom of this message. If you need more details, please ask. > > Regards, > Peter > > #0 0x00007ffff1a251c9 in raise () from /usr/lib/libc.so.6 > #1 0x00007ffff1a265c8 in abort () from /usr/lib/libc.so.6 > #2 0x00005555557dd84d in kvm_set_phys_mem (section=0x7fffe6fdca00, add=false) at /tmp/qemu/kvm-all.c:715 > #3 0x00005555557e132c in address_space_update_topology_pass (as=as@entry=0x5555564dae00 , adding=adding@entry=false, old_view=..., new_view=...) at /tmp/qemu/memory.c:725 > #4 0x00005555557e1f13 in address_space_update_topology (as=0x5555564dae00 ) at /tmp/qemu/memory.c:761 > #5 memory_region_transaction_commit () at /tmp/qemu/memory.c:786 > #6 0x00005555557dfa42 in access_with_adjusted_size (addr=addr@entry=2, value=value@entry=0x7fffe6fdcc18, size=1, access_size_min=, access_size_max=, > access=access@entry=0x5555557e0000 , opaque=opaque@entry=0x55555658c238) at /tmp/qemu/memory.c:399 > #7 0x00005555557e0f77 in memory_region_iorange_write (iorange=, offset=2, width=1, data=51) at /tmp/qemu/memory.c:475 > #8 0x00005555557de562 in kvm_handle_io (count=1, size=1, direction=1, data=, port=3326) at /tmp/qemu/kvm-all.c:1507 > #9 kvm_cpu_exec (env=env@entry=0x55555656f750) at /tmp/qemu/kvm-all.c:1659 > #10 0x000055555578da05 in qemu_kvm_cpu_thread_fn (arg=0x55555656f750) at /tmp/qemu/cpus.c:759 > #11 0x00007ffff6280dd2 in start_thread () from /usr/lib/libpthread.so.0 > #12 0x00007ffff1ad5cdd in clone () from /usr/lib/libc.so.6