viridian: use viridian_map/unmap_guest_page() for reference tsc page
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 19 Mar 2019 15:25:00 +0000 (16:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 08:29:19 +0000 (10:29 +0200)
commit386b3365221dce2c1a6a5ae16298321324b7bc53
tree06d754f3e97427e47ac603cd7466b9266eedd989
parent9203661ebb3cf35426a6777517dd8bf5417e238e
viridian: use viridian_map/unmap_guest_page() for reference tsc page

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. The domain pointer cannot be
      const, unlike the vcpu pointer.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/hvm/viridian/private.h
xen/arch/x86/hvm/viridian/synic.c
xen/arch/x86/hvm/viridian/time.c
xen/arch/x86/hvm/viridian/viridian.c
xen/include/asm-x86/hvm/viridian.h