'idiv', when given a memory operand, can't determine the instruction size. Provide it explicitly.
Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Avi Kivity <[email protected]> --- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7ce5878..32096cf 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1038,7 +1038,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data) nsdiff = (nsdiff * 1000) / vcpu->arch.virtual_tsc_khz; #else /* do_div() only does unsigned */ - asm("idiv %2; xor %%edx, %%edx" + asm("idivl %2; xor %%edx, %%edx" : "=A"(nsdiff) : "A"(nsdiff * 1000), "rm"(vcpu->arch.virtual_tsc_khz)); #endif -- 1.7.9 -- 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
