CN101211270A - Display card, virtual machine system using same and display processing method - Google Patents
Display card, virtual machine system using same and display processing method Download PDFInfo
- Publication number
- CN101211270A CN101211270A CNA2006101716194A CN200610171619A CN101211270A CN 101211270 A CN101211270 A CN 101211270A CN A2006101716194 A CNA2006101716194 A CN A2006101716194A CN 200610171619 A CN200610171619 A CN 200610171619A CN 101211270 A CN101211270 A CN 101211270A
- Authority
- CN
- China
- Prior art keywords
- space
- video card
- operating system
- frame buffer
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The invention discloses a display card, a virtual machine system which uses the display card and a display processing method. The display card comprises a graphic conversion table module, which is divided into a plurality of parts and used for preserving a graphic conversion table corresponding to one or a plurality of operating systems; a frame buffer module, which is divided into a plurality of parts and distributed to one or a plurality of operating systems; an MMIO/IO module, which is divided into a plurality of parts and composed of all registers of a display card logical interface corresponding to one or a plurality of operating systems; a dispatch module, which is used for dispatching display function hardware processing corresponding to the display card logical interface which corresponds to different operating systems; a graphics processing unit, which is used for operating the graphic conversion table, the frame buffer and the corresponding register that correspond to the dispatched display card logical interface; and a graphic display control module, which is used for sending the content in the frame buffer to a display for displaying. With the invention, all the operating systems in the virtual machine can access the real display card.
Description
Technical field
The present invention relates to virtual machine technique, particularly a kind of video card, the dummy machine system of using this video card and display processing method.
Background technology
At present, use to equipment in the Intel Virtualization Technology has several modes, a kind of is that this equipment is monopolized, a kind of is that this equipment is visited in the mode of sharing, but during the mode access means of sharing, be necessary for a plurality of systems a virtual equipment platform is provided, visit real equipment again by certain host computer system or service system then; In addition, can also equipment be shifted between different system, but equipment be not share this time.
For the such equipment of video card, present processing mode or monopolize for a system, other system does not show, a plurality of systems are shared, each system uses virtualized video card, usually the virtual video card that comes out is inconsistent with real physics video card, in order to realize convenient a lot of reductions that on function, have, as not supporting functions such as 2D or 3D, cause virtual machine can not use the whole hardware-accelerated characteristic of video card, and this moment, real video card can only be by host computer system or service system visit, and virtual system just can not utilize the complete characteristic of video card fully like this, and video card can not use as a kind of equipment of switching.
Summary of the invention
The object of the present invention is to provide a kind of video card, use the dummy machine system and the display processing method of this video card, make that the operating system in the dummy machine system can both have access to real video card.
To achieve these goals, the invention provides a kind of video card, comprising:
Can be divided into the graphics translation table module of a plurality of parts, be used for preserving and one or more operating system graph of a correspondence conversion tables;
Can be divided into the frame buffer module of a plurality of parts, distribute to one or more operating systems;
Can be divided into the MMIO/IO module of a plurality of parts, comprise whole registers that the video card logic interfacing corresponding with one or more operating systems will be used;
Scheduler module is used to dispatch the hardware handles of the pairing Presentation Function of video card logic interfacing of corresponding different operating system;
Graphics Processing Unit is used for according to scheduling result operation and the video card logic interfacing graph of a correspondence conversion table, frame buffer and the relevant register that are scheduled for;
The graphics display control module is used for content with frame buffer and sends to display and show.
Above-mentioned video card wherein, also comprises:
The virtual machine indicating module is used for obtaining an instruction from virtual machine monitor, and which operating system described instruction indicates obtained focus;
Described scheduler module specifically is used for determining the logic interfacing that is dispatched to according to described virtual machine indicating module and predetermined scheduling strategy.
Above-mentioned video card, wherein, the content of frame buffer that described graphics display control module is used for having obtained the operating system correspondence of focus sends to display and shows.
Above-mentioned video card wherein, also comprises:
The resources allocation logging modle by virtual machine monitor or operating system access, is used to preserve the distribution condition of video card resource.
Above-mentioned video card, wherein, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence.
Above-mentioned video card, wherein, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence, also be used for preserving the information in the still untapped MMIO/IO of video card space, graphics translation table space and frame buffer space, offer operating system and distribute voluntarily.
Above-mentioned video card, wherein, described resources allocation logging modle is specially:
The PCI/PCI-E configuration space, consistent and corresponding with the operating system number, be used to preserve the size and the resource address scope of video card MMIO, graphics translation table and the frame buffer of each operating system correspondence.
In order better to realize above-mentioned purpose, the present invention also provides a kind of dummy machine system, comprises a video card, and wherein, described video card comprises:
Can be divided into the graphics translation table module of a plurality of parts, be used for preserving and one or more operating system graph of a correspondence conversion tables;
Can be divided into the frame buffer module of a plurality of parts, distribute to one or more operating systems;
Can be divided into the MMIO/IO module of a plurality of parts, comprise whole registers that the video card logic interfacing corresponding with one or more operating systems will be used;
Scheduler module is used to dispatch the hardware handles of the pairing Presentation Function of video card logic interfacing of corresponding different operating system;
Graphics Processing Unit is used for according to scheduling result operation and the video card logic interfacing graph of a correspondence conversion table, frame buffer and the relevant register that are scheduled for;
The graphics display control module is used for content with frame buffer and sends to display and show;
Described dummy machine system also comprises:
Map addresses is set up module, is used to set up address realm that operating system is MMIO/IO space, graphics translation table space, frame buffer allocation of space and the mapping relations between the video card real resources;
The virtual machine communication module, be arranged at virtual machine monitor, be used for above-mentioned video card is distributed to MMIO/IO space, graphics translation table space, the frame buffer space notice relative operation system of operating system, and be used for of the operation of the video card driver module of capturing operation system to video card, send to video card after setting up the mapping relations reference address of setting up in the module according to map addresses.
Above-mentioned dummy machine system, wherein, described video card also comprises:
The virtual machine indicating module is used for obtaining an instruction from virtual machine monitor, and which operating system described instruction indicates obtained focus;
Described scheduler module specifically is used for determining the logic interfacing that is dispatched to according to described virtual machine indicating module and predetermined scheduling strategy.
Above-mentioned dummy machine system, wherein, the content of frame buffer that described graphics display control module is used for having obtained the operating system correspondence of focus sends to display and shows.
Above-mentioned dummy machine system, wherein, described video card also comprises:
The resources allocation logging modle by virtual machine monitor or operating system access, is used to preserve the distribution condition of video card resource;
Described virtual machine communication module is specifically obtained MMIO/IO space, graphics translation table space, the frame buffer space of distributing to operating system from the resources allocation logging modle.
Above-mentioned dummy machine system, wherein, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence.
Above-mentioned dummy machine system, wherein, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence, also be used for preserving the information in the still untapped MMIO/IO of video card space, graphics translation table space and frame buffer space, offer operating system and distribute voluntarily.
Above-mentioned dummy machine system, wherein, described resources allocation logging modle is specially:
The PCI/PCI-E configuration space, consistent and corresponding with the operating system number, be used to preserve the size and the resource address scope of video card MMIO, graphics translation table and the frame buffer of each operating system correspondence.
In order better to realize above-mentioned purpose, the present invention also provides a kind of display processing method, wherein, comprising:
Video card resources allocation notifying process, behind the virtual machine activation, when operating system is configured video card, the virtual machine communication module with in the video card to the size notice relative operation system in the MMIO/IO space of logic interfacing that should operating system, graphics translation table space, frame buffer space; MMIO/IO space in the described video card, graphics translation table space, frame buffer space are assigned to one or more operating systems;
The mapping resources establishment step, after operating system obtains MMIO/IO space, graphics translation table space, frame buffer space size, be that it distributes address realm, and set up address realm that operating system is MMIO/IO space, graphics translation table space, frame buffer allocation of space and the mapping relations between the video card real resources by virtual machine monitor;
Graphics Processing Unit computing step, Graphics Processing Unit is handled video card logic interfacing graph of a correspondence conversion table, frame buffer and the register that is scheduled for;
Show the output step, the content in the frame buffer is sent to display show.
Above-mentioned display processing method, wherein, the operating system of having obtained focus is by priority scheduling.
Above-mentioned display processing method wherein, in the described demonstration output step, sends to display and shows having obtained content in the frame buffer of operating system correspondence of focus.
Above-mentioned display processing method, wherein, described video card resources allocation notifying process is specially:
Behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, will distribute to the big or small notifying operation system in MMIO/IO space, GTT space, the frame buffer space of respective operations system in the video card.
Above-mentioned display processing method, wherein, described video card resources allocation notifying process is specially:
Behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, and the information of obtaining still untapped MMIO/IO space, GTT space and frame buffer space in the video card offers operating system, by the own corresponding operable resource size of logic interfacing of operating system decision.
Above-mentioned display processing method, wherein, described video card resources allocation notifying process is specially:
Behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, and the information of obtaining MMIO/IO space, GTT space and frame buffer space in the PCI/PCI-E configuration space of operating system correspondence offers operating system.
Video card of the present invention, the dummy machine system of using this video card and display processing method, by graphics translation table module, frame buffer module and MMIO/IO module are divided into several sections, the logic interfacing of different operating system is given in configuration respectively, relative operation system obtains the resource that a cover is monopolized like this, can both have access to real video card.
Description of drawings
Fig. 1 is the structural representation of video card of the present invention;
Fig. 2 is the process flow diagram of the display processing method of dummy machine system of the present invention.
Embodiment
Video card of the present invention, use in the dummy machine system and display processing method of this video card, be divided into several sections by the frame buffer that will have now in the video card, offer a plurality of operating systems in the dummy machine system respectively, for each operating system provides the logic video card of monopolizing interface.
The present invention is described in detail below in conjunction with different embodiment.
<the first embodiment 〉
In the first embodiment of the present invention, the MMIO/IO space of each operating system correspondence, GTT (Graphic Translation Table, graphics translation table) space and frame buffer space are allocated in advance and are preserved, when operating system was configured video card, virtual machine monitor was the size notice relative operation system of allocating MMIO/IO space to each operating system, GTT space, frame buffer space in advance.
In the first embodiment of the present invention, video card as shown in Figure 1, comprise PCI/PCI-E configuration space, virtual machine indicating module, scheduler module, resources allocation preservation module, GPU, MMIO/IO module, GTT module, frame buffer module (Frame Buffer) and graphics display control module, the GTT module, the frame buffer module resource can be in system hosts, wherein:
The PCI/PCI-E configuration space is used to preserve the size and the resource address scope of video card MMIO, GTT and frame buffer; In the first embodiment of the present invention, the PCI/PCI-E configuration space is one;
The MMIO/IO module is divided into a plurality of parts, and each part comprises whole registers (as display mode register, control register, status register etc.) that the video card logic interfacing corresponding with each operating system will be used; At this, the part of each operating system correspondence is identical in configuration aspects;
The GTT module is divided into a plurality of parts, is used to preserve the GTT corresponding with each operating system, and this GTT is used to preserve the mapping relations between frame buffer address and the physical memory addresses;
At this, what should describe is, above-mentioned GTT (graphics translation table) just industry to the software module that realizes this function or wherein a kind of call of hardware module, the title that also has other, as GART (Graphics Address Remapping Table, table is redistributed in the video card address) etc., but for convenience of description, unified in the present invention with its called after GTT.
Frame buffer module is divided into a plurality of parts, to distribute to corresponding operating system;
Wherein, the size of the various piece in GTT module and the frame buffer module can be different corresponding to each operating system, and the frame buffer that each operating system is assigned to can be different.
The resources allocation logging modle by virtual machine monitor or operating system access, is used to preserve the information in MMIO/IO space, GTT space and the frame buffer space of each operating system correspondence;
The virtual machine indicating module is used to receive the instruction which operating system of indication that VMM sends has been obtained focus;
Scheduler module, be used for the instruction that sends according to the virtual machine indicating module and predetermined scheduling strategy and determine the logic interfacing that is dispatched to, and send to GPU (Grapic Processing Unit, Graphics Processing Unit) from MMIO space, GTT space and the frame buffer spatial information that the resources allocation logging modle is obtained the logic interfacing correspondence that is scheduled for;
GPU is used for GTT, frame buffer and the relevant register of the information operating correspondence of the logic interfacing that is scheduled for that sends according to scheduler module;
The graphics display control module, the content of frame buffer that is used for having obtained the operating system correspondence of focus sends to display and shows.
VME operating system of the present invention comprises:
Above-mentioned video card;
The operating system focus is obtained notification module, is arranged at virtual machine monitor, is used for having obtained the operating system notice virtual machine indicating module of focus;
Map addresses is set up module, is arranged at virtual machine monitor, is used to set up address realm that operating system is MMIO/IO space, GTT space, frame buffer allocation of space and the mapping relations between the video card real resources;
The virtual machine communication module, be arranged at virtual machine monitor, be used for above-mentioned video card is distributed to MMIO/IO space, GTT space, the frame buffer space notice relative operation system of operating system, and be used for of the operation of the video card driver module of capturing operation system to video card, send to video card after setting up the mapping relations reference address of setting up in the module according to map addresses, the operation of MMIO and video memory is set up the mapping relations of setting up in the module according to map addresses and is set up page table in the virtual machine monitor.。Like this, relative operation system obtains the resource that a cover is monopolized, and has been equivalent to obtain the video card interface of a logic.
Be described in detail below in conjunction with the display processing method of accompanying drawing virtual machine of the present invention.
As shown in Figure 2, the display processing method of virtual machine of the present invention comprises the steps:
The PCI/PCI-E resource allocation step, during system start-up, virtual machine monitor or host OS read the size of MMIO/IO from the PCI/PCI-E configuration space of video card, the size of GTT, the size of FB, and distribute the PCI/PCI-E configuration space that writes video card after these resource addresses scopes again for video card;
Video card resources allocation notifying process, behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, the virtual machine communication module makes the operating system of each startup obtain the resource that a cover is monopolized with distributing to MMIO/IO space, the GTT space of each operating system, the size notice relative operation system in frame buffer space in the video card;
The mapping resources establishment step, after operating system obtains MMIO/IO space, GTT space, frame buffer space size, be that it distributes address realm, map addresses is set up module and is set up address realm that operating system is MMIO/IO space, GTT space, frame buffer allocation of space and the mapping relations between the video card real resources;
GPU computing step, GPU handles the GTT and the frame buffer of this logic interfacing correspondence according to the information (being relevant register content and order) of the logic interfacing that is scheduled for; It is relevant whether the logic interfacing that is scheduled for and scheduling strategy and this logic interfacing relative operation system have obtained focus, and the operating system that has obtained focus has higher right of priority.If the displaying contents that does not need GPU to participate in then by corresponding GTT of Operational System Control and FB, and does not need to dispatch, in this case, a plurality of operating systems can walk abreast simultaneously and carry out.
Show the output step, send to display and show having obtained content in the frame buffer of operating system correspondence of focus.
Wherein:
What is called has obtained the operating system of focus for having had the operating system of input equipment (as keyboard, mouse);
Simultaneously, in the GPU computing step priority processing after having obtained the display command of operating system correspondence of focus, just handle the display command of other operating system correspondences, yet because the control of graphics display control module, only obtained content in the frame buffer of operating system correspondence of focus and just can be sent to display and show.
In the GPU computing step, GPU at first obtains the MMIO/IO of the logic interfacing correspondence that is scheduled in the base address of video card inside, and carries out computing according to the pairing register in this base address, and operates corresponding GTT and frame buffer.
<the second embodiment 〉
In the second embodiment of the present invention, when operating system was configured video card, virtual machine monitor offered operating system with the information in still untapped MMIO/IO space, GTT space and frame buffer space in the video card, selects the space voluntarily by operating system.
In the second embodiment of the present invention, video card comprises PCI/PCI-E configuration space, virtual machine indicating module, scheduler module, resources allocation preservation module, GPU, MMIO/IO module, GTT module, frame buffer module and graphics display control module, the GTT module, the frame buffer module resource can be in system hosts, wherein:
The PCI/PCI-E configuration space is used to preserve the size and the resource address scope of video card MMIO, GTT (Grapic TranslationTable, graphics translation table) and frame buffer; In the second embodiment of the present invention, the PCI/PCI-E configuration space is one; Certainly, also can cooperate some registers to preserve these contents with the PCI/PCI-E configuration space.
The MMIO/IO module is divided into a plurality of parts, and each part comprises whole registers (as display mode register, control register, status register etc.) that the video card logic interfacing corresponding with each operating system will be used; At this, the part of each operating system correspondence is identical in configuration aspects;
The GTT module is divided into a plurality of parts, is used to preserve the GTT corresponding with each operating system, and this GTT is used to preserve the mapping relations between frame buffer address and the physical memory addresses;
Frame buffer module is divided into a plurality of parts, to distribute to corresponding operating system;
Wherein, the size of the various piece in GTT module and the frame buffer module can be different corresponding to each operating system, and the frame buffer that each operating system is assigned to can be different.
The resources allocation logging modle by virtual machine monitor or operating system access, is used to preserve the information in MMIO/IO space, GTT space and the frame buffer space of each operating system correspondence; Also be used for preserving the information in the still untapped MMIO/IO of video card space, GTT space and frame buffer space simultaneously, and the information in still untapped MMIO/IO space, GTT space and frame buffer space in the video card offered as yet not the operating system that connects with video card, by the own corresponding operable resource size of logic interfacing of operating system decision that connects with video card as yet;
The virtual machine indicating module is used to receive the instruction which operating system of indication that VMM sends has been obtained focus;
Scheduler module, be used for the instruction that sends according to the virtual machine indicating module and predetermined scheduling strategy and determine the logic interfacing that is dispatched to, and send to GPU (Grapic Processing Unit, Graphics Processing Unit) from MMIO space, GTT space and the frame buffer spatial information that the resources allocation logging modle is obtained the logic interfacing correspondence that is scheduled for;
GPU is used for GTT, frame buffer and the relevant register of the information operating correspondence of the logic interfacing that is scheduled for that sends according to scheduler module;
The graphics display control module, the content of frame buffer that is used for having obtained the operating system correspondence of focus sends to display and shows.
VME operating system in the second embodiment of the present invention comprises:
Above-mentioned video card;
The operating system focus is obtained notification module, is arranged at virtual machine monitor, is used for having obtained the operating system notice virtual machine indicating module of focus;
Map addresses is set up module, is arranged at virtual machine monitor, is used to set up address realm that operating system is MMIO/IO space, GTT space, frame buffer allocation of space and the mapping relations between the video card real resources; At this, operating system is at first obtained the information in still untapped MMIO/IO space, GTT space and frame buffer space in the video card from the resources allocation logging modle, and the size of the resource of the video card logic interfacing use of the own correspondence of decision;
The virtual machine communication module, be arranged at virtual machine monitor, be used for still unallocated MMIO/IO space, GTT space, the frame buffer space notifying operation system that gives operating system of above-mentioned video card, and be used for of the operation of the video card driver module of capturing operation system to video card, send to video card after setting up the mapping relations reference address of setting up in the module according to map addresses, the operation of MMIO and video memory is set up the mapping relations of setting up in the module according to map addresses and is set up page table in the virtual machine monitor.Like this, relative operation system obtains the resource that a cover is monopolized, and has been equivalent to obtain the video card interface of a logic.
The display processing method of virtual machine of the present invention comprises the steps:
The PCI/PCI-E resource allocation step, during system start-up, virtual machine monitor or host OS read the size of MMIO/IO from the PCI/PCI-E configuration space of video card, the size of GTT, the size of FB, and distribute the PCI/PCI-E configuration space that writes video card after these resource addresses scopes again for video card;
Video card resources allocation notifying process, behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, and the information of obtaining still untapped MMIO/IO space, GTT space and frame buffer space in the video card that writes down in the resources allocation logging modle offers operating system, by the own corresponding operable resource size of logic interfacing of operating system decision;
The mapping resources establishment step, after operating system decision MMIO/IO space, GTT space, the frame buffer space size, be that it distributes address realm, map addresses is set up module and is set up address realm that operating system is MMIO/IO space, GTT space, frame buffer allocation of space and the mapping relations between the video card real resources;
GPU computing step, GPU handles the GTT and the frame buffer of this logic interfacing correspondence according to the information (being relevant register content and order) of the logic interfacing that is scheduled for; It is relevant whether the logic interfacing that is scheduled for and scheduling strategy and this logic interfacing relative operation system have obtained focus, and the operating system that has obtained focus has higher right of priority.If the displaying contents that does not need GPU to participate in then by corresponding GTT of Operational System Control and FB, and does not need to dispatch, in this case, a plurality of operating systems can walk abreast simultaneously and carry out.
Show the output step, send to display and show having obtained content in the frame buffer of operating system correspondence of focus.
Wherein:
What is called has obtained the operating system of focus for having had the operating system of input equipment (as keyboard, mouse);
Simultaneously, in the GPU computing step priority processing after having obtained the display command of operating system correspondence of focus, just handle the display command of other operating system correspondences, yet because the control of graphics display control module, only obtained content in the frame buffer of operating system correspondence of focus and just can be sent to display and show.
In the GPU computing step, GPU at first obtains the base address of MMIO/IO in video card of the logic interfacing correspondence that is scheduled for, and carries out computing according to the pairing register in this base address, and operates corresponding GTT and frame buffer.
<the three embodiment 〉
In the third embodiment of the present invention, the MMIO/IO space of each operating system correspondence, GTT space and frame buffer space are allocated in advance and are kept in a plurality of PCI/PCI-E configuration spaces corresponding with operating system, and the logic interfacing of each operating system is corresponding with a PCI/PCI-E configuration space.
In the third embodiment of the present invention, video card comprises PCI/PCI-E configuration space, virtual machine indicating module, scheduler module, GPU, MMIO/IO module, GTT module, frame buffer module and graphics display control module, GTT module, frame buffer module resource can be in system hosts, wherein:
The PCI/PCI-E configuration space, comprise a plurality of, corresponding with operating system, be used to preserve video card MMIO, the GTT (Grapic Translation Table, graphics translation table) of each operating system correspondence and the size and the resource address scope of frame buffer;
The MMIO/IO module is divided into a plurality of parts, and each part comprises whole registers (as display mode register, control register, status register etc.) that the video card logic interfacing corresponding with each operating system will be used; At this, the part of each operating system correspondence is identical in configuration aspects;
The GTT module is divided into a plurality of parts, is used to preserve the GTT corresponding with each operating system, and this GTT is used to preserve the mapping relations between frame buffer address and the physical memory addresses;
Frame buffer module is divided into a plurality of parts, to distribute to corresponding operating system;
Wherein, the size of the various piece in GTT module and the frame buffer module can be different corresponding to each operating system, and the frame buffer that each operating system is assigned to can be different.
The virtual machine indicating module is used to receive the instruction which operating system of indication that VMM sends has been obtained focus;
Scheduler module, be used for the instruction that sends according to the virtual machine indicating module and predetermined scheduling strategy and determine the logic interfacing that is dispatched to, and MMIO space, GTT space and the frame buffer spatial information of the logic interfacing correspondence that is scheduled for send to GPU (Grapic Processing Unit, Graphics Processing Unit);
GPU is used for GTT, frame buffer and the relevant register of the information operating correspondence of the logic interfacing that is scheduled for that sends according to scheduler module;
The graphics display control module, the content of frame buffer that is used for having obtained the operating system correspondence of focus sends to display and shows.
VME operating system in the third embodiment of the present invention comprises:
Above-mentioned video card;
The operating system focus is obtained notification module, is arranged at virtual machine monitor, is used for having obtained the operating system notice virtual machine indicating module of focus;
Map addresses is set up module, is arranged at virtual machine monitor, is used to set up address realm that operating system is MMIO/IO space, GTT space, frame buffer allocation of space and the mapping relations between the video card real resources; At this, operating system is obtained corresponding with operating system video card MMIO, GTT (Grapic Translation Table from the PCI/PCI-E configuration space, graphics translation table) and frame buffer the size and the Resources allocation address realm, set up module by map addresses and set up mapping relations.
The virtual machine communication module, be arranged at virtual machine monitor, be used for above-mentioned video card is distributed to MMIO/IO space, GTT space, the frame buffer space notice relative operation system of operating system, and be used for of the operation of the video card driver module of capturing operation system to video card, send to video card after setting up the mapping relations reference address of setting up in the module according to map addresses, the operation of MMIO and video memory is set up the mapping relations of setting up in the module according to map addresses and is set up page table in the virtual machine monitor.Like this, relative operation system obtains the resource that a cover is monopolized, and has been equivalent to obtain the video card interface of a logic.
The display processing method of the virtual machine of third embodiment of the invention comprises the steps:
The PCI/PCI-E resource allocation step, during system start-up, virtual machine monitor or host OS are that a plurality of operating systems are provided with corresponding PCI/PCI-E configuration space, and the size of reading MMIO/IO from the PCI/PCI-E configuration space of correspondence, the size of GTT, the size of FB, and write corresponding PCI/PCI-E configuration space after these resource addresses scopes again for video card distributes;
Video card resources allocation notifying process, behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, and the information of obtaining MMIO/IO space, GTT space and frame buffer space in the corresponding PCI/PCI-E configuration space offers operating system;
The mapping resources establishment step, after operating system obtains MMIO/IO space, GTT space, frame buffer space size, be that it distributes address realm, map addresses is set up module and is set up address realm that operating system is MMIO/IO space, GTT space, frame buffer allocation of space and the mapping relations between the video card real resources;
GPU computing step, GPU handles the GTT and the frame buffer of this logic interfacing correspondence according to the information (being relevant register content and order) of the logic interfacing that is scheduled for; It is relevant whether the logic interfacing that is scheduled for and scheduling strategy and this logic interfacing relative operation system have obtained focus, and the operating system that has obtained focus has higher right of priority.If the displaying contents that does not need GPU to participate in then by corresponding GTT of Operational System Control and FB, and does not need to dispatch, in this case, a plurality of operating systems can walk abreast simultaneously and carry out.
Show the output step, send to display and show having obtained content in the frame buffer of operating system correspondence of focus.
Wherein:
What is called has obtained the operating system of focus for having had the operating system of input equipment (as keyboard, mouse);
Simultaneously, in the GPU computing step priority processing after having obtained the display command of operating system correspondence of focus, just handle the display command of other operating system correspondences, yet because the control of graphics display control module, only obtained content in the frame buffer of operating system correspondence of focus and just can be sent to display and show.
In the GPU computing step, GPU at first obtains the base address of MMIO/IO in video card of the logic interfacing correspondence that is scheduled for, and carries out computing according to the pairing register in this base address, and operates corresponding GTT and frame buffer.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (20)
1. a video card is characterized in that, comprising:
Can be divided into the graphics translation table module of a plurality of parts, be used for preserving and one or more operating system graph of a correspondence conversion tables;
Can be divided into the frame buffer module of a plurality of parts, distribute to one or more operating systems;
Can be divided into the MMIO/IO module of a plurality of parts, comprise whole registers that the video card logic interfacing corresponding with one or more operating systems will be used;
Scheduler module is used to dispatch the hardware handles of the pairing Presentation Function of video card logic interfacing of corresponding different operating system;
Graphics Processing Unit is used for according to scheduling result operation and the video card logic interfacing graph of a correspondence conversion table, frame buffer and the relevant register that are scheduled for;
The graphics display control module is used for content with frame buffer and sends to display and show.
2. video card according to claim 1 is characterized in that, also comprises:
The virtual machine indicating module is used for obtaining an instruction from virtual machine monitor, and which operating system described instruction indicates obtained focus;
Described scheduler module specifically is used for determining the logic interfacing that is dispatched to according to described virtual machine indicating module and predetermined scheduling strategy.
3. video card according to claim 2 is characterized in that, the content of frame buffer that described graphics display control module is used for having obtained the operating system correspondence of focus sends to display and shows.
4. video card according to claim 2 is characterized in that, also comprises:
The resources allocation logging modle by virtual machine monitor or operating system access, is used to preserve the distribution condition of video card resource.
5. video card according to claim 4 is characterized in that, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence.
6. video card according to claim 4, it is characterized in that, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence, also be used for preserving the information in the still untapped MMIO/IO of video card space, graphics translation table space and frame buffer space, offer operating system and distribute voluntarily.
7. video card according to claim 4 is characterized in that, described resources allocation logging modle is specially:
The PCI/PCI-E configuration space, consistent and corresponding with the operating system number, be used to preserve the size and the resource address scope of video card MMIO, graphics translation table and the frame buffer of each operating system correspondence.
8. a dummy machine system comprises a video card, it is characterized in that, described video card comprises:
Can be divided into the graphics translation table module of a plurality of parts, be used for preserving and one or more operating system graph of a correspondence conversion tables;
Can be divided into the frame buffer module of a plurality of parts, distribute to one or more operating systems;
Can be divided into the MMIO/IO module of a plurality of parts, comprise whole registers that the video card logic interfacing corresponding with one or more operating systems will be used;
Scheduler module is used to dispatch the hardware handles of the pairing Presentation Function of video card logic interfacing of corresponding different operating system;
Graphics Processing Unit is used for according to scheduling result operation and the video card logic interfacing graph of a correspondence conversion table, frame buffer and the relevant register that are scheduled for;
The graphics display control module is used for content with frame buffer and sends to display and show;
Described dummy machine system also comprises:
Map addresses is set up module, is used to set up address realm that operating system is MMIO/IO space, graphics translation table space, frame buffer allocation of space and the mapping relations between the video card real resources;
The virtual machine communication module, be arranged at virtual machine monitor, be used for above-mentioned video card is distributed to MMIO/IO space, graphics translation table space, the frame buffer space notice relative operation system of operating system, and be used for of the operation of the video card driver module of capturing operation system to video card, send to video card after setting up the mapping relations reference address of setting up in the module according to map addresses.
9. dummy machine system according to claim 8 is characterized in that, described video card also comprises:
The virtual machine indicating module is used for obtaining an instruction from virtual machine monitor, and which operating system described instruction indicates obtained focus;
Described scheduler module specifically is used for determining the logic interfacing that is dispatched to according to described virtual machine indicating module and predetermined scheduling strategy.
10. dummy machine system according to claim 9 is characterized in that, the content of frame buffer that described graphics display control module is used for having obtained the operating system correspondence of focus sends to display and shows.
11. dummy machine system according to claim 9 is characterized in that, described video card also comprises:
The resources allocation logging modle by virtual machine monitor or operating system access, is used to preserve the distribution condition of video card resource;
Described virtual machine communication module is specifically obtained MMIO/IO space, graphics translation table space, the frame buffer space of distributing to operating system from the resources allocation logging modle.
12. dummy machine system according to claim 11 is characterized in that, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence.
13. dummy machine system according to claim 11, it is characterized in that, described resources allocation logging modle specifically is used to preserve the information in MMIO/IO space, graphics translation table space and the frame buffer space of each operating system correspondence, also be used for preserving the information in the still untapped MMIO/IO of video card space, graphics translation table space and frame buffer space, offer operating system and distribute voluntarily.
14. dummy machine system according to claim 11 is characterized in that, described resources allocation logging modle is specially:
The PCI/PCI-E configuration space, consistent and corresponding with the operating system number, be used to preserve the size and the resource address scope of video card MMIO, graphics translation table and the frame buffer of each operating system correspondence.
15. a display processing method is characterized in that, comprising:
Video card resources allocation notifying process, behind the virtual machine activation, when operating system is configured video card, the virtual machine communication module with in the video card to the size notice relative operation system in the MMIO/IO space of logic interfacing that should operating system, graphics translation table space, frame buffer space; MMIO/IO space in the described video card, graphics translation table space, frame buffer space are assigned to one or more operating systems;
The mapping resources establishment step, after operating system obtains MMIO/IO space, graphics translation table space, frame buffer space size, be that it distributes address realm, and set up address realm that operating system is MMIO/IO space, graphics translation table space, frame buffer allocation of space and the mapping relations between the video card real resources by virtual machine monitor;
Graphics Processing Unit computing step, Graphics Processing Unit is handled video card logic interfacing graph of a correspondence conversion table, frame buffer and the register that is scheduled for;
Show the output step, the content in the frame buffer is sent to display show.
16. display processing method according to claim 15 is characterized in that, the logic interfacing of operating system correspondence of having obtained focus is by priority scheduling.
17. display processing method according to claim 15 is characterized in that, in the described demonstration output step, sends to display and shows having obtained content in the frame buffer of operating system correspondence of focus.
18., it is characterized in that described video card resources allocation notifying process is specially according to claim 15,16 or 17 described display processing methods:
Behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, will distribute to the big or small notifying operation system in MMIO/IO space, GTT space, the frame buffer space of respective operations system in the video card.
19., it is characterized in that described video card resources allocation notifying process is specially according to claim 15,16 or 17 described display processing methods:
Behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, and the information of obtaining still untapped MMIO/IO space, GTT space and frame buffer space in the video card offers operating system, by the own corresponding operable resource size of logic interfacing of operating system decision.
20., it is characterized in that described video card resources allocation notifying process is specially according to claim 15,16 or 17 described display processing methods:
Behind the virtual machine activation, when operating system is configured video card, virtual machine monitor interception operating system is to the configuration access of video card equipment, and the information of obtaining MMIO/IO space, GTT space and frame buffer space in the PCI/PCI-E configuration space of operating system correspondence offers operating system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101716194A CN100570562C (en) | 2006-12-31 | 2006-12-31 | Video card, the dummy machine system of using this video card and display processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101716194A CN100570562C (en) | 2006-12-31 | 2006-12-31 | Video card, the dummy machine system of using this video card and display processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101211270A true CN101211270A (en) | 2008-07-02 |
CN100570562C CN100570562C (en) | 2009-12-16 |
Family
ID=39611325
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006101716194A Active CN100570562C (en) | 2006-12-31 | 2006-12-31 | Video card, the dummy machine system of using this video card and display processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100570562C (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541618A (en) * | 2010-12-29 | 2012-07-04 | 中国移动通信集团公司 | Implementation method, system and device for virtualization of universal graphic processor |
CN103092679A (en) * | 2013-01-29 | 2013-05-08 | 四川大学 | Advertisement show method and system based on virtualized host machine |
CN101739289B (en) * | 2008-11-13 | 2013-06-19 | 北京闪联云视信息技术有限公司 | Method and device for setting display mode in Linux virtual machine |
CN103200128A (en) * | 2013-04-01 | 2013-07-10 | 华为技术有限公司 | Method, device and system for network package processing |
CN105550002A (en) * | 2015-12-28 | 2016-05-04 | 北京元心科技有限公司 | interface display method based on system switching and intelligent terminal |
CN106648878A (en) * | 2015-10-29 | 2017-05-10 | 华为技术有限公司 | System and method thereof for dynamically distributing MMIO resources |
CN107077376A (en) * | 2016-12-07 | 2017-08-18 | 深圳前海达闼云端智能科技有限公司 | Frame buffer implementation method, device, electronic equipment and computer program product |
WO2018053829A1 (en) * | 2016-09-26 | 2018-03-29 | Intel Corporation | Apparatus and method for hybrid layer of address mapping for virtualized input/output implementation |
CN108762894A (en) * | 2018-06-21 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of virtual machine display methods and device |
WO2019237711A1 (en) * | 2018-06-11 | 2019-12-19 | 郑州云海信息技术有限公司 | Method and system for gpu server io resource allocation |
WO2020107405A1 (en) * | 2018-11-30 | 2020-06-04 | Intel Corporation | Apparatus and method for efficient local display sharing for a virtualized graphics processor |
CN114896014A (en) * | 2022-05-20 | 2022-08-12 | 亿咖通(湖北)技术有限公司 | Desktop image display method, device, equipment and storage medium |
-
2006
- 2006-12-31 CN CNB2006101716194A patent/CN100570562C/en active Active
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101739289B (en) * | 2008-11-13 | 2013-06-19 | 北京闪联云视信息技术有限公司 | Method and device for setting display mode in Linux virtual machine |
CN102541618B (en) * | 2010-12-29 | 2015-05-27 | 中国移动通信集团公司 | Implementation method, system and device for virtualization of universal graphic processor |
CN102541618A (en) * | 2010-12-29 | 2012-07-04 | 中国移动通信集团公司 | Implementation method, system and device for virtualization of universal graphic processor |
CN103092679A (en) * | 2013-01-29 | 2013-05-08 | 四川大学 | Advertisement show method and system based on virtualized host machine |
CN103092679B (en) * | 2013-01-29 | 2016-01-20 | 四川大学 | A kind of advertisement demonstration method based on virtualized host and system |
CN103200128B (en) * | 2013-04-01 | 2016-12-28 | 华为技术有限公司 | The methods, devices and systems that a kind of network packet processes |
CN103200128A (en) * | 2013-04-01 | 2013-07-10 | 华为技术有限公司 | Method, device and system for network package processing |
CN106648878A (en) * | 2015-10-29 | 2017-05-10 | 华为技术有限公司 | System and method thereof for dynamically distributing MMIO resources |
CN105550002A (en) * | 2015-12-28 | 2016-05-04 | 北京元心科技有限公司 | interface display method based on system switching and intelligent terminal |
CN105550002B (en) * | 2015-12-28 | 2020-02-07 | 北京元心科技有限公司 | Interface display method based on system switching and intelligent terminal |
WO2018053829A1 (en) * | 2016-09-26 | 2018-03-29 | Intel Corporation | Apparatus and method for hybrid layer of address mapping for virtualized input/output implementation |
US10983821B2 (en) | 2016-09-26 | 2021-04-20 | Intel Corporation | Apparatus and method for a hybrid layer of address mapping for a virtualized input/output (I/O) implementation |
CN107077376A (en) * | 2016-12-07 | 2017-08-18 | 深圳前海达闼云端智能科技有限公司 | Frame buffer implementation method, device, electronic equipment and computer program product |
WO2018103022A1 (en) * | 2016-12-07 | 2018-06-14 | 深圳前海达闼云端智能科技有限公司 | Method and apparatus for achieving frame buffering, electronic device and computer program product |
WO2019237711A1 (en) * | 2018-06-11 | 2019-12-19 | 郑州云海信息技术有限公司 | Method and system for gpu server io resource allocation |
CN108762894A (en) * | 2018-06-21 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of virtual machine display methods and device |
WO2020107405A1 (en) * | 2018-11-30 | 2020-06-04 | Intel Corporation | Apparatus and method for efficient local display sharing for a virtualized graphics processor |
CN114896014A (en) * | 2022-05-20 | 2022-08-12 | 亿咖通(湖北)技术有限公司 | Desktop image display method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN100570562C (en) | 2009-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100570562C (en) | Video card, the dummy machine system of using this video card and display processing method | |
US8924959B2 (en) | Switching hardware devices in virtual machine systems using resource converting relationships | |
CN101088078B (en) | One step address translation method and system for graphics addresses in virtualization | |
JP6009675B2 (en) | Dynamic partitioning technology for physical memory | |
CN101241445B (en) | Virtual machine system and its method for accessing display card | |
CN103034524B (en) | Half virtualized virtual GPU | |
WO2018041075A9 (en) | Resource access method applied to computer, and computer | |
US9176765B2 (en) | Virtual machine system and a method for sharing a graphics card amongst virtual machines | |
US9269122B2 (en) | First and second software stacks and discrete and integrated graphics processing units | |
CN102110196A (en) | Method and system for safely transmitting data among parallel-running multiple user operating systems | |
CN105830026A (en) | Apparatus and method for scheduling graphics processing unit workloads from virtual machines | |
JP2009110518A (en) | Dynamic allocation of virtual machine device | |
JP2022516486A (en) | Resource management methods and equipment, electronic devices, and recording media | |
KR20070100367A (en) | Method, apparatus and system for dynamically reassigning memory from one virtual machine to another | |
CN105786589A (en) | Cloud rendering system, server and method | |
CN107077375B (en) | Display method and device for multiple operating systems and electronic equipment | |
CN104636186A (en) | Virtual machine memory management method, physical host, PCIE equipment, configuration method thereof and migration management equipment | |
CN103425534A (en) | Graphics processing unit sharing between many applications | |
CN104503825A (en) | Mixed type equipment virtualization method based on KVM (Kernel-based Virtual Machine) | |
CN109712060A (en) | A kind of cloud desktop video card sharing method and system based on GPU container technique | |
CN115904617A (en) | GPU virtualization implementation method based on SR-IOV technology | |
CN101464843A (en) | Method for sharing display card in multiple operating systems and computer system thereof | |
CN102096594B (en) | Method and device for using system resources in memory | |
US20160026567A1 (en) | Direct memory access method, system and host module for virtual machine | |
WO2024093546A1 (en) | Image display method and device for virtual machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |