The front end then does all of the connection steps
described earlier, enters the XenbusStateInitialised state, and waits. Now the back
end needs to perform its own part of the connection.
This is symmetrical to the front end??™s operations. The back end must map the
o?¬?ered grant reference and then bind the pro?¬?ered event channel. Mapping the
grant reference requires some space to be allocated in the guest??™s virtual address
space to hold it; performing the grant table mapping operation updates the page
table entry for the speci?¬?ed page to point to the shared page, but space must be
9.1. The Virtual Block Device Driver 165
allocated in the kernel??™s virtual address space to prevent it from being mapped
over a real page.
Typically,1 a guest??™s memory layout has the kernel text near the bottom, followed
by the remainder of the memory that can be used by the guest. Xen is
mapped in at the top, with some shared data (speci?¬?cally the MFN to PFN mapping
table) read only and the rest no-access. This is optimization, making context
switches into the hypervisor more e?¬?cient.
Pages:
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353