> -----Original Message-----
> From: Wei Liu [mailto:[email protected]]
> Sent: 02 January 2019 15:55
> To: Paul Durrant <[email protected]>
> Cc: [email protected]; Jan Beulich <[email protected]>;
> Andrew Cooper <[email protected]>; Wei Liu <[email protected]>;
> Roger Pau Monne <[email protected]>
> Subject: Re: [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 <[email protected]>
> > ---
> > Cc: Jan Beulich <[email protected]>
> > Cc: Andrew Cooper <[email protected]>
> > Cc: Wei Liu <[email protected]>
> > Cc: "Roger Pau MonnĂ©" <[email protected]>
> > ---
> >  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?
> 

Yes, I guess that should be do-able now that the viridian_page is in a separate 
allocation unit.

> With that:
> 
> Reviewed-by: Wei Liu <[email protected]>

Thanks,

  Paul

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to