From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: test_x86_emulator (was Re: [PATCH optional v2 01/10] hvm/hpet: Add manual unit test code.) Date: Mon, 14 Apr 2014 13:29:20 -0400 Message-ID: <534C1AF0.3060707@terremark.com> References: <1396967094-29484-1-git-send-email-dslutz@verizon.com> <1396967094-29484-2-git-send-email-dslutz@verizon.com> <53458CB40200007800007598@nat28.tlf.novell.com> <534592D7.2020805@terremark.com> <534652300200007800007727@nat28.tlf.novell.com> <53475944.3060100@terremark.com> <5347B9BD0200007800007DDB@nat28.tlf.novell.com> <5347D8C4.8080500@terremark.com> <5347F7A10200007800007F74@nat28.tlf.novell.com> <5347E4B1.3080505@terremark.com> <534822E202000078000080AC@nat28.tlf.novell.com> <5348292B.5000102@terremark.com> <534BAD0F0200007800008407@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <534BAD0F0200007800008407@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Don Slutz Cc: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 04/14/14 03:40, Jan Beulich wrote: >>>> On 11.04.14 at 19:40, wrote: >> Testing movdqu %xmm2,(%ecx)... okay >> Testing movdqu (%edx),%xmm4... okay >> >> Breakpoint 3, main (argc=, argv=) at >> test_x86_emulator.c:661 >> 661 if ( (rc != X86EMUL_OKAY) || memcmp(res, res + 16, 64) ) >> (gdb) p rc >> $4 = 7 >> (gdb) q > I don't see how a return code of 7 could ever be observed here. But > It's then apparently not the suspected XMM register clobbering. On ac0f56a + All these patches (which should not effect this) It is more complex then it appears at 1st look. -O1: ... Testing movdqu (%edx),%xmm4... okay Testing vmovdqu %ymm2,(%ecx)... skipped Testing vmovdqu (%edx),%ymm4... skipped Testing movsd %xmm5,(%ecx)... okay Testing movaps (%edx),%xmm7... okay ... -O2: ... Testing movdqu (%edx),%xmm4... okay Testing vmovdqu %ymm2,(%ecx)... failed! make: *** [run] Error 1 How I got here: ... Testing movq (%edx),%mm5... okay Testing movdqu %xmm2,(%ecx)... okay Testing movdqu (%edx),%xmm4... okay Breakpoint 1, main (argc=, argv=) at test_x86_emulator.c:702 702 printf("%-40s", "Testing vmovdqu %ymm2,(%ecx)..."); (gdb) c Continuing. Breakpoint 3, x86_emulate (ctxt=ctxt@entry=0x7fffffffdb80, ops=ops@entry=0x6152a0 ) at x86_emulate/x86_emulate.c:4164 4164 get_fpu(X86EMUL_FPU_ymm, &fic); (gdb) p rc $2 = 0 (gdb) s get_fpu (exception_callback=0x402a60 , exception_callback_arg=0x7fffffffd7d0, type=X86EMUL_FPU_ymm, ctxt=0x7fffffffdb80) at test_x86_emulator.c:138 138 switch ( type ) (gdb) n 137 { (gdb) 138 switch ( type ) (gdb) 154 return X86EMUL_OKAY; (gdb) 138 switch ( type ) (gdb) 152 return X86EMUL_UNHANDLEABLE; (gdb) 138 switch ( type ) (gdb) 132 int get_fpu( (gdb) 155 } (gdb) x86_emulate (ctxt=ctxt@entry=0x7fffffffdb80, ops=ops@entry=0x6152a0 ) at x86_emulate/x86_emulate.c:4525 4525 } (gdb) main (argc=, argv=) at test_x86_emulator.c:719 719 if ( (rc != X86EMUL_OKAY) || memcmp(res, res + 16, 64) ) (gdb) 934 printf("failed!\n"); And so I tried at the lower -O1, and "it works". >> This is from 4.3.1... > I.e. not really meaningful if not proven to behave the same on > -unstable. And anyway, if you're not up to debugging this, I don't > think there's much we can do. Since I know almost nothing about both AVX instructions and x86_emulate, it is hard for me to quickly help. -Don Slutz > Jan >