lkml.org 
[lkml]   [2021]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v4] hyperv: root partition faults writing to VP ASSIST MSR PAGE
Date
>  	hv_common_cpu_die(cpu);
>
> - if (hv_vp_assist_page && hv_vp_assist_page[cpu])
> - wrmsrl(HV_X64_MSR_VP_ASSIST_PAGE, 0);
> + if (hv_vp_assist_page && hv_vp_assist_page[cpu]) {
> + union hv_vp_assist_msr_contents msr = {0};
> + if (hv_root_partition) {
> + /*
> + * For Root partition the VP ASSIST page is mapped to
> + * hypervisor provided page, and thus, we unmap the
> + * page here and nullify it, so that in future we have
> + * correct page address mapped in hv_cpu_init.
> + */
> + memunmap(hv_vp_assist_page[cpu]);
> + hv_vp_assist_page[cpu] = NULL;
> + rdmsrl(HV_X64_MSR_VP_ASSIST_PAGE, msr.as_uint64);

If the vp assist page was previously enabled for root, it will continue to stay enabled
when you 'wrmsr' below. We need to explicitly set the enable bit to 0.

> + }
> + wrmsrl(HV_X64_MSR_VP_ASSIST_PAGE, msr.as_uint64);
> + }

\
 
 \ /
  Last update: 2021-07-31 02:13    [W:0.046 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site