From owner-freebsd-virtualization@FreeBSD.ORG Sun Apr 14 03:46:23 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0EFDE95E for ; Sun, 14 Apr 2013 03:46:23 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id B0C4D1F95 for ; Sun, 14 Apr 2013 03:46:22 +0000 (UTC) Received: from pool-96-250-5-62.nycmny.fios.verizon.net ([96.250.5.62]:50241 helo=minion.home) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1URDtV-0001yD-Je for freebsd-virtualization@freebsd.org; Sat, 13 Apr 2013 23:46:21 -0400 From: George Neville-Neil Content-Type: multipart/signed; boundary="Apple-Mail=_6E062044-DFAC-4E78-9252-9EE3802B9536"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Fatal trap 1: priviledged instruction fault while in kernel mode... Message-Id: <07943784-E0BF-4691-A7CB-B09D4C0232A5@neville-neil.com> Date: Sat, 13 Apr 2013 23:46:20 -0400 To: freebsd-virtualization@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) X-Mailer: Apple Mail (2.1503) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2013 03:46:23 -0000 --Apple-Mail=_6E062044-DFAC-4E78-9252-9EE3802B9536 Content-Type: multipart/mixed; boundary="Apple-Mail=_534E5F76-8750-41EF-8C25-6FA90EF5B118" --Apple-Mail=_534E5F76-8750-41EF-8C25-6FA90EF5B118 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Howdy, I just started trying to run bhyve on a Thinkpad X220. This has a core = i5 and EPT support, dmesg attached. I'm trying with the March snapshots (02 March and 30 March so = far) and have gotten the above panic instantly upon trying the vmrun.sh script. I took a shot of the screen after the panic but at that point I can't = use the keyboard with the machine at all. dmesg for the machine is attached to this email, and the photo is at: http://people.freebsd.org/~gnn/bhyvecrash.jpg Best, George --Apple-Mail=_534E5F76-8750-41EF-8C25-6FA90EF5B118 Content-Disposition: attachment; filename=dmesg.txt Content-Type: text/plain; x-unix-mode=0664; name="dmesg.txt" Content-Transfer-Encoding: quoted-printable Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-CURRENT #0 r247862M: Tue Mar 5 23:30:46 EST 2013 root@punk:/usr/obj/usr/home/gnn/svn/head-punk/src/sys/GENERIC amd64 FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221 WARNING: WITNESS option enabled, expect reduced performance. module iwn already present! CPU: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (2491.96-MHz K8-class CPU) Origin =3D "GenuineIntel" Id =3D 0x206a7 Family =3D 0x6 Model =3D = 0x2a Stepping =3D 7 = Features=3D0xbfebfbff = Features2=3D0x1fbae3ff AMD Features=3D0x28000800 AMD Features2=3D0x1 TSC: P-state invariant, performance statistics real memory =3D 17179869184 (16384 MB) avail memory =3D 16395001856 (15635 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi_ec0: port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, bf900000 (3) failed cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 550 Event timer "HPET1" frequency 14318180 Hz quality 440 Event timer "HPET2" frequency 14318180 Hz quality 440 Event timer "HPET3" frequency 14318180 Hz quality 440 Event timer "HPET4" frequency 14318180 Hz quality 440 atrtc0: port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0x5000-0x503f mem = 0xd0000000-0xd03fffff,0xc0000000-0xcfffffff irq 16 at device 2.0 on pci0 agp0: on vgapci0 agp0: aperture size is 256M, detected 65532k stolen memory pci0: at device 22.0 (no driver attached) em0: port 0x5080-0x509f mem = 0xd2500000-0xd251ffff,0xd252b000-0xd252bfff irq 20 at device 25.0 on = pci0 em0: Using an MSI interrupt em0: Ethernet address: f0:de:f1:55:d8:16 ehci0: mem 0xd252a000-0xd252a3ff irq = 16 at device 26.0 on pci0 usbus0: EHCI version 1.0 usbus0 on ehci0 hdac0: mem 0xd2520000-0xd2523fff irq = 22 at device 27.0 on pci0 pcib1: irq 16 at device 28.0 on pci0 pci2: on pcib1 pcib2: irq 17 at device 28.1 on pci0 pci3: on pcib2 iwn0: mem 0xd2400000-0xd2401fff irq 17 = at device 0.0 on pci3 pcib3: irq 19 at device 28.3 on pci0 pci5: on pcib3 pcib4: irq 16 at device 28.4 on pci0 pci13: on pcib4 sdhci_pci0: mem 0xd1400000-0xd14000ff irq 16 at = device 0.0 on pci13 sdhci_pci0: 1 slot(s) allocated ehci1: mem 0xd2529000-0xd25293ff irq = 23 at device 29.0 on pci0 usbus1: EHCI version 1.0 usbus1 on ehci1 isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port = 0x50a8-0x50af,0x50b4-0x50b7,0x50a0-0x50a7,0x50b0-0x50b3,0x5060-0x507f = mem 0xd2528000-0xd25287ff irq 19 at device 31.2 on pci0 ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahcich4: at channel 4 on ahci0 ahciem0: on ahci0 pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: flags 0xe irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 battery0: on acpi0 acpi_acad0: on acpi0 orm0: at iomem 0xc0000-0xcffff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=3D0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on = isa0 ppc0: cannot reserve I/O port range est0: on cpu0 p4tcc0: on cpu0 est1: on cpu1 p4tcc1: on cpu1 est2: on cpu2 p4tcc2: on cpu2 est3: on cpu3 p4tcc3: on cpu3 Timecounters tick every 1.000 msec hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 31,25 and 27 on = hdaa0 pcm1: at nid 35 on hdaa0 hdacc1: at cad 3 on hdac0 hdaa1: at nid 1 on hdacc1 pcm2: at nid 5 on hdaa1 pcm3: at nid 6 on hdaa1 pcm4: at nid 7 on hdaa1 usbus0: 480Mbps High Speed USB v2.0 usbus1: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-8 SATA 2.x device ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 305245MB (625142448 512 byte sectors: 1H 63S/T 16383C) ada0: Previously was known as ad4 ses0 at ahciem0 bus 0 scbus3 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device SMP: AP CPU #1 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #2 Launched! Timecounter "TSC-low" frequency 1245978366 Hz quality 1000 WARNING: WITNESS option enabled, expect reduced performance. Root mount waiting for: usbus1 usbus0 uhub0: 3 ports with 3 removable, self powered uhub1: 3 ports with 3 removable, self powered Root mount waiting for: usbus1 usbus0 ugen0.2: at usbus0 uhub2: = on usbus0 ugen1.2: at usbus1 uhub3: = on usbus1 Root mount waiting for: usbus1 usbus0 uhub2: 6 ports with 6 removable, self powered uhub3: 8 ports with 8 removable, self powered ugen0.3: at usbus0 Trying to mount root from ufs:/dev/ad4s1a [rw]... WARNING: / was not properly dismounted WARNING: /usr was not properly dismounted wlan0: Ethernet address: a0:88:b4:34:77:a4 lock order reversal: 1st 0xffffff83d7d9d978 bufwait (bufwait) @ = /usr/home/gnn/svn/head-punk/src/sys/kern/vfs_bio.c:2676 2nd 0xfffffe000833ec00 dirhash (dirhash) @ = /usr/home/gnn/svn/head-punk/src/sys/ufs/ufs/ufs_dirhash.c:284 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffff845657c300 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff845657c3b0 witness_checkorder() at witness_checkorder+0xc47/frame = 0xffffff845657c430 _sx_xlock() at _sx_xlock+0x73/frame 0xffffff845657c470 ufsdirhash_add() at ufsdirhash_add+0x3e/frame 0xffffff845657c4c0 ufs_direnter() at ufs_direnter+0x685/frame 0xffffff845657c580 ufs_mkdir() at ufs_mkdir+0x863/frame 0xffffff845657c780 VOP_MKDIR_APV() at VOP_MKDIR_APV+0xf0/frame 0xffffff845657c7b0 kern_mkdirat() at kern_mkdirat+0x21a/frame 0xffffff845657c9a0 amd64_syscall() at amd64_syscall+0x265/frame 0xffffff845657cab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xffffff845657cab0 --- syscall (136, FreeBSD ELF64, sys_mkdir), rip =3D 0x80093035a, rsp =3D = 0x7fffffffd788, rbp =3D 0x7fffffffdc70 --- em0: link state changed to UP lock order reversal: 1st 0xfffffe000afd0840 filedesc structure (filedesc structure) @ = /usr/home/gnn/svn/head-punk/src/sys/kern/kern_descrip.c:1180 2nd 0xfffffe00643187c8 ufs (ufs) @ = /usr/home/gnn/svn/head-punk/src/sys/kern/vfs_subr.c:4401 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffff84565e5580 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff84565e5630 witness_checkorder() at witness_checkorder+0xc47/frame = 0xffffff84565e56b0 __lockmgr_args() at __lockmgr_args+0x6c9/frame 0xffffff84565e57e0 ffs_lock() at ffs_lock+0x84/frame 0xffffff84565e5830 VOP_LOCK1_APV() at VOP_LOCK1_APV+0xf9/frame 0xffffff84565e5860 _vn_lock() at _vn_lock+0xab/frame 0xffffff84565e58d0 knlist_remove_kq() at knlist_remove_kq+0x82/frame 0xffffff84565e5900 knote_fdclose() at knote_fdclose+0xc8/frame 0xffffff84565e5950 closefp() at closefp+0x64/frame 0xffffff84565e59a0 amd64_syscall() at amd64_syscall+0x265/frame 0xffffff84565e5ab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xffffff84565e5ab0 --- syscall (6, FreeBSD ELF64, sys_close), rip =3D 0x8015be79a, rsp =3D = 0x7fffffffd858, rbp =3D 0x7fffffffd870 --- lock order reversal: 1st 0xffffff83d7d7fc18 bufwait (bufwait) @ = /usr/home/gnn/svn/head-punk/src/sys/kern/vfs_bio.c:2676 2nd 0xfffffe000830e7b0 snaplk (snaplk) @ = /usr/home/gnn/svn/head-punk/src/sys/ufs/ffs/ffs_snapshot.c:2298 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xffffff84564de470 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff84564de520 witness_checkorder() at witness_checkorder+0xc47/frame = 0xffffff84564de5a0 __lockmgr_args() at __lockmgr_args+0x6c9/frame 0xffffff84564de6d0 ffs_copyonwrite() at ffs_copyonwrite+0x19a/frame 0xffffff84564de780 ffs_geom_strategy() at ffs_geom_strategy+0xe3/frame 0xffffff84564de7b0 bufwrite() at bufwrite+0x178/frame 0xffffff84564de7f0 ffs_sbupdate() at ffs_sbupdate+0x1d8/frame 0xffffff84564de860 ffs_sync_lazy() at ffs_sync_lazy+0x106/frame 0xffffff84564de8a0 ffs_sync() at ffs_sync+0x92/frame 0xffffff84564de960 sync_fsync() at sync_fsync+0x131/frame 0xffffff84564de9a0 VOP_FSYNC_APV() at VOP_FSYNC_APV+0xf0/frame 0xffffff84564de9d0 sched_sync() at sched_sync+0x34c/frame 0xffffff84564dea70 fork_exit() at fork_exit+0x84/frame 0xffffff84564deab0 fork_trampoline() at fork_trampoline+0xe/frame 0xffffff84564deab0 --- trap 0, rip =3D 0, rsp =3D 0xffffff84564deb70, rbp =3D 0 --- --Apple-Mail=_534E5F76-8750-41EF-8C25-6FA90EF5B118-- --Apple-Mail=_6E062044-DFAC-4E78-9252-9EE3802B9536 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iEYEARECAAYFAlFqJo0ACgkQYdh2wUQKM9KI1gCgqax0M/s1KBf940asBX677DaP rpkAn12L0GyoZ2NDtI+Y1tM/gzcPERpz =0VJk -----END PGP SIGNATURE----- --Apple-Mail=_6E062044-DFAC-4E78-9252-9EE3802B9536-- From owner-freebsd-virtualization@FreeBSD.ORG Sun Apr 14 03:54:36 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E83AA9BE for ; Sun, 14 Apr 2013 03:54:36 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id A4F071FAA for ; Sun, 14 Apr 2013 03:54:36 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id D28E512219; Sun, 14 Apr 2013 13:54:27 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro.local (c-67-190-11-104.hsd1.co.comcast.net [67.190.11.104]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BLK31203 (AUTH peterg@ptree32.com.au); Sun, 14 Apr 2013 13:54:25 +1000 Message-ID: <516A286D.5060901@freebsd.org> Date: Sat, 13 Apr 2013 21:54:21 -0600 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: George Neville-Neil Subject: Re: Fatal trap 1: priviledged instruction fault while in kernel mode... References: <07943784-E0BF-4691-A7CB-B09D4C0232A5@neville-neil.com> In-Reply-To: <07943784-E0BF-4691-A7CB-B09D4C0232A5@neville-neil.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Info: RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,SPF_SOFTFAIL X-Junkmail-Status: score=29/51, host=dommail.onthenet.com.au Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2013 03:54:37 -0000 Hi George, > I just started trying to run bhyve on a Thinkpad X220. This has a core i5 and EPT support, dmesg > attached. I'm trying with the March snapshots (02 March and 30 March so far) and have gotten > the above panic instantly upon trying the vmrun.sh script. > > I took a shot of the screen after the panic but at that point I can't use the keyboard with the > machine at all. > > dmesg for the machine is attached to this email, and the photo is at: > > http://people.freebsd.org/~gnn/bhyvecrash.jpg I'm guessing this recent commit may fix the panic http://svnweb.freebsd.org/base?view=revision&revision=249396 ... but, is it possible that VT-x is disabled in the BIOS ? (the cause of the crash on VM creation). later, Peter. From owner-freebsd-virtualization@FreeBSD.ORG Mon Apr 15 00:04:02 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6FA80DE9 for ; Mon, 15 Apr 2013 00:04:02 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx1.freebsd.org (Postfix) with ESMTP id ED5A587D for ; Mon, 15 Apr 2013 00:04:01 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id w20so4087011lbh.32 for ; Sun, 14 Apr 2013 17:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=feQLHnR64sc0ptZcFhJO4+AMNeXaXyo9Oy7GOQzr1nY=; b=mo0JnqpE6GYJoXITYJ3+bsM0sYErWXTPD/SZAvOBRXcZDBmR5DLoS/vv0TUdsqNrlg mkx2qFGps9TuNo1vkfvGhzZYPsxQ2JIyxz1kx1ZbFaRvEcqyhjJeNQ8O6Ux7dNgU8e3O EuHba8Y1zbC5DejsJEqYUOBzg6sHcIbmG0NCIQwtVqXsmnsYFC9m6hO3/n5IXwMJtkfw fzGB6bULRBVasPWlYAWsck55LyQRSZMyI/LwDwI5DpC3oxdo88kErURVYuUKStoT/Erl rK4BON0OIzTMdsbQTEIcrEhFnzSz4FVA+/NTb0EP02Apf+Z4GAxdr5Pcixi7pgKM2Avy XIgQ== MIME-Version: 1.0 X-Received: by 10.152.116.52 with SMTP id jt20mr9419345lab.52.1365984240313; Sun, 14 Apr 2013 17:04:00 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.146.135 with HTTP; Sun, 14 Apr 2013 17:03:59 -0700 (PDT) Received: by 10.112.146.135 with HTTP; Sun, 14 Apr 2013 17:03:59 -0700 (PDT) In-Reply-To: References: <0A562DF1-BC1A-4416-8471-B27BC5E964EF@gmail.com> Date: Sun, 14 Apr 2013 17:03:59 -0700 X-Google-Sender-Auth: y2hzYY1xilqmoeOxbz1DOJsyXoE Message-ID: Subject: Re: FW: AMD and BHyve? From: Craig Rodrigues To: Anish Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 00:04:02 -0000 On Sat, Apr 13, 2013 at 2:43 PM, Anish wrote: > Hi Craig, > > >AMD Features=0xea500800 > AMD Features2=0x11f > > Yes, the AMD processor you have support AMD-V or SVM and I got BHyVe > working on AMD processors with SVM Nested Page Table/RVI support, > equivalent of Intel Extended Page Table. OK, cool. > > > Neel and Peter have created projects/bhyve_svm for submitting AMD patches > for BHyVe. It doesn't have complete patches yet, only vmcb related files. I looked at http://svnweb.freebsd.org/base/projects/bhyve_svm/sys/amd64/vmm/amd/amdv.c but it looks like the code will still give me an error if I try to kldload vmm.ko on my box. Do you have a patch? Thanks. -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Mon Apr 15 02:49:20 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1E95FC21 for ; Mon, 15 Apr 2013 02:49:20 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) by mx1.freebsd.org (Postfix) with ESMTP id E74D3CE5 for ; Mon, 15 Apr 2013 02:49:19 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id e14so5292012iej.30 for ; Sun, 14 Apr 2013 19:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=LLLl5BWopPVWBPGr5OsS1VXC1IXmuxzli/iDcd+KcHE=; b=W1vJAsdl0AH7uPv/hVZM6LnHh8cj81NRp5oBrCNYGPZRE9L6Kg+fFBlY+SaIItqnrN Xkf3bYKLSnVckIQK5+kNCXv6b55dMjDS8DVkdBjZA9DG+syN57umve9CdYHmCN5UCOTi ucIaoJPfIPYcSTmRQ35gYNB9/flAAOT+eC9cH9VhUO4VLdATskabSyuQfM3WkBMoQ/3l 17ME0WKbQPnU39ANT7HuMAqr2f/RfJUrAZsoQ4GnSM/3u7mXQY6jFSy1TPJ2Y07765ZP 229kJXaxvA7rcs+8s6+rgqmniiy2QzlbrHIWUBUAugJS4p68vPOPc1Iehcg6Aiavuleo Aw2Q== MIME-Version: 1.0 X-Received: by 10.50.53.176 with SMTP id c16mr4195613igp.36.1365994159591; Sun, 14 Apr 2013 19:49:19 -0700 (PDT) Received: by 10.43.9.138 with HTTP; Sun, 14 Apr 2013 19:49:19 -0700 (PDT) In-Reply-To: References: <0A562DF1-BC1A-4416-8471-B27BC5E964EF@gmail.com> Date: Sun, 14 Apr 2013 19:49:19 -0700 Message-ID: Subject: Re: FW: AMD and BHyve? From: Neel Natu To: Craig Rodrigues Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 02:49:20 -0000 Hi Craig, On Sun, Apr 14, 2013 at 5:03 PM, Craig Rodrigues wrote: > On Sat, Apr 13, 2013 at 2:43 PM, Anish wrote: > > > Hi Craig, > > > > >AMD Features=0xea500800 > > AMD Features2=0x11f > > > > Yes, the AMD processor you have support AMD-V or SVM and I got BHyVe > > working on AMD processors with SVM Nested Page Table/RVI support, > > equivalent of Intel Extended Page Table. > > OK, cool. > > > > > > > Neel and Peter have created projects/bhyve_svm for submitting AMD patches > > for BHyVe. It doesn't have complete patches yet, only vmcb related files. > > I looked at > http://svnweb.freebsd.org/base/projects/bhyve_svm/sys/amd64/vmm/amd/amdv.c > but it looks like the code will still give me an error if I try to kldload > vmm.ko on my box. > Yes, that is expected. The bhyve_svm branch does not have all the bits to support AMD just yet. best Neel > > Do you have a patch? > > Thanks. > > -- > Craig > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to " > freebsd-virtualization-unsubscribe@freebsd.org" > From owner-freebsd-virtualization@FreeBSD.ORG Mon Apr 15 11:06:53 2013 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 718899BA for ; Mon, 15 Apr 2013 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6344A7BA for ; Mon, 15 Apr 2013 11:06:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3FB6rM9015297 for ; Mon, 15 Apr 2013 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3FB6qSF015295 for freebsd-virtualization@FreeBSD.org; Mon, 15 Apr 2013 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Apr 2013 11:06:52 GMT Message-Id: <201304151106.r3FB6qSF015295@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-virtualization@FreeBSD.org Subject: Current problem reports assigned to freebsd-virtualization@FreeBSD.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/170096 virtualization[vimage] Dynamically-attached network interface will c o kern/169991 virtualization[run] [vimage] panic after device plugged in o kern/165252 virtualization[vimage] [pf] [panic] kernel panics with VIMAGE and PF o kern/161094 virtualization[vimage] [pf] [panic] kernel panic with pf + VIMAGE wh o kern/160541 virtualization[vimage][pf][patch] panic: userret: Returning on td 0x o kern/160496 virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE o kern/148155 virtualization[vimage] [pf] Kernel panic with PF + VIMAGE kernel opt a kern/147950 virtualization[vimage] [carp] VIMAGE + CARP = kernel crash s kern/143808 virtualization[pf] pf does not work inside jail a kern/141696 virtualization[rum] [vimage] [panic] rum(4)+ vimage = kernel panic 10 problems total. From owner-freebsd-virtualization@FreeBSD.ORG Mon Apr 15 14:03:27 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9748E7C7; Mon, 15 Apr 2013 14:03:27 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 1036E1DC; Mon, 15 Apr 2013 14:03:26 +0000 (UTC) Received: from [38.105.238.108] (port=61905 helo=[10.16.241.159]) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1URk0E-0006L3-F4; Mon, 15 Apr 2013 10:03:26 -0400 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Fatal trap 1: priviledged instruction fault while in kernel mode... From: George Neville-Neil In-Reply-To: <516A286D.5060901@freebsd.org> Date: Mon, 15 Apr 2013 10:03:34 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <1A5C5F22-87CA-4A23-9594-67ABB73D4F07@neville-neil.com> References: <07943784-E0BF-4691-A7CB-B09D4C0232A5@neville-neil.com> <516A286D.5060901@freebsd.org> To: Peter Grehan X-Mailer: Apple Mail (2.1503) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 14:03:27 -0000 On Apr 13, 2013, at 23:54 , Peter Grehan wrote: > Hi George, >=20 >> I just started trying to run bhyve on a Thinkpad X220. This has a = core i5 and EPT support, dmesg >> attached. I'm trying with the March snapshots (02 March and 30 March = so far) and have gotten >> the above panic instantly upon trying the vmrun.sh script. >>=20 >> I took a shot of the screen after the panic but at that point I can't = use the keyboard with the >> machine at all. >>=20 >> dmesg for the machine is attached to this email, and the photo is at: >>=20 >> http://people.freebsd.org/~gnn/bhyvecrash.jpg >=20 > I'm guessing this recent commit may fix the panic >=20 > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D249396 >=20 > ... but, is it possible that VT-x is disabled in the BIOS ? (the cause = of the crash on VM creation). I'll check that tonight. Thanks! Best, George From owner-freebsd-virtualization@FreeBSD.ORG Wed Apr 17 03:03:15 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A529768E; Wed, 17 Apr 2013 03:03:15 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 8027478D; Wed, 17 Apr 2013 03:03:15 +0000 (UTC) Received: from pool-96-250-5-62.nycmny.fios.verizon.net ([96.250.5.62]:60490 helo=new-host.home) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1USIeQ-0005oT-1O; Tue, 16 Apr 2013 23:03:14 -0400 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Fatal trap 1: priviledged instruction fault while in kernel mode... From: George Neville-Neil In-Reply-To: <516A286D.5060901@freebsd.org> Date: Tue, 16 Apr 2013 23:03:13 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <07943784-E0BF-4691-A7CB-B09D4C0232A5@neville-neil.com> <516A286D.5060901@freebsd.org> To: Peter Grehan X-Mailer: Apple Mail (2.1503) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2013 03:03:15 -0000 On Apr 13, 2013, at 23:54 , Peter Grehan wrote: > Hi George, >=20 >> I just started trying to run bhyve on a Thinkpad X220. This has a = core i5 and EPT support, dmesg >> attached. I'm trying with the March snapshots (02 March and 30 March = so far) and have gotten >> the above panic instantly upon trying the vmrun.sh script. >>=20 >> I took a shot of the screen after the panic but at that point I can't = use the keyboard with the >> machine at all. >>=20 >> dmesg for the machine is attached to this email, and the photo is at: >>=20 >> http://people.freebsd.org/~gnn/bhyvecrash.jpg >=20 > I'm guessing this recent commit may fix the panic >=20 > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D249396 >=20 > ... but, is it possible that VT-x is disabled in the BIOS ? (the cause = of the crash on VM creation). >=20 OK I can confirm that updating to the latest HEAD and turning on VT in = the BIOS worked. Thanks! Best, George From owner-freebsd-virtualization@FreeBSD.ORG Fri Apr 19 15:47:41 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4F14E9F for ; Fri, 19 Apr 2013 15:47:41 +0000 (UTC) (envelope-from tycho.nightingale@pluribusnetworks.com) Received: from p3plsmtpa06-01.prod.phx3.secureserver.net (p3plsmtpa06-01.prod.phx3.secureserver.net [173.201.192.102]) by mx1.freebsd.org (Postfix) with ESMTP id 317D5F1F for ; Fri, 19 Apr 2013 15:47:41 +0000 (UTC) Received: from [10.0.1.9] ([209.6.121.211]) by p3plsmtpa06-01.prod.phx3.secureserver.net with id Rrm41l0014ZlaVd01rm4VC; Fri, 19 Apr 2013 08:46:05 -0700 From: Tycho Nightingale Content-Type: multipart/mixed; boundary="Apple-Mail=_31F1079F-E4E1-4782-8EAA-8441AC83B269" Subject: direct descriptor support for virtio block device Message-Id: <4FC78CC2-AAF3-4802-ACFC-3F3281DC45DE@pluribusnetworks.com> Date: Fri, 19 Apr 2013 11:46:03 -0400 To: freebsd-virtualization@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) X-Mailer: Apple Mail (2.1503) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2013 15:47:41 -0000 --Apple-Mail=_31F1079F-E4E1-4782-8EAA-8441AC83B269 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii The current virtio block device advertises support for the indirect = descriptors feature yet is unable to cope if the guest elects not to use = them. Attached is a patch for direct descriptors along with an = implementation of device reset. Tycho --Apple-Mail=_31F1079F-E4E1-4782-8EAA-8441AC83B269 Content-Disposition: attachment; filename=vtblk-diff.txt Content-Type: text/plain; name="vtblk-diff.txt" Content-Transfer-Encoding: 7bit diff -r 7ec7f1183c3c usr.sbin/bhyve/pci_virtio_block.c --- a/usr.sbin/bhyve/pci_virtio_block.c Thu Apr 18 07:43:45 2013 -0400 +++ b/usr.sbin/bhyve/pci_virtio_block.c Fri Apr 19 11:08:32 2013 -0400 @@ -187,6 +187,13 @@ { if (value == 0) { DPRINTF(("vtblk: device reset requested !\n")); + sc->vbsc_isr = 0; + sc->msix_table_idx_req = VIRTIO_MSI_NO_VECTOR; + sc->msix_table_idx_cfg = VIRTIO_MSI_NO_VECTOR; + sc->vbsc_features = 0; + sc->vbsc_pfn = 0; + sc->vbsc_lastq = 0; + memset(&sc->vbsc_q, 0, sizeof(struct vring_hqueue)); } sc->vbsc_status = value; @@ -203,9 +210,8 @@ int i; int err; int iolen; - int nsegs; int uidx, aidx, didx; - int writeop, type; + int indirect, writeop, type; off_t offset; uidx = *hq->hq_used_idx; @@ -215,30 +221,21 @@ vd = &hq->hq_dtable[didx]; - /* - * Verify that the descriptor is indirect, and obtain - * the pointer to the indirect descriptor. - * There has to be space for at least 3 descriptors - * in the indirect descriptor array: the block header, - * 1 or more data descriptors, and a status byte. - */ - assert(vd->vd_flags & VRING_DESC_F_INDIRECT); + indirect = ((vd->vd_flags & VRING_DESC_F_INDIRECT) != 0); - nsegs = vd->vd_len / sizeof(struct virtio_desc); - assert(nsegs >= 3); - assert(nsegs < VTBLK_MAXSEGS + 2); - - vid = paddr_guest2host(vtblk_ctx(sc), vd->vd_addr, vd->vd_len); - assert((vid->vd_flags & VRING_DESC_F_INDIRECT) == 0); + if (indirect) { + vid = paddr_guest2host(vtblk_ctx(sc), vd->vd_addr, vd->vd_len); + vd = &vid[0]; + } /* * The first descriptor will be the read-only fixed header */ - vbh = paddr_guest2host(vtblk_ctx(sc), vid[0].vd_addr, + vbh = paddr_guest2host(vtblk_ctx(sc), vd->vd_addr, sizeof(struct virtio_blk_hdr)); - assert(vid[0].vd_len == sizeof(struct virtio_blk_hdr)); - assert(vid[0].vd_flags & VRING_DESC_F_NEXT); - assert((vid[0].vd_flags & VRING_DESC_F_WRITE) == 0); + assert(vd->vd_len == sizeof(struct virtio_blk_hdr)); + assert(vd->vd_flags & VRING_DESC_F_NEXT); + assert((vd->vd_flags & VRING_DESC_F_WRITE) == 0); /* * XXX @@ -253,14 +250,21 @@ /* * Build up the iovec based on the guest's data descriptors */ - for (i = 1, iolen = 0; i < nsegs - 1; i++) { - iov[i-1].iov_base = paddr_guest2host(vtblk_ctx(sc), - vid[i].vd_addr, vid[i].vd_len); - iov[i-1].iov_len = vid[i].vd_len; - iolen += vid[i].vd_len; + for (i = 1, iolen = 0; i <= VTBLK_MAXSEGS + 1; i++) { + if (indirect) { + vd = &vid[i]; + } else { + vd = &hq->hq_dtable[vd->vd_next]; + } - assert(vid[i].vd_flags & VRING_DESC_F_NEXT); - assert((vid[i].vd_flags & VRING_DESC_F_INDIRECT) == 0); + if ((vd->vd_flags & VRING_DESC_F_NEXT) == 0) + break; + + iov[i - 1].iov_base = paddr_guest2host(vtblk_ctx(sc), + vd->vd_addr, + vd->vd_len); + iov[i - 1].iov_len = vd->vd_len; + iolen += vd->vd_len; /* * - write op implies read-only descriptor, @@ -268,58 +272,35 @@ * therefore test the inverse of the descriptor bit * to the op. */ - assert(((vid[i].vd_flags & VRING_DESC_F_WRITE) == 0) == + assert(((vd->vd_flags & VRING_DESC_F_WRITE) == 0) == writeop); } /* Lastly, get the address of the status byte */ - status = paddr_guest2host(vtblk_ctx(sc), vid[nsegs - 1].vd_addr, 1); - assert(vid[nsegs - 1].vd_len == 1); - assert((vid[nsegs - 1].vd_flags & VRING_DESC_F_NEXT) == 0); - assert(vid[nsegs - 1].vd_flags & VRING_DESC_F_WRITE); + status = paddr_guest2host(vtblk_ctx(sc), vd->vd_addr, 1); + assert(vd->vd_len == 1); + assert((vd->vd_flags & VRING_DESC_F_NEXT) == 0); + assert(vd->vd_flags & VRING_DESC_F_WRITE); DPRINTF(("virtio-block: %s op, %d bytes, %d segs, offset %ld\n\r", - writeop ? "write" : "read", iolen, nsegs - 2, offset)); + writeop ? "write" : "read", iolen, i - 1, offset)); if (writeop){ - err = pwritev(sc->vbsc_fd, iov, nsegs - 2, offset); + err = pwritev(sc->vbsc_fd, iov, i - 1, offset); } else { - err = preadv(sc->vbsc_fd, iov, nsegs - 2, offset); + err = preadv(sc->vbsc_fd, iov, i - 1, offset); } *status = err < 0 ? VTBLK_S_IOERR : VTBLK_S_OK; /* - * Return the single indirect descriptor back to the host + * Return the single descriptor back to the host */ vu = &hq->hq_used_ring[uidx % hq->hq_size]; vu->vu_idx = didx; vu->vu_tlen = 1; hq->hq_cur_aidx++; *hq->hq_used_idx += 1; -} - -static void -pci_vtblk_qnotify(struct pci_vtblk_softc *sc) -{ - struct vring_hqueue *hq = &sc->vbsc_q; - int i; - int ndescs; - - /* - * Calculate number of ring entries to process - */ - ndescs = hq_num_avail(hq); - - if (ndescs == 0) - return; - - /* - * Run through all the entries, placing them into iovecs and - * sending when an end-of-packet is found - */ - for (i = 0; i < ndescs; i++) - pci_vtblk_proc(sc, hq); /* * Generate an interrupt if able @@ -332,7 +313,21 @@ pci_generate_msi(sc->vbsc_pi, 0); } } - +} + +static void +pci_vtblk_qnotify(struct pci_vtblk_softc *sc) +{ + struct vring_hqueue *hq = &sc->vbsc_q; + int ndescs; + + while ((ndescs = hq_num_avail(hq)) != 0) { + /* + * Run through all the entries, placing them into iovecs and + * sending when an end-of-packet is found + */ + pci_vtblk_proc(sc, hq); + } } static void --Apple-Mail=_31F1079F-E4E1-4782-8EAA-8441AC83B269--