From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [PATCH 11/21] MIPS: KVM: Rewrite count/compare timer emulation Date: Fri, 25 Apr 2014 22:05:42 +0100 Message-ID: <1591723.zAIKIVVUH7@radagast> References: <1398439204-26171-1-git-send-email-james.hogan@imgtec.com> <1398439204-26171-12-git-send-email-james.hogan@imgtec.com> <535A94A5.1040200@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart15069885.7FTzL28OdA"; micalg="pgp-sha1"; protocol="application/pgp-signature" Cc: David Daney , Paolo Bonzini , Gleb Natapov , kvm@vger.kernel.org, Ralf Baechle , Sanjay Lal To: linux-mips@linux-mips.org Return-path: In-Reply-To: <535A94A5.1040200@gmail.com> Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: List-Id: kvm.vger.kernel.org --nextPart15069885.7FTzL28OdA Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi David, On Friday 25 April 2014 10:00:21 David Daney wrote: > > + /* Frequency of timer in Hz */ > > + uint32_t count_hz; > > We are currently running with timer frequencies of over 2GHz, so the > width of this variable is close to the limit. Interesting. Do you have 64-bit Count/Compare registers or just accept that you'll wrap after only 2 seconds? (it seems like a fairly short maximum idle time, though perhaps not important in the grand scheme of things) > Your follow-on patch exports this to user-space as part of the KVM ABI. > > I would suggest, at least for the user-space ABI, to make this a 64-bit > wide value. Yes, it's 64-bit wide in the userspace API, so it should be future proof. Currently it refuses to accept a value higher than 1GHz for numerical reasons though. If this same timer code is to be adapted for sleeping VZ guests too with those sorts of timer frequencies then it makes sense to ensure it can handle higher frequencies (since OTOH VZ doesn't give you control over the guest timer frequency, just the offset). It's not strictly required for T&E though so I don't think it should be a blocking factor. Thanks James --nextPart15069885.7FTzL28OdA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTWs4vAAoJEGwLaZPeOHZ6PTIQAL3SA34V6s735NBH8mNCebcu kr6KQ2H9BCwuv3v0trl8vTJfAOTDCJ+h0NoylI5/D5EEMKwxhMzEvreqxE94UTuP wQtM3m3AMHDb7uOj5FvCzFBC5VvNQF7kM77WB0ZRlsWJXfsSRd1F6Ki9o1iK/kYm OnnLrHvM01zflCMgEHu41omXAE9I+z73zE0jfJickpFMP4Kkdk+xWGBcMWDy3yjW lePl/R687DoFdWKHO5nRSvs28ZuGOF5SNLVL99vQmOnL/6yHFVUVF/+c4jixVEy5 ACtYxP/5zTN274q+x4eDnWQKUudVUxMX8zaxQ0QrP69AJHr5a03GxZlEr0WMAqyN q6/5WrtEP31aFptWaK2Ik2IKyJmZTDYKpS5X6mPSnfbbCJ+SbMwWNhKIGOsI2/L0 EINXYnj4yHKhC87FkAuO+TaojFLedq6V9xJO0nQkPCtnWhnEeYLTKLuyekHZ+O6C cv9tYAKjzRdr9nVDxqCv3tQLxirSi1h44EoRrLJlpUDFL2XhbtT9FjSW1k+WfISR RRh1s0+GvvX6uBJ08Qm1BslwGkE/BMSjxjR7VvSMuUsdc/Ktm6dHl/tOT7ysrhMj 3s9qJuic620ljZpOHwn+jeLM3BO/y1VmOwf/e2ysgPt0XxtaUEtCq721OVCJ99fP yhbPxFI25NDcEM/3ynfx =pnjw -----END PGP SIGNATURE----- --nextPart15069885.7FTzL28OdA--