From: Daniel De Graaf Subject: Re: [PATCH v2] x86/domctl: Fix getpageframeinfo* handling Date: Wed, 20 May 2015 10:43:42 -0400 Message-ID: <555C9D9E.80901@tycho.nsa.gov> References: <1432118976-9756-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432118976-9756-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Xen-devel Cc: Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 05/20/2015 06:49 AM, Andrew Cooper wrote: > In tree, there is one single caller of XEN_DOMCTL_getpageframeinfo3 > (xc_get_pfn_type_batch()), and no callers of the older variants. > > getpageframeinfo3 and getpageframeinfo2 are compatible if the parameter > contents are considered to be unsigned long, and indeed, a compat guest > calling getpageframeinfo3 falls through into the getpageframeinfo2 handler. > > However, getpageframeinfo3 and getpageframeinfo2 have different algorithms for > calculating the eventual frame type, which means that a toolstack will get > different answers depending on whether it is compat or not. > > Rewrite getpageframeinfo3 such that the code block can handle both regular and > compat guests, and use the original getpageframeinfo3 algorithm for frame > time, which is more complete. > > Remove getpageframeinfo2 and getpageframeinfo1, as they are unused and > obsolete. > > Signed-off-by: Andrew Cooper Acked-by: Daniel De Graaf