NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58370: Do not disable ALTINST for VIA C7 and above CPUs



>Number:         58370
>Category:       kern
>Synopsis:       Do not disable ALTINST for VIA C7 and above CPUs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 25 14:20:00 +0000 2024
>Originator:     Andrius V
>Release:        current, 9, 10
>Organization:
>Environment:
>Description:
NetBSD's VIA CPU identification code explicitly disables alternate instruction set (https://en.wikipedia.org/wiki/Alternate_Instruction_Set) for VIA CPUs https://github.com/NetBSD/src/blob/0a62af663cd24cb9abdb004444560436f7da4547/sys/arch/x86/x86/identcpu.c#L581 due to so called rosenbrindge vulnerability. However, the problem is that this instruction set is "available" only for VIA C3 based CPUs, and not for C7 and above. Same MSR bit has a different unknown meaning (the bit is reserved). Thus, the code should be applied only for C3 CPUs. 

I accidentally noticed that while testing different issue on my C7-D CPU based motherboard by noticing reported temperature using CPUID instructions in old NetBSD (~6.1) release, which was not working in later  releases (8.1 and above). Apparently setting this bit to 0 on C7 and later may affect some CPU functionality in unexpected ways.
>How-To-Repeat:
Code inspection, observation of broken VIA C7 temperature driver functionality with older CPUID implementation after change was applied.
>Fix:
Initial patch, some changes are pending according Taylor comments.
http://netbsd.org/~andvar/identcpu.c.diff



Home | Main Index | Thread Index | Old Index