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

Re: [Xen-devel] [PATCH RFC v1 58/74] xen/pvshim: add migration support



On Tue, Jan 09, 2018 at 02:38:21AM -0700, Jan Beulich wrote:
> >>> On 04.01.18 at 14:06, <wei.liu2@xxxxxxxxxx> wrote:
> > +        struct domain *d = current->domain;
> > +        struct vcpu *v;
> > +        unsigned int i;
> > +        uint64_t old_store_pfn, old_console_pfn = 0, store_pfn, 
> > console_pfn;
> > +        uint64_t store_evtchn, console_evtchn;
> > +
> > +        BUG_ON(current->vcpu_id != 0);
> > +
> > +        BUG_ON(xen_hypercall_hvm_get_param(HVM_PARAM_STORE_PFN,
> > +                                           &old_store_pfn));
> > +        if ( !pv_console )
> > +            BUG_ON(xen_hypercall_hvm_get_param(HVM_PARAM_CONSOLE_PFN,
> > +                                               &old_console_pfn));
> > +
> > +        /* Pause the other vcpus before starting the migration. */
> > +        for_each_vcpu(d, v)
> > +            if ( v != current )
> > +                vcpu_pause_by_systemcontroller(v);
> > +
> > +        rc = xen_hypercall_shutdown(SHUTDOWN_suspend);
> > +        if ( rc )
> > +        {
> > +            for_each_vcpu(d, v)
> > +                if ( v != current )
> > +                    vcpu_unpause_by_systemcontroller(v);
> > +
> > +            return rc;
> > +        }
> > +
> > +        /* Resume the shim itself first. */
> > +        hypervisor_resume();
> > +
> > +        /*
> > +         * ATM there's nothing Xen can do if the console/store pfn changes,
> > +         * because Xen won't have a page_info struct for it.
> > +         */
> > +        BUG_ON(xen_hypercall_hvm_get_param(HVM_PARAM_STORE_PFN,
> > +                                           &store_pfn));
> > +        BUG_ON(old_store_pfn != store_pfn);
> > +        if ( !pv_console )
> > +        {
> > +            BUG_ON(xen_hypercall_hvm_get_param(HVM_PARAM_CONSOLE_PFN,
> > +                                               &console_pfn));
> > +            BUG_ON(old_console_pfn != console_pfn);
> > +        }
> > +
> > +        /* Update domain id. */
> > +        d->domain_id = get_dom0_domid();
> > +
> > +        /* Clean the iomem range. */
> > +        BUG_ON(iomem_deny_access(d, 0, ~0UL));
> 
> Does this rangeset change across migration?

Likely, the allowed iomem ranges for the DomU change depending on what
hypervisor_alloc_unused_page returns. Those are mainly used to map
grant table frames.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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