[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 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.

Simplifying this logic before moving it would be the better option.

~Andrew

_______________________________________________
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®.