From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2FWZ-0005FS-D5 for qemu-devel@nongnu.org; Thu, 25 Jul 2013 02:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2FWY-0008OD-Bg for qemu-devel@nongnu.org; Thu, 25 Jul 2013 02:59:43 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:34448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2FWY-0008N4-2K for qemu-devel@nongnu.org; Thu, 25 Jul 2013 02:59:42 -0400 Received: by mail-pb0-f50.google.com with SMTP id wz7so383860pbc.37 for ; Wed, 24 Jul 2013 23:59:39 -0700 (PDT) Message-ID: <51F0CCD3.9080708@ozlabs.ru> Date: Thu, 25 Jul 2013 16:59:31 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1374501278-31549-1-git-send-email-pbonzini@redhat.com> <87ip02wqvn.fsf@codemonkey.ws> <1374729976.6142.61.camel@pasglop> <1374731256.6142.63.camel@pasglop> <51F0BFFE.8060900@web.de> In-Reply-To: <51F0BFFE.8060900@web.de> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , qemu-devel@nongnu.org, agraf@suse.de, hpoussin@reactos.org, Paolo Bonzini , aurelien@aurel32.net On 07/25/2013 04:04 PM, Jan Kiszka wrote: > On 2013-07-25 07:47, Benjamin Herrenschmidt wrote: >> On Thu, 2013-07-25 at 15:26 +1000, Benjamin Herrenschmidt wrote: >>> On Mon, 2013-07-22 at 10:34 -0500, Anthony Liguori wrote: >>>> >>>> Really nice series. I'd prefer we simply got rid of the endianness >>>> flag >>>> entirely but this is a good step. >>>> >>>> Reviewed-by: Anthony Liguori >>> >>> Are you going to merge this ? >>> >>> Afaik (Alexey just told me), pretty much anything IO is broken for >>> powerpc upstream and has been for weeks now ! It looks like the only >>> thing that got reverted was the VGA problem but everything else is still >>> busted including virtio. >>> >>> Why hasn't the original breakage been reverted immediately instead ? >> >> It's actually worse than I thought. Alexey is showing me that in fact, >> even PCI MMIO is busted, using EHCI causes qemu to segfault for example. > > Can you be more specific? I suppose this is also on Power. Is it > unrelated to the endianness topic? Not sure what it is related to. It is fixed by "fix I/O port endianness mess" series, at least Paolo's "iommu" branch does not have this problem. Here is my command line: ./qemu-system-ppc64 -L "qemu-ppc64-bios/" -trace "events=qemu_trace_events" -usb -device usb-ehci -usbdevice disk:format=qcow2:virtimg/fc19beta -m "1024" -machine "pseries" -nographic -vga "none" -enable-kvm Or without -enable-kvm, does not make any difference. Here is what I get with the "master" branch from qemu.org: [ 0.313165] libphy: Fixed MDIO Bus: probed [ 0.313240] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.313311] ehci-pci: EHCI PCI platform driver [ 0.313889] ehci-pci 0000:00:01.0: EHCI Host Controller [ 0.313992] ehci-pci 0000:00:01.0: new USB bus registered, assigned bus number 1 Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x1fffffb8eef0 (LWP 32175)] 0x0000000010382408 in memory_region_oldmmio_write_accessor (opaque=0x10c33a18, addr=0x9, value=0x1fffffb8e220, size=0x1, shift=0x0, mask=0xff) at /home/alexey/pcipassthru/qemu-impreza/memory.c:384 warning: Source file is more recent than executable. 384 mr->ops->old_mmio.write[ctz32(size)](mr->opaque, addr, tmp); (gdb) p mr->ops->old_mmio $3 = {read = {0x0, 0x0, 0x0}, write = {0x0, 0x0, 0x0}} (gdb) bt #0 0x0000000010382408 in memory_region_oldmmio_write_accessor (opaque=0x10c33a18, addr=0x9, value=0x1fffffb8e220, size=0x1, shift=0x0, mask=0xff) at /home/alexey/pcipassthru/qemu-impreza/memory.c:384 #1 0x0000000010382650 in access_with_adjusted_size (addr=0x9, value=0x1fffffb8e220, size=0x1, access_size_min=0x1, access_size_max=0x4, access=@0x106a2a20: 0x1038235c , opaque=0x10c33a18) at /home/alexey/pcipassthru/qemu-impreza/memory.c:433 #2 0x0000000010384ec8 in memory_region_dispatch_write (mr=0x10c33a18, addr=0x9, data=0x0, size=0x1) at /home/alexey/pcipassthru/qemu-impreza/memory.c:978 #3 0x0000000010388508 in io_mem_write (mr=0x10c33a18, addr=0x9, val=0x0, size=0x1) at /home/alexey/pcipassthru/qemu-impreza/memory.c:1737 #4 0x00000000102ebb40 in address_space_rw (as=0x10af9100 , addr=0x100b0001009, buf=0x1ffffffd0028 "", len=0x4, is_write=0x1) at /home/alexey/pcipassthru/qemu-impreza/exec.c:1967 #5 0x00000000102ebfec in cpu_physical_memory_rw (addr=0x100b0001009, buf=0x1ffffffd0028 "", len=0x4, is_write=0x1) at /home/alexey/pcipassthru/qemu-impreza/exec.c:2036 #6 0x000000001037f9d8 in kvm_cpu_exec (cpu=0x1fffffb90010) at /home/alexey/pcipassthru/qemu-impreza/kvm-all.c:1673 #7 0x00000000102dba58 in qemu_kvm_cpu_thread_fn (arg=0x1fffffb90010) at /home/alexey/pcipassthru/qemu-impreza/cpus.c:785 #8 0x00000080c70cc29c in .start_thread () from /lib64/libpthread.so.0 #9 0x00000080c6fbd110 in .__clone () from /lib64/libc.so.6 (gdb) -- Alexey