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

Re: [Xen-devel] [PATCH v5 10/12] arm/mem_access: Add long-descriptor based gpt





On 05/07/17 15:37, Sergej Proskurin wrote:
Hi Julien,

Hi Sergej,


[...]

+        /* Access the guest's memory to read only one PTE. */
+        ret = vgic_access_guest_memory(d, paddr, &pte,
sizeof(lpae_t), false);

It really doesn't make sense to call a function vgic_* in guest page
table walk code. I wasn't expected that I needed to explicitly say
that vgic_access_* should be moved in ARM generic code and be renamed.

Do you think it would make sense to put the vgic_access_guest_memory
functionality into arch/arm/guestcopy.c? Alternatively I could introduce
a new file, such as guest-memory-access.c.

The same question applies to exporting the functionality in
include/asm-arm/guest_access.h or would you prefer a new header file
(e.g. guest-memory-access.h)?

guest_access.h is a good place. It deals with copy memory from/to the guest.


Concerning the function name, I believe guest_memory_access() would be
appropriate.

I would like to see the word "ipa" in the name to not confuse the raw_copy_* using va.

One suggestion would be access_guest_memory_by_ipa or something similar.

Cheers,

--
Julien Grall

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