public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Muli Ben-Yehuda <muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] simplify pdpte check
Date: Thu, 01 Feb 2007 16:07:01 +0200	[thread overview]
Message-ID: <45C1F405.5070400@qumranet.com> (raw)
In-Reply-To: <20070201140138.GM2327-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org>

Muli Ben-Yehuda wrote:
> Small cleanup: we check (pdpte & 1) && (pdpte & constant). Instead
> just check (pdpte & (constant | 1)).
>
> Signed-off-by: Muli Ben-Yehuda <muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org>
>
> Index: kernel/kvm_main.c
> ===================================================================
> --- kernel/kvm_main.c	(revision 4379)
> +++ kernel/kvm_main.c	(working copy)
> @@ -336,7 +336,7 @@
>  	ret = 1;
>  	for (i = 0; i < 4; ++i) {
>  		pdpte = pdpt[offset + i];
> -		if ((pdpte & 1) && (pdpte & 0xfffffff0000001e6ull)) {
> +		if (pdpte & 0xfffffff0000001e7ull) {
>  			ret = 0;
>  			goto out;
>  		}
>
>   

The code is not equivalent.  For example, pdpte == 2 passes the check 
before the patch and fails it after.



-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

  parent reply	other threads:[~2007-02-01 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 14:01 [PATCH] simplify pdpte check Muli Ben-Yehuda
     [not found] ` <20070201140138.GM2327-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org>
2007-02-01 14:07   ` Avi Kivity [this message]
     [not found]     ` <45C1F405.5070400-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-01 14:46       ` Muli Ben-Yehuda
     [not found]         ` <20070201144606.GH15992-WD1JZD8MxeCTrf4lBMg6DdBPR1lH4CV8@public.gmane.org>
2007-02-01 14:52           ` Avi Kivity
     [not found]             ` <45C1FEA2.4050200-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-01 14:57               ` Muli Ben-Yehuda
2007-02-01 14:52           ` Dor Laor
     [not found]             ` <64F9B87B6B770947A9F8391472E032160A3F2213-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-02-01 14:54               ` Avi Kivity
     [not found]                 ` <45C1FF23.1020201-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-02-01 14:56                   ` Avi Kivity
2007-02-01 14:57               ` Muli Ben-Yehuda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45C1F405.5070400@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox