Skip to contentSkip to conversation

Question about monitor_table

DISCUSSION Travis Johnson 2 participants 2 messages Feb 14, 2006

lore
Share & tools
lore
#0 lore raw

Note: If I don't specify then I'm referring to x86_32 (no PAE). Also I'm reading code from the 3.0 release but the concepts are probably the same.

Could someone help me understand the need for the monitor page table. I
figure that arch_vcpu->guest_table points to a guests L2 page table (PD on x86) and arch_vcpu->shadow_table points to the guest_table's shadow table (if shadowing is turned on) but I don't quite get the purpose of the monitor_table. On x86_32 it seems like it just gets set to the value of the guest table on initialization and I lose track of it after that. I understand Xen needs to trap page table updates but I figured that would be a privileged operation and Xen could trap those accesses through hardware faults or by paravirtualizing through hypercalls (do_mmu_update).

That's a large amount of figuring so if someone could shed some light on the purpose and use of the monitor table I would appreciate it.

Xen is awesome.

-Travis

#1 lore raw
Quoted 4 lines · Travis Johnson

Could someone help me understand the need for the monitor page table. I
figure that arch_vcpu->guest_table points to a guests L2 page table (PD on x86) and arch_vcpu->shadow_table points to the guest_table's shadow table (if shadowing is turned on) but I don't quite get the purpose of the monitor_table. On x86_32 it seems like it just gets set to the value of the guest table on initialization and I lose track of it after that. I understand Xen needs to trap page table updates but I figured that would be a privileged operation and Xen could trap those accesses through hardware faults or by paravirtualizing through hypercalls (do_mmu_update).

That's a large amount of figuring so if someone could shed some light on the purpose and use of the monitor table I would appreciate it.

When running a fully-virtualised (HVM) guest, monitor_table is the pagetable that is used while Xen runs.

-- Keir