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

[xen master] x86/mem_sharing: add missing m2p entry when mapping shared_info page



commit 23eb39acf011ef9bbe02ed4619c55f208fbcd39b
Author:     Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
AuthorDate: Wed Oct 18 04:02:42 2023 -0400
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Oct 31 16:10:14 2023 +0000

    x86/mem_sharing: add missing m2p entry when mapping shared_info page
    
    When mapping in the shared_info page to a fork the m2p entry wasn't set
    resulting in the shared_info being reset even when the fork reset was called
    with only reset_state and not reset_memory. This results in an extra
    unnecessary TLB flush.
    
    Fixes: 1a0000ac775 ("mem_sharing: map shared_info page to same gfn during 
fork")
    Signed-off-by: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/mm/mem_sharing.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 94b6b782ef..142258f16a 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1847,6 +1847,8 @@ static int copy_special_pages(struct domain *cd, struct 
domain *d)
                                 p2m_ram_rw, p2m->default_access, -1);
             if ( rc )
                 return rc;
+
+            set_gpfn_from_mfn(mfn_x(new_mfn), gfn_x(old_gfn));
         }
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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