From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRNtd-0003CN-K4 for qemu-devel@nongnu.org; Thu, 16 Jul 2009 06:09:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRNtY-0003Bw-23 for qemu-devel@nongnu.org; Thu, 16 Jul 2009 06:09:00 -0400 Received: from [199.232.76.173] (port=48424 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRNtX-0003Bs-Us for qemu-devel@nongnu.org; Thu, 16 Jul 2009 06:08:55 -0400 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:56828 helo=TX2EHSOBE001.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1MRNtX-0004CM-1k for qemu-devel@nongnu.org; Thu, 16 Jul 2009 06:08:55 -0400 Message-ID: <4A5EFC16.7070808@amd.com> Date: Thu, 16 Jul 2009 12:08:22 +0200 From: Andre Przywara MIME-Version: 1.0 Subject: Re: [Qemu-devel] CPUID feature bits not saved with migration References: <4A5DD0B0.7070700@amd.com> <4A5DE9E5.2080809@codemonkey.ws> <20090715151234.GA28724@shareable.org> In-Reply-To: <20090715151234.GA28724@shareable.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org Jamie Lokier wrote: > Anthony Liguori wrote: >> It's unclear what to do about -cpu host. If we did migrate cpuid >> values, then -cpu would effectively be ignored after an incoming migration. > > The new host might not support all the cpuid features of the old host, > whether by -cpu host or explicit cpuid. What happens then? If you plan to migrate, you should think of this in advance. I have a rough version of a tool to compute the least common denominator CPUID bits given either processor (code)names or host names. In the latter case it will login into the box and query the host's CPUID. The tool then generates a QEMU command line (like -cpu qemu64,-mwait,-popcnt) with which the guest should be started. This should ensure that the guest always sees the same subset of the CPUs capabilities. > For changing cpuid when migrating, as you might like to do with -cpu > host for performance, is reboot-during-migrate useful? It would make > sure all disk state is committed to the image files asynchronously > while the machine continues to run (just like normal migration), and > at the last moment transfers control and the machine sees a reboot, > permitting devices changes including cpuid change. Is that really useful? After all the sexy part of live migration is the "live" component... > CPU hotplug could be used for cpuid change in theory, but I doubt if > any guests or guest apps would handle it well. Hotplugging could work for secondary processors, but hotplugging the BSP is kind of tricky. And this does not solve the userspace issues, where libraries detect CPU capabilities during startup and use optimized code paths. AFAIK there is no mechanism of informing those libraries about a CPUID change. Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 448 3567 12 ----to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy; Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632