Re: [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes

2015-11-30 Thread Paolo Bonzini
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

Re: [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes

2015-11-30 Thread Eduardo Habkost
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

[for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes

2015-11-28 Thread Eduardo Habkost
target-i386/cpu.c:ext_save_area uses magic numbers for the xsave area offets and sizes, and target-i386/kvm.c:kvm_{put,get}_xsave() uses offset macros and bit manipulation to access the xsave area. This series changes both to use C structs for the same operations. I still need to figure out a way