target/i386: Restore TSX features with taa-no
PATCH v2 1/1 target/i386: Restore TSX features with taa-no
On ICX-2S2 host, when run L2 guest with both L1/L2 using Icelake-Server-v3 or above, we got below warning:
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]"
This is because L1 KVM doesn't expose taa-no to L2 if RTM is disabled, then starting L2 qemu triggers the warning.
Fix it by restoring TSX features in Icelake-Server-v3, which may also help guest performance if host isn't susceptible to TSX Async Abort (TAA) vulnerabilities.
---
v2: Rewrite commit message
target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+)
target/i386/cpu.c +3 -0
@@ -3423,6 +3423,9 @@ static const X86CPUDefinition builtin_x86_defs[] = { { .version = 3, .props = (PropValue []) { +/* Restore TSX features removed by -v2 above */ + {"hle" ,"on" }, + {"rtm" ,"on" }, {"arch-capabilities" ,"on" }, {"rdctl-no" ,"on" }, {"ibrs-all" ,"on" },
Signature · 1 line
2.25.1
Quoted 12 lines · Zhenzhong Duan
On ICX-2S2 host, when run L2 guest with both L1/L2 using Icelake-Server-v3 or above, we got below warning:
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]"
This is because L1 KVM doesn't expose taa-no to L2 if RTM is disabled, then starting L2 qemu triggers the warning.
Fix it by restoring TSX features in Icelake-Server-v3, which may also help guest performance if host isn't susceptible to TSX Async Abort (TAA) vulnerabilities.
Quoted 5 lines
Fixes d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model")Tested-by Xiangfei Ma <[email protected]>Signed-off-by Zhenzhong Duan <[email protected]>---
v2: Rewrite commit message
Why wouldn't the fix be (in an Icelake-Server-v4 model) to remove taa-no?
Paolo
Quoted 17 lines
target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+)target/i386/cpu.c +3
-0@@ -3423,6 +3423,9 @@ static const X86CPUDefinition builtin_x86_defs[] = { { .version = 3, .props = (PropValue []) { +/* Restore TSX features removed by -v2 above */ + {"hle" ,"on" }, + {"rtm" ,"on" }, {"arch-capabilities" ,"on" }, {"rdctl-no" ,"on" }, {"ibrs-all" ,"on" },
Quoted 25 lines
-----Original Message-----
From: Paolo Bonzini <[email protected]> On Behalf Of Paolo Bonzini
Sent: Thursday, July 14, 2022 3:59 PM
To: Duan, Zhenzhong <[email protected]>; qemu- [email protected]
Cc: [email protected]; Ma, XiangfeiX <[email protected]>; Li, Xiaoyao <[email protected]>; Christopherson,, Sean <[email protected]>
Subject: Re: [PATCH v2] target/i386: Restore TSX features with taa-noQuoted 4 lines · Zhenzhong Duan
On ICX-2S2 host, when run L2 guest with both L1/L2 using Icelake-Server-v3 or above, we got below warning:
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit
8]"
Quoted 8 lines
This is because L1 KVM doesn't expose taa-no to L2 if RTM is disabled, then starting L2 qemu triggers the warning.
Fix it by restoring TSX features in Icelake-Server-v3, which may also help guest performance if host isn't susceptible to TSX Async Abort (TAA) vulnerabilities.
Quoted 8 lines
Quoted 6 lines
Fixes d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bitsinto Icelake-Server CPU model")
Tested-by Xiangfei Ma <[email protected]>Signed-off-by Zhenzhong Duan <[email protected]>---
v2: Rewrite commit messageWhy wouldn't the fix be (in an Icelake-Server-v4 model) to remove taa-no?
This way we don't have a versioned model enabling both TSX and taa-no. In currently implementation, TSX is disabled in Icelake-Server-v2 and above. And taa-no is enabled in Icelake-Server-v3 and above.
If hardware supports taa-no mitigation, I thought it's better to expose it to guest together with TSX so that guest knows it's secure to use TSX?
Thanks
Zhenzhong
Quoted 21 lines
Paolo
target/i386/cpu.c static const X86CPUDefinition builtin_x86_defs[]
Quoted 8 lines
target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+)target/i386/cpu.c index renamed from target/i386/cpu.c +0
-0
14f681e998cc..25ef972a3eed100644target/i386/cpu.c +0
-0@@ -3423,6 +3423,9 @@ static const X86CPUDefinition builtin_x86_defs[]= {
Quoted 9 lines
target/i386/cpu.c +3
-0{ .version = 3, .props = (PropValue []) { +/* Restore TSX features removed by -v2 above */ + {"hle" ,"on" }, + {"rtm" ,"on" }, {"arch-capabilities" ,"on" }, {"rdctl-no" ,"on" }, {"ibrs-all" ,"on" },
Quoted 13 lines · Paolo Bonzini
Quoted 12 lines · Zhenzhong Duan
On ICX-2S2 host, when run L2 guest with both L1/L2 using Icelake-Server-v3 or above, we got below warning:
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]"
This is because L1 KVM doesn't expose taa-no to L2 if RTM is disabled, then starting L2 qemu triggers the warning.
Fix it by restoring TSX features in Icelake-Server-v3, which may also help guest performance if host isn't susceptible to TSX Async Abort (TAA) vulnerabilities.
Quoted 7 lines
Quoted 5 lines
Fixes d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model")Tested-by Xiangfei Ma <[email protected]>Signed-off-by Zhenzhong Duan <[email protected]>---
v2: Rewrite commit messageWhy wouldn't the fix be (in an Icelake-Server-v4 model) to remove taa-no?
Production Icelake silicon should have the taa-no set, that's the reason taa-no was added in v3 model.
When taa-no presents, it's safe to bring TSX features back.
I'm wondering if we need a new version (v7) for this change.
Quoted 21 lines
Paolo
Quoted 18 lines
target/i386/cpu.c| 3 +++1 file changed, 3 insertions(+)target/i386/cpu.c +3
-0@@ -3423,6 +3423,9 @@ static const X86CPUDefinition builtin_x86_defs[] = { { .version = 3, .props = (PropValue[]) { + /* Restore TSX features removed by -v2 above */ + { "hle", "on" }, + { "rtm", "on" }, { "arch-capabilities", "on" }, { "rdctl-no", "on" },{ "ibrs-all", "on" },
Quoted 34 lines
-----Original Message-----
From: Li, Xiaoyao <[email protected]>
Sent: Friday, July 15, 2022 9:14 AM
To: Paolo Bonzini <[email protected]>; Duan, Zhenzhong <[email protected]>; [email protected]
Cc: [email protected]; Ma, XiangfeiX <[email protected]>; Christopherson,, Sean <[email protected]>
Subject: Re: [PATCH v2] target/i386: Restore TSX features with taa-noQuoted 22 lines · Paolo Bonzini
Quoted 20 lines · Zhenzhong Duan
On ICX-2S2 host, when run L2 guest with both L1/L2 using Icelake-Server-v3
or above, we got below warning:"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]"
This is because L1 KVM doesn't expose taa-no to L2 if RTM is disabled, then starting L2 qemu triggers the warning.
Fix it by restoring TSX features in Icelake-Server-v3, which may also help guest performance if host isn't susceptible to TSX Async Abort (TAA) vulnerabilities.
Fixes d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bitsinto Icelake-Server CPU model")
Tested-by Xiangfei Ma <[email protected]>Signed-off-by Zhenzhong Duan <[email protected]>---
v2: Rewrite commit message
Quoted 8 lines
Quoted 1 line
Why wouldn't the fix be (in an Icelake-Server-v4 model) to remove taa-no?
Production Icelake silicon should have the taa-no set, that's the reason taa-no was added in v3 model.
When taa-no presents, it's safe to bring TSX features back.
I'm wondering if we need a new version (v7) for this change.
Ping. Any further suggestion on which way to go ahead? Thanks
Zhenzhong