VIRTUAL MACHINE SYSTEM AND A METHOD FOR SHARING A GRAPHICS CARD AMONGST VIRTUAL MACHINES
First Claim
1. A virtual machine system, comprising a Service Operating System (SOS), one or more Guest Operating Systems (GOSs), a Virtual Machine Monitor (VMM) and a graphics card, wherein,the VMM is provided with a resource-converting module that converts data exchanged between a graphics card drive module of a GOS in the foreground and the graphics card based on a resource-converting table, and also intercepts accesses to the real graphics card by a GOS in the background and then responds to its operations on the graphics card;
- the VMM is further provided with a switching module, which alters a state of a VM based on a command to switch the VM, saves a graphics card state before the VM is switched to the background and restores the stored graphics card state to the graphics card when the VM is switched back to the foreground; and
the GOSs each comprise a graphics card drive module corresponding to the real graphics card for accessing the real graphics card.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention provides a virtual machine system and a method for sharing a graphics card amongst virtual machines. A VMM of the virtual machine system is provided with a resource-converting module, which converts data exchanged between a graphics card drive module of a GOS in the foreground and the graphics card based on a resource-converting table, and also intercepts accesses to the real graphics card by a GOS in the background and then responds to its operations on the graphics card. The VMM is further provided with a switching module, which alters a state of a VM based on a command for switching the VM, saves a graphics card state before the VM is switched to the background and restores the stored graphics card state to the graphics card when the VM is switched back to the foreground. Further, the GOSs each comprise a graphics card drive module corresponding to the real graphics card for accessing the real graphics card. The systems and the methods according to the present invention enable the GOSs to access the real graphics card, and also enable switching among a plurality of virtual machines.
-
Citations
27 Claims
-
1. A virtual machine system, comprising a Service Operating System (SOS), one or more Guest Operating Systems (GOSs), a Virtual Machine Monitor (VMM) and a graphics card, wherein,
the VMM is provided with a resource-converting module that converts data exchanged between a graphics card drive module of a GOS in the foreground and the graphics card based on a resource-converting table, and also intercepts accesses to the real graphics card by a GOS in the background and then responds to its operations on the graphics card; -
the VMM is further provided with a switching module, which alters a state of a VM based on a command to switch the VM, saves a graphics card state before the VM is switched to the background and restores the stored graphics card state to the graphics card when the VM is switched back to the foreground; and the GOSs each comprise a graphics card drive module corresponding to the real graphics card for accessing the real graphics card. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for sharing a graphics card amongst virtual machines, comprising:
-
converting data exchanged between a graphics card drive module of a GOS in the foreground and the graphics card based on a resource-converting table using a resource-converting module of a VMM; intercepting accesses to the real graphics card by a GOS in the background and then responding to its operations on the graphics card; and altering a state of a VM based on a command to switch the VM using a switching module of the VMM, saving a graphics card state before the VM is switched to the background and restoring the stored graphics card state to the graphics card when the VM is switched back to the foreground, wherein the GOSs each comprise a graphics card drive module corresponding to the real graphics card. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A virtual machine system, comprising:
-
a Virtual Machine Monitor (VMM) comprising a resource-converting module; a Service Operating System (SOS) comprising a display switching drive; and Guest Operating Systems (GOSs) each comprising a display switching drive and a real graphics card drive;
wherein,the real graphics card drives of the GOSs are configured to send graphics card accessing data of the GOSs to the resource-converting module of the VMM, the resource-converting module of the VMM is configured to store correspondences between resources allocated for a graphics card by the SOS and those allocated for the graphics card by the GOSs therein, and converts Input/Output (IO) addresses and Memory Mapped Input/Output (MMIO) addresses of the graphics card accessing data from the GOSs based on the correspondences and then send them to the graphics card, the display switching drive of the SOS is configured to send a message to switch to the foreground to the display switching drive of the GOS to be switched to the foreground by a communication module of the VMM on receipt of a display switching message, and the display switching drives of the GOSs are configured to enable the virtual graphics card drives and disable the real graphics card drives on receipt of a message including an instruction to switch to the background, and disable the virtual graphics card drives and enable the real graphics card drives on receipt of the message to switch to the foreground sent by the display switching drive of the SOS through the communication module of the VMM. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21)
-
-
22. A method for sharing a graphics card amongst virtual machines, comprising:
-
allocating the real graphics card to GOSs, also allocating virtual graphics cards to the GOSs, and loading corresponding real graphics card drives and virtual graphics card drives; on display switching, disabling the real graphics card drive of a GOS in the background and enabling the virtual graphics card drive of the GOS in the background, as well as disabling the virtual graphics card drive of a GOS in the foreground and enabling the real graphics card drive of the GOS in the foreground; the GOS in the background accessing the virtual graphics card by the virtual graphics card drive, and an SOS discarding graphics card accessing data of the GOS; the GOS in the foreground accessing the real graphics card by the real graphics card drive, comprising the sub-steps of; (a) sending graphics card accessing data of the GOS in the foreground to a VMM by the real graphics card drive; and (b) the VMM converting IO addresses and MMIO addresses of the graphics card accessing data based on correspondences between resources allocated for the graphics card by the SOS and resources allocated for the graphics card by the GOS in the foreground, and then sending them to the graphics card. - View Dependent Claims (23, 24, 25, 26, 27)
-
Specification