From: "Jan Beulich" Subject: [BAND-AID PATCH] x86: partially undo (disable) d639e6a05a Date: Fri, 27 Mar 2015 12:19:05 +0000 Message-ID: <551558C9020000780006E831@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartCBFF86A9.1__=" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YbTE9-0004d1-Tl for xen-devel@lists.xenproject.org; Fri, 27 Mar 2015 12:19:06 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Andrew Cooper , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartCBFF86A9.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline As from osstest results it looks like commit ("x86: allow 64-bit PV guest kernels to suppress user mode exposure of M2P") is guilty in causing migration failures, comment out the meat of it without fully reverting, until it is understood what is causing the issue. Signed-off-by: Jan Beulich --- I'm intending to push this unless the bisector manages to disprove the suspicion about aforementioned commit by tonight. --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1396,25 +1396,31 @@ void init_guest_l4_table(l4_pgentry_t l4 l4e_from_pfn(domain_page_map_to_mfn(l4tab), __PAGE_HYPERVISOR); l4tab[l4_table_offset(PERDOMAIN_VIRT_START)] =3D l4e_from_page(d->arch.perdomain_l3_pg, __PAGE_HYPERVISOR); +#if 0 /* FIXME */ if ( zap_ro_mpt || is_pv_32on64_domain(d) || paging_mode_refcounts(d) = ) l4tab[l4_table_offset(RO_MPT_VIRT_START)] =3D l4e_empty(); +#endif } =20 void fill_ro_mpt(unsigned long mfn) { +#if 0 /* FIXME */ l4_pgentry_t *l4tab =3D map_domain_page(mfn); =20 l4tab[l4_table_offset(RO_MPT_VIRT_START)] =3D idle_pg_table[l4_table_offset(RO_MPT_VIRT_START)]; unmap_domain_page(l4tab); +#endif } =20 void zap_ro_mpt(unsigned long mfn) { +#if 0 /* FIXME */ l4_pgentry_t *l4tab =3D map_domain_page(mfn); =20 l4tab[l4_table_offset(RO_MPT_VIRT_START)] =3D l4e_empty(); unmap_domain_page(l4tab); +#endif } =20 static int alloc_l4_table(struct page_info *page) --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -1435,8 +1435,10 @@ void sh_install_xen_entries_in_l4(struct shadow_l4e_from_mfn(page_to_mfn(d->arch.perdomain_l3_pg), __PAGE_HYPERVISOR); =20 +#if 0 /* FIXME */ if ( !VM_ASSIST(d, m2p_strict) ) sl4e[shadow_l4_table_offset(RO_MPT_VIRT_START)] =3D shadow_l4e_emp= ty(); +#endif =20 /* Shadow linear mapping for 4-level shadows. N.B. for 3-level * shadows on 64-bit xen, this linear mapping is later replaced by = the @@ -3978,6 +3980,7 @@ sh_update_cr3(struct vcpu *v, int do_loc /* PAGING_LEVELS=3D=3D4 implies 64-bit, which means that * map_domain_page_global can't fail */ BUG_ON(v->arch.paging.shadow.guest_vtable =3D=3D NULL); +#if 0 /* FIXME */ if ( !shadow_mode_external(d) && !is_pv_32on64_domain(d) ) { shadow_l4e_t *sl4e =3D v->arch.paging.shadow.guest_vtable; @@ -3991,6 +3994,7 @@ sh_update_cr3(struct vcpu *v, int do_loc sl4e[shadow_l4_table_offset(RO_MPT_VIRT_START)] =3D shadow_l4e_empty(); } +#endif } else v->arch.paging.shadow.guest_vtable =3D __linear_l4_table; --=__PartCBFF86A9.1__= Content-Type: text/plain; name="x86-m2p-strict-partial-undo.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-m2p-strict-partial-undo.patch" x86: partially undo (disable) d639e6a05a=0A=0AAs from osstest results it = looks like commit ("x86: allow 64-bit PV=0Aguest kernels to suppress user = mode exposure of M2P") is guilty in=0Acausing migration failures, comment = out the meat of it without fully=0Areverting, until it is understood what = is causing the issue.=0A=0ASigned-off-by: Jan Beulich = =0A---=0AI'm intending to push this unless the bisector manages to = disprove the=0Asuspicion about aforementioned commit by tonight.=0A=0A--- = a/xen/arch/x86/mm.c=0A+++ b/xen/arch/x86/mm.c=0A@@ -1396,25 +1396,31 @@ = void init_guest_l4_table(l4_pgentry_t l4=0A l4e_from_pfn(domain_pag= e_map_to_mfn(l4tab), __PAGE_HYPERVISOR);=0A l4tab[l4_table_offset(PERDO= MAIN_VIRT_START)] =3D=0A l4e_from_page(d->arch.perdomain_l3_pg, = __PAGE_HYPERVISOR);=0A+#if 0 /* FIXME */=0A if ( zap_ro_mpt || = is_pv_32on64_domain(d) || paging_mode_refcounts(d) )=0A l4tab[l4_ta= ble_offset(RO_MPT_VIRT_START)] =3D l4e_empty();=0A+#endif=0A }=0A =0A void = fill_ro_mpt(unsigned long mfn)=0A {=0A+#if 0 /* FIXME */=0A l4_pgentry_= t *l4tab =3D map_domain_page(mfn);=0A =0A l4tab[l4_table_offset(RO_MPT_= VIRT_START)] =3D=0A idle_pg_table[l4_table_offset(RO_MPT_VIRT_START= )];=0A unmap_domain_page(l4tab);=0A+#endif=0A }=0A =0A void zap_ro_mpt(= unsigned long mfn)=0A {=0A+#if 0 /* FIXME */=0A l4_pgentry_t *l4tab = =3D map_domain_page(mfn);=0A =0A l4tab[l4_table_offset(RO_MPT_VIRT_STAR= T)] =3D l4e_empty();=0A unmap_domain_page(l4tab);=0A+#endif=0A }=0A = =0A static int alloc_l4_table(struct page_info *page)=0A--- a/xen/arch/x86/= mm/shadow/multi.c=0A+++ b/xen/arch/x86/mm/shadow/multi.c=0A@@ -1435,8 = +1435,10 @@ void sh_install_xen_entries_in_l4(struct=0A shadow_l4e_= from_mfn(page_to_mfn(d->arch.perdomain_l3_pg),=0A = __PAGE_HYPERVISOR);=0A =0A+#if 0 /* FIXME */=0A if ( !VM_ASSIST(d, = m2p_strict) )=0A sl4e[shadow_l4_table_offset(RO_MPT_VIRT_START)] = =3D shadow_l4e_empty();=0A+#endif=0A =0A /* Shadow linear mapping for = 4-level shadows. N.B. for 3-level=0A * shadows on 64-bit xen, this = linear mapping is later replaced by the=0A@@ -3978,6 +3980,7 @@ sh_update_c= r3(struct vcpu *v, int do_loc=0A /* PAGING_LEVELS=3D=3D4 implies = 64-bit, which means that=0A * map_domain_page_global can't fail = */=0A BUG_ON(v->arch.paging.shadow.guest_vtable =3D=3D NULL);=0A+#i= f 0 /* FIXME */=0A if ( !shadow_mode_external(d) && !is_pv_32on64_d= omain(d) )=0A {=0A shadow_l4e_t *sl4e =3D v->arch.pagin= g.shadow.guest_vtable;=0A@@ -3991,6 +3994,7 @@ sh_update_cr3(struct vcpu = *v, int do_loc=0A sl4e[shadow_l4_table_offset(RO_MPT_VIRT_S= TART)] =3D=0A shadow_l4e_empty();=0A }=0A+#endi= f=0A }=0A else=0A v->arch.paging.shadow.guest_vtable =3D = __linear_l4_table;=0A --=__PartCBFF86A9.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartCBFF86A9.1__=--