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

Re: [Xen-devel] [PATCH 0/2 for-4.12] Introduce runstate area registration with phys address



On Thu, Mar 07, 2019 at 03:17:54PM +0000, Julien Grall wrote:
> Hi Andrii,
> 
> On 07/03/2019 14:34, Andrii Anisov wrote:
> > On 07.03.19 16:02, Julien Grall wrote:
> > > >   - IMHO, this implementation is simpler and cleaner than what I
> > > > have for runstate mapping on access.
> > > 
> > > Did you implement it using access_guest_memory_by_ipa?
> > Not exactly, access_guest_memory_by_ipa() has no implementation for x86.
> > But it is made around that code.
> 
> For the HVM, the equivalent function is hvm_copy_to_guest_phys. I don't know
> what would be the interface for PV. Roger, any idea?

For PV I think you will have to use get_page_from_gfn, check the
permissions, map it, write and unmap it. The same flow would also work
for HVM, so I'm not sure if there's much point in using
hvm_copy_to_guest_phys. Or you can implement a generic
copy_to_guest_phys helper that works for both PV and HVM.

Note that for translated guests you will have to walk the HAP page
tables for each vCPU for each context switch, which I think will be
expensive in terms of performance (I might be wrong however, since I
have no proof of this).

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