All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with hvm guests
Date: Sat, 11 Apr 2015 11:27:50 +0200	[thread overview]
Message-ID: <5528E916.5050903@citrix.com> (raw)
In-Reply-To: <1428686959-2890-4-git-send-email-roger.pau@citrix.com>

El 10/04/15 a les 19.29, Roger Pau Monne ha escrit:
> When the caller of paging_log_dirty_op is a hvm guest Xen would choke when
> trying to copy the dirty bitmap to the guest because the paging lock is
> already held.
> 
> Fix this by independently mapping each page of the guest bitmap as needed
> without the paging lock held.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Tim Deegan <tim@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> Changes since v2:
>  - Add checks for p2m_is_ram and p2m_is_discard_write when mapping a guest
>    page.
>  - Remove error checking from memset/memcpy, they unconditionally return
>    dst.
> ---
>  xen/arch/x86/mm/paging.c | 103 +++++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 91 insertions(+), 12 deletions(-)
> 
> diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
> index b54d76a..cb5feb8 100644
> --- a/xen/arch/x86/mm/paging.c
> +++ b/xen/arch/x86/mm/paging.c
> @@ -397,6 +397,53 @@ int paging_mfn_is_dirty(struct domain *d, mfn_t gmfn)
>      return rv;
>  }
>  
> +static inline void *map_dirty_bitmap(XEN_GUEST_HANDLE_64(uint8) dirty_bitmap,
> +                                     unsigned long pages,
> +                                     struct page_info **page,
> +                                     unsigned long *mapped_page)
> +{
> +    p2m_type_t p2mt;
> +    uint32_t pfec;

This should be:

uint32_t pfec = PFEC_page_present | PFEC_write_access;

Will wait for other's comments before resending the series.

Roger.

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

  reply	other threads:[~2015-04-11  9:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 17:29 [PATCH v3 0/3] xen/pvh: enable migration on PVH Dom0 Roger Pau Monne
2015-04-10 17:29 ` [PATCH v3 1/3] xen/pvh: enable mmu_update hypercall Roger Pau Monne
2015-04-14 11:55   ` Jan Beulich
2015-04-14 12:03     ` Roger Pau Monné
2015-04-14 13:10       ` Andrew Cooper
2015-04-16  9:04         ` Tim Deegan
2015-04-10 17:29 ` [PATCH v3 2/3] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests Roger Pau Monne
2015-04-14 12:22   ` Jan Beulich
2015-05-06 15:12     ` Roger Pau Monné
2015-05-06 15:41       ` Jan Beulich
2015-04-10 17:29 ` [PATCH v3 3/3] xen: rework paging_log_dirty_op to work with " Roger Pau Monne
2015-04-11  9:27   ` Roger Pau Monné [this message]
2015-04-14 12:14   ` Jan Beulich
2015-04-16  9:11     ` Tim Deegan
2015-04-16  9:49       ` Jan Beulich
2015-05-06 11:55     ` Roger Pau Monné
2015-05-06 12:10       ` Jan Beulich
2015-05-06 12:32         ` Roger Pau Monné
2015-05-06 12:39           ` Jan Beulich

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=5528E916.5050903@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.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.