From owner-freebsd-virtualization@freebsd.org Tue May 8 11:40:26 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00AE9FB2C4E for ; Tue, 8 May 2018 11:40:26 +0000 (UTC) (envelope-from edenist@edenist.net) Received: from comms.edenist.net (unknown [IPv6:2001:44b8:4154:6400::205]) (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 5AD6274FFC for ; Tue, 8 May 2018 11:40:25 +0000 (UTC) (envelope-from edenist@edenist.net) Received: from comms.edenist.net (unknown [192.168.1.205]) by comms.edenist.net (Postfix) with ESMTP id EC6413823C for ; Tue, 8 May 2018 21:40:17 +1000 (AEST) X-Virus-Scanned: amavisd-new at edenist.net Received: from comms.edenist.net ([192.168.1.205]) by comms.edenist.net (comms.edenist.net [192.168.1.205]) (amavisd-new, port 10024) with LMTP id oj4e4cAVDpPX for ; Tue, 8 May 2018 21:39:49 +1000 (AEST) Received: from [IPv6:2001:44b8:4154:6400:9c24:e118:393f:d4df] (unknown [IPv6:2001:44b8:4154:6400:9c24:e118:393f:d4df]) by comms.edenist.net (Postfix) with ESMTPSA id BC1823822F for ; Tue, 8 May 2018 21:39:49 +1000 (AEST) Subject: Re: wrmsr to register 0x49(0x1) on vcpu x To: freebsd-virtualization@freebsd.org References: <20180508071846.18435a99@mimo> From: edenist Message-ID: Date: Tue, 8 May 2018 21:39:48 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180508071846.18435a99@mimo> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 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: Tue, 08 May 2018 11:40:26 -0000 Hi Frank, While the changelog from Asus is rather lean, I would wager it has to do with spectre mitigations introduced by AMD. Last month they announced that they had prepared a microcode update to address variant 2, and had handed the microcode to motherboard vendors to supply as a BIOS update. Most of my systems are AMD, though I've yet to see this microcode update personally yet due to lazy vendors. That said, it appears they have followed intel and introduced an IBRS feature. https://developer.amd.com/wp-content/resources/Architecture_Guidelines_Update_Indirect_Branch_Control.pdf According to that document, sure enough msr 49 is for IBPB. If you check your CPU features in your kernel logs, if the CPU has the IBRS feature, both IBPB and STIBP will appear under Structured Extended Features. On an intel system I have with updated microcode, it shows the following: Structured Extended Features3=0xc000000 I'd then check the hw.ibrs_active sysctl to see if it is in use. If so, it can be disabled with hw.ibrs_disable. Someone more knowledgeable on the inner workings of bhyve can likely give more info on the error itself, but I'm unsure if these features have even been exposed to guests yet. Josh On 08/05/18 15:18, Frank Ebert wrote: > Hi, > > since the last bios-update (AMD Ryzen Threadripper 1950X on Asus ROG > STRIX x399-E) I get the following message when starting a Windows 10 > Guest on FreeBSD 11.1/amd64: > > wrmsr to register 0x49(0x1) on vcpu x > wrmsr to register 0x49(0x1) on vcpu x > wrmsr to register 0x49(0x1) on vcpu x > wrmsr to register 0x49(0x1) on vcpu x > > The message will be repeated endless (x is the number of the vcpu). > > Despite this message, the guest is running fine. I don't have any > performance issues at the moment. Prior to this bios-update the message > appears only once (or twice?) for every vcpu. > > Attached you find the way I start bhyve: > > bhyve -c8 -m 16G -H -w \ > -s 0,amd_hostbridge \ > -s 3,ahci-cd,/home/frank/bhyve/null_dvd.iso \ > -s 4,ahci-hd,/dev/zvol/zroot/win10disk0 \ > -s 10,virtio-net,tap0 \ > -s11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900 \ > -s 30,xhci,tablet \ > -s31,lpc \ > -lbootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd win10 > > I use "hw.vmm.topology.cores_per_package=4" in /boot/loader.conf and a > "custom" vmm.ko (https://reviews.freebsd.org/D13780) since January. > > When starting bhyve without "-w", the guest freezes while booting. But > I think this has to do with another issue > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219343 > > The changelog from Asus says: > > Update AGESA 1.0.0.5 > recommend to keep C-state [enable] > > Does anyone have an idea how to solve this issue? > > Thanx Frank >