From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anNj5-0006fw-Om for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anNj1-00031I-WB for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:56:47 -0400 Message-ID: <1459850183.20087.67.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Tue, 05 Apr 2016 19:56:23 +1000 In-Reply-To: <3qfNxw4KcCz9sD5@ozlabs.org> References: <3qfNxw4KcCz9sD5@ozlabs.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] powerpc: Clear user CPU feature bits if TM is disabled at runtime List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Ellerman , Paul Mackerras via Linuxppc-dev , Alexey Kardashevskiy , Paul Mackerras , Michael Neuling , David Gibson , Alexander Graf Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Tue, 2016-04-05 at 19:35 +1000, Michael Ellerman wrote: > 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. I was about to make the same comment but then realized we are trying to clear *2* bits. And since that logic will also, I think, set the bits when the corresponding pa-feature is present, it means we will also set those 2 bits if we put both in the mask... Not sure that's quite what we want, but then I'm not sure what the 2 bits are about, which is why I postponed commenting :-) Cheers, Ben.