target/i386: Restore TSX features with taa-no
PATCH 1/1 target/i386: Restore TSX features with taa-no
In L1 kernel side, taa-no is cleared because RTM is disabled which will lead to below warning when starting L2 qemu:
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]"
If host isn't susceptible to TSX Async Abort (TAA) vulnerabilities, exposing TSX to L2 may help performance too.
--- 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 7 lines · Zhenzhong Duan
In L1 kernel side, taa-no is cleared because RTM is disabled which will lead to below warning when starting L2 qemu:
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit 8]"
If host isn't susceptible to TSX Async Abort (TAA) vulnerabilities, exposing TSX to L2 may help performance too.
If L1 doesn't see RTM, how can it expose it to L2?
Quoted 21 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]>--- 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 15 lines
-----Original Message-----
From: Li, Xiaoyao <[email protected]>
Sent: Friday, July 8, 2022 2:03 PM
To: Duan, Zhenzhong <[email protected]>; qemu- [email protected]
Cc: [email protected]; [email protected]; Ma, XiangfeiX <[email protected]>
Subject: Re: [PATCH] target/i386: Restore TSX features with taa-noQuoted 3 lines · Zhenzhong Duan
In L1 kernel side, taa-no is cleared because RTM is disabled which will lead to below warning when starting L2 qemu:
Quoted 7 lines
Quoted 1 line
"warning: host doesn't support requested feature: MSR(10AH).taa-no [bit
8]"
Quoted 3 lines
If host isn't susceptible to TSX Async Abort (TAA) vulnerabilities, exposing TSX to L2 may help performance too.
If L1 doesn't see RTM, how can it expose it to L2?
Sorry, looks my words is confusing. Should be "exposing TSX to guest may help performance too" After patch, both L1 and L2 will see RTM if both are Icelake-Server-v3 or above.
Thanks
Zhenzhong
Quoted 24 lines
target/i386/cpu.c static const X86CPUDefinition builtin_x86_defs[]
Quoted 14 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]>--- target/i386/cpu.c | 3 +++ 1 file changed, 3 insertions(+)target/i386/cpu.c index renamed from target/i386/cpu.c +0
-0
6a57ef13af86..bda2569c73cc100644target/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" },