[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/8] x86/hyperv: setup hypercall page
On Mon, Dec 30, 2019 at 12:55:22PM +0000, Andrew Cooper wrote: > On 29/12/2019 18:33, Wei Liu wrote: > > @@ -71,6 +72,40 @@ const struct hypervisor_ops *__init hyperv_probe(void) > > return &ops; > > } > > > > +static void __init setup_hypercall_page(void) > > +{ > > + union hv_x64_msr_hypercall_contents hypercall_msr; > > + > > + /* Unfortunately there isn't a really good way to unwind Xen to > > + * not use Hyper-V hooks, so panic if anything goes wrong. > > + * > > + * In practice if page allocation fails this early on it is > > + * unlikely we can get a working system later. > > + */ > > + hv_hypercall_page = alloc_domheap_page(NULL, 0); > > + if ( !hv_hypercall_page ) > > + panic("Failed to allocate Hyper-V hypercall page\n"); > > + > > + hv_hypercall = __map_domain_page_global(hv_hypercall_page); > > + if ( !hv_hypercall ) > > + panic("Failed to map Hyper-V hypercall page\n"); > > I really hope this doesn't actually function correctly. This should > result in an NX mapping. > Ah, stupid me. I had actually looked at Xen's implementation and thought "wouldn't it be nice to save one page in the image". I clearly missed that __map_domain_page_global makes the page NX. Wei. > See feedback on the next patch for an alternative suggestion. > > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |