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

Re: [Xen-devel] [PATCH v4 3/3] x86/ioreq server: Add HVMOP to map guest ram with p2m_ioreq_server to an ioreq server.



>>> On 20.06.16 at 14:06, <yu.c.zhang@xxxxxxxxxxxxxxx> wrote:
> Suppose resolve_misconfig() is modified to change all p2m_ioreq_server 
> entries(which also
> have e.recalc flag turned on) back to p2m_ram_rw. And suppose we have 
> ioreq server 1, which
> emulates gfn A, and ioreq server 2 which emulates gfn B:
> 
> 1> At the beginning, ioreq server 1 is attached to p2m_ioreq_server, and 
> gfn A is write protected
> by setting it to p2m_ioreq_server;
> 
> 2> ioreq server 1 is detached from p2m_ioreq_server, left gfn A's p2m 
> type unchanged;
> 
> 3> After the detachment of ioreq server 1, 
> p2m_change_entry_type_global() is called, all ept
> entries are invalidated;
> 
> 4> Later, ioreq server 2 is attached to p2m_ioreq_server;
> 
> 5> Gfn B is set to p2m_ioreq_server, although its corresponding ept 
> entry was invalidated,
> ept_set_entry() will trigger resolve_misconfig(), which will set the p2m 
> type of gfn B back to
> p2m_ram_rw;
> 
> 6> ept_set_entry() will set gfn B's p2m type to p2m_ioreq_server next; 
> And now, we have two
> ept entries with p2m_ioreq_server type - gfn A's and gfn B's.
> 
> With no live migration, things could work fine - later accesses to gfn A 
> will ultimately change
> its type back to p2m_ram_rw.
> 
> However, if live migration is started(all pte entries invalidated 
> again), resolve_misconfig() would
> change both gfn A's and gfn B's p2m type back to p2m_ram_rw, which means 
> the emulation of
> gfn B would fail.

Why would it? Changes to p2m_ram_logdirty won't alter
p2m_ioreq_server entries, and hence changes from it back to
p2m_ram_rw won't either.

And then - didn't we mean to disable that part of XenGT during
migration, i.e. temporarily accept the higher performance
overhead without the p2m_ioreq_server entries? In which case
flipping everything back to p2m_ram_rw after (completed or
canceled) migration would be exactly what we want. The (new
or previous) ioreq server should attach only afterwards, and
can then freely re-establish any p2m_ioreq_server entries it
deems necessary.

Jan


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

 


Rackspace

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