From owner-freebsd-virtualization@freebsd.org Sat May 12 09:23:22 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 3B7BEFCF5E7 for ; Sat, 12 May 2018 09:23:22 +0000 (UTC) (envelope-from frank.ebert@freenet.de) Received: from mout2.freenet.de (mout2.freenet.de [IPv6:2001:748:100:40::2:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C38116B70C for ; Sat, 12 May 2018 09:23:21 +0000 (UTC) (envelope-from frank.ebert@freenet.de) Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout2.freenet.de with esmtpa (ID frank.ebert@freenet.de) (port 25) (Exim 4.90_1 #2) id 1fHQkJ-0007GI-6S for freebsd-virtualization@freebsd.org; Sat, 12 May 2018 11:23:19 +0200 Received: from [::1] (port=42878 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID frank.ebert@freenet.de) (Exim 4.90_1 #2) id 1fHQkJ-0005rV-2Y for freebsd-virtualization@freebsd.org; Sat, 12 May 2018 11:23:19 +0200 Received: from mx0.freenet.de ([195.4.92.10]:54258) by mjail1.freenet.de with esmtpa (ID frank.ebert@freenet.de) (Exim 4.90_1 #2) id 1fHQiH-0003dX-Ux for freebsd-virtualization@freebsd.org; Sat, 12 May 2018 11:21:13 +0200 Received: from hsi-kbw-046-005-251-146.hsi8.kabel-badenwuerttemberg.de ([46.5.251.146]:23768 helo=imap.skynet.domain) by mx0.freenet.de with esmtpsa (ID frank.ebert@freenet.de) (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (port 587) (Exim 4.90_1 #2) id 1fHQiH-0004ZA-Pb for freebsd-virtualization@freebsd.org; Sat, 12 May 2018 11:21:13 +0200 Received: from mimo (imap [192.168.126.52]) by imap.skynet.domain (Postfix) with ESMTPA id 232E7DABCF for ; Sat, 12 May 2018 11:21:13 +0200 (CEST) Date: Sat, 12 May 2018 11:21:12 +0200 From: Frank Ebert To: freebsd-virtualization@freebsd.org Subject: Re: wrmsr to register 0x49(0x1) on vcpu x Message-ID: <20180512112112.567c698a@mimo> In-Reply-To: References: <20180508071846.18435a99@mimo> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/6thf5eBHeeKbdbxUgz+kI0Y"; protocol="application/pgp-signature" X-Spamscore: -5.5 (-----) X-Spamreport: Action: no action Symbol: RCVD_VIA_SMTP_AUTH(0.00) Symbol: TO_MATCH_ENVRCPT_ALL(0.00) Symbol: PREVIOUSLY_DELIVERED(0.00) Symbol: BAYES_HAM(-2.79) Symbol: NEURAL_HAM(-3.00) Symbol: RCVD_COUNT_TWO(0.00) Symbol: MIME_GOOD(-0.20) Symbol: ASN(0.00) Symbol: RCPT_COUNT_ONE(0.00) Symbol: FROM_HAS_DN(0.00) Symbol: RCVD_TLS_LAST(0.00) Symbol: HAS_WP_URI(0.00) Symbol: TO_DN_NONE(0.00) Symbol: FROM_EQ_ENVFROM(0.00) Symbol: MID_RHS_NOT_FQDN(0.50) Message-ID: 20180512112112.567c698a@mimo X-FN-Spambar: X-Originated-At: 46.5.251.146!23768 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: Sat, 12 May 2018 09:23:22 -0000 --Sig_/6thf5eBHeeKbdbxUgz+kI0Y Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Josh, thank you very much for your reply. I also assume that it has something to do with spectre, because the changelog says "Update AGESA 1.0.0.5=E2=80= =9C. AGESA seems to be microcode for AMD CPUs. But 1.0.0.5 appears to be too old (?) to include code for spectre, isn=E2=80=99t it? I have checked the CPU features. Attached you find my dmesg before and after the BIOS-Update: Full output before BIOS upgrade: CPU: AMD Ryzen Threadripper 1950X 16-Core Processor (3393.70-MHz K8-class CPU) Origin=3D"AuthenticAMD" Id=3D0x800f11 Family=3D0x17 Model=3D0x1 Stepping=3D1 Features=3D0x178bfbff Features2=3D0x7ed8320b AMD Features=3D0x2e500800 AMD Features2=3D0x35c233ff Structured Extended Features=3D0x209c01a9 XSAVE Features=3D0xf SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=3D32768 TSC: P-state invariant, performance statistics Full output after BIOS upgrade: CPU: AMD Ryzen Threadripper 1950X 16-Core Processor (3393.72-MHz K8-class CPU) Origin=3D"AuthenticAMD" Id=3D0x800f11 Family=3D0x17 Model=3D0x1 Stepping=3D1 Features=3D0x178bfbff Features2=3D0x7ed8320b AMD Features=3D0x2e500800 AMD Features2=3D0x35c233ff Structured Extended Features=3D0x209c01a9 XSAVE Features=3D0xf SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=3D32768 TSC: P-state invariant, performance statistics As you can see, I don't have "IBPB" or "STIBP". I have checked hw.ibrs_active: hw.ibrs_active: 0 If I can provide or you need further information, please let me know. Thanx Frank Am Tue, 8 May 2018 21:39:48 +1000 schrieb edenist : > Hi Frank, >=20 > 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. >=20 > 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. >=20 > https://developer.amd.com/wp-content/resources/Architecture_Guidelines_Up= date_Indirect_Branch_Control.pdf >=20 > According to that document, sure enough msr 49 is for IBPB. >=20 > 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=3D0xc000000 >=20 > 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. >=20 > 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. >=20 > Josh --Sig_/6thf5eBHeeKbdbxUgz+kI0Y Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSnmuRRu7yN/9fhJZSngGwyW6douQUCWvayCAAKCRCngGwyW6do ubEgAJsH9nltcMkjo6UEiMlvkaOjBngqogCdGCXfIkqbe3eniDbI2zmHWLDGz6E= =wjHB -----END PGP SIGNATURE----- --Sig_/6thf5eBHeeKbdbxUgz+kI0Y--