[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] powerpc: Clear user CPU feature bits if TM is disabled at
From: |
Michael Ellerman |
Subject: |
Re: [Qemu-ppc] powerpc: Clear user CPU feature bits if TM is disabled at runtime |
Date: |
Tue, 5 Apr 2016 19:35:32 +1000 (AEST) |
On Mon, 2016-04-04 at 11:11:12 UTC, Paul Mackerras via Linuxppc-dev wrote:
> In check_cpu_pa_features() we check a number of bits in the
Shouldn't we be clearing the user feature there too?
The ibm_pa_features array and the logic in scan_features() knows to flip the
cpu_user_features bits, it was just never updated to handle cpu_user_features2.
So it seems to me that's where the bug is.
> ibm,pa-features array and set and clear CPU features based on what
> we find. One of these bits is CPU_FTR_TM, the transactional memory
> feature bit.
>
> If this does disable TM at runtime, then we need to tell userspace
> about it by clearing the user CPU feature bits.
>
> Without this patch userspace processes will think they can execute
> TM instructions and get killed when they try.
>
> Signed-off-by: Anton Blanchard <address@hidden>
> Cc: address@hidden
> Reviewed-by: David Gibson <address@hidden>
> ---
>
> Michael I've added stable here because I'm seeing this on a number
> of distros and would like to get it backported, but I'll leave it up
> to you if it should go there.
Yeah it should definitely go to stable. Can we pinpoint which commit introduced
the bug, I guess whenever the TM support was merged.
cheers
- Re: [Qemu-ppc] PR KVM and TM issues, Anton Blanchard, 2016/04/04
- [Qemu-ppc] [PATCH] powerpc: Clear user CPU feature bits if TM is disabled at runtime, Anton Blanchard, 2016/04/04
- [Qemu-ppc] [PATCH 1/3] powerpc: scan_features() updates incorrect bits, Anton Blanchard, 2016/04/14
- Re: [Qemu-ppc] [1/3] powerpc: scan_features() updates incorrect bits, Michael Ellerman, 2016/04/18
- [Qemu-ppc] [PATCH v2 1/3] powerpc: scan_features() updates incorrect bits for REAL_LE, Michael Ellerman, 2016/04/18
- Re: [Qemu-ppc] [v2, 1/3] powerpc: scan_features() updates incorrect bits for REAL_LE, Michael Ellerman, 2016/04/19
[Qemu-ppc] [PATCH 2/3] powerpc: Update cpu_user_features2 in scan_features(), Anton Blanchard, 2016/04/14