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

Re: [Xen-devel] [PATCH v4 12/31] x86/mm: split out readonly MMIO emulation code



On Thu, Aug 24, 2017 at 04:25:23PM +0100, Andrew Cooper wrote:
> On 24/08/17 16:16, Jan Beulich wrote:
> >>>> On 17.08.17 at 16:44, <wei.liu2@xxxxxxxxxx> wrote:
> >> Move the code to pv/emul-mmio-op.c. Fix coding style issues while
> >> moving.
> >>
> >> Note that mmio_ro_emulated_write is needed by both PV and HVM, so it
> >> is left in x86/mm.c.
> >>
> >> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> >> ---
> >>  xen/arch/x86/mm.c              | 129 --------------------------------
> >>  xen/arch/x86/pv/Makefile       |   1 +
> >>  xen/arch/x86/pv/emul-mmio-op.c | 166 
> >> +++++++++++++++++++++++++++++++++++++++++
> > Again I think just mmio.c would do. Other comments on earlier
> > patches apply here as well.
> 
> I think it would be wise to merge the ptwr and mmio handling.  At the
> moment, we invoke a full lookup pte/decode/try-to-emulate cycle twice in
> the #PF handler for PV guests before handing the fault back to the guest.
> 
> The correct ops and context can be determined by inspecting the l1e
> under %cr2 before calling into any emulation code.

I will see what I can do. The predicates in traps.c look terribly
complicated.

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

 


Rackspace

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