David Chisnall013234971X, 9780132349710
The Definitive Guide to the Xen Hypervisor is a comprehensive handbook on the inner workings of XenSource’s powerful open source paravirtualization solution. From architecture to kernel internals, author David Chisnall exposes key code components and shows you how the technology works, providing the essential information you need to fully harness and exploit the Xen hypervisor to develop cost-effective, highperformance Linux and Windows virtual environments.
Granted exclusive access to the XenSource team, Chisnall lays down a solid framework with overviews of virtualization and the design philosophy behind the Xen hypervisor. Next, Chisnall takes you on an in-depth exploration of the hypervisor’s architecture, interfaces, device support, management tools, and internals—including key information for developers who want to optimize applications for virtual environments. He reveals the power and pitfalls of Xen in real-world examples and includes hands-on exercises, so you gain valuable experience as you learn.
This insightful resource gives you a detailed picture of how all the pieces of the Xen hypervisor fit and work together, setting you on the path to building and implementing a streamlined, cost-efficient virtual enterprise.
Table of contents :
The Definitive Guide to the Xen Hypervisor……Page 1
Contents……Page 6
List of Figures……Page 12
List of Tables……Page 14
Foreword……Page 16
Preface……Page 18
I: The Xen Virtual Machine……Page 22
1.1 What Is Virtualization?……Page 24
1.2 Why Virtualize?……Page 28
1.3 The First Virtual Machine……Page 29
1.5 Some Solutions……Page 30
1.6 The Xen Philosophy……Page 36
1.7 The Xen Architecture……Page 37
2.1 Booting as a Paravirtualized Guest……Page 48
2.2 Restricting Operations with Privilege Rings……Page 49
2.3 Replacing Privileged Instructions with Hypercalls……Page 51
2.4 Exploring the Xen Event Model……Page 54
2.5 Communicating with Shared Memory……Page 55
2.6 Split Device Driver Model……Page 56
2.7 The VM Lifecycle……Page 58
2.8 Exercise: The Simplest Xen Kernel……Page 59
3.1 Retrieving Boot Time Info……Page 68
3.2 The Shared Info Page……Page 72
3.3 Time Keeping in Xen……Page 74
3.4 Exercise: Implementing gettimeofday()……Page 75
4.1 Sharing Memory……Page 80
4.2 Device I/O Rings……Page 86
4.3 Granting and Revoking Permissions……Page 87
4.4 Exercise: Mapping a Granted Page……Page 90
4.5 Exercise: Sharing Memory between VMs……Page 92
5.1 Managing Memory with x86……Page 96
5.2 Pseudo-Physical Memory Model……Page 99
5.3 Segmenting on 32-bit x86……Page 101
5.4 Using Xen Memory Assists……Page 103
5.5 Controlling Memory Usage with the Balloon Driver……Page 105
5.6 Other Memory Operations……Page 107
5.7 Updating the Page Tables……Page 110
5.8 Exercise: Mapping the Shared Info Page……Page 116
II: Device I/O……Page 118
6 Understanding Device Drivers……Page 120
6.1 The Split Driver Model……Page 121
6.2 Moving Drivers out of Domain 0……Page 123
6.3 Understanding Shared Memory Ring Buffers……Page 124
6.4 Connecting Devices with XenBus……Page 130
6.5 Handling Notifications from Events……Page 132
6.7 Exercise: The Console Device……Page 133
7.1 Events and Interrupts……Page 140
7.2 Handling Traps……Page 141
7.3 Event Types……Page 144
7.4 Requesting Events……Page 145
7.5 Binding an Event Channel to a VCPU……Page 148
7.6 Operations on Bound Channels……Page 149
7.7 Getting a Channel’s Status……Page 150
7.8 Masking Events……Page 151
7.9 Events and Scheduling……Page 153
7.10 Exercise: A Full Console Driver……Page 154
8.1 The XenStore Interface……Page 162
8.2 Navigating the XenStore……Page 163
8.3 The XenStore Device……Page 166
8.4 Reading and Writing a Key……Page 168
8.5 Other Operations……Page 179
9.1 The Virtual Block Device Driver……Page 182
9.2 Using Xen Networking……Page 190
10.1 CD Support……Page 198
10.2 Virtual Frame Buffer……Page 199
10.3 The TPM Driver……Page 204
10.4 Native Hardware……Page 205
10.5 Adding a New Device Type……Page 208
III: Xen Internals……Page 216
11 The Xen API……Page 218
11.1 XML-RPC……Page 219
11.2 Exploring the Xen Interface Hierarchy……Page 221
11.3 The Xen API Classes……Page 222
11.4 The Function of Xend……Page 227
11.5 Xm Command Line……Page 229
11.6 Xen CIM Providers……Page 230
11.7 Exercise: Enumerating Running VMs……Page 231
11.8 Summary……Page 236
12 Virtual Machine Scheduling……Page 238
12.1 Overview of the Scheduler Interface……Page 239
12.2 Historical Schedulers……Page 240
12.3 Using the Scheduler API……Page 245
12.4 Exercise: Adding a New Scheduler……Page 250
12.5 Summary……Page 254
13.1 Running Unmodified Operating Systems……Page 256
13.2 Intel VT-x and AMD SVM……Page 258
13.3 HVM Device Support……Page 260
13.4 Hybrid Virtualization……Page 261
13.5 Emulated BIOS……Page 265
13.6 Device Models and Legacy I/O Emulation……Page 266
13.7 Paravirtualized I/O……Page 267
13.8 HVM Support in Xen……Page 269
14.1 Real to Virtual, and Back Again……Page 274
14.2 Emulation and Virtualization……Page 275
14.3 Porting Efforts……Page 276
14.4 The Desktop……Page 278
14.5 Power Management……Page 280
14.6 The Domain 0 Question……Page 282
14.7 Stub Domains……Page 284
14.8 New Devices……Page 285
14.9 Unusual Architectures……Page 286
14.10 The Big Picture……Page 288
IV: Appendix……Page 292
A.1 Domain Builder……Page 294
A.3 Setting Up the Virtual IDT……Page 295
A.4 Page Table Management……Page 296
A.6 Domain 0 Responsibilities……Page 297
A.7 Efficiency……Page 298
A.8 Summary……Page 299
D……Page 300
H……Page 301
M……Page 302
P……Page 303
S……Page 304
V……Page 305
X……Page 306
Z……Page 307
Reviews
There are no reviews yet.