From: Bharat Bhushan Date: Wed, 19 Oct 2011 04:16:06 +0000 (+0530) Subject: KVM: PPC: Fix DEC truncation for greater than 0xffff_ffff/1000 X-Git-Tag: v3.4-rc1~59^2~100 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc2babfea592e633cf3890294af6545609b466be;p=pandora-kernel.git KVM: PPC: Fix DEC truncation for greater than 0xffff_ffff/1000 kvmppc_emulate_dec() uses dec_nsec of type unsigned long and does below calculation: dec_nsec = vcpu->arch.dec; dec_nsec *= 1000; This will truncate if DEC value "vcpu->arch.dec" is greater than 0xffff_ffff/1000. For example : For tb_ticks_per_usec = 4a, we can not set decrementer more than ~58ms. Signed-off-by: Bharat Bhushan Acked-by: Liu Yu Signed-off-by: Alexander Graf Signed-off-by: Avi Kivity --- Reading git-diff-tree failed