From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Esr-0003tC-9l for qemu-devel@nongnu.org; Tue, 14 Aug 2012 07:02:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1Esp-0003Tx-53 for qemu-devel@nongnu.org; Tue, 14 Aug 2012 07:02:01 -0400 Received: from thoth.sbs.de ([192.35.17.2]:23179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Eso-0003Tq-RT for qemu-devel@nongnu.org; Tue, 14 Aug 2012 07:01:59 -0400 Message-ID: <502A3021.30206@siemens.com> Date: Tue, 14 Aug 2012 13:01:53 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <87629cvz5b.fsf@blackfin.pond.sub.org> <87ipd8s7zs.fsf@blackfin.pond.sub.org> <87y5m1be5q.fsf@blackfin.pond.sub.org> <87wr1921rd.fsf@blackfin.pond.sub.org> <502235FA.6050903@redhat.com> <87393qnc3t.fsf@blackfin.pond.sub.org> <87lihi50y5.fsf@codemonkey.ws> <87628l6exd.fsf@blackfin.pond.sub.org> <502A2672.9070801@redhat.com> <502A2C08.3060404@siemens.com> <502A2DC5.8000801@redhat.com> In-Reply-To: <502A2DC5.8000801@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Funny -m arguments can crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , "peter.maydell@linaro.org" , Markus Armbruster , Anthony Liguori , "qemu-devel@nongnu.org" On 2012-08-14 12:51, Avi Kivity wrote: > On 08/14/2012 01:44 PM, Jan Kiszka wrote: >> On 2012-08-14 12:20, Avi Kivity wrote: >>> On 08/14/2012 11:44 AM, Markus Armbruster wrote: >>>> >>>> Next error: >>>> >>>> $ gdb --args qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -monitor stdio -m 640k >>>> [...] >>>> Program received signal SIGSEGV, Segmentation fault. >>>> [...] >>>> (gdb) bt >>>> #0 0x0000003b0de884ac in __memcmp_sse2 () from /lib64/libc.so.6 >>>> #1 0x000000000063f1ad in patch_hypercalls (s=0x139b350) >>>> at /work/armbru/qemu/hw/i386/../kvmvapic.c:532 >>>> #2 0x000000000063f3fe in vapic_prepare (s=0x139b350) >>>> at /work/armbru/qemu/hw/i386/../kvmvapic.c:597 >>>> #3 0x000000000063f4ed in vapic_write (opaque=0x139b350, addr=0, data=32, size= >>>> 2) at /work/armbru/qemu/hw/i386/../kvmvapic.c:634 >>>> #4 0x0000000000677a44 in memory_region_write_accessor (opaque=0x139d670, addr= >>>> >>>> Happens when -m argument is a multiple of 4k in [648k..768k]. Only with >>>> --enable-kvm. With and without my CMOS fix applied. >>> >>> kvmvapic requires RAM to be present underneath the ROM. We could fix up >>> kvmvapic to allocate a 4k region and insert it as an overlay, but it's >>> sufficient IMO to require sub-1M users to disable it. It won't be of >>> any use to the anyway as Windows XP requires more than 1MB. >> >> We can also easily automatically disable it when there is insufficient >> (<1MB) memory. Will post a patch. > > Would be nicer if it auto-disables itself, but don't know if the option > ROM has access to the memory size. There is that global ram_size, also used by vmport. Not really nice but no precedent. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux