From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNto-00077M-EP for qemu-devel@nongnu.org; Wed, 29 Apr 2015 05:03:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnNtk-0003VA-5w for qemu-devel@nongnu.org; Wed, 29 Apr 2015 05:03:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37951 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNtj-0003R8-W7 for qemu-devel@nongnu.org; Wed, 29 Apr 2015 05:03:16 -0400 Message-ID: <55409E4E.3090905@suse.de> Date: Wed, 29 Apr 2015 11:03:10 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1426705700-2564-1-git-send-email-drjones@redhat.com> <1426705833-2679-1-git-send-email-drjones@redhat.com> In-Reply-To: <1426705833-2679-1-git-send-email-drjones@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones , kvmarm@lists.cs.columbia.edu, qemu-devel@nongnu.org, ard.biesheuvel@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, peter.maydell@linaro.org, pbonzini@redhat.com Cc: catalin.marinas@arm.com, lersek@redhat.com, m.smarduch@samsung.com On 18.03.15 20:10, Andrew Jones wrote: > Introduce a new memory region flag, KVM_MEM_UNCACHED, which > is needed by ARM. This flag informs KVM that the given memory > region is typically mapped by the guest as uncached. KVM for > ARM then maps that region as uncached for userspace as well, > in order to keep coherency. I finally managed to give this a spin and immediately ran into an unaligned access trap: [ 116.509976] Unhandled fault: alignment fault (0x92000061) at 0x000003ffb1300000 Program received signal SIGBUS, Bus error. [Switching to Thread 0x3ffb317ecb0 (LWP 1956)] 0x000003ffb685ed68 in memset () from /lib64/libc.so.6 (gdb) bt #0 0x000003ffb685ed68 in memset () from /lib64/libc.so.6 #1 0x000002aaaac013ec in memset (__len=3D, __ch=3D0, __dest=3D) at /usr/include/bits/string3.h:90 #2 vbe_ioport_write_data (opaque=3D0x2aaabbd3600, addr=3D= , val=3D65) at /usr/src/debug/qemu-2.3.0-rc4/hw/display/vga.c:739 #3 0x000002aaaabe07dc in memory_region_write_accessor (mr=3D, addr=3D, value=3D, size=3D, shift=3D, mask=3D) at /usr/src/debug/qemu-2.3.0-rc4/memory.c:430 [...] So maybe forcing the guest to see VRAM as cached is the safer choice after all? Alex