Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2018 11:21:12 +0200
From:      Frank Ebert <frank.ebert@freenet.de>
To:        freebsd-virtualization@freebsd.org
Subject:   Re: wrmsr to register 0x49(0x1) on vcpu x
Message-ID:  <20180512112112.567c698a@mimo>
In-Reply-To: <d329dda8-dd74-1aaa-ccf3-b2b3f86fe146@edenist.net>
References:  <20180508071846.18435a99@mimo> <d329dda8-dd74-1aaa-ccf3-b2b3f86fe146@edenist.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,=
MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Features2=3D0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVB=
E,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
AMD Features=3D0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM> AMD
Features2=3D0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW=
,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
Structured Extended
Features=3D0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHO=
PT,SHA>
XSAVE Features=3D0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES> 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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,=
MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Features2=3D0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVB=
E,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
AMD Features=3D0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM> AMD
Features2=3D0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW=
,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
Structured Extended
Features=3D0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHO=
PT,SHA>
XSAVE Features=3D0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES> 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 <edenist@edenist.net>:

> 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<IBPB,STIBP>
>=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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180512112112.567c698a>