From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWVYz-0006Z3-56 for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:29:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWVYw-0005HE-3h for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:29:56 -0400 Received: from cantor.suse.de ([195.135.220.2]:53137 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWVYv-0005Gi-Ct for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:29:53 -0400 From: Alexander Graf Date: Tue, 14 Jun 2011 17:29:48 +0200 Message-Id: <1308065389-11945-3-git-send-email-agraf@suse.de> In-Reply-To: <1308065389-11945-1-git-send-email-agraf@suse.de> References: <1308065389-11945-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 2/3] pc: use old default cpu type for 0.14 and 0.15 compat machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org Developers" Cc: Anthony Liguori When running with the 0.14 or 0.15 machine types, use the old mechanism of determining the default CPU to choose, so that the guest sees the same default CPU when running qemu in compat mode. Signed-off-by: Alexander Graf --- hw/pc_piix.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 3b3ef84..84d5650 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -220,6 +220,14 @@ static void pc_init_pci_014(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + if (cpu_model == NULL) { +#ifdef TARGET_X86_64 + cpu_model = "qemu64"; +#else + cpu_model = "qemu32"; +#endif + } + pc_init1(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, 1, 1); @@ -232,6 +240,14 @@ static void pc_init_pci_no_kvmclock(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + if (cpu_model == NULL) { +#ifdef TARGET_X86_64 + cpu_model = "qemu64"; +#else + cpu_model = "qemu32"; +#endif + } + pc_init1(ram_size, boot_device, kernel_filename, kernel_cmdline, initrd_filename, cpu_model, 1, 0); -- 1.7.3.4