qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes
@ 2015-11-28 19:56 Eduardo Habkost
  2015-11-28 19:56 ` [Qemu-devel] [for-2.6 PATCH 1/3] target-i386: Define structs for layout of xsave area Eduardo Habkost
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Eduardo Habkost @ 2015-11-28 19:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, kvm, Huaitong Han

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 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).

Eduardo Habkost (3):
  target-i386: Define structs for layout of xsave area
  target-i386: Use xsave structs for ext_save_area
  target-i386: kvm: Use X86XSaveArea struct for xsave save/load

 target-i386/cpu.c |  18 +++++---
 target-i386/cpu.h |  85 ++++++++++++++++++++++++++++++++++++++
 target-i386/kvm.c | 121 +++++++++++++++++++++++-------------------------------
 3 files changed, 149 insertions(+), 75 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-12-01 18:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-28 19:56 [Qemu-devel] [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes Eduardo Habkost
2015-11-28 19:56 ` [Qemu-devel] [for-2.6 PATCH 1/3] target-i386: Define structs for layout of xsave area Eduardo Habkost
2015-11-30 11:18   ` Paolo Bonzini
2015-11-30 14:48     ` Eduardo Habkost
2015-12-01 17:09     ` Richard Henderson
2015-12-01 17:15       ` Eduardo Habkost
2015-12-01 17:20         ` Richard Henderson
2015-12-01 17:27           ` Paolo Bonzini
2015-12-01 18:34             ` Eduardo Habkost
2015-12-01 18:42               ` Richard Henderson
2015-11-28 19:56 ` [Qemu-devel] [for-2.6 PATCH 2/3] target-i386: Use xsave structs for ext_save_area Eduardo Habkost
2015-11-28 19:56 ` [Qemu-devel] [for-2.6 PATCH 3/3] target-i386: kvm: Use X86XSaveArea struct for xsave save/load Eduardo Habkost
2015-11-30 11:21 ` [Qemu-devel] [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes Paolo Bonzini
2015-11-30 14:14   ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).