Re: [PATCH]KVM: Fix DEC truncation for greater than 0xffff_ffff/1000

2011-10-20 Thread Alexander Graf
gmail.com; Bhushan Bharat- >> R65777 >> Subject: Re: [PATCH]KVM: Fix DEC truncation for greater than >> 0x_/1000 >> >> >> On 18.10.2011, at 10:05, Bharat Bhushan wrote: >> >>> kvmppc_emulate_dec() uses dec_nsec of type unsigned long and

RE: [PATCH]KVM: Fix DEC truncation for greater than 0xffff_ffff/1000

2011-10-20 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Thursday, October 20, 2011 10:45 PM > To: Bhushan Bharat-R65777 > Cc: kvm-ppc@vger.kernel.org; bharatb.ya...@gmail.com; Bhushan Bharat- > R65777 > Subject: Re: [PATCH]KVM: Fix DEC trunca

Re: [PATCH]KVM: Fix DEC truncation for greater than 0xffff_ffff/1000

2011-10-20 Thread Alexander Graf
On 18.10.2011, at 10:05, Bharat Bhushan wrote: > 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 > 0x_/1000. > For

[PATCH]KVM: Fix DEC truncation for greater than 0xffff_ffff/1000

2011-10-18 Thread Bharat Bhushan
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 0x_/1000. For example : For tb_ticks_per_usec = 4a, we can not set decremente