From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled() Date: Thu, 7 Oct 2010 10:42:15 +0200 Message-ID: <20101007084215.GB1983@amd.com> References: <1285593377-1754-1-git-send-email-joerg.roedel@amd.com> <1285593377-1754-2-git-send-email-joerg.roedel@amd.com> <20101006185306.GA8237@amt.cnet> <4CACCD0B.5090302@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Marcelo Tosatti , Anthony Liguori , Avi Kivity , Alexander Graf , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" To: Anthony Liguori Return-path: Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:29219 "EHLO TX2EHSOBE001.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760168Ab0JGImX (ORCPT ); Thu, 7 Oct 2010 04:42:23 -0400 Content-Disposition: inline In-Reply-To: <4CACCD0B.5090302@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Oct 06, 2010 at 03:24:59PM -0400, Anthony Liguori wrote: > >> + qemu_compat_version = machine->compat_version; > >> + > >> if (display_type == DT_NOGRAPHIC) { > >> if (default_parallel) > >> add_device_config(DEV_PARALLEL, "null"); > >> -- > >> 1.7.0.4 > >> > > Looks fine to me, given CPUs are not in qdev. Anthony? > > > > The idea is fine, but why not just add the default CPU to the machine > description? If I remember correctly the reason was that the machine description was not accessible in the cpuid initialization path because it is a function local variable. I could have made it a global variable but considered the compat_version approach simpler. The qemu_compat_version might also be useful at other places. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632