From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: Re: [PATCH] target-i386: fix losing XCR0 processor state component bits Date: Wed, 28 Sep 2016 12:05:53 -0300 Message-ID: <20160928150553.GK3877@thinpad.lan.raisama.net> References: <1475040669-29085-1-git-send-email-wanpeng.li@hotmail.com> <20160928145737.GJ3877@thinpad.lan.raisama.net> <67000e1f-e521-e293-6d61-80f1c41976dc@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Wanpeng Li , kvm@vger.kernel.org, qemu-devel@nongnu.org, Wanpeng Li , Richard Henderson , "Michael S. Tsirkin" To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932789AbcI1PGB (ORCPT ); Wed, 28 Sep 2016 11:06:01 -0400 Content-Disposition: inline In-Reply-To: <67000e1f-e521-e293-6d61-80f1c41976dc@gnu.org> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Sep 28, 2016 at 05:01:01PM +0200, Paolo Bonzini wrote: > > > On 28/09/2016 16:57, Eduardo Habkost wrote:\ > > This can be fixed by adding actual property names to the > > FEAT_XSAVE_COMP_* bits. This way we will be able to report > > meaningful names to management in case GET_SUPPORTED_CPUID says a > > given xsave component is not supported yet, and will ensure we > > correctly treat still-unknown xsave components as unmigratable. > > 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. -- Eduardo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpGQw-0004PQ-7K for qemu-devel@nongnu.org; Wed, 28 Sep 2016 11:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpGQr-0000xk-Vc for qemu-devel@nongnu.org; Wed, 28 Sep 2016 11:06:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpGQr-0000xW-Ot for qemu-devel@nongnu.org; Wed, 28 Sep 2016 11:06:01 -0400 Date: Wed, 28 Sep 2016 12:05:53 -0300 From: Eduardo Habkost Message-ID: <20160928150553.GK3877@thinpad.lan.raisama.net> References: <1475040669-29085-1-git-send-email-wanpeng.li@hotmail.com> <20160928145737.GJ3877@thinpad.lan.raisama.net> <67000e1f-e521-e293-6d61-80f1c41976dc@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67000e1f-e521-e293-6d61-80f1c41976dc@gnu.org> 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: Paolo Bonzini Cc: Wanpeng Li , kvm@vger.kernel.org, qemu-devel@nongnu.org, Wanpeng Li , Richard Henderson , "Michael S. Tsirkin" On Wed, Sep 28, 2016 at 05:01:01PM +0200, Paolo Bonzini wrote: > > > On 28/09/2016 16:57, Eduardo Habkost wrote:\ > > This can be fixed by adding actual property names to the > > FEAT_XSAVE_COMP_* bits. This way we will be able to report > > meaningful names to management in case GET_SUPPORTED_CPUID says a > > given xsave component is not supported yet, and will ensure we > > correctly treat still-unknown xsave components as unmigratable. > > 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. -- Eduardo