From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Date: Tue, 01 Apr 2008 12:08:50 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] kvm(ppc)-userspace: initialize Message-Id: <47F225D2.9020409@linux.vnet.ibm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: kvm-ppc@vger.kernel.org ehrhardt@linux.vnet.ibm.com wrote: > From: Christian Ehrhardt >=20 > virtio-block support is atm initialized in qemu/hw/pc.c which is only cal= led > for the "standart pc" platform. > In our case we need to call the virtio-block initialization from our plat= form > init. It might be worth moving this initialization into a funvtion in=20 > virtio-block.c and only call that initializer from any platform init that > supports virtio - any suggestions/preferences if we should do it now or w= hen > another architecture needs that - Anthony ? >=20 > This patch adds that initialization for the kvmppc bamboo platform. >=20 > Signed-off-by: Christian Ehrhardt > --- >=20 > [diffstat] > ppc440_bamboo.c | 13 +++++++++++++ > 1 files changed, 13 insertions(+) [...] FYI some output using virtio-block (still buggy on kvmppc) Initialization when booting guest (VIO =3D virtio drvier in guest, U-VIO = =3D virtio emulation in host kvm userspace) PCI: Enabling device 0000:00:01.0 (0000 -> 0001) PCI: Enabling device 0000:00:02.0 (0000 -> 0001) U-VIO virtio_blk_update_config - vdev 0x10d0b008 VIO virtblk_probe - vdev 0xc8925200 U-VIO virtio_blk_get_features - vdev 0x10d0b008 U-VIO virtio_blk_get_features - vdev 0x10d0b008 U-VIO virtio_blk_get_features - vdev 0x10d0b008 blk_queue_max_hw_segments: set to minimum 1 vda:<3>VIO do_virtblk_request - request_queue 0xc8936000 VIO do_req - request_queue 0xc8936000 request 0xc8937320 virtio_blk 0xc880c= 000 (8secs@0x0 - Maj -929934324) U-VIO virtio_blk_handle_output - vdev 0x10d0b008 vq 0x10d0b20c VIO blk_done - vq 0xc88bcc00 VIO do_virtblk_request - request_queue 0xc8936000 We have no dynamic /dev so anyone who wants to test that will need to creat= e /dev/vda for his needs. This is easy to check using /proc/partitions. Well I think that block size is broken here and using fdisk to check the pa= rtitions on that (unformatted) disk killed the guest kernel. This needs more debugging, but to enable it for our platform is the first s= tep - comments are welcome. bash-3.00# cat /proc/partitions major minor #blocks name [...] 254 0 22517998136852480 vda <- ?broken? The related device nod looks like this: brw-r--r-- 1 root root 254, 0 Mar 28 2008 /dev/vda Below I added the log of the guest crash FYI: bash-3.00# fdisk -l /dev/vda VIO do_virtblk_request - request_queue 0xc8936000 VIO do_req - request_queue 0xc8936000 request 0xc89373e8 virtio_blk 0xc880c= 000 (8secs@0x0 - Maj -929934324) VIO do_req - request_queue 0xc8936000 request 0xc89374b0 virtio_blk 0xc880c= 000 (8secs@0x0 - Maj -929934324) VIO do_req - request_queue 0xc8936000 request 0xc8937578 virtio_blk 0xc880c= 000 (8secs@0x0 - Maj -929934324) VIO do_req - request_queue 0xc8936000 request 0xc8937320 virtio_blk 0xc880c= 000 (8secs@0x0 - Maj -929934324) U-VIO virtio_blk_handle_output - vdev 0x10d0b008 vq 0x10d0b20c VIO blk_done - vq 0xc88bcc00 VIO do_virtblk_request - request_queue 0xc8936000 VIO do_virtblk_request - request_queue 0xc8936000 BUG: recent printk recursion! Bamboo Modules linked in: NIP: c010bcec LR: c010d170 CTR: ffffffff REGS: c8999ae0 TRAP: 0300 Not tainted (2.6.25-rc3-dirty) MSR: 00021002 CR: 84004044 XER: 20000000 DEAR: fffffff8, ESR: 00000000 TASK =3D c89f6000[990] 'fdisk' THREAD: c8998000 GPR00: ffffffff c8999b90 c89f6000 fffffff8 ffffffff c02092e9 00000000 00000= 000 GPR08: c02092e8 fffffff8 ffffffff 00000008 24004028 1002c7b0 00000000 100c8= 510 GPR16: 100c0000 00000000 00000000 c8402208 c0250000 00000400 c899abc8 c0250= 000 GPR24: 00021002 00000000 c026b954 fffffff8 ffffffff c8999cc0 c026bd54 c026b= 9b3 NIP [c010bcec] strnlen+0x10/0x48 LR [c010d170] vsnprintf+0x558/0x83c Call Trace: [c8999b90] [c010cfec] vsnprintf+0x3d4/0x83c (unreliable) [c8999bc0] [c010d46c] vscnprintf+0x18/0x38 [c8999bd0] [c0024c04] vprintk+0x70/0x3a8 [c8999c50] [c0024f8c] printk+0x50/0x60 [c8999cd0] [c013a3c4] do_virtblk_request+0x9c/0x2a8 [c8999d00] [c00f9048] __generic_unplug_device+0x3c/0x50 [c8999d10] [c00f90f0] generic_unplug_device+0x14/0x28 [c8999d20] [c00f8474] blk_unplug+0x20/0x30 [c8999d30] [c009a678] block_sync_page+0x54/0x70 [c8999d40] [c004e58c] sync_page+0x50/0x74 [c8999d50] [c004e5c0] sync_page_killable+0x10/0x4c [c8999d60] [c01be7d0] __wait_on_bit_lock+0x9c/0xf8 [c8999d90] [c004ded8] __lock_page_killable+0x50/0x60 [c8999dc0] [c0050c6c] generic_file_aio_read+0x3bc/0x5bc [c8999e30] [c0075330] do_sync_read+0xc0/0x134 [c8999ef0] [c0075c30] vfs_read+0xcc/0x16c [c8999f10] [c007643c] sys_read+0x4c/0x90 [c8999f40] [c000d0cc] ret_from_syscall+0x0/0x3c Instruction dump: 71200020 4082ffe4 38000000 98030001 881f0000 2f800000 409eff7c 4bffff9c 7c802379 7c691b78 7c0903a6 4182002c <88030000> 2f800000 419e0020 38630001 ---[ end trace 74c6a5de04fea905 ]--- --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel