From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] target-i386: fix losing XCR0 processor state component bits Date: Wed, 28 Sep 2016 17:09:46 +0200 Message-ID: <625b529e-5306-34f1-2429-c6d335280882@gnu.org> References: <1475040669-29085-1-git-send-email-wanpeng.li@hotmail.com> <20160928145737.GJ3877@thinpad.lan.raisama.net> <67000e1f-e521-e293-6d61-80f1c41976dc@gnu.org> <20160928150553.GK3877@thinpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Wanpeng Li , kvm@vger.kernel.org, qemu-devel@nongnu.org, Wanpeng Li , Richard Henderson , "Michael S. Tsirkin" To: Eduardo Habkost Return-path: Received: from mail-wm0-f46.google.com ([74.125.82.46]:32854 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932486AbcI1PJt (ORCPT ); Wed, 28 Sep 2016 11:09:49 -0400 Received: by mail-wm0-f46.google.com with SMTP id d66so38315139wmf.0 for ; Wed, 28 Sep 2016 08:09:49 -0700 (PDT) In-Reply-To: <20160928150553.GK3877@thinpad.lan.raisama.net> Sender: kvm-owner@vger.kernel.org List-ID: On 28/09/2016 17:05, Eduardo Habkost wrote: > > Hmm, right. Even though XSAVE could be migrated as a blob, QEMU > > marshals and unmarshals the registers out and back into the xsave data, > > so that unknown features are indeed unmigratable. > > > > But are the property names necessary? It makes no sense to > > enable/disable XSAVE components separately from the other CPUID bits > > that enable them. Could we just mark all unknown features as > > unmigratable without giving them names? > > We could, as we don't really need to make them configurable. But > giving them names will also allow us to return more useful data > to libvirt in case GET_SUPPORTED_CPUID returns some bits as > unsupported. The new CPU runnability/comparison APIs are all > based on property names. The names could, or perhaps should, be obtained also from x86_ext_save_areas (apart from the legacy x87 and sse components which are guaranteed to be there). Basically property names such as "avx" trigger both the regular CPUID bits and the XSAVE components. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpGUd-0008Iw-G1 for qemu-devel@nongnu.org; Wed, 28 Sep 2016 11:09:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpGUX-00023L-BJ for qemu-devel@nongnu.org; Wed, 28 Sep 2016 11:09:54 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:33220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpGUX-00023D-3O for qemu-devel@nongnu.org; Wed, 28 Sep 2016 11:09:49 -0400 Received: by mail-lf0-x233.google.com with SMTP id b71so56712319lfg.0 for ; Wed, 28 Sep 2016 08:09:49 -0700 (PDT) Sender: Paolo Bonzini References: <1475040669-29085-1-git-send-email-wanpeng.li@hotmail.com> <20160928145737.GJ3877@thinpad.lan.raisama.net> <67000e1f-e521-e293-6d61-80f1c41976dc@gnu.org> <20160928150553.GK3877@thinpad.lan.raisama.net> From: Paolo Bonzini Message-ID: <625b529e-5306-34f1-2429-c6d335280882@gnu.org> Date: Wed, 28 Sep 2016 17:09:46 +0200 MIME-Version: 1.0 In-Reply-To: <20160928150553.GK3877@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-i386: fix losing XCR0 processor state component bits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Wanpeng Li , kvm@vger.kernel.org, qemu-devel@nongnu.org, Wanpeng Li , Richard Henderson , "Michael S. Tsirkin" On 28/09/2016 17:05, Eduardo Habkost wrote: > > Hmm, right. Even though XSAVE could be migrated as a blob, QEMU > > marshals and unmarshals the registers out and back into the xsave data, > > so that unknown features are indeed unmigratable. > > > > But are the property names necessary? It makes no sense to > > enable/disable XSAVE components separately from the other CPUID bits > > that enable them. Could we just mark all unknown features as > > unmigratable without giving them names? > > We could, as we don't really need to make them configurable. But > giving them names will also allow us to return more useful data > to libvirt in case GET_SUPPORTED_CPUID returns some bits as > unsupported. The new CPU runnability/comparison APIs are all > based on property names. The names could, or perhaps should, be obtained also from x86_ext_save_areas (apart from the legacy x87 and sse components which are guaranteed to be there). Basically property names such as "avx" trigger both the regular CPUID bits and the XSAVE components. Paolo