> > On Tue, Sep 15, 2020 at 12:32:29PM +0200, Vitaly Kuznetsov wrote: > > Wei Liu <wei....@kernel.org> writes: > > > > > When Linux is running as the root partition, the hypercall page will > > > have already been setup by Hyper-V. Copy the content over to the > > > allocated page. > > > > And we can't setup a new hypercall page by writing something different > > to HV_X64_MSR_HYPERCALL, right? > > > > My understanding is that we can't, but Sunil can maybe correct me.
That is correct. For root partition, the hypervisor has already allocated the hypercall page. The root is required to query the page, map it in its address space and wrmsr to enable it. It cannot change the location of the page. For guest, it can allocate and assign the hypercall page. This is covered a bit in the hypervisor TLFS (section 3.13 in TLFS v6), for the guest side. The root side is not covered there, yet.