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.
See feedback on the next patch for an alternative suggestion.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel