[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 2/4] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests



>>> On 14.05.15 at 17:06, <roger.pau@xxxxxxxxxx> wrote:
> @@ -3584,12 +3591,8 @@ int shadow_track_dirty_vram(struct domain *d,
>          rc = -ENODATA;
>      }
>      else if (dirty_vram->last_dirty == -1)
> -    {
>          /* still completely clean, just copy our empty bitmap */
> -        rc = -EFAULT;
> -        if ( copy_to_guest(dirty_bitmap, dirty_vram->dirty_bitmap, 
> dirty_size) == 0 )
> -            rc = 0;
> -    }
> +        memcpy(dirty_bitmap, dirty_vram->dirty_bitmap, dirty_size);

Btw, having looked at this again in the context of the coverity issue
it causes - wouldn't this (according to the retained comment) be a
memset()? And if so, in turn a loop over clear_page()?

Which gets me to a second thing: With the large amounts of data
being pushed through copy_to_guest() here and in its HAP
counterpart, wouldn't it make sense to have a specialized function
avoiding cache thrashing along the lines of clear_page() and
copy_page()?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.