The prototype
for this hypercall is shown here:
HYPERVISOR mmu update (mmu update t ??— req , i n t count , i n t ??—
s u c c e s s count ) ;
As usual, the hypercall takes an array of structures, and a count indicating the
number of these structures. The third argument is used to return the number of
operations that succeeded. If success count is less than count, at least one of the
operations failed. The hypercall does not indicate directly which updates failed.
It is up to the caller to walk the page tables to discover this.
The mmu update t structure is a simple pair, as shown in Listing 5.6. The ptr
?¬?eld is used to contain the address of the page table entry to be updated, and the
val ?¬?eld is used to specify the new value. Because page table entries are 32 bits6
(and are page aligned), the least signi?¬?cant two bits of the ptr value is always zero.
The hypercall interface speci?¬?es that these two bits are ignored when calculating
the address. Instead, they are used to encode the type of the update.
Listing 5.6: MMU update control structure [from: xen/include/public/xen.
Pages:
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213