View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Shared among guest VMs at a much higher granularity
Two level spool table
Virtual Machine 1 Spool Table Program A B C D Status Printed Completed Running Completed Location 1000 2000 3000 4000 Real loc 11000 12000 13000 14000 Size 400 200 200 500 Virtual Machine 2 Spool Table Size 400 800 Real loc 21000 22000 Location 1000 2000 Status Running Completed Program P Q VMM Spool Table VM 1 2 1 1 Status A Q B D Status Printed Printing Waiting Waiting Real loc 30000 31000 31800 30400 Size 400 800 200 500 10000 20000 30000
The HW (via microcode) performs the emulation of special instructions
E.g., In System/370, 13 instructions are assisted by HW
LOAD PSW (LPSW) , INSERT PSW KEY (IPK), INSERT STORAGE KEY (ISK), LOAD REAL ADDRESS (LRA), RESET REFERENCE BIT (RRB), SUPERVISOR CALL (SVC), SET STORAGE KEY (SSK), SET SYSTEM MASK (SSM), STORE CONTROL (STCTL), STORE AND AND SYSTEM MASK (STNSM), STORE THEN OR SYSTEM MASK (STOSM), SET PSW KEY FROM ADDRESS (SPKA)
LPSW traps VMM determines if the guest VM is in system mode or in user mode PSW is loaded with the corresponding value if the guest VM is in system mode Assisted by HW
The processor directly executes most of the functions of the virtual machine in hardware.
An extreme case of a VM assist.
Interpretive Execution Entry and Exit
Start Interpretive Execution (SIE) : The software give up control to the hardware IEF part and processor enters the interpretive execution mode.
Unsupported hardware instructions.
Exception during the execution of interpreted instruction.
Some special case…
Generalized Support for Virtual Machines VMM Software SIE Host interrupt handler Interpretive execution mode Entry into interpretive execution mode Exit for interception Exit for host interrupt Emulation
The state of a virtual machine is maintained in the VMCS data structure
Due to Instruction Execution Due to Event Delivery Other Exit Information Vectoring Event Information VM-Exit Information Basic Information VM Exit Information Controls for Event Injection MSR Controls Control Bitmap VM Entry Controls MSR Controls Control Bitmap VM Exit Controls etc. Bitmap Fields Processor-based Execution Controls Pin-based Execution Controls VM Execution Controls Control Area Register State Host State Interruptibility State Register State Guest State State Area