From owner-svn-src-head@freebsd.org Thu Nov 23 22:10:14 2017 Return-Path: Delivered-To: svn-src-head@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 0089CDF6B59; Thu, 23 Nov 2017 22:10:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 BCF257C8AC; Thu, 23 Nov 2017 22:10:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vANMACHL036171; Thu, 23 Nov 2017 22:10:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vANMACJW036170; Thu, 23 Nov 2017 22:10:12 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201711232210.vANMACJW036170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 23 Nov 2017 22:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326140 - head/share/examples/bhyve X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/share/examples/bhyve X-SVN-Commit-Revision: 326140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 22:10:14 -0000 Author: avg Date: Thu Nov 23 22:10:12 2017 New Revision: 326140 URL: https://svnweb.freebsd.org/changeset/base/326140 Log: vmrun.sh: add -A option for AHCI emulation of disk devices AHCI emulation is useful for testing scenarios closer to the real hardware. For example, it allows to exercise the CAM subsystem. There could be other uses as well. MFC after: 2 weeks Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Thu Nov 23 19:10:09 2017 (r326139) +++ head/share/examples/bhyve/vmrun.sh Thu Nov 23 22:10:12 2017 (r326140) @@ -46,7 +46,7 @@ errmsg() { usage() { local msg=$1 - echo "Usage: vmrun.sh [-aEhiTv] [-c ] [-C ] [-d ]" + echo "Usage: vmrun.sh [-aAEhiTv] [-c ] [-C ] [-d ]" echo " [-e ] [-f ] [-F ]" echo " [-g ] [-H ]" echo " [-I ] [-l ]" @@ -55,6 +55,7 @@ usage() { echo "" echo " -h: display this help message" echo " -a: force memory mapped local APIC access" + echo " -A: use AHCI disk emulation instead of virtio" echo " -c: number of virtual cpus (default is ${DEFAULT_CPUS})" echo " -C: console device (default is ${DEFAULT_CONSOLE})" echo " -d: virtio diskdev file (default is ${DEFAULT_VIRTIO_DISK})" @@ -99,6 +100,7 @@ console=${DEFAULT_CONSOLE} cpus=${DEFAULT_CPUS} tap_total=0 disk_total=0 +disk_emulation="virtio-blk" gdbport=0 loader_opt="" bhyverun_opt="-H -A -P" @@ -113,11 +115,14 @@ vncport=5900 fbsize="w=1024,h=768" tablet="" -while getopts ac:C:d:e:Ef:F:g:hH:iI:l:m:p:P:t:Tuvw c ; do +while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:p:P:t:Tuvw c ; do case $c in a) bhyverun_opt="${bhyverun_opt} -a" ;; + A) + disk_emulation="ahci-hd" + ;; c) cpus=${OPTARG} ;; @@ -316,7 +321,7 @@ while [ 1 ]; do eval "disk=\$disk_dev${i}" eval "opts=\$disk_opts${i}" make_and_check_diskdev "${disk}" - devargs="$devargs -s $nextslot:0,virtio-blk,${disk}${opts} " + devargs="$devargs -s $nextslot:0,$disk_emulation,${disk}${opts} " nextslot=$(($nextslot + 1)) i=$(($i + 1)) done