Avi Kivity wrote:
> On 11/16/2009 01:17 PM, Dietmar Maurer wrote:
>> 38f0: 0f 85 82 01 00 00 jne 3a78<svm_get_msr+0x2b8>
>> 38f6: 48 8b 87 e0 27 00 00 mov 0x27e0(%rdi),%rax
>> 38fd: 48 8b 48 50 mov 0x50(%rax),%rcx
>> 3901: 0f 31 rdtsc
>> 3903: 48 01 c8 add %rcx,%rax
>>
>> # this is svm_get_msr+0x146
>> 3906: 48 89 02 mov %rax,(%rdx)
>>
>
>
> Looks like a miscompile of native_read_tsc(), it needs to use %edx:%eax,
> not assume the result is in %rax.
>
> Jan, looks like the culprit is
>
> static inline unsigned long long kvm_native_read_tsc(void)
> {
> unsigned long long val;
> asm volatile("rdtsc" : "=A" (val));
> return val;
> }
>
> "=A" only works correctly on i386, need to use "=a" "=d" for portability.
>
Yes, already commit a fix, currently propagating it through all series.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html