From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Bfd-0002RL-Mz for qemu-devel@nongnu.org; Thu, 10 Jul 2014 06:33:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5BfW-0004NT-M5 for qemu-devel@nongnu.org; Thu, 10 Jul 2014 06:33:45 -0400 Message-ID: <53BE6C01.10001@suse.de> Date: Thu, 10 Jul 2014 12:33:37 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1404916856-12567-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1404916856-12567-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-ppc: Fix number of threads per core limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org On 09.07.14 16:40, Alexey Kardashevskiy wrote: > The number of threads per core is different for POWER6/7/8 CPUs. > Guest systems do not expect to see more threads per core than > a specific CPU supports so we need to limit this number. > This limit is implemented by ppc_get_compat_smt_threads(). > > However it has a problem as it checks for PCR (Processor Compatibility > Register) mask, 2.05 means 2 threads per core, 2.06 - 4 threads. > For POWER8 one would expect PCR_COMPAT_2_07 bit set and > ppc_get_compat_smt_threads() checking for it to return 8 threads > per core. But the latest PowerISA spec now is 2.07 and there is > no 2.07 compatibility mode defined, QEMU does not define it either > (will be in PowerISA 2.08). > > Instead of relying on a PCR mask, this uses kvmppc_smt_threads() > which returns the maximum supported threads number for KVM or > 1 for TCG. > > Signed-off-by: Alexey Kardashevskiy Thanks, applied to ppc-next (for 2.1). Alex