20 messages in com.xensource.lists.xen-develRe: [Xen-devel] [PATCH 1/9] Add cpu i...
FromSent OnAttachments
Wei, Gang24 Apr 2008 22:07.patch
Keir Fraser25 Apr 2008 06:00 
Wei, Gang25 Apr 2008 06:28 
Wei, Gang26 Apr 2008 02:55.patch
Jan Beulich28 Apr 2008 02:24 
Wei, Gang29 Apr 2008 20:27.patch
Jan Beulich30 Apr 2008 00:21 
Keir Fraser30 Apr 2008 01:53 
Wei, Gang30 Apr 2008 02:08 
Tian, Kevin30 Apr 2008 02:12 
Tian, Kevin30 Apr 2008 02:18 
Jan Beulich30 Apr 2008 02:35 
Tian, Kevin30 Apr 2008 02:42 
Keir Fraser30 Apr 2008 03:00 
Jan Beulich30 Apr 2008 03:24 
Jan Beulich30 Apr 2008 03:24 
Keir Fraser30 Apr 2008 05:27 
Wei, Gang30 Apr 2008 09:36.patch
Wei, Gang30 Apr 2008 17:47.patch
Tian, Kevin04 May 2008 23:33 
Subject:Re: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen
From:Keir Fraser (keir@eu.citrix.com)
Date:04/30/2008 03:00:00 AM
List:com.xensource.lists.xen-devel

On 30/4/08 10:42, "Tian, Kevin" <kevi@intel.com> wrote:

What do you mean by partly copying things? For a 32-on-64 guest, all pointers from guest are 32-bit and compat_handler_okay already ensures compat pointers validity. Only native structure may have 64-bit pointer field, which is checked by common guest_handle_okay if from a 64bit guest, or is trusted by increasing addr limitation if from compat layer...

Yes, I don't think we do partial copying anywhere right now. If we did, we could apply guest_handle_okay() checks explicitly before removing the addr-space limitation.

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.

That's also the limitation of current approach by pre-defined size, which is not scalable if 2nd level pointer are variable decided by some count field.

Also the approaches are not mutually exclusive. We can still have a per-vcpu pre-alloc'ed page for most hypercalls, and allow dynamic allocation for hypercalls which require more space and which then have to tolerate ENOMEM failure. The pre-alloc'ed pages would no longer require to be mapped in a special place.

On the other hand, I don't think we have any hypercall right now where 4kB is likely to be too little space, and where the hypercall cannot be sub-divided into smaller chunks by the compat shim.

*But* having a way to flag that arguments have been copied would also be useful for HVM compat shims too. We already have such a flag (guest_handles_in_xen_space) there, so we would increase commonality. This probably means we will go down this route for PV guests too when we merge some of the compat shim mechanisms for PV and HVM guests.

-- Keir