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

Re: [Xen-devel] [PATCH 5/8] viridian: use viridian_map/unmap_guest_page() for reference tsc page



On Thu, Dec 20, 2018 at 04:33:42PM +0000, Paul Durrant wrote:
> Whilst the reference tsc page does not currently need to be kept mapped
> after it is initially set up (or updated after migrate), the code can
> be simplified by using the common guest page map/unmap and dump functions.
> New functionality added by a subsequent patch will also require the page to
> kept mapped for the lifetime of the domain.
> 
> NOTE: Because the reference tsc page is per-domain rather than per-vcpu
>       this patch also changes viridian_map_guest_page() to take a domain
>       pointer rather than a vcpu pointer.
> 
> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> ---
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> Cc: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
> ---
>  xen/arch/x86/hvm/viridian/private.h  |  2 +-
>  xen/arch/x86/hvm/viridian/synic.c    |  8 +++-
>  xen/arch/x86/hvm/viridian/time.c     | 57 ++++++++++------------------
>  xen/arch/x86/hvm/viridian/viridian.c |  3 +-
>  xen/include/asm-x86/hvm/viridian.h   |  2 +-
>  5 files changed, 28 insertions(+), 44 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/viridian/private.h 
> b/xen/arch/x86/hvm/viridian/private.h
> index 1864bab3d5..0bf34eefe0 100644
> --- a/xen/arch/x86/hvm/viridian/private.h
> +++ b/xen/arch/x86/hvm/viridian/private.h
> @@ -111,7 +111,7 @@ void viridian_time_load_domain_ctxt(
>  
>  void viridian_dump_guest_page(const struct vcpu *v, const char *name,
>                                const struct viridian_page *vp);
> -void viridian_map_guest_page(struct vcpu *v, struct viridian_page *vp);
> +void viridian_map_guest_page(struct domain *d, struct viridian_page *vp);

Since you modify this anyway, can you constify struct domain?

With that:

Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

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