All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.13] x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling"
@ 2021-07-15 15:10 Andrew Cooper
  2021-07-15 15:39 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2021-07-15 15:10 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich

The backport dropped the hunk deleting the setup_clear_cpu_cap() for HLE/RTM,
but retained the hunk adding setup_force_cpu_cap().

Calling both force and clear on the same feature elicits an error, and clear
takes precedence, which breaks the part of the bufix which makes migration
from older versions of Xen function safely for VMs using TSX.

Fixes: f17d848c4caa ("x86/cpuid: Rework HLE and RTM handling")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
---
 xen/arch/x86/spec_ctrl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
index 33343062a7b6..1cfd02d7d7cf 100644
--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -1150,9 +1150,6 @@ void __init init_speculation_mitigations(void)
          ((hw_smt_enabled && opt_smt) ||
           !boot_cpu_has(X86_FEATURE_SC_VERW_IDLE)) )
     {
-        setup_clear_cpu_cap(X86_FEATURE_HLE);
-        setup_clear_cpu_cap(X86_FEATURE_RTM);
-
         opt_tsx = 0;
         tsx_init();
     }
-- 
2.11.0



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

* Re: [PATCH for-4.13] x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling"
  2021-07-15 15:10 [PATCH for-4.13] x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling" Andrew Cooper
@ 2021-07-15 15:39 ` Jan Beulich
  2021-07-15 15:56   ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2021-07-15 15:39 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel

On 15.07.2021 17:10, Andrew Cooper wrote:
> The backport dropped the hunk deleting the setup_clear_cpu_cap() for HLE/RTM,
> but retained the hunk adding setup_force_cpu_cap().
> 
> Calling both force and clear on the same feature elicits an error, and clear
> takes precedence,

Right, I particularly didn't pay attention to this interaction
aspect.

> which breaks the part of the bufix which makes migration
> from older versions of Xen function safely for VMs using TSX.
> 
> Fixes: f17d848c4caa ("x86/cpuid: Rework HLE and RTM handling")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

Are you going to put this in, or should I?

Jan



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

* Re: [PATCH for-4.13] x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling"
  2021-07-15 15:39 ` Jan Beulich
@ 2021-07-15 15:56   ` Andrew Cooper
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2021-07-15 15:56 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Xen-devel

On 15/07/2021 16:39, Jan Beulich wrote:
> On 15.07.2021 17:10, Andrew Cooper wrote:
>> The backport dropped the hunk deleting the setup_clear_cpu_cap() for HLE/RTM,
>> but retained the hunk adding setup_force_cpu_cap().
>>
>> Calling both force and clear on the same feature elicits an error, and clear
>> takes precedence,
> Right, I particularly didn't pay attention to this interaction
> aspect.
>
>> which breaks the part of the bufix which makes migration
>> from older versions of Xen function safely for VMs using TSX.
>>
>> Fixes: f17d848c4caa ("x86/cpuid: Rework HLE and RTM handling")
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Thanks.

> Are you going to put this in, or should I?

Feel free to.

~Andrew


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

end of thread, other threads:[~2021-07-15 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 15:10 [PATCH for-4.13] x86/tsx: Fix backport of "x86/cpuid: Rework HLE and RTM handling" Andrew Cooper
2021-07-15 15:39 ` Jan Beulich
2021-07-15 15:56   ` Andrew Cooper

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.