Skip to content

xen/arm: allocate vcpu mpu_regions in arch_vcpu_create

In previous code, the mpu_regions of arch_vcpu is created in first context_switch. This doesn't make sense. And it will also hit the ASSERT_ALLOC_CONTEXT in alloc_xenheap_pages (in no irq state, but irq has been disabled). As mpu_regions is an essential variable of arch vcpu and context_switch is a hot path, we have to allocate them in vcpu creation. This will also remove the hit of ASSERT_ALLOC_CONTEXT. Signed-off-by: default avatarWei Chen wei.chen@arm.com

Edited by Henry Wang

Merge request reports