Messages in this thread | | | From | Sunil Muthuswamy <> | Subject | RE: [PATCH v4] hyperv: root partition faults writing to VP ASSIST MSR PAGE | Date | Sat, 31 Jul 2021 00:12:45 +0000 |
| |
> 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); > + }
| |