From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: x86: XSAVE/XRSTOR live migration support Date: Mon, 31 May 2010 14:26:01 +0300 Message-ID: <4C039CC9.20103@redhat.com> References: <1274953721-5068-1-git-send-email-sheng@linux.intel.com> <4BFE4337.4010502@redhat.com> <201005311921.10566.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65147 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119Ab0EaL0F (ORCPT ); Mon, 31 May 2010 07:26:05 -0400 In-Reply-To: <201005311921.10566.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/31/2010 02:21 PM, Sheng Yang wrote: > >> Need to reserve way more space here for future xsave growth. I think at >> least 4K. LRB wa 32x512bit = 1K (though it probably isn't a candidate >> for vmx). Would be good to get an opinion from your processor architects. >> >> I don't think we need to detail the contents of the structures since >> they're described by the SDM; so we can have just a large array that is >> 1:1 with the xsave as saved by the fpu. >> > I think we can reserve one page here. But one big array make it harder to work > with QEmu CPUState. Do we need lots of marcos in QEmu to parse the array? Also > it's easier to transfer get/set_fpu to get/set_xsave interface using current > structure I think. > We'll need that code somewhere, so we aren't losing anything by putting it in userspace (in fact, qemu already has to have most of this code since it supports fxsave/fxrstor emulation). What we gain is that if we make a bug, it is easier to fix it in userspace than in the kernel. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.