Skip to contentSkip to conversation

sh_install_xen_entries_in_l3()

DISCUSSION Jan Beulich 2 participants 3 messages Nov 9, 2006

lore
Share & tools
lore
#0 lore raw

Could someone explain to me the purpose of this function? I'm trying to understand whether this needs to be called in the context of 32-bit guests on 64-bit hv (which, for compatibility reasons, need to have a mirror of the M2P table available in what would be the Xen region on a 32-bit hv).

Thanks, Jan

#1 lore raw
Quoted 1 line · Jan Beulich

Could someone explain to me the purpose of this function?

That particular function is no longer with us, now that we don't track shadows of PAE l3 tables any more.

The purpose of the sh_install_xen_entries_in_l* functions is to add the required mappings of Xen address space into the shadow tables of non-external shadowed guests. For example, a PV guest shadowed for live-migration needs to have Xen's address space in its shadow tables so it can take hypercalls. They're analogous to the code in alloc_l2_table/create_pae_xen_mappings/alloc_l4_table in mm.c for normal PV pagetables.

The xen address space is _not_ a shadow of equivalent area of the guest's pagetables -- the guest is never allowed to change entries in it. It is installed at shadow creation time, and not demand-faulted like the rest of the shadow, to avoid the complexity of taking recursive shadow faults.

Quoted 5 lines

I'm trying to
understand whether this needs to be called in the context of 32-bit guests on 64-bit hv (which, for compatibility reasons, need to have a mirror of the M2P table available in what would be the Xen region on a 32-bit hv).

You will need to call something like it, certainly, to install the mapping of the M2P table, and any other parts of Xen's address space that you need. You may need to alter the functions to reflect the memory layout that you want for the 32bit guest.

Cheers,

Tim.

#2 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Tim Deegan <[email protected]> 09.11.06 16:41 >>>

Quoted 1 line · Jan Beulich

Could someone explain to me the purpose of this function?

That particular function is no longer with us, now that we don't track shadows of PAE l3 tables any more.

As I create the patches against 3.0.3, I still have the function, and hence still would need to know if it needs to be called.

Quoted 4 lines

You will need to call something like it, certainly, to install the mapping of the M2P table, and any other parts of Xen's address space that you need. You may need to alter the functions to reflect the memory layout that you want for the 32bit guest.

Yes, that is what I understood, and I added respective code to ..._l2h just a few minutes ago.

Thanks, Jan