From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: RE: [PATCH 1/9] Add cpu idle pwr mgmt to xen Date: Wed, 30 Apr 2008 10:35:23 +0100 Message-ID: <4818597B.76E4.0078.0@novell.com> References: <48183A3F.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kevin Tian Cc: xen-devel@lists.xensource.com, Keir Fraser , Gang Wei List-Id: xen-devel@lists.xenproject.org >>> "Tian, Kevin" 30.04.08 11:12 >>> >One thing kicking me just now is, whether Linux address check >style can be used here by temporarily increasing address limit >in compat logic to bypass relative check in common code? I >didn't see obvious benefit to reserve a guest virtual addr range >and let each component to manage internal allocation themselves. >Linux style seems simpler and compat logic can just use xmalloc >to create native copy to reduce xlat complexity. I intentionally did not go that route when I first wrote these translation routines. For one, you wouldn't be able to partly copy things (as I suggested as an improvement here), since the validity checks would apply to all or nothing during an individual hypercall (and a bad 64-bit field representing a pointer might then slip through). Secondly, the static pre-allocation used currently also avoids spurious failures of hypercalls (there may be deterministic failures if the combined set of indirect hypercall arguments exceeds the pre-allocation size. Jan