All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>, Tim Deegan <tim@xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v7 2/4] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests
Date: Fri, 22 May 2015 08:59:26 +0100	[thread overview]
Message-ID: <555EFDFE020000780007D0FB@mail.emea.novell.com> (raw)
In-Reply-To: <1431615977-38284-3-git-send-email-roger.pau@citrix.com>

>>> On 14.05.15 at 17:06, <roger.pau@citrix.com> 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

  reply	other threads:[~2015-05-22  7:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 15:06 [PATCH v7 0/4] xen/pvh: enable migration on PVH Dom0 Roger Pau Monne
2015-05-14 15:06 ` [PATCH v7 1/4] xen: introduce a helper to allocate non-contiguous memory Roger Pau Monne
2015-05-14 15:06 ` [PATCH v7 2/4] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests Roger Pau Monne
2015-05-22  7:59   ` Jan Beulich [this message]
2015-05-14 15:06 ` [PATCH v7 3/4] xen/hap: make hap_track_dirty_vram use non-contiguous memory for temporary map Roger Pau Monne
2015-05-14 15:06 ` [PATCH v7 4/4] xen: rework paging_log_dirty_op to work with hvm guests Roger Pau Monne
2015-05-14 15:21 ` [PATCH v7 0/4] xen/pvh: enable migration on PVH Dom0 Tim Deegan

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=555EFDFE020000780007D0FB@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.