x86/cpuid: fix raw FEATURESET_7d0 reporting
PATCH 1/1 x86/cpuid: fix raw FEATURESET_7d0 reporting
Commit 62b1879693e0 ("x86: further CPUID handling adjustments") added FEATURESET_7d0 reporting but forgot to update calculate_raw_featureset() function. As result, the value reported by xen-cpuid contains 0.
Fix that by properly filling raw_featureset[FEATURESET_7d0].
---
I see that at least 4.8 also contains this bug, so other releases also need checking.
--- xen/arch/x86/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/cpuid.c +1 -1
@@ -113,7 +113,7 @@ static void __init calculate_raw_featureset(void)cpuid_count (0x7 ,0 , &tmp, &raw_featureset[FEATURESET_7b0], &raw_featureset[FEATURESET_7c0], - &tmp); + &raw_featureset[FEATURESET_7d0]);if ( max >=0xd ) cpuid_count(0xd, 1, &raw_featureset[FEATURESET_Da1],
Signature · 7 lines
2.17.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 15.05.18 at 10:37, <[email protected]> wrote:
Commit
62b1879693e0("x86: further CPUID handling adjustments") addedFEATURESET_7d0reporting but forgot to updatecalculate_raw_featureset()function. As result, the value reported by xen-cpuid contains 0.Fix that by properly filling raw_featureset[FEATURESET_7d0].
Signed-off-by Sergey Dyasli <[email protected]>
Thanks, technically
Quoted 3 lines
---
I see that at least 4.8 also contains this bug, so other releases also need checking.
The commit in question being only on the two branches, I think no other one would need the change.
I'm certainly going to apply this to 4.8; I'm uncertain about 4.7 though, if it's really only xen-cpuid output which is now wrong. I wasn't really planning on putting there any further non-security changes (severe regression fixes for earlier security patches perhaps being the only possible exception). Otoh osstest continues to be unhappy with the branch (albeit that's mostly environmental issues iirc, i.e. "broken" rather than "failed" tests), so us being able to push out 4.7.6 continues to be delayed.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 15.05.18 at 10:37, <[email protected]> wrote:
Commit
62b1879693e0("x86: further CPUID handling adjustments") addedFEATURESET_7d0reporting but forgot to updatecalculate_raw_featureset()function. As result, the value reported by xen-cpuid contains 0.Fix that by properly filling raw_featureset[FEATURESET_7d0].
Signed-off-by Sergey Dyasli <[email protected]>Thanks, technically
Acked-by Jan Beulich <[email protected]>
Quoted 7 lines
Quoted 3 lines
---
I see that at least 4.8 also contains this bug, so other releases also need checking.The commit in question being only on the two branches, I think no other one would need the change.
I'm certainly going to apply this to 4.8; I'm uncertain about 4.7 though <snip>
The entirety of that changeset is broken in feature levelling scenarios, which is a consequence of missing this hunk which Sergey identified.
The result is that, when trying to level STIBP/IBPB out of guests view, the CPUID bits remain visible, but attempts to use the MSR bits will fail.
I'm rewriting the change from scratch.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 15.05.18 at 17:36, <[email protected]> wrote:
Quoted 17 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 15.05.18 at 10:37, <[email protected]> wrote:
Commit
62b1879693e0("x86: further CPUID handling adjustments") addedFEATURESET_7d0reporting but forgot to updatecalculate_raw_featureset()function. As result, the value reported by xen-cpuid contains 0.Fix that by properly filling raw_featureset[FEATURESET_7d0].
Signed-off-by Sergey Dyasli <[email protected]>Thanks, technically
Acked-by Jan Beulich <[email protected]>Quoted 3 lines
---
I see that at least 4.8 also contains this bug, so other releases also need checking.The commit in question being only on the two branches, I think no other one would need the change.
Quoted 8 lines
Quoted 1 line
I'm certainly going to apply this to 4.8; I'm uncertain about 4.7 though
<snip>
The entirety of that changeset is broken in feature levelling scenarios, which is a consequence of missing this hunk which Sergey identified.
The result is that, when trying to level STIBP/IBPB out of guests view, the CPUID bits remain visible, but attempts to use the MSR bits will fail.
I don't follow: PV and HVM feature sets take host_featureset as an input, not raw_featureset.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel