On 05/21/2012 06:54 AM, Xudong Hao wrote:
> Enabling Access bit when doing memory swapping.
>
> @@ -1243,11 +1244,11 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned 
> long *rmapp,
>  
>       for (sptep = rmap_get_first(*rmapp, &iter); sptep;
>            sptep = rmap_get_next(&iter)) {
> -             BUG_ON(!(*sptep & PT_PRESENT_MASK));
> +             BUG_ON(!is_shadow_present_pte(*sptep));
>  
> -             if (*sptep & PT_ACCESSED_MASK) {
> +             if (*sptep & shadow_accessed_mask) {
>                       young = 1;
> -                     clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)sptep);
> +                     *sptep &= ~shadow_accessed_mask;
>               }
>       }

As Marcelo already noted, this converts an atomic operation into a
non-atomic one.


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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to