From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSocG-0006mW-Hd for qemu-devel@nongnu.org; Tue, 12 Jun 2018 15:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSocD-0001gf-DN for qemu-devel@nongnu.org; Tue, 12 Jun 2018 15:06:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47060) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSocD-0001fQ-6J for qemu-devel@nongnu.org; Tue, 12 Jun 2018 15:06:01 -0400 Date: Tue, 12 Jun 2018 16:05:54 -0300 From: Eduardo Habkost Message-ID: <20180612190554.GO7451@localhost.localdomain> References: <1528498581-131037-1-git-send-email-babu.moger@amd.com> <1528498581-131037-4-git-send-email-babu.moger@amd.com> <20180611205030.GW7451@localhost.localdomain> <20180611211026.GA7451@localhost.localdomain> <20180612174021.GL7451@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v13 3/5] i386: Enable TOPOEXT feature on AMD EPYC CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Moger, Babu" Cc: "mst@redhat.com" , "marcel.apfelbaum@gmail.com" , "pbonzini@redhat.com" , "rth@twiddle.net" , "mtosatti@redhat.com" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "kash@tripleback.net" , "geoff@hostfission.com" , Jiri Denemark On Tue, Jun 12, 2018 at 06:38:08PM +0000, Moger, Babu wrote: [...] > > I'm starting to think that enabling TOPOEXT automatically is > > adding too much complexity and compatibility problems, and it's > > better to leave this task to management software. > > > > The main problem here is: > > > > This works today with QEMU 2.12 + Linux <= 4.15: > > $ $QEMU -machine pc -cpu EPYC,enforce -smp > > 8,sockets=2,cores=2,threads=2" > > and must keep working with QEMU 3.0 and Linux <= 4.15. > > > > In addition to that, the results for: > > $ $QEMU -machine pc-q35-3.0 -cpu EPYC,enforce [...] > > must be deterministic and expose exactly the same CPUID data even > > if host hardware or software changes, as long as the QEMU > > command-line is the same. > > > > Do you see a way to fulfill those two constraints while making > > "-machine pc-q35-3.0 -cpu EPYC" enable TOPOEXT automatically? > > > > Now(setting feature before x86_cpu_expand_features), enabling > TOPOEXT appears to work fine. What about the above constraints? Are you really fulfilling them? This one is tricky: ] This works today with QEMU 2.12 + Linux <= 4.15: ] $ $QEMU -machine pc -cpu EPYC,enforce -smp 8,sockets=2,cores=2,threads=2" ] and must keep working with QEMU 3.0 and Linux <= 4.15. If we enable TOPOEXT unconditionally, the command-line won't work with Linux <= 4.15. If we enable TOPOEXT only if the kernel returns TOPOEXT on GET_SUPPORTED_CPUID, we break the second constraint: ] The results for: ] $ $QEMU -machine pc-q35-3.0 -cpu EPYC,enforce [...] ] must be deterministic and expose exactly the same CPUID data even ] if host hardware or software changes, as long as the QEMU ] command-line is the same. -- Eduardo