From owner-freebsd-bugs@freebsd.org Thu Dec 10 04:50:23 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D00839D50B7 for ; Thu, 10 Dec 2015 04:50:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C175014CC for ; Thu, 10 Dec 2015 04:50:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tBA4oN4h012299 for ; Thu, 10 Dec 2015 04:50:23 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 205178] virtio-blk not working correctly in powerpc Date: Thu, 10 Dec 2015 04:50:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kennethsalerno@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 04:50:23 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205178 Bug ID: 205178 Summary: virtio-blk not working correctly in powerpc Product: Base System Version: 11.0-CURRENT Hardware: ppc OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: kennethsalerno@yahoo.com When attaching a disk as a virtio block device, the FreeBSD kernel discovers the geometry incorrectly and sees only a small portion of the available capacity. kens@freebsd-ppc64> gpart show vtbd0 =>16 48 vtbd0 MBR (8.0M) 16 48 - free - (6.0M) Here is the same disk attached to the guest as a SCSI device: kens@freebsd-ppc64> gpart show da1 => 255 4194049 da1 MBR (2.0G) 255 4194049 - free - (2.0G) In other ppc64 guest Operating Systems (Linux) I run with the same host, virtio block devices work as expected (i.e. their reported size by the OS matches what I created with qemu-img). Hypervisor: QEMU version 2.4.0.1 Operating System configuration details: ------------------------------------------------------------- kens@freebsd-ppc64> freebsd-version -ku 11.0-CURRENT 11.0-CURRENT kens@freebsd-ppc64> uname -a FreeBSD freebsd-ppc64.kpsalerno.us.ibm.com 11.0-CURRENT FreeBSD 11.0-CURRENT #3 r291616: Sat Dec 5 15:04:53 EST 2015 root@freebsd-amd64.kpsalerno.us.ibm.com:/usr/obj/powerpc.powerpc64/usr/src/sys/SALERNO powerpc kens@freebsd-ppc64> sysctl kern.conftxt kern.conftxt: options CONFIG_AUTOGENERATED ident SALERNO machine powerpc cpu AIM options SMP options INCLUDE_CONFIG_FILE options _KPOSIX_PRIORITY_SCHEDULING options SCSI_DELAY=5000 options COMPAT_FREEBSD32 options UFS_DIRHASH options INET options PREEMPTION options SCHED_ULE options FDT options PSERIES options NEW_PCIB options GEOM_PART_MBR options GEOM_PART_BSD device uart_ns8250 device pci device scbus device da device cd device pass device scc device uart device uart_z8530 device loop device random device ether device ofwd device bpf device powermac_nvram kens@freebsd-ppc64> kldstat Id Refs Address Size Name 1 25 0x100000 673ab0 kernel 2 1 0x775000 1bcb0 geom_label.ko 3 1 0x791000 b5cc0 if_em.ko 4 1 0x847000 6a578 ufs.ko 5 1 0x8b2000 13770 mem.ko 6 4 0x8c6000 16a20 virtio.ko 7 1 0x8dd000 22c60 if_vtnet.ko 8 1 0x900000 18e90 virtio_pci.ko 9 1 0x919000 18b18 virtio_blk.ko kens@freebsd-ppc64> cat make.conf MAKE_JOBS_NUMBER = 5 KPS_FLAGS = -O2 -fomit-frame-pointer -pipe CFLAGS = ${KPS_FLAGS} COPTFLAGS = ${KPS_FLAGS} WITHOUT_PROFILE = yes WITHOUT_CAPSICUM = yes WITHOUT_TESTS = yes MALLOC_PRODUCTION = yes NO_WERROR = WERROR = # temp disable these modules until Makefile fixed in 11-CURRENT # linux64 linprocfs linsysfs \ MODULES_OVERRIDE = \ geom/geom_label \ sysvipc \ ufs fdescfs tmpfs msdosfs cd9660 procfs pseudofs \ mem \ md firmware \ em \ virtio/virtio virtio/network virtio/pci virtio/block kens@freebsd-ppc64> dmesg | grep -e vt -e virtio virtio_pci0: port 0x40-0x7f mem 0xc0000000-0xc0000fff irq 4100 at device 1.0 on pci0 vtblk0: on virtio_pci0 vtblk0: 8MB (64 131072 byte sectors) kens@freebsd-ppc64> sysctl dev.vtblk dev.vtblk.0.writecache_mode: 1 dev.vtblk.0.%parent: virtio_pci0 dev.vtblk.0.%pnpinfo: dev.vtblk.0.%location: dev.vtblk.0.%driver: vtblk dev.vtblk.0.%desc: VirtIO Block Adapter dev.vtblk.%parent: Details of same disk image when attached to guest as SCSI device: ------------------------------------------------------------- kens@freebsd-ppc64> dmesg|grep da1 da1 at vscsi0 bus 0 scbus0 target 0 lun 2 da1: Fixed Direct Access SPC-3 SCSI device da1: 150.000MB/s transfers da1: 2048MB (4194304 512 byte sectors) -- You are receiving this mail because: You are the assignee for the bug.