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

Re: [Xen-devel] [PATCH] x86/mm: Allow map_domain_page_global() to be used during boot



>>> On 07.09.17 at 18:50, <andrew.cooper3@xxxxxxxxxx> wrote:
> map_domain_page_global() uses vmap under the hood, which works fine even
> during very early boot.  Relax the local_irq_is_enabled() part of the
> assertion before Xen has finished booting.

vm_init() being called right after having reached SYS_STATE_boot
makes me question the "very early" in your description.

> --- a/xen/arch/x86/domain_page.c
> +++ b/xen/arch/x86/domain_page.c
> @@ -305,7 +305,8 @@ int mapcache_vcpu_init(struct vcpu *v)
>  
>  void *map_domain_page_global(mfn_t mfn)
>  {
> -    ASSERT(!in_irq() && local_irq_is_enabled());
> +    ASSERT(!in_irq() && (system_state < SYS_STATE_active ||
> +                         local_irq_is_enabled()));

Extending the assertion to also trigger on SYS_STATE_early_boot
would therefore seem desirable, too. Leaving
SYS_STATE_{suspend,resume} aside is hopefully going to be okay
for the moment.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.