Input-output virtualization technique
Methods, systems, apparatuses and program products are disclosed for managing device virtualization in hypervisor and hypervisor-related environment which include both pass-thru I/O and emulated I/O.
1 . A method of executing a program comprising:
setting up a SPT (shadow page table) structure in response to trapping an action of a guest program;
catching a first write of a first MMIO (memory mapped input-output) guest PFN (Page Frame Number), the first write being to a GPT (guest page table) structure of the guest program;
normalizing the SPT structure to reflect the first MMIO guest PFN; and
reissuing a first input-output operation that is to an MMIO address in a page referenced by the first MMIO guest PFN.
2 . The method of claim 1 wherein the step of:
setting up the SPT structure is performed by a hypervisor program.
3 . The method of claim 1 further comprising:
catching a second write of a second memory MMIO (memory mapped input-output) guest PFN (Page Frame Number), the second write being to the GPT structure and
emulating a second input-output operation that is to an MMIO address in a page referenced by the second MMIO guest PFN.
4 . The method of claim 1 wherein:
the first write is of a MMIO (memory mapped input-output) guest PFN (Page Frame Number) having an equal value to a corresponding value written to a PCI (peripheral control interface) BAR (Base Address Register).
5 . The method of claim 4 wherein:
the guest program is a multi-tasking operating system program.
6 . The method of claim 3 wherein:
the guest program is an operating system running in an unprivileged domain and
the emulating step is performed in a service selected from a list consisting of a hypervisor program and the hypervisor program acting together with a control domain.
7 . The method of claim 1 wherein:
a GPT selected from the GPT structure is marked for read-only properties and
the step of catching the first write is or, is in response to, catching an attempt to write to a page of memory that is marked for read-only access, the read-only access being by the guest program.
8 . The method of claim 1 further comprising the step of:
setting up multiple SPTs and at least one SPTI (shadow page table information block) for each of a plurality of GPTs created by the guest program.
9 . 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 for input-output virtualization by steps comprising the acts of:
setting up a SPT (shadow page table) structure in response to trapping an action of a guest program;
catching a first write of a first MMIO (memory mapped input-output) guest PFN (Page Frame Number), the first write being to a GPT (guest page table) structure of the guest program;
normalizing the SPT structure to reflect the first MMIO guest PFN; and
reissuing a first input-output operation that is to an MMIO address in a page referenced by the first MMIO guest PFN.
10 . The computer program product of claim 9 wherein the acts further comprise:
catching a second write of a second memory MMIO (memory mapped input-output) guest PFN (Page Frame Number), the second write being to the GPT structure and
emulating a second input-output operation that is to an MMIO address in a page referenced by the second MMIO guest PFN.
11 . The computer program product of claim 9 wherein:
setting up the SPT structure is performed by a hypervisor program and the guest program is an operating system running in an unprivileged domain.
12 . A method comprising:
an act of modulating a signal onto an electromagnetic carrier wave impressed into a tangible medium, or of demodulating the signal from the electromagnetic carrier wave, the signal having instructions encoded therein, the instructions when executed by at least one processor causing said at least one processor to
operate for input-output virtualization by steps comprising the acts of:
setting up a SPT (shadow page table) structure in response to trapping an action of a guest program;
catching a first write of a first MMIO (memory mapped input-output) guest PFN (Page Frame Number), the first write being to a GPT (guest page table) structure of the guest program;
normalizing the SPT structure to reflect the first MMIO guest PFN; and
reissuing a first input-output operation that is to an MMIO address in a page referenced by the first MMIO guest PFN.
13 . The method of claim 12 wherein the acts further comprise:
catching a second write of a second memory MMIO (memory mapped input-output) guest PFN (Page Frame Number), the second write being to the GPT structure and
emulating a second input-output operation that is to an MMIO address in a page referenced by the second MMIO guest PFN.
14 . The method of claim 12 wherein:
setting up the SPT structure is performed by a hypervisor program and the guest program is an operating system running in an unprivileged domain.
15 . 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 for input-output virtualization by steps comprising the acts of: setting up a SPT (shadow page table) structure in response to trapping an action of a guest program;
catching a first write of a first MMIO (memory mapped input-output) guest PFN (Page Frame Number), the first write being to a GPT (guest page table) structure of the guest program;
normalizing the SPT structure to reflect the first MMIO guest PFN; and
reissuing a first input-output operation that is to an MMIO address in a page referenced by the first MMIO guest PFN.
16 . The electronic device of claim 15 wherein the instructions when
executed by the controller further cause said controller to
catching a second write of a second memory MMIO (memory mapped input-output) guest PFN (Page Frame Number), the second write being to the GPT structure and
emulating a second input-output operation that is to an MMIO address in a page referenced by the second MMIO guest PFN.
17 . The electronic device of claim 15 wherein:
setting up the SPT structure is performed by a hypervisor program and the guest program is an operating system running in an unprivileged domain.