viridian: extend init/deinit hooks into synic and time modules
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:26:14 +0000 (10:26 +0200)
commit80aaa19e03070e318d0e7879982ad655a44e21a0
tree5d93aa6c1cbc82a78f8f2600ab3b80b77c5ecedd
parenta204e6f8e744f67b43b99c324be378683fe66a61
viridian: extend init/deinit hooks into synic and time modules

This patch simply adds domain and vcpu init/deinit hooks into the synic
and time modules and wires them into viridian_[domain|vcpu]_[init|deinit]().
Only one of the hooks is currently needed (to unmap the 'VP Assist' page)
but subsequent patches will make use of the others.

NOTE: To perform the unmap of the VP Assist page,
      viridian_unmap_guest_page() is now directly called in the new
      viridian_synic_vcpu_deinit() function (which is safe even if
      is_viridian_vcpu() evaluates to false). This replaces the slightly
      hacky mechanism of faking a zero write to the
      HV_X64_MSR_VP_ASSIST_PAGE MSR in viridian_cpu_deinit().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.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