From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxzd6-0000mM-HU for qemu-devel@nongnu.org; Thu, 16 Feb 2012 06:36:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxzd5-0000Yc-B7 for qemu-devel@nongnu.org; Thu, 16 Feb 2012 06:36:04 -0500 Received: from goliath.siemens.de ([192.35.17.28]:33888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxzd5-0000YT-11 for qemu-devel@nongnu.org; Thu, 16 Feb 2012 06:36:03 -0500 Message-ID: <4F3CEA20.2090700@siemens.com> Date: Thu, 16 Feb 2012 12:36:00 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1329347774-23262-1-git-send-email-imammedo@redhat.com> <1329347774-23262-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1329347774-23262-6-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/7] Set default 'model' property if it wasn't specified yet. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: "qemu-devel@nongnu.org" , "gleb@redhat.com" On 2012-02-16 00:16, Igor Mammedov wrote: > If cpu model wasn't specified at startup or hot-plug set it to default > value for the target. > > Signed-off-by: Igor Mammedov > --- > hw/pc.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/hw/pc.c b/hw/pc.c > index 3d35d78..ec50f16 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -933,6 +933,14 @@ static int cpu_device_init(ICCBusDevice *dev) > CPUPC* cpu = DO_UPCAST(CPUPC, busdev, dev); > CPUState *env = &cpu->state; > > + if (cpu->model == NULL) { > +#ifdef TARGET_X86_64 > + qdev_prop_set_string(&dev->qdev, "model", g_strdup("qemu64")); > +#else > + qdev_prop_set_string(&dev->qdev, "model", g_strdup("qemu32")); > +#endif > + } > + > if (cpu_x86_init_inplace(env, cpu->model) < 0) { > return -1; > } This obsoletes a similar logic in pc_cpus_init. Please consolidate. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux