This looks like a double commit in l4ka-pistachio-38b2e96fc5a6/kernel/src/glue/v4-x86/space.cc:703:

   /* MYUTCB mapping
    * allocate a full page for all myutcb pointers.
    * access must be performed via gs:0, when setting up the gdt
    * each processor gets a full cache line to avoid bouncing
    * page is user-writable and global
    */
   EXTERN_KMEM_GROUP(kmem_misc);
   add_mapping((addr_t)UTCB_MAPPING,
       virt_to_phys(kmem.alloc(kmem_misc, X86_PAGE_SIZE)),
       pgent_t::size_4k, true, false, true);

   EXTERN_KMEM_GROUP(kmem_misc);
   utcb_page = kmem.alloc(kmem_misc, X86_PAGE_SIZE);
   ASSERT(utcb_page);
   add_mapping((addr_t)UTCB_MAPPING,  virt_to_phys(utcb_page),
       pgent_t::size_4k, true, false, true);

I guess, the first mapping should be removed. Am I right?

Best regards
Moritz Kroll

Reply via email to