From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbc7r-0006BP-Vp for qemu-devel@nongnu.org; Tue, 07 Oct 2014 17:17:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xbc7q-0002pn-Rm for qemu-devel@nongnu.org; Tue, 07 Oct 2014 17:16:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbc7q-0002n3-JF for qemu-devel@nongnu.org; Tue, 07 Oct 2014 17:16:54 -0400 Message-ID: <54345843.8070703@redhat.com> Date: Tue, 07 Oct 2014 16:16:51 -0500 From: Wei Huang MIME-Version: 1.0 References: <1412711059-12524-1-git-send-email-wei@redhat.com> <543453D9.8020706@redhat.com> In-Reply-To: <543453D9.8020706@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , afaerber@suse.de Cc: qemu-devel@nongnu.org On 10/07/2014 03:58 PM, Paolo Bonzini wrote: > Il 07/10/2014 21:44, Wei Huang ha scritto: >> AMD CPU doesn't support hyperthreading. Even though QEMU fixes >> this issue by setting CPUID_0000_0001_EBX and CPUID_8000_0008_ECX >> via conversion, it is better to stop end-users in the first place >> with a warning message. > > Hi Wei, > > what exactly breaks if you try creating an AMD VM with hyperthreading? Hi Paolo, It isn't a bug IMO. I tested various combinations; and current QEMU handles it very well. It converts threads=n to proper CPUID_0000_0001_EBX[LogicalProcCount] and CPUID_8000_0008_ECX[NC] accordingly for AMD. There is a bugzilla reported for such configuration: https://bugzilla.redhat.com/show_bug.cgi?id=1135772. So I thought such checking might be a good thing to do. > > I am worried that the default CPU is an AMD one when KVM is disabled, > and thus "qemu-system-x86_64 -smp threads=2" will likely be broken. "-smp threads=2" will be rejected by the patch. Unless the meaning of threads is not limited to threads-per-core, shouldn't end users use "-smp 2" in this case or something like "-smp 2,cores=2,sockets=1"? > > Paolo >