lkml.org 
[lkml]   [2021]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3] hyperv: root partition faults writing to VP ASSIST MSR PAGE
Date
> >
> > - if (*hvp) {
> > - u64 val;
> > + WARN_ON(!(*hvp));
> >
> > - val = vmalloc_to_pfn(*hvp);
> > - val = (val << HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT) |
> > - HV_X64_MSR_VP_ASSIST_PAGE_ENABLE;
> > + if (*hvp) {
> > + if (!hv_root_partition)
> > + msr.guest_physical_address = vmalloc_to_pfn(*hvp);
> >
> > - wrmsrl(HV_X64_MSR_VP_ASSIST_PAGE, val);
> > + msr.enable = 1;
> > + wrmsrl(HV_X64_MSR_VP_ASSIST_PAGE, msr.as_uint64);
>
> This version has a substantive difference compared with previous versions
> in that the "enable" bit is being set and written back to the MSR even when
> running in the root partition. Is that intentional?

Yes, the hypervisor won't allow the root to change the page address. So, to
enable/disable it, the page address needs to be preserved and just the enable
bit needs to be toggled.

- Sunil

\
 
 \ /
  Last update: 2021-07-27 18:52    [W:0.079 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site