RE: [PATCH v3] hyperv: root partition faults writing to VP ASSIST MSR PAGE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >
> > -	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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux