From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: Re: [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes Date: Mon, 30 Nov 2015 12:14:59 -0200 Message-ID: <20151130141459.GD23717@thinpad.lan.raisama.net> References: <1448740611-3096-1-git-send-email-ehabkost@redhat.com> <565C3133.2060707@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Huaitong Han To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56641 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754321AbbK3OPD (ORCPT ); Mon, 30 Nov 2015 09:15:03 -0500 Content-Disposition: inline In-Reply-To: <565C3133.2060707@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Nov 30, 2015 at 12:21:23PM +0100, Paolo Bonzini wrote: > > > On 28/11/2015 20:56, Eduardo Habkost wrote: > > I still need to figure out a way to write unit tests for the new > > code. Maybe I will just copy and paste the new and old functions, > > and test them locally (checking if they give the same results > > when translating blobs of random bytes). > > Aren't the QEMU_BUILD_BUG_ON enough? No need to delete them in patch 3, > though perhaps you can remove the #defines. Just wanted to be 100% sure. Even if the offets are all correct, I might have made other mistakes when translating the get/save code. About the QEMU_BUILD_BUG_ON lines, we can keep them if you like. We could translate the uint32_t offsets to byte offsets after ptach 3/3, to make them easier to compare to the Intel docs. -- Eduardo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3PET-0003eH-Ci for qemu-devel@nongnu.org; Mon, 30 Nov 2015 09:15:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3PEN-0006kl-Jm for qemu-devel@nongnu.org; Mon, 30 Nov 2015 09:15:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3PEN-0006kh-FK for qemu-devel@nongnu.org; Mon, 30 Nov 2015 09:15:03 -0500 Date: Mon, 30 Nov 2015 12:14:59 -0200 From: Eduardo Habkost Message-ID: <20151130141459.GD23717@thinpad.lan.raisama.net> References: <1448740611-3096-1-git-send-email-ehabkost@redhat.com> <565C3133.2060707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <565C3133.2060707@redhat.com> Subject: Re: [Qemu-devel] [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Huaitong Han , qemu-devel@nongnu.org, kvm@vger.kernel.org On Mon, Nov 30, 2015 at 12:21:23PM +0100, Paolo Bonzini wrote: > > > On 28/11/2015 20:56, Eduardo Habkost wrote: > > I still need to figure out a way to write unit tests for the new > > code. Maybe I will just copy and paste the new and old functions, > > and test them locally (checking if they give the same results > > when translating blobs of random bytes). > > Aren't the QEMU_BUILD_BUG_ON enough? No need to delete them in patch 3, > though perhaps you can remove the #defines. Just wanted to be 100% sure. Even if the offets are all correct, I might have made other mistakes when translating the get/save code. About the QEMU_BUILD_BUG_ON lines, we can keep them if you like. We could translate the uint32_t offsets to byte offsets after ptach 3/3, to make them easier to compare to the Intel docs. -- Eduardo