From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86: fix (and simplify) MTRR overlap checking Date: Wed, 20 Jan 2016 19:22:11 +0000 Message-ID: <569FDE63.1030501@citrix.com> References: <569FB83302000078000C93DE@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLyKs-0002YQ-6W for xen-devel@lists.xenproject.org; Wed, 20 Jan 2016 19:22:30 +0000 In-Reply-To: <569FB83302000078000C93DE@prv-mh.provo.novell.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: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 20/01/16 15:39, Jan Beulich wrote: > Obtaining one individual range per variable range register (via > get_mtrr_range()) was bogus from the beginning, as these registers may > cover multiple disjoint ranges. Do away with that, in favor of simply > comparing masked addresses. > > Also, for is_var_mtrr_overlapped()'s result to be correct when called > from mtrr_wrmsr(), generic_set_mtrr() must update saved state first. > > As minor cleanup changes, constify is_var_mtrr_overlapped()'s parameter > and make mtrr_wrmsr() static. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Much nicer.