From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH] x86/mm: Make asserts on types and counts of shared pages more accurate Date: Thu, 9 Feb 2012 23:32:46 +0000 Message-ID: <20120209233246.GA20578@ocelot.phlegethon.org> References: <20120209074242.GC71900@ocelot.phlegethon.org> <61936533ef44253d5e1b7036711d1324.squirrel@webmail.lagarcavilla.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <61936533ef44253d5e1b7036711d1324.squirrel@webmail.lagarcavilla.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andres Lagar-Cavilla Cc: andres@gridcentric.ca, xen-devel@lists.xensource.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org At 06:50 -0800 on 09 Feb (1328770222), Andres Lagar-Cavilla wrote: > > At 01:01 -0500 on 09 Feb (1328749297), Andres Lagar-Cavilla wrote: > >> xen/arch/x86/mm/mem_sharing.c | 4 +++- > >> xen/arch/x86/mm/p2m.c | 6 ++++-- > >> 2 files changed, 7 insertions(+), 3 deletions(-) > >> > >> > >> Signed-off-by: Andres Lagar-Cavilla > > > > NACK, I'm afraid, especially the second one. '<=' comparisons with a > > number that's made up of a count ORed with a type don't make sense. > > If you want to test both type and count, just test them separately. > > The type I'm ORing with is a mask with single bit set, not a multi-bit > type mask. And the type is defined as a higher order bit than the count > mask. It is right now, but if someone reshuffles the page_info struct again you don't want it to banjax your super-cunning code. Just test the thing you need to test. :) Tim.