DMA compliance by remapping in virtualization
Methods, systems, apparatuses and program products are disclosed for managing DMA compliance by remapping in hypervisor and hypervisor-related environments.
1 . A method of executing programs comprising:
loading a privileged host program including a hypervisor into an executable memory at a hypervisor memory datum byte physical address at or above a predetermined address;
loading into the executable memory, under a control of the hypervisor, a guest operating system program; and
allocating substantially all bytes of,the executable memory having physical addresses below the predetermined address to the guest operating system program.
2 . The method of claim 1 further comprising the step of:
performing one or more DMA (Direct Memory Access) transfers directed by the guest operating system program.
3 . The method of claim 2 wherein:
the predetermined address is approximately 16 Mebibytes.
4 . The method of claim 2 further comprising the step of:
loading into the executable memory a privileged operating system program at a privileged operating system memory datum byte physical address higher than the hypervisor memory datum byte physical address.
5 . The method of claim 2 further comprising:
executing the guest operating system program so that a selected one of the DMA transfers takes place at a plurality of physical addresses in RAM (random access memory) equal to addresses associated by the guest operating system program with the DMA selected transfer.
6 . The method of claim 2 wherein:
the guest operating system program is operable to run in an unprivileged domain;
the privileged operating system program is operable to run in a privileged domain; and
the privileged operating system program is operable to emulate instructions executed by the guest operating system program.
7 . The method of claim 2 wherein:
the DMA transfers are to or from a peripheral device connected via a PCI (peripheral channel interface) bus; and
the guest operating system program performs instructions for PIO (programmed input-output) transfers to the peripheral device.
8 . A computer program product comprising:
at least one computer-readable medium having instructions encoded therein, the instructions when executed by at least one processor cause said at least one processor to
operate by steps comprising the acts of:
loading a privileged host program including a hypervisor into an executable memory at a hypervisor memory datum byte physical address at or above a predetermined address;
loading into the executable memory, under a control of the hypervisor, a guest operating system program; and
allocating substantially all bytes of the executable memory having physical addresses below the predetermined address to the guest operating system program.
9 . The computer program product of claim 8 wherein:
the predetermined address is 16 Mebibytes.
10 . The computer program product of claim 8 further comprising the act of:
loading into the executable memory a privileged operating system program at a privileged operating system memory datum byte physical address higher than the hypervisor memory datum byte physical address.
11 . An electronic device comprising:
at least one controller; and
at least one non-volatile memory having instructions encoded therein, the instructions when executed by the controller cause said controller to operate by steps comprising the acts of:
loading a privileged host program including a hypervisor into an executable memory at a hypervisor memory datum byte physical address at or above a predetermined address;
loading into the executable memory, under a control of the hypervisor, a guest operating system program;
allocating substantially all bytes of the executable memory having physical addresses below the predetermined address to the guest operating system program; and
performing one or more DMA (Direct Memory Access) transfers directed by the guest operating system program.
12 . The electronic device of claim 11 wherein:
the predetermined address is 16 Mebibytes.
13 . The electronic device of claim 11 wherein the instructions when executed by the controller further cause said controller to
load into the executable memory a privileged operating system program at a privileged operating system memory datum byte physical address higher than the hypervisor memory datum byte physical address.