From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUSwe-0002xo-Gb for qemu-devel@nongnu.org; Tue, 03 Feb 2009 16:36:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUSwb-0002w9-D3 for qemu-devel@nongnu.org; Tue, 03 Feb 2009 16:36:35 -0500 Received: from [199.232.76.173] (port=58258 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUSwa-0002vz-R4 for qemu-devel@nongnu.org; Tue, 03 Feb 2009 16:36:32 -0500 Received: from mail-qy0-f20.google.com ([209.85.221.20]:42640) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUSwa-0001aV-Bl for qemu-devel@nongnu.org; Tue, 03 Feb 2009 16:36:32 -0500 Received: by qyk13 with SMTP id 13so4257820qyk.10 for ; Tue, 03 Feb 2009 13:36:32 -0800 (PST) Message-ID: <4988B8CC.9080806@codemonkey.ws> Date: Tue, 03 Feb 2009 15:36:12 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 3/4] mask out forbidden cpuid features with kvm ioctl References: <1233249569-16686-1-git-send-email-glommer@redhat.com> <1233249569-16686-2-git-send-email-glommer@redhat.com> <1233249569-16686-3-git-send-email-glommer@redhat.com> <1233249569-16686-4-git-send-email-glommer@redhat.com> <498216B0.9030400@us.ibm.com> <4988B6BA.1080501@redhat.com> In-Reply-To: <4988B6BA.1080501@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Glauber Costa Avi Kivity wrote: > Anthony Liguori wrote: >> Glauber Costa wrote: >>> KVM has a (so far unused) ioctl to inform userspace >>> about supported cpuid bits in the current host. >>> >>> The lack of this kind of checking can lead to bugs in which >>> a cpuid bit is exposed but not supported by the host kernel >>> (an example is fedora bug >>> https://bugzilla.redhat.com/show_bug.cgi?id=481274) >>> >>> The current host_cpuid code is replaced by this general check. >>> >>> Signed-off-by: Glauber Costa >>> >> >> So what do we do about live migration? > > We need a way to completely specify cpuid from the command line. The > management utility would figure out what is supported (driven by both > cpu capabilities and installed kvm capabilities) and fgure out a > greatest common denominator, or something. What is the default case? Pass everything through or pick a reasonable small, constant subset? That is, is -cpuid a union or an intersection. Regards, Anthony Liguori >> Does KVM mask a set of bits unconditionally? > > The kernel doesn't touch cpuid (except nx due to an historical mistake). > >> Before, we were masking unconditionally which should insulate >> migration reasonable well. > > That suits migration, but not other uses of qemu. >