All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/i386: Restore TSX features with taa-no
@ 2022-07-08  5:42 Zhenzhong Duan
  2022-07-08  6:02 ` Xiaoyao Li
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenzhong Duan @ 2022-07-08  5:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, ehabkost, xiangfeix.ma, xiaoyao.li

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.

Fixes: d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model")
Tested-by: Xiangfei Ma <xiangfeix.ma@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
 target/i386/cpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 6a57ef13af86..bda2569c73cc 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -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" },
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] target/i386: Restore TSX features with taa-no
  2022-07-08  5:42 [PATCH] target/i386: Restore TSX features with taa-no Zhenzhong Duan
@ 2022-07-08  6:02 ` Xiaoyao Li
  2022-07-08  6:23   ` Duan, Zhenzhong
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaoyao Li @ 2022-07-08  6:02 UTC (permalink / raw)
  To: Zhenzhong Duan, qemu-devel; +Cc: pbonzini, ehabkost, xiangfeix.ma

On 7/8/2022 1:42 PM, Zhenzhong Duan wrote:
> 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?

> Fixes: d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model")
> Tested-by: Xiangfei Ma <xiangfeix.ma@intel.com>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
> ---
>   target/i386/cpu.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 6a57ef13af86..bda2569c73cc 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -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" },



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] target/i386: Restore TSX features with taa-no
  2022-07-08  6:02 ` Xiaoyao Li
@ 2022-07-08  6:23   ` Duan, Zhenzhong
  0 siblings, 0 replies; 3+ messages in thread
From: Duan, Zhenzhong @ 2022-07-08  6:23 UTC (permalink / raw)
  To: Li, Xiaoyao, qemu-devel; +Cc: pbonzini, ehabkost, Ma, XiangfeiX



>-----Original Message-----
>From: Li, Xiaoyao <xiaoyao.li@intel.com>
>Sent: Friday, July 8, 2022 2:03 PM
>To: Duan, Zhenzhong <zhenzhong.duan@intel.com>; qemu-
>devel@nongnu.org
>Cc: pbonzini@redhat.com; ehabkost@redhat.com; Ma, XiangfeiX
><xiangfeix.ma@intel.com>
>Subject: Re: [PATCH] target/i386: Restore TSX features with taa-no
>
>On 7/8/2022 1:42 PM, Zhenzhong Duan wrote:
>> 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?

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
>
>> Fixes: d965dc35592d ("target/i386: Add ARCH_CAPABILITIES related bits
>> into Icelake-Server CPU model")
>> Tested-by: Xiangfei Ma <xiangfeix.ma@intel.com>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>> ---
>>   target/i386/cpu.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/target/i386/cpu.c b/target/i386/cpu.c index
>> 6a57ef13af86..bda2569c73cc 100644
>> --- a/target/i386/cpu.c
>> +++ b/target/i386/cpu.c
>> @@ -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" },


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-08  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08  5:42 [PATCH] target/i386: Restore TSX features with taa-no Zhenzhong Duan
2022-07-08  6:02 ` Xiaoyao Li
2022-07-08  6:23   ` Duan, Zhenzhong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.