From owner-freebsd-virtualization@freebsd.org Sun Apr 26 17:53:18 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EE092B7AE6 for ; Sun, 26 Apr 2020 17:53:18 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 499FrB4Lkpz3HZW for ; Sun, 26 Apr 2020 17:53:14 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from disco.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id AB96456468; Sun, 26 Apr 2020 12:53:06 -0500 (CDT) Subject: Re: bhyve with AMD Ryzen 3900X and MSI MEG ACE X570 To: Christian Jeannot , freebsd-virtualization@freebsd.org References: <2535c7f2-ef59-467e-779b-6c9c6db82005@os-plus.org> From: Eric van Gyzen Message-ID: <87c31320-c347-aa1b-adc3-7b36d6edeb38@vangyzen.net> Date: Sun, 26 Apr 2020 12:53:06 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <2535c7f2-ef59-467e-779b-6c9c6db82005@os-plus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 499FrB4Lkpz3HZW X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of eric@vangyzen.net designates 199.48.133.146 as permitted sender) smtp.mailfrom=eric@vangyzen.net X-Spamd-Result: default: False [-5.45 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[vangyzen.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.15)[ip: (-8.15), ipnet: 199.48.132.0/22(-3.76), asn: 36236(-3.80), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36236, ipnet:199.48.132.0/22, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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, 26 Apr 2020 17:53:18 -0000 On 4/26/20 3:57 AM, Christian Jeannot wrote: > Hi Community, > > I am testing bhyve from FreeBSD 12.1 RELEASE. > > My environment: > - CPU: AMD Ryze 3900X > - Mainboard: MSI MEG ACE X570, Default settings, latest BIOS 7C35v18 > - RAM: G.Skill RipJaws V DIMM Kit 64GB, DDR4-3200, CL16-18-18-38 > - GPU: Sapphire Nitro RX 5700XT > > I checked the settings in the BIOS. Virtualization options are enabled. > SVM is enabled. > > I follow the instruction from the FreeBSD handbook „21.7. FreeBSD as a > Host with bhyve“. > > When I run >     kldload vmm > I got an output that SVM is disabled by BIOS. When I check the BIOS it > is enabled. I use bhyve on a Ryzen with an Asus Prime X470-PRO. I wonder if your BIOS is enabling SVM but failing to update the MSR to say it's enabled. Try commenting out the second "return (0);" in svm_available() in sys/amd64/vmm/amd/svm.c and rebuilding the vmm module. If SVM is actually disabled, I have no idea what impact this change will have, so beware. If SVM is actually enabled and this hack allows you to use it, we could probably commit a tunable to do this more cleanly. Eric