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

[Xen-changelog] [xen master] xen/arm: domain_build: Don't switch to the guest P2M when copying data



commit d0122fd7a406d5b9badaa2cb7c0479c3928db74e
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Mon Jan 28 11:50:23 2019 +0000
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Mon Jan 28 16:53:23 2019 -0800

    xen/arm: domain_build: Don't switch to the guest P2M when copying data
    
    Until recently, kernel/initrd/dtb were loaded using guest VA and
    therefore requiring to restore temporarily the P2M. This was reworked
    in a series of commits (up to 9292086 "xen/arm: domain_build: Use
    copy_to_guest_phys_flush_dcache in dtb_load") to use a guest PA.
    
    This will also help a follow-up patch which will require
    p2m_{save,restore}_state to work in pair to workaround an erratum.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index d2c63a89ca..31af989e63 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1923,7 +1923,6 @@ static void __init find_gnttab_region(struct domain *d,
 
 static int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
 {
-    struct vcpu *saved_current;
     int i, cpu;
     struct vcpu *v = d->vcpu[0];
     struct cpu_user_regs *regs = &v->arch.cpu_info->guest_cpu_user_regs;
@@ -1945,14 +1944,6 @@ static int __init construct_domain(struct domain *d, 
struct kernel_info *kinfo)
 #endif
 
     /*
-     * The following loads use the domain's p2m and require current to
-     * be a vcpu of the domain, temporarily switch
-     */
-    saved_current = current;
-    p2m_restore_state(v);
-    set_current(v);
-
-    /*
      * kernel_load will determine the placement of the kernel as well
      * as the initrd & fdt in RAM, so call it first.
      */
@@ -1961,10 +1952,6 @@ static int __init construct_domain(struct domain *d, 
struct kernel_info *kinfo)
     initrd_load(kinfo);
     dtb_load(kinfo);
 
-    /* Now that we are done restore the original p2m and current. */
-    set_current(saved_current);
-    p2m_restore_state(saved_current);
-
     memset(regs, 0, sizeof(*regs));
 
     regs->pc = (register_t)kinfo->entry;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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