xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/mm: don't call HVM-only function for PV guests
@ 2015-10-27 15:23 Jan Beulich
  2015-10-27 15:27 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2015-10-27 15:23 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Andrew Cooper, Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

Somehow I managed to drop the HVM dependency from v2 to v3 of what
became commit 5c23c760a8 ("x86/HVM: correct page dirty marking in
hvm_map_guest_frame_rw()"), obviously breaking migration of PV guests.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -425,7 +425,8 @@ static int paging_log_dirty_op(struct do
          * Mark dirty all currently write-mapped pages on e.g. the
          * final iteration of a save operation.
          */
-        if ( sc->mode & XEN_DOMCTL_SHADOW_LOGDIRTY_FINAL )
+        if ( has_hvm_container_domain(d) &&
+             (sc->mode & XEN_DOMCTL_SHADOW_LOGDIRTY_FINAL) )
             hvm_mapped_guest_frames_mark_dirty(d);
 
         domain_pause(d);




[-- Attachment #2: x86-HVM-map-gf-dirtying-no-PV.patch --]
[-- Type: text/plain, Size: 825 bytes --]

x86/mm: don't call HVM-only function for PV guests

Somehow I managed to drop the HVM dependency from v2 to v3 of what
became commit 5c23c760a8 ("x86/HVM: correct page dirty marking in
hvm_map_guest_frame_rw()"), obviously breaking migration of PV guests.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -425,7 +425,8 @@ static int paging_log_dirty_op(struct do
          * Mark dirty all currently write-mapped pages on e.g. the
          * final iteration of a save operation.
          */
-        if ( sc->mode & XEN_DOMCTL_SHADOW_LOGDIRTY_FINAL )
+        if ( has_hvm_container_domain(d) &&
+             (sc->mode & XEN_DOMCTL_SHADOW_LOGDIRTY_FINAL) )
             hvm_mapped_guest_frames_mark_dirty(d);
 
         domain_pause(d);

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/mm: don't call HVM-only function for PV guests
  2015-10-27 15:23 [PATCH] x86/mm: don't call HVM-only function for PV guests Jan Beulich
@ 2015-10-27 15:27 ` Andrew Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2015-10-27 15:27 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: George Dunlap, Keir Fraser

On 27/10/15 15:23, Jan Beulich wrote:
> Somehow I managed to drop the HVM dependency from v2 to v3 of what
> became commit 5c23c760a8 ("x86/HVM: correct page dirty marking in
> hvm_map_guest_frame_rw()"), obviously breaking migration of PV guests.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Oops yes.  Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/mm/paging.c
> +++ b/xen/arch/x86/mm/paging.c
> @@ -425,7 +425,8 @@ static int paging_log_dirty_op(struct do
>           * Mark dirty all currently write-mapped pages on e.g. the
>           * final iteration of a save operation.
>           */
> -        if ( sc->mode & XEN_DOMCTL_SHADOW_LOGDIRTY_FINAL )
> +        if ( has_hvm_container_domain(d) &&
> +             (sc->mode & XEN_DOMCTL_SHADOW_LOGDIRTY_FINAL) )
>              hvm_mapped_guest_frames_mark_dirty(d);
>  
>          domain_pause(d);
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-27 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 15:23 [PATCH] x86/mm: don't call HVM-only function for PV guests Jan Beulich
2015-10-27 15:27 ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).