From: Zachery Salwasser Subject: Re: (qemu)info registers -- Not working for me. Date: Mon, 1 Mar 2010 21:19:41 -0500 Message-ID: References: <4B8AB58B.2050209@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:48764 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753127Ab0CBCTm convert rfc822-to-8bit (ORCPT ); Mon, 1 Mar 2010 21:19:42 -0500 Received: by mail-px0-f183.google.com with SMTP id 13so1116870pxi.22 for ; Mon, 01 Mar 2010 18:19:41 -0800 (PST) In-Reply-To: <4B8AB58B.2050209@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Thank you for the prompt reply, you were correct, and I was able to resolve the issue by being a little more careful with my header files. I will close the issue on sourceforge. On Sun, Feb 28, 2010 at 1:27 PM, Jan Kiszka wrote: > Zachery Salwasser wrote: >> I have been having trouble with reading the extended registers >> normally read by kvm_get_sregs() on host kernels ~2.6.32 and higher. >> >> I am currently running Linux 2.6.32-8, kvm-kmod 2.6.32.8, and qemu 0= =2E12.2. >> >> I get the following output when I try info registers on the qemu con= sole: >> >> (qemu) info registers >> EAX=3D6d63c93d EBX=3Dffdffc70 ECX=3Dffdffc70 EDX=3D00000000 >> ESI=3Dffdffc50 EDI=3D823e7b68 EBP=3D80550f50 ESP=3D80550f34 >> EIP=3Df8621d3e EFL=3D00000246 [---Z-P-] CPL=3D0 II=3D0 A20=3D1 SMM=3D= 0 HLT=3D0 >> ES =3D3d65 00001000 b772bdf8 3fffe800 DPL=3D3 Reserved >> CS =3D4fe1 b7d59ff4 b7d5b3a0 6b300100 >> SS =3D0000 b772bde8 0847ab38 6f300a00 >> DS =3Db3d0 b7d5b3cc 00000000 7bffd500 DPL=3D2 DS =A0 [E-A] >> FS =3De008 b7d5b3a0 b7d59ff4 005bb900 DPL=3D1 CS32 [--A] >> GS =3Dffff ffffffff 00000007 7fffff00 DPL=3D3 CS64 [CRA] >> LDT=3D9ff4 b772bde0 00000008 7ffff500 DPL=3D3 DS =A0 [E-A] >> TR =3D0000 00000080 b7fb63ab 00f00000 >> GDT=3D =A0 =A0 00014fe1 00000100 >> IDT=3D =A0 =A0 b7d5b3cc 0000b3d0 >> CR0=3D08000101 CR2=3D00002000 CR3=3D00000000 CR4=3D08000101 >> DR0=3D00000000 DR1=3D00000000 DR2=3D00000000 DR3=3D00000000 >> DR6=3Dffff0ff0 DR7=3D00000000 >> FCW=3D027f FSW=3D0000 [ST=3D0] FTW=3D00 MXCSR=3D00000000 >> FPR0=3D0000000000000000 ffff FPR1=3D00ff00ff00ff00ff ffff >> FPR2=3D0000000000000000 ffff FPR3=3D00fe000d009900ee ffff >> FPR4=3Dff0d9aefff6a604c ffff FPR5=3D00ff000d009a00ef ffff >> FPR6=3D0000000000000000 ffff FPR7=3D0080008000800080 ffff >> XMM00=3D >> 00000020000000000000000000000001 XMM01=3D81181ab88055f980e115d000000= 00020 >> XMM02=3Df79092a481181ab8c03845740dd1d000 XMM03=3D81181ab8c0384574000= 0016d804e93e0 >> XMM04=3Dc0384574000000000000000100000000 XMM05=3De1150000804e7e36f79= 0931400000000 >> XMM06=3D806f02980000000000000000c0384574 XMM07=3D000000028055f620000= 00080c0384574 >> >> Note that cr3 is 0, which doesn't seem possible. =A0The contents of = the >> sregs is also static across invocations of info registers (whereas t= he >> "regs" chang), indicating that the values that are there are garbage= =2E >> >> Delving deeper, when I check actual invocations of kvm_get_sregs(), = it >> usually returns either 0 or -22, neither value indicating success. > > -22 indicates something bad is happening. Maybe sizeof(struct kvm_sre= gs) > is different from kernel and user space POV on your host. That would > cause KVM_GET_SREGS to have different values, thus the kernel would b= e > unable to dispatch the request. Could you check this? > > Jan > >