[go: up one dir, main page]

WO2018103022A1 - Method and apparatus for achieving frame buffering, electronic device and computer program product - Google Patents

Method and apparatus for achieving frame buffering, electronic device and computer program product Download PDF

Info

Publication number
WO2018103022A1
WO2018103022A1 PCT/CN2016/108925 CN2016108925W WO2018103022A1 WO 2018103022 A1 WO2018103022 A1 WO 2018103022A1 CN 2016108925 W CN2016108925 W CN 2016108925W WO 2018103022 A1 WO2018103022 A1 WO 2018103022A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
address
virtual
operating system
frame buffer
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.)
Ceased
Application number
PCT/CN2016/108925
Other languages
French (fr)
Chinese (zh)
Inventor
李岩刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Shenzhen Robotics Systems Co Ltd
Original Assignee
Cloudminds Shenzhen Robotics Systems Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Cloudminds Shenzhen Robotics Systems Co Ltd filed Critical Cloudminds Shenzhen Robotics Systems Co Ltd
Priority to CN201680002798.0A priority Critical patent/CN107077376B/en
Priority to PCT/CN2016/108925 priority patent/WO2018103022A1/en
Publication of WO2018103022A1 publication Critical patent/WO2018103022A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/109Address translation for multiple virtual address spaces, e.g. segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Definitions

  • the present invention relates to the field of virtualization technologies, and in particular, to a frame buffer implementation method, apparatus, electronic device, and computer program product.
  • Frame Buffer is an interface provided by the Linux system for display devices. It will display the buffer abstraction and shield the underlying differences of the image hardware, allowing the upper application to directly read and write the display buffer in graphics mode. The related operations are all done by the frame buffer driver, so that the user does not have to care about the specific address and storage mode of the physical display buffer.
  • Figure 1 shows a schematic diagram of a virtualized system architecture in which multiple Linux operating systems (or operating systems similar to the Linux operating system, such as the Android operating system) can be run, including a host operating system (host OS). And one or more guest operating systems (guest OS), the main operating system running on the host machine, running one or more guest virtual machines, ie clients, on the host operating system, and each client as an application of the main operating system Run, which simulates a hardware device for the guest operating system running on the client for use by the guest operating system, and runs various applications in the guest operating system running on each client.
  • Linux operating systems or operating systems similar to the Linux operating system, such as the Android operating system
  • the client operating system invokes the frame buffer by implementing a virtual frame cache for the client running by the guest operating system, and running the virtual frame cache driver in the kernel layer of the client running by the guest operating system. Allocating an actual storage area for the virtual frame buffer to store display pixels of the guest operating system, the storage area mapping its address space to the host user plane to obtain a virtual address, so that the client can cache the virtual frame corresponding to the address through the address mapping
  • the virtual frame cache storage area operates.
  • the client copies the content in the storage area corresponding to the virtual frame buffer to the storage area corresponding to the real frame buffer for display.
  • the physical storage area is allocated to the virtual frame cache, and the content in the virtual frame cache physical storage area is copied to the storage area corresponding to the real frame buffer, which occupies a large amount of main operating system resources and storage resources.
  • the performance of the virtualization system is degraded, and the guest operating system shows that the operation takes a long time to execute.
  • the embodiment of the invention provides a frame buffer implementation method, device, electronic device and computer program product, which are mainly used to solve the problem that the performance of the virtualization system is reduced and the execution time of the client operating system is long.
  • an embodiment of the present invention provides a virtual frame buffer implementation method, where the method includes:
  • an embodiment of the present invention provides a virtual frame buffer implementation apparatus, where the apparatus includes:
  • a determining module configured to determine that a physical frame cache address corresponding to the display device is mapped to a virtual address of the user space
  • An address allocation module configured to allocate the virtual address to a client in response to a request by the client to obtain a storage area address corresponding to a virtual frame buffer address thereof, so that the client establishes a virtual frame cache address of the client A mapping relationship with the virtual address.
  • an embodiment of the present invention provides an electronic device, including: a display device, a memory, one or more processors; and one or more modules, the one or more The modules are stored in the memory and are configured to be executed by the one or more processors, the one or more modules including instructions for performing the various steps of any of the above methods.
  • embodiments of the present invention provide a computer program product for use with an electronic device including a display device, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein
  • the computer program mechanism includes instructions for performing the various steps of any of the above methods.
  • the embodiment of the present invention establishes a mapping relationship between a virtual frame cache address in a client and a virtual address cache of a real physical frame in a user space, and can send display data of a guest operating system running on the client to a physical frame based on an address mapping relationship.
  • Cache no need to allocate physical storage area for virtual frame cache, and also saves the time and process of copying between storage areas, thus reducing the occupation of main operating system resources and storage resources, improving the performance of virtualized systems, and shortening the display operation of guest operating systems. execution time.
  • FIG. 1 is a schematic diagram showing the architecture of a virtualization system in the prior art
  • FIG. 2 is a schematic structural diagram of a virtualization system applied to a frame buffer implementation method according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic flowchart diagram of a method for implementing a frame buffer according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic structural diagram of a device for implementing a frame buffer in Embodiment 2 of the present invention.
  • FIG. 5 is a schematic structural diagram of an electronic device in Embodiment 3 of the present application.
  • the physical storage area needs to be allocated for the virtual frame cache, and when the content needs to be displayed, the content in the physical storage area of the virtual frame cache is copied to the storage area corresponding to the real frame buffer, which occupies a large amount of main operating system resources and storage resources. As a result, the performance of the virtualization system is degraded, and the guest operating system displays an operation execution time.
  • the present invention provides a frame buffer implementation method, which establishes a mapping relationship between a virtual frame cache address in a client and a virtual address cache of a real physical frame in a user space, and can operate a guest operating system running on the client.
  • the display data is sent to the physical frame buffer based on the address mapping relationship, and the physical storage area is not allocated for the virtual frame buffer, and the time and process of copying between the storage areas are omitted, thereby reducing the occupation of the main operating system resources and storage resources, and improving Virtualize system performance and reduce the execution time of guest operating system display operations.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 2 is a schematic diagram of a virtualized system architecture applied to a frame buffer implementation method according to Embodiment 1 of the present invention.
  • a virtual cache driver is run in a kernel layer of a guest operating system running on a client to implement a virtual cache of a client.
  • FIG. 3 is a schematic flowchart of a method for implementing a frame buffer according to Embodiment 1 of the present invention. As shown in FIG. 3, the method for implementing a frame buffer includes:
  • Step 101 Determine that a physical frame cache address corresponding to the display device is mapped to a virtual address of the user space.
  • Step 102 In response to the client obtaining a request for a storage area address corresponding to the virtual frame buffer address, assigning the virtual address to the client, so that the client establishes the virtual frame cache address of the client and the The mapping relationship of virtual addresses.
  • the correspondence between the physical space of the device and the virtual address in the user space is usually established, so that the physical address of the device directly accessed by the user space can be realized through the memory mapping.
  • a physical display device usually corresponds to a physical frame cache storage area, and the display device can directly read the display in the physical frame cache storage area. Display data for display.
  • the address space of the physical frame cache storage area is mapped to a virtual address space in the host space of the host, so that any address in the address space of the physical frame cache storage area can be mapped to a virtual address on the user plane.
  • the physical frame cache address space corresponding to the display device in the virtualization system architecture is mapped to the virtual address space after the user space, and when determining the mapping relationship, one of the addresses (for example, the first address) may also be determined.
  • the mapping relationship in turn obtains the mapping relationship of the address space.
  • the virtual frame buffer in the client also needs address mapping to determine its corresponding storage space.
  • the client requests to obtain the storage area address corresponding to the virtual frame buffer address
  • the physical frame determined in step 101 above is determined.
  • the virtual address mapped to the user space by the cache address is provided to the client so that the client maps its virtual frame buffer address space to the virtual address space described above, thereby mapping to the address space of the physical frame cache storage area.
  • the virtual frame cache driver After the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address, when the virtual frame cache driver receives an operation instruction of the guest operating system to the virtual frame cache address, the virtual frame cache address and the The mapping relationship between the virtual address and the physical address cache address is such that the operation instruction directly points to the physical frame cache, so that the client operating system of the client can directly operate on the physical frame buffer. When displayed, the guest operating system can directly write display data directly to the physical frame buffer without having to copy it.
  • the virtual address is assigned to the client to cause the client to establish A mapping relationship between a virtual frame buffer address of the client and the virtual address.
  • the above step 102 can occur at the time of client startup.
  • the virtual frame cache driver in the client first obtains the physical frame buffer parameter by operating the physical frame buffer driver in the host operating system, and the physical frame is buffered in the storage area, or is long.
  • the width, and the supported data format, etc., the virtual frame buffer driver determines or calculates the actual storage space size of the physical frame buffer according to the physical frame buffer parameter.
  • the contiguous memory allocator reserves a memory space that is twice the size of the physical frame buffer, and sets the starting address of the contiguous memory allocator to the idle address of the system, wherein the virtual frame buffer address space is allocated during the process.
  • the starting address is aligned according to the page table requirements of the guest operating system kernel, and the address space reserved after the starting address is idle.
  • the virtual frame buffer address is transmitted to the client by setting a base address setting register provided by the virtual frame buffer, so that the client can map the physical frame buffer address to the physical frame buffer address after obtaining the virtual frame buffer address.
  • the virtual address of the user space is then mapped.
  • an operation instruction is sent to the physical frame buffer, And return the information of the successful operation to the guest operating system.
  • each client can sense whether the current guest operating system is in the foreground running state. Only when the guest operating system of a certain client runs in the foreground, the virtual frame cache driver will execute the operation instruction of the guest operating system to cache the virtual frame. Is delivered to the physical frame buffer according to the address mapping relationship. For example, only when a guest operating system of a client is running in the foreground, the virtual frame buffer driver of the client can write the pixels to be displayed into the physical frame buffer, and can feedback the operation to the guest operating system after the writing is completed. The successful return value.
  • the operation instruction is not sent to the physical frame cache. And return information about the successful operation to the guest operating system.
  • the guest operating system or the application running on it may still initiate a frame buffer operation to the virtual frame cache.
  • the operation instruction of the virtual operating system cached by the guest operating system is not sent to the physical frame cache according to the address mapping relationship, but the information of the successful operation is directly returned to the guest operating system.
  • the virtual frame buffer driving simulation operation is successfully performed, but actually The corresponding operation is not performed to avoid affecting the display of the operating system running in the foreground that currently occupies the physical frame buffer.
  • an operational instruction is issued to the physical frame buffer by setting a register of the virtual frame buffer.
  • the register of the virtual frame buffer corresponds to a register of the physical frame buffer, and generally includes a plurality of sets of registers related to parameters, operations, addresses, or controls of the virtual frame buffer.
  • the frame buffer register can include the following groups/groups:
  • the parameters can be obtained by the virtual frame buffer driver reading the data of the property register of the physical frame buffer when the client starts.
  • the physical frame buffer parameter may be information such as length, width, and supported data format of the physical frame buffered in the storage device.
  • the guest operating system can read the property register to get the physical frame buffer parameters.
  • the guest operating system can automatically read the parameters of the virtual frame buffer, that is, the physical frame buffer parameter, through the virtual frame buffer.
  • the guest operating system running in the background reads the frame buffer parameter, one case is that the guest operating system can no longer read the parameters of the virtual frame buffer normally through the virtual frame buffer, and only obtains the information of successful reading; another case
  • the attribute register of the physical frame buffer has synchronized its data to the attribute register of the virtual frame buffer, and the frame buffer parameter is usually read-only and does not change, in which case even if the guest operating system is running in the background,
  • the property register of the virtual frame buffer can be read normally to obtain the physical frame buffer parameters.
  • An address register for the virtual frame buffer is set for the virtual frame buffer driver for storing the virtual frame buffer address.
  • the virtual frame cache driver can obtain the virtual frame buffer address through the contiguous memory allocator and then pass the address to the client by setting the address setting register of the virtual frame buffer.
  • the same physical frame buffer driver is provided with an address register of the physical frame buffer for storing physical frame buffers.
  • the storage address is mapped to the virtual address of the user space.
  • the virtual frame buffer driver can obtain the virtual address from an address register of the physical frame buffer to establish a mapping relationship.
  • the virtual frame buffer address in the virtual frame buffer address register can be read, and the display data is written into the virtual frame buffer.
  • An interrupt register for setting a physical frame buffer for the physical frame buffer driver configured to store interrupt information of the physical frame buffer, where the interrupt information may include information such as an interrupt enable and an interrupt state, which are respectively stored by an interrupt enable register and an interrupt status register.
  • the interrupt register can provide an operation result of a physical frame buffer device or other asynchronous event or the like.
  • An interrupt register that also sets a virtual frame buffer for the virtual frame buffer driver is used to store the interrupt information obtained by the physical frame buffer's broken register. When the interrupt information in the interrupt register of the physical frame buffer changes, it can be updated to the interrupt register of the virtual frame buffer in each client.
  • the physical frame buffer interrupt information stored in the interrupt register of the virtual frame buffer may be used to determine whether the current physical frame buffer can perform related operations, and when the judgment allows In operation, an operation instruction is issued to the physical frame buffer.
  • whether the guest operating system is in the foreground running state determines whether it can perform some operations on the real physical frame buffer based on the mapping relationship between the virtual frame buffer address and the physical frame cache address.
  • the frame buffer operation initiated by the virtual frame buffer of the client also returns the return value of the successful operation, and will not report an error or affect the display of the foreground operating system.
  • the method further includes: acquiring a physical frame buffer parameter of the physical frame buffer; and providing the physical frame buffer parameter when receiving a frame buffer parameter query request of a guest operating system running in the client.
  • the frame buffer parameter in the attribute register of the physical frame buffer may be synchronized to the attribute register of the virtual frame buffer when the client establishes a mapping relationship between the virtual frame buffer address of the client and the virtual address.
  • the frame buffer parameter is usually read-only and does not change, so it can be set that the operating system running in the foreground or the background in the client can read the frame buffer parameter in the attribute register of the virtual frame buffer to obtain the physical frame buffer.
  • the parameter is capable of transmitting display data that meets the parameter requirements to the virtual frame buffer.
  • the mapping relationship between the virtual frame cache address in the client and the virtual address of the real physical frame cache in the user space is established, and the display data of the guest operating system running on the client can be sent to the physical frame based on the address mapping relationship.
  • Cache no need to allocate physical storage area for virtual frame cache, and also saves the time and process of copying between storage areas, thus reducing the occupation of main operating system resources and storage resources, improving the performance of virtualized systems, and shortening the display operation of guest operating systems. execution time.
  • the embodiment further discloses that the virtual frame cache address mapping relationship can be established in time during the client startup process; the frame cache implementation manner of the guest operating system running in the foreground or in the background is separately disclosed, and the physical frame buffer is set based on the frame buffer register setting.
  • the operation method ensures that the guest operating system running in the foreground can call the physical frame cache normally, and the operating system running in the background can still read the physical frame cache parameter, but does not affect the current operating system cache operation of the operating system in the foreground.
  • the physical frame buffer parameters can be provided to the virtual frame buffer driver so that the guest operating system can conform to the frame buffer parameter requirements when initiating the frame buffer operation.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the frame buffer implementation apparatus 200 includes: a determining module 201, configured to determine a physical frame cache address corresponding to the display device to be mapped to a virtual address of the user space; and an address allocation module 202, configured to receive the client in response to the client A request for a storage area address corresponding to the virtual frame buffer address, the virtual address is allocated to the client, so that the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address.
  • the address allocation module 202 is specifically configured to allocate the virtual address to the client in response to the client requesting the storage area address corresponding to the virtual frame cache address when the client is started. And causing the client to establish a mapping relationship between the virtual frame cache address of the client and the virtual address.
  • the apparatus further includes: an operation module 203, configured to allocate the virtual address to the address allocation module 202 in response to a request by the client to obtain a storage area address corresponding to a virtual frame buffer address thereof a client, after the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address:
  • the operation module 203 is specifically configured to allocate the virtual address to the client in response to the request by the address allocation module 202 to obtain a storage area address corresponding to the virtual frame cache address thereof.
  • the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address, when the guest operating system running on the client operates the virtual frame cache, and the operation
  • an operation instruction is sent to the physical frame cache by setting a register of the virtual frame buffer, and information indicating that the operation is successful is returned to the guest operating system.
  • the address allocation module 202 is further configured to acquire a physical frame cache parameter of the physical frame cache; the operation module 203 is further configured to: when receiving a guest operating system running on the client The physical frame buffer parameter is provided when the frame buffer parameter queries the request.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • an embodiment of the present invention further provides an electronic device due to its original
  • the implementation is similar to the frame buffer implementation, so the implementation can refer to the implementation of the method, and the repeated description will not be repeated.
  • the electronic device 300 includes: a display device 301, a memory 302, one or more processors 303; and one or more modules, the one or more modules being stored in the memory, And being configured to be executed by the one or more processors, the one or more modules comprising instructions for performing the various steps of any of the above methods.
  • the electronic device may be a mobile phone, a tablet computer, a robot, or other smart device.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • an embodiment of the present invention further provides a frame buffer implementation computer program product for use in combination with an electronic device including a display device. Since the principle is similar to the frame buffer implementation method, the implementation may refer to the implementation of the method. The repetitions are not repeated here.
  • the computer program product comprises a computer readable storage medium and a computer program mechanism embodied therein, the computer program mechanism comprising instructions for performing the various steps of any of the foregoing methods.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Digital Computer Display Output (AREA)

Abstract

Provided in the present invention are a method and an apparatus for achieving frame buffering, an electronic device and a computer program product. The method comprises: determining that a physical frame buffer address corresponding to a display device is mapped to a virtual address of a user space; and in response to a request of a client for acquiring a storage area address corresponding to a virtual frame buffer address thereof, allocating the virtual address to the client, so that the client establishes a mapping relationship between the virtual frame buffer address of the client and the virtual address. By establishing a mapping relationship between the virtual frame buffer address of a client and the virtual address of a real physical frame buffer in a user space, the present invention can send display data running on the client operating system of the client, on the basis of the address mapping relationship, to the physical frame buffer, without the need to allocate a physical storage area to the virtual frame buffer, also eliminating the time and process necessary for copying between storage areas, and therefore the present invention can reduce the occupancy of the main operation system resources and storage resources, improve the performance of the virtualized system, and shorten the execution time needed for the client operation system to display operations.

Description

帧缓存实现方法、装置、电子设备和计算机程序产品Frame buffer implementation method, device, electronic device and computer program product 技术领域Technical field

本发明涉及虚拟化技术领域,特别涉及帧缓存实现方法、装置、电子设备和计算机程序产品。The present invention relates to the field of virtualization technologies, and in particular, to a frame buffer implementation method, apparatus, electronic device, and computer program product.

背景技术Background technique

帧缓存(Frame Buffer)是Linux系统为显示设备提供的一个接口,其将显示缓冲区抽象,屏蔽图像硬件的底层差异,允许上层应用程序在图形模式下直接对显示缓冲区进行读写操作。相关操作均由帧缓存驱动完成,使用户不必关心物理显示缓冲区的具体地址及存放方式。Frame Buffer is an interface provided by the Linux system for display devices. It will display the buffer abstraction and shield the underlying differences of the image hardware, allowing the upper application to directly read and write the display buffer in graphics mode. The related operations are all done by the frame buffer driver, so that the user does not have to care about the specific address and storage mode of the physical display buffer.

图1示出了虚拟化系统架构示意图,虚拟化系统架构中可以运行多个Linux操作系统(或与Linux操作系统类似的操作系统,例如Android操作系统),其中包括一个主操作系统(host OS),以及一个或者多个客户操作系统(guest OS),主操作系统运行于宿主机,在主操作系统上运行一个或者多个客户虚拟机,即客户机,各客户机作为主操作系统的应用程序运行,其可以为运行于该客户机上的客户操作系统模拟硬件设备以供客户操作系统使用,在各客户机运行的客户操作系统中可运行各种应用程序。基于虚拟化系统架构,多个操作系统之间可共享硬件设备提供的CPU,内存和输入输出设备。Figure 1 shows a schematic diagram of a virtualized system architecture in which multiple Linux operating systems (or operating systems similar to the Linux operating system, such as the Android operating system) can be run, including a host operating system (host OS). And one or more guest operating systems (guest OS), the main operating system running on the host machine, running one or more guest virtual machines, ie clients, on the host operating system, and each client as an application of the main operating system Run, which simulates a hardware device for the guest operating system running on the client for use by the guest operating system, and runs various applications in the guest operating system running on each client. Based on the virtualized system architecture, CPUs, memory, and input and output devices provided by hardware devices can be shared among multiple operating systems.

现有技术中,客户操作系统调用帧缓存的实现方式是为客户操作系统运行的客户机实现一个虚拟帧缓存,在客户操作系统运行的客户机的内核(kernel)层中运行虚拟帧缓存驱动,为虚拟帧缓存分配实际存储区以存储客户操作系统的显示像素,所述存储区将其地址空间映射至宿主机用户面得到虚拟地址,使客户机能够通过地址映射对其虚拟帧缓存对应的真实的虚拟帧缓存存储区进行操作。当客户操作系统进行显示时,客户机将其虚拟帧缓存对应的存储区中的内容拷贝到真实的帧缓存对应的存储区中进行显示。 In the prior art, the client operating system invokes the frame buffer by implementing a virtual frame cache for the client running by the guest operating system, and running the virtual frame cache driver in the kernel layer of the client running by the guest operating system. Allocating an actual storage area for the virtual frame buffer to store display pixels of the guest operating system, the storage area mapping its address space to the host user plane to obtain a virtual address, so that the client can cache the virtual frame corresponding to the address through the address mapping The virtual frame cache storage area operates. When the guest operating system displays, the client copies the content in the storage area corresponding to the virtual frame buffer to the storage area corresponding to the real frame buffer for display.

但是为虚拟帧缓存分配物理存储区,并且在需要显示时,将虚拟帧缓存物理存储区中的内容拷贝到真实的帧缓存对应的存储区中,会占用大量主操作系统资源和存储资源,导致虚拟化系统性能降低,客户操作系统显示操作执行时间长。The physical storage area is allocated to the virtual frame cache, and the content in the virtual frame cache physical storage area is copied to the storage area corresponding to the real frame buffer, which occupies a large amount of main operating system resources and storage resources. The performance of the virtualization system is degraded, and the guest operating system shows that the operation takes a long time to execute.

发明内容Summary of the invention

本发明实施例提出了帧缓存实现方法、装置、电子设备和计算机程序产品,主要用以解决虚拟化系统性能降低,客户操作系统显示操作执行时间长的问题。The embodiment of the invention provides a frame buffer implementation method, device, electronic device and computer program product, which are mainly used to solve the problem that the performance of the virtualization system is reduced and the execution time of the client operating system is long.

在一个方面,本发明实施例提供了一种虚拟帧缓存实现方法,其特征在于,所述方法包括:In one aspect, an embodiment of the present invention provides a virtual frame buffer implementation method, where the method includes:

确定显示设备对应的物理帧缓存地址映射至用户空间的虚拟地址;Determining that the physical frame cache address corresponding to the display device is mapped to the virtual address of the user space;

响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。Responding to a request by the client to obtain a storage area address corresponding to its virtual frame buffer address, assigning the virtual address to a client, such that the client establishes a virtual frame buffer address of the client and the virtual address Mapping relations.

在另一个方面,本发明实施例提供了一种虚拟帧缓存实现装置,其特征在于,所述装置包括:In another aspect, an embodiment of the present invention provides a virtual frame buffer implementation apparatus, where the apparatus includes:

确定模块,用于确定显示设备对应的物理帧缓存地址映射至用户空间的虚拟地址;a determining module, configured to determine that a physical frame cache address corresponding to the display device is mapped to a virtual address of the user space;

地址分配模块,用于响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。An address allocation module, configured to allocate the virtual address to a client in response to a request by the client to obtain a storage area address corresponding to a virtual frame buffer address thereof, so that the client establishes a virtual frame cache address of the client A mapping relationship with the virtual address.

在另一个方面,本发明实施例提供了一种电子设备,其特征在于,所述电子设备包括:显示设备,存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行任一上述方法中各个步骤的指令。 In another aspect, an embodiment of the present invention provides an electronic device, including: a display device, a memory, one or more processors; and one or more modules, the one or more The modules are stored in the memory and are configured to be executed by the one or more processors, the one or more modules including instructions for performing the various steps of any of the above methods.

在另一个方面,本发明实施例提供了一种与包括显示设备的电子设备结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行任一上述方法中各个步骤的指令。In another aspect, embodiments of the present invention provide a computer program product for use with an electronic device including a display device, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein The computer program mechanism includes instructions for performing the various steps of any of the above methods.

本发明实施例的有益效果如下:The beneficial effects of the embodiments of the present invention are as follows:

本发明实施例建立客户机中的虚拟帧缓存地址与真实的物理帧缓存在用户空间的虚拟地址的映射关系,能够将运行于客户机的客户操作系统的显示数据基于地址映射关系发送至物理帧缓存,无需为虚拟帧缓存分配物理存储区,也省去存储区之间拷贝的时间和过程,因此能够减少主操作系统资源和存储资源的占用,提升虚拟化系统性能,缩短客户操作系统显示操作执行时间。The embodiment of the present invention establishes a mapping relationship between a virtual frame cache address in a client and a virtual address cache of a real physical frame in a user space, and can send display data of a guest operating system running on the client to a physical frame based on an address mapping relationship. Cache, no need to allocate physical storage area for virtual frame cache, and also saves the time and process of copying between storage areas, thus reducing the occupation of main operating system resources and storage resources, improving the performance of virtualized systems, and shortening the display operation of guest operating systems. execution time.

附图说明DRAWINGS

下面将参照附图描述本发明的具体实施例,其中:Specific embodiments of the present invention will be described below with reference to the accompanying drawings, in which:

图1示出了现有技术中虚拟化系统架构示意图;FIG. 1 is a schematic diagram showing the architecture of a virtualization system in the prior art;

图2示出了本发明实施例一中帧缓存实现方法应用的虚拟化系统架构示意图;2 is a schematic structural diagram of a virtualization system applied to a frame buffer implementation method according to Embodiment 1 of the present invention;

图3示出了本发明实施例一中帧缓存实现方法的流程示意图;FIG. 3 is a schematic flowchart diagram of a method for implementing a frame buffer according to Embodiment 1 of the present invention;

图4示出了本发明实施例二中帧缓存实现装置的结构示意图;4 is a schematic structural diagram of a device for implementing a frame buffer in Embodiment 2 of the present invention;

图5示出了本申请实施例三中电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device in Embodiment 3 of the present application.

具体实施方式detailed description

为了使本发明的技术方案及优点更加清楚明白,以下结合附图对本发明的示例性实施例进行进一步详细的说明,显然,所描述的实施例仅是本发明的一部分实施例,而不是所有实施例的穷举。并且在不冲突的情况下,本说明中的实施例及实施例中的特征可以互相结合。The embodiments of the present invention are further described in detail with reference to the accompanying drawings, in which FIG. An exhaustive example. And in the case of no conflict, the features in the embodiments and the embodiments in the description can be combined with each other.

发明人在发明过程中注意到:在虚拟化系统架构中实现帧缓存的现有方 案,需要为虚拟帧缓存分配物理存储区,并且在需要显示时,将虚拟帧缓存物理存储区中的内容拷贝到真实的帧缓存对应的存储区中,会占用大量主操作系统资源和存储资源,导致虚拟化系统性能降低,客户操作系统显示操作执行时间长。The inventor noticed during the invention that the existing side of the frame buffer was implemented in the virtualized system architecture. The physical storage area needs to be allocated for the virtual frame cache, and when the content needs to be displayed, the content in the physical storage area of the virtual frame cache is copied to the storage area corresponding to the real frame buffer, which occupies a large amount of main operating system resources and storage resources. As a result, the performance of the virtualization system is degraded, and the guest operating system displays an operation execution time.

针对上述不足,本发明提供了一种帧缓存实现方法,建立客户机中的虚拟帧缓存地址与真实的物理帧缓存在用户空间的虚拟地址的映射关系,能够将运行于客户机的客户操作系统的显示数据基于地址映射关系发送至物理帧缓存,无需为虚拟帧缓存分配物理存储区,也省去存储区之间拷贝的时间和过程,因此能够减少主操作系统资源和存储资源的占用,提升虚拟化系统性能,缩短客户操作系统显示操作执行时间。In view of the above-mentioned deficiencies, the present invention provides a frame buffer implementation method, which establishes a mapping relationship between a virtual frame cache address in a client and a virtual address cache of a real physical frame in a user space, and can operate a guest operating system running on the client. The display data is sent to the physical frame buffer based on the address mapping relationship, and the physical storage area is not allocated for the virtual frame buffer, and the time and process of copying between the storage areas are omitted, thereby reducing the occupation of the main operating system resources and storage resources, and improving Virtualize system performance and reduce the execution time of guest operating system display operations.

为了便于本发明的实施,下面以实例进行说明。In order to facilitate the implementation of the present invention, the following description will be made by way of examples.

实施例一:Embodiment 1:

图2示出了本发明实施例一中帧缓存实现方法应用的虚拟化系统架构示意图,客户机上运行的客户操作系统的内核层中运行虚拟缓存驱动,以实现客户机的虚拟缓存。FIG. 2 is a schematic diagram of a virtualized system architecture applied to a frame buffer implementation method according to Embodiment 1 of the present invention. A virtual cache driver is run in a kernel layer of a guest operating system running on a client to implement a virtual cache of a client.

图3示出了本发明实施例一中帧缓存实现方法流程示意图,如图3所示,所述帧缓存实现方法包括:FIG. 3 is a schematic flowchart of a method for implementing a frame buffer according to Embodiment 1 of the present invention. As shown in FIG. 3, the method for implementing a frame buffer includes:

步骤101,确定显示设备对应的物理帧缓存地址映射至用户空间的虚拟地址;Step 101: Determine that a physical frame cache address corresponding to the display device is mapped to a virtual address of the user space.

步骤102,响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。Step 102: In response to the client obtaining a request for a storage area address corresponding to the virtual frame buffer address, assigning the virtual address to the client, so that the client establishes the virtual frame cache address of the client and the The mapping relationship of virtual addresses.

在所述步骤101中,因虚拟化架构中硬件设备不能直接被访问,因此通常会建立设备物理空间与用户空间中虚拟地址的对应关系,从而能够通过存储器映射实现用户空间直接访问设备的物理地址。一个物理显示设备通常对应一个物理帧缓存存储区,显示设备能够直接读取物理帧缓存存储区中的显 示数据进行显示。该物理帧缓存存储区的地址空间在宿主机的用户空间映射为一个虚拟的地址空间,使物理帧缓存存储区的地址空间中的任一地址在用户面能够映射为一个虚拟的地址。In the step 101, because the hardware device in the virtualization architecture cannot be directly accessed, the correspondence between the physical space of the device and the virtual address in the user space is usually established, so that the physical address of the device directly accessed by the user space can be realized through the memory mapping. . A physical display device usually corresponds to a physical frame cache storage area, and the display device can directly read the display in the physical frame cache storage area. Display data for display. The address space of the physical frame cache storage area is mapped to a virtual address space in the host space of the host, so that any address in the address space of the physical frame cache storage area can be mapped to a virtual address on the user plane.

本实施例中首先确定虚拟化系统架构中的显示设备对应的物理帧缓存地址空间映射至用户空间后的虚拟地址空间,在确定其映射关系时也可以通过确定其中某一个地址(例如首地址)的映射关系进而获取地址空间的映射关系。In this embodiment, first, the physical frame cache address space corresponding to the display device in the virtualization system architecture is mapped to the virtual address space after the user space, and when determining the mapping relationship, one of the addresses (for example, the first address) may also be determined. The mapping relationship in turn obtains the mapping relationship of the address space.

在步骤102中,客户机中的虚拟帧缓存同样需要地址映射才能确定其对应的存储空间,当客户机请求获取其虚拟帧缓存地址对应的存储区地址时,将上述步骤101中确定的物理帧缓存地址映射至用户空间的虚拟地址提供给客户机,以便客户机将其虚拟帧缓存地址空间映射至上述虚拟地址空间,进而映射至物理帧缓存存储区的地址空间。In step 102, the virtual frame buffer in the client also needs address mapping to determine its corresponding storage space. When the client requests to obtain the storage area address corresponding to the virtual frame buffer address, the physical frame determined in step 101 above is determined. The virtual address mapped to the user space by the cache address is provided to the client so that the client maps its virtual frame buffer address space to the virtual address space described above, thereby mapping to the address space of the physical frame cache storage area.

客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系之后,当虚拟帧缓存驱动接收到客户操作系统向虚拟帧缓存地址的操作指令时,能够根据虚拟帧缓存地址与所述虚拟地址的映射关系,以及所述虚拟地址与物理帧缓存地址的映射关系,使所述操作指令直接指向物理帧缓存,使客户机的客户操作系统能够直接对物理帧缓存进行操作。当进行显示时,客户操作系统可直接将显示数据直接写入物理帧缓存,而无需再拷贝。After the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address, when the virtual frame cache driver receives an operation instruction of the guest operating system to the virtual frame cache address, the virtual frame cache address and the The mapping relationship between the virtual address and the physical address cache address is such that the operation instruction directly points to the physical frame cache, so that the client operating system of the client can directly operate on the physical frame buffer. When displayed, the guest operating system can directly write display data directly to the physical frame buffer without having to copy it.

在一些实施方式中,在所述客户机启动时,响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。In some embodiments, when the client is started, in response to a request by the client to obtain a memory area address corresponding to its virtual frame buffer address, the virtual address is assigned to the client to cause the client to establish A mapping relationship between a virtual frame buffer address of the client and the virtual address.

上述步骤102可以发生于客户机启动时。在客户机启东时,首先客户机中的虚拟帧缓存驱动通过操作主操作系统中物理帧缓存驱动在用户空间提供的接口获得物理帧缓存的参数,物理帧缓存在存储区的大小,或者长、宽,以及支持的数据格式等信息,虚拟帧缓存驱动根据物理帧缓存参数确定或者计算得到物理帧缓存实际存储空间的大小。之后在客户操作系统启动的命令 行中,通过连续内存分配器预留大于等于物理帧缓存两倍大小的内存空间,同时设置连续内存分配器的起始地址为系统的闲置的地址,其中虚拟帧缓存地址空间分配过程中确保所述起始地址是按照客户操作系统内核的页表要求进行对齐的,并且该起始地址后预留的地址空间都是闲置的。The above step 102 can occur at the time of client startup. When the client starts, the virtual frame cache driver in the client first obtains the physical frame buffer parameter by operating the physical frame buffer driver in the host operating system, and the physical frame is buffered in the storage area, or is long. The width, and the supported data format, etc., the virtual frame buffer driver determines or calculates the actual storage space size of the physical frame buffer according to the physical frame buffer parameter. After the command started in the guest operating system In the row, the contiguous memory allocator reserves a memory space that is twice the size of the physical frame buffer, and sets the starting address of the contiguous memory allocator to the idle address of the system, wherein the virtual frame buffer address space is allocated during the process. The starting address is aligned according to the page table requirements of the guest operating system kernel, and the address space reserved after the starting address is idle.

确定虚拟帧缓存地址之后,通过设置虚拟帧缓存提供的基地址设置寄存器将所述虚拟帧缓存地址传递给客户机,使客户机在获得该虚拟帧缓存地址后,可与物理帧缓存地址映射至用户空间的虚拟地址再进行映射。After determining the virtual frame buffer address, the virtual frame buffer address is transmitted to the client by setting a base address setting register provided by the virtual frame buffer, so that the client can map the physical frame buffer address to the physical frame buffer address after obtaining the virtual frame buffer address. The virtual address of the user space is then mapped.

在一些实施方式中,当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。In some embodiments, when the guest operating system running on the client operates the virtual frame buffer, and the operating system is an operating system running in the foreground, an operation instruction is sent to the physical frame buffer, And return the information of the successful operation to the guest operating system.

若虚拟化系统架构中运行了多个客户机,各客户机运行各自的客户操作系统,此时可能有一个客户操作系统为前台运行状态,而其他客户操作系统为后台运行状态,或者关闭状态。各客户机能够感知当前自身的客户操作系统是否为前台运行状态,只有在某一客户机的客户操作系统在前台运行时,虚拟帧缓存驱动才会将客户操作系统对虚拟帧缓存的操作指令,依据地址映射关系下发至物理帧缓存。例如仅当某一客户机的客户操作系统在前台运行时,该客户机的虚拟帧缓存驱动才能够将需要显示的像素写入物理帧缓存,并且在写入完成后可向客户操作系统反馈操作成功的返回值。If multiple clients are running in the virtualization system architecture and each client runs its own guest operating system, there may be one guest operating system running in the foreground and other guest operating systems running in the background or in the shutdown state. Each client can sense whether the current guest operating system is in the foreground running state. Only when the guest operating system of a certain client runs in the foreground, the virtual frame cache driver will execute the operation instruction of the guest operating system to cache the virtual frame. Is delivered to the physical frame buffer according to the address mapping relationship. For example, only when a guest operating system of a client is running in the foreground, the virtual frame buffer driver of the client can write the pixels to be displayed into the physical frame buffer, and can feedback the operation to the guest operating system after the writing is completed. The successful return value.

在一些实施方式中,当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为后台运行的操作系统时,不向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。In some embodiments, when the guest operating system running on the client operates the virtual frame buffer, and the operating system is an operating system running in the background, the operation instruction is not sent to the physical frame cache. And return information about the successful operation to the guest operating system.

若虚拟化系统架构中运行了多个客户机,而其中某一客户机的客户操作系统在后台运行时,该客户操作系统或者其上运行的应用程序可能仍会向虚拟帧缓存发起帧缓存操作,此时不再将客户操作系统对虚拟帧缓存的操作指令,依据地址映射关系下发至物理帧缓存,而是直接向客户操作系统返回操作成功的信息。本实施方式中虚拟帧缓存驱动模拟操作成功进行,但实际上 并不进行相应操作,避免对当前占用物理帧缓存的前台运行的操作系统的显示造成影响。If multiple clients are running in the virtualized system architecture and the guest operating system of one of the clients is running in the background, the guest operating system or the application running on it may still initiate a frame buffer operation to the virtual frame cache. At this time, the operation instruction of the virtual operating system cached by the guest operating system is not sent to the physical frame cache according to the address mapping relationship, but the information of the successful operation is directly returned to the guest operating system. In this embodiment, the virtual frame buffer driving simulation operation is successfully performed, but actually The corresponding operation is not performed to avoid affecting the display of the operating system running in the foreground that currently occupies the physical frame buffer.

在一些实施方式中,通过设置所述虚拟帧缓存的寄存器,向物理帧缓存下发操作指令。所述虚拟帧缓存的寄存器与物理帧缓存的寄存器对应,通常包括多组与虚拟帧缓存的参数、操作、地址或者控制相关的寄存器。例如帧缓存的寄存器可以包括以下几个/组:In some embodiments, an operational instruction is issued to the physical frame buffer by setting a register of the virtual frame buffer. The register of the virtual frame buffer corresponds to a register of the physical frame buffer, and generally includes a plurality of sets of registers related to parameters, operations, addresses, or controls of the virtual frame buffer. For example, the frame buffer register can include the following groups/groups:

1)属性寄存器1) Property register

为虚拟帧缓存驱动设置虚拟帧缓存的属性寄存器,为物理帧缓存驱动设置物理帧缓存的属性寄存器,这两个寄存器中均存储物理帧缓存参数,其中虚拟帧缓存的属性寄存器中的物理帧缓存参数可以为客户机启动时虚拟帧缓存驱动读取物理帧缓存的属性寄存器的数据得到的。所述物理帧缓存参数可以为物理帧缓存在存储设备中的长、宽以及支持的数据格式等信息。客户操作系统可以对属性寄存器进行读操作以获取物理帧缓存参数。Setting a virtual frame buffer attribute register for the virtual frame buffer driver, and setting a physical frame buffer attribute register for the physical frame buffer driver, both of which store physical frame buffer parameters, wherein the physical frame buffer in the virtual frame buffer's attribute register The parameters can be obtained by the virtual frame buffer driver reading the data of the property register of the physical frame buffer when the client starts. The physical frame buffer parameter may be information such as length, width, and supported data format of the physical frame buffered in the storage device. The guest operating system can read the property register to get the physical frame buffer parameters.

当前台运行的客户操作系统读取帧缓存参数时,客户操作系统能够通过虚拟帧缓存驱动正常读取虚拟帧缓存的参数,也即物理帧缓存参数。当后台运行的客户操作系统读取帧缓存参数时,一种情况是客户操作系统不再能够通过虚拟帧缓存驱动正常读取虚拟帧缓存的参数,仅获得读取成功的信息;另一种情况是物理帧缓存的属性寄存器已经将其数据同步至虚拟帧缓存的属性寄存器,而其中帧缓存参数通常是只读并且不会改变的,此种情况下,即便客户操作系统在后台运行,其仍能够正常读取虚拟帧缓存的属性寄存器以获取物理帧缓存参数。When the guest operating system running by the current station reads the frame buffer parameter, the guest operating system can automatically read the parameters of the virtual frame buffer, that is, the physical frame buffer parameter, through the virtual frame buffer. When the guest operating system running in the background reads the frame buffer parameter, one case is that the guest operating system can no longer read the parameters of the virtual frame buffer normally through the virtual frame buffer, and only obtains the information of successful reading; another case The attribute register of the physical frame buffer has synchronized its data to the attribute register of the virtual frame buffer, and the frame buffer parameter is usually read-only and does not change, in which case even if the guest operating system is running in the background, The property register of the virtual frame buffer can be read normally to obtain the physical frame buffer parameters.

2)地址寄存器2) Address register

为虚拟帧缓存驱动设置虚拟帧缓存的地址寄存器,用于存储虚拟帧缓存地址。在客户机启动时,虚拟帧缓存驱动通过连续内存分配器获取虚拟帧缓存地址后可通过设置虚拟帧缓存的地址设置寄存器来传递该地址给客户机。同样的物理帧缓存驱动设置有物理帧缓存的地址寄存器,用于存储物理帧缓 存地址映射至用户空间的虚拟地址。虚拟帧缓存驱动可由物理帧缓存的地址寄存器获得所述虚拟地址,以建立映射关系。An address register for the virtual frame buffer is set for the virtual frame buffer driver for storing the virtual frame buffer address. When the client starts, the virtual frame cache driver can obtain the virtual frame buffer address through the contiguous memory allocator and then pass the address to the client by setting the address setting register of the virtual frame buffer. The same physical frame buffer driver is provided with an address register of the physical frame buffer for storing physical frame buffers. The storage address is mapped to the virtual address of the user space. The virtual frame buffer driver can obtain the virtual address from an address register of the physical frame buffer to establish a mapping relationship.

当前台运行的客户操作系统中运行的应用程序需要显示相关内容时,可读取虚拟帧缓存地址寄存器中的虚拟帧缓存地址,进而向虚拟帧缓存中写入显示数据。When the application running in the guest operating system running in the current station needs to display related content, the virtual frame buffer address in the virtual frame buffer address register can be read, and the display data is written into the virtual frame buffer.

3)中断寄存器3) Interrupt register

为物理帧缓存驱动设置物理帧缓存的中断寄存器,用于存储物理帧缓存的中断信息,所述中断信息可以包括中断使能和中断状态等信息,分别由中断使能寄存器和中断状态寄存器存储,所述中断寄存器能够提供物理帧缓存设备的操作结果或者其他异步事件等。为虚拟帧缓存驱动同样设置虚拟帧缓存的中断寄存器,用于存储由物理帧缓存的断寄存器获取的中断信息。当物理帧缓存的中断寄存器中中断信息改变时,可将其更新至各客户机中的虚拟帧缓存的中断寄存器。当虚拟帧缓存驱动获取前台运行的客户操作系统发起的帧缓存操作请求时,可根据虚拟帧缓存的中断寄存器中存储的物理帧缓存中断信息判断当前物理帧缓存是否能够执行相关操作,当判断允许操作时,向物理帧缓存下发操作指令。An interrupt register for setting a physical frame buffer for the physical frame buffer driver, configured to store interrupt information of the physical frame buffer, where the interrupt information may include information such as an interrupt enable and an interrupt state, which are respectively stored by an interrupt enable register and an interrupt status register. The interrupt register can provide an operation result of a physical frame buffer device or other asynchronous event or the like. An interrupt register that also sets a virtual frame buffer for the virtual frame buffer driver is used to store the interrupt information obtained by the physical frame buffer's broken register. When the interrupt information in the interrupt register of the physical frame buffer changes, it can be updated to the interrupt register of the virtual frame buffer in each client. When the virtual frame buffer driver obtains a frame buffer operation request initiated by the guest operating system running in the foreground, the physical frame buffer interrupt information stored in the interrupt register of the virtual frame buffer may be used to determine whether the current physical frame buffer can perform related operations, and when the judgment allows In operation, an operation instruction is issued to the physical frame buffer.

上述各种实施方式中,客户操作系统是否处于前台运行状态,决定了其是否能够基于虚拟帧缓存地址与物理帧缓存地址的映射关系对真正的物理帧缓存进行某些操作。通常在某一时刻仅有一个操作系统(主操作系统或者某一客户操作系统)在前台运行,也仅有该操作系统发起的帧缓存操作能够完全被执行,而其他后台运行的客户操作系统向其客户机的虚拟帧缓存发起的帧缓存操作也会返回操作成功的返回值,不会报错也不会影响前台操作系统的显示。In the foregoing various implementation manners, whether the guest operating system is in the foreground running state determines whether it can perform some operations on the real physical frame buffer based on the mapping relationship between the virtual frame buffer address and the physical frame cache address. Usually only one operating system (main operating system or a guest operating system) runs in the foreground at a time, and only the frame buffer operation initiated by the operating system can be completely executed, while other client operating systems running in the background The frame buffer operation initiated by the virtual frame buffer of the client also returns the return value of the successful operation, and will not report an error or affect the display of the foreground operating system.

在一些实施方式中,还包括,获取所述物理帧缓存的物理帧缓存参数;当接收到运行于所述客户机的客户操作系统的帧缓存参数查询请求时,提供所述物理帧缓存参数。 In some embodiments, the method further includes: acquiring a physical frame buffer parameter of the physical frame buffer; and providing the physical frame buffer parameter when receiving a frame buffer parameter query request of a guest operating system running in the client.

具体实施时,可在客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系时将物理帧缓存的属性寄存器中的帧缓存参数同步至虚拟帧缓存的属性寄存器。帧缓存参数通常是只读并且不会改变的,因此可以设置客户机中运行于前台或者后台的操作系统均能够读取所述虚拟帧缓存的属性寄存器中的帧缓存参数,以获得物理帧缓存参数,进而能够向虚拟帧缓存发送符合参数要求的显示数据。In a specific implementation, the frame buffer parameter in the attribute register of the physical frame buffer may be synchronized to the attribute register of the virtual frame buffer when the client establishes a mapping relationship between the virtual frame buffer address of the client and the virtual address. The frame buffer parameter is usually read-only and does not change, so it can be set that the operating system running in the foreground or the background in the client can read the frame buffer parameter in the attribute register of the virtual frame buffer to obtain the physical frame buffer. The parameter, in turn, is capable of transmitting display data that meets the parameter requirements to the virtual frame buffer.

本实施例中建立客户机中的虚拟帧缓存地址与真实的物理帧缓存在用户空间的虚拟地址的映射关系,能够将运行于客户机的客户操作系统的显示数据基于地址映射关系发送至物理帧缓存,无需为虚拟帧缓存分配物理存储区,也省去存储区之间拷贝的时间和过程,因此能够减少主操作系统资源和存储资源的占用,提升虚拟化系统性能,缩短客户操作系统显示操作执行时间。本实施例还公开了可在客户机启动过程中及时建立虚拟帧缓存地址映射关系;分别公开了前台运行或者后台运行的客户操作系统的帧缓存实现方式,以及基于帧缓存寄存器设置对物理帧缓存进行操作的方法,确保前台运行的客户操作系统能够正常调用物理帧缓存,而后台运行的操作系统仍能读取物理帧缓存参数,但不会影响当前前台运行的操作系统对物理帧缓存的调用;同时,可将物理帧缓存参数提供给虚拟帧缓存驱动,以便客户操作系统能够在发起帧缓存操作时能够符合帧缓存参数要求。In this embodiment, the mapping relationship between the virtual frame cache address in the client and the virtual address of the real physical frame cache in the user space is established, and the display data of the guest operating system running on the client can be sent to the physical frame based on the address mapping relationship. Cache, no need to allocate physical storage area for virtual frame cache, and also saves the time and process of copying between storage areas, thus reducing the occupation of main operating system resources and storage resources, improving the performance of virtualized systems, and shortening the display operation of guest operating systems. execution time. The embodiment further discloses that the virtual frame cache address mapping relationship can be established in time during the client startup process; the frame cache implementation manner of the guest operating system running in the foreground or in the background is separately disclosed, and the physical frame buffer is set based on the frame buffer register setting. The operation method ensures that the guest operating system running in the foreground can call the physical frame cache normally, and the operating system running in the background can still read the physical frame cache parameter, but does not affect the current operating system cache operation of the operating system in the foreground. At the same time, the physical frame buffer parameters can be provided to the virtual frame buffer driver so that the guest operating system can conform to the frame buffer parameter requirements when initiating the frame buffer operation.

实施例二:Embodiment 2:

基于同一发明构思,本发明实施例中还提供了一种帧缓存实现装置,由于这些装置解决问题的原理与帧缓存实现方法相似,因此这些装置的实施可以参见方法的实施,重复之处不再赘述。如图4所示,所述帧缓存实现装置200包括:确定模块201,用于确定显示设备对应的物理帧缓存地址映射至用户空间的虚拟地址;地址分配模块202,用于响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。 Based on the same inventive concept, a frame buffer implementation apparatus is also provided in the embodiment of the present invention. Since the principle of solving the problem is similar to the frame buffer implementation method, the implementation of these devices can refer to the implementation of the method, and the repetition is no longer Narration. As shown in FIG. 4, the frame buffer implementation apparatus 200 includes: a determining module 201, configured to determine a physical frame cache address corresponding to the display device to be mapped to a virtual address of the user space; and an address allocation module 202, configured to receive the client in response to the client A request for a storage area address corresponding to the virtual frame buffer address, the virtual address is allocated to the client, so that the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address.

在一些实施方式中,所述地址分配模块202具体用于,在所述客户机启动时,响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。In some embodiments, the address allocation module 202 is specifically configured to allocate the virtual address to the client in response to the client requesting the storage area address corresponding to the virtual frame cache address when the client is started. And causing the client to establish a mapping relationship between the virtual frame cache address of the client and the virtual address.

在一些实施方式中,所述装置还包括:操作模块203,用于在所述地址分配模块202响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系之后:In some embodiments, the apparatus further includes: an operation module 203, configured to allocate the virtual address to the address allocation module 202 in response to a request by the client to obtain a storage area address corresponding to a virtual frame buffer address thereof a client, after the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address:

当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息;当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为后台运行的操作系统时,不允许向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。When the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the foreground, an operation instruction is sent to the physical frame cache, and is returned to the guest operating system. The operation succeeds. When the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the background, the operation instruction is not allowed to be sent to the physical frame cache. And return information about the successful operation to the guest operating system.

在一些实施方式中,所述操作模块203具体用于,在所述地址分配模块202响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系之后,当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,通过设置所述虚拟帧缓存的寄存器,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。In some embodiments, the operation module 203 is specifically configured to allocate the virtual address to the client in response to the request by the address allocation module 202 to obtain a storage area address corresponding to the virtual frame cache address thereof. After the client establishes a mapping relationship between the virtual frame cache address of the client and the virtual address, when the guest operating system running on the client operates the virtual frame cache, and the operation When the system is an operating system running in the foreground, an operation instruction is sent to the physical frame cache by setting a register of the virtual frame buffer, and information indicating that the operation is successful is returned to the guest operating system.

在一些实施方式中,所述地址分配模块202,还用于获取所述物理帧缓存的物理帧缓存参数;所述操作模块203,还用于当接收到运行于所述客户机的客户操作系统的帧缓存参数查询请求时,提供所述物理帧缓存参数。In some embodiments, the address allocation module 202 is further configured to acquire a physical frame cache parameter of the physical frame cache; the operation module 203 is further configured to: when receiving a guest operating system running on the client The physical frame buffer parameter is provided when the frame buffer parameter queries the request.

实施例三:Embodiment 3:

基于同一发明构思,本发明实施例中还提供了一种电子设备,由于其原 理与帧缓存实现方法相似,因此其实施可以参见方法的实施,重复之处不再赘述。如图5所示,所述电子设备300包括:显示设备301,存储器302,一个或多个处理器303;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行任一上述方法中各个步骤的指令。Based on the same inventive concept, an embodiment of the present invention further provides an electronic device due to its original The implementation is similar to the frame buffer implementation, so the implementation can refer to the implementation of the method, and the repeated description will not be repeated. As shown in FIG. 5, the electronic device 300 includes: a display device 301, a memory 302, one or more processors 303; and one or more modules, the one or more modules being stored in the memory, And being configured to be executed by the one or more processors, the one or more modules comprising instructions for performing the various steps of any of the above methods.

本实施例中,所述电子设备可以为手机、平板电脑、机器人或者其他智能设备。In this embodiment, the electronic device may be a mobile phone, a tablet computer, a robot, or other smart device.

实施例四:Embodiment 4:

基于同一发明构思,本发明实施例还提供了一种与包括显示设备的电子设备结合使用的帧缓存实现计算机程序产品,由于其原理与帧缓存实现方法相似,因此其实施可以参见方法的实施,重复之处不再赘述。所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行任一前述方法中各个步骤的指令。Based on the same inventive concept, an embodiment of the present invention further provides a frame buffer implementation computer program product for use in combination with an electronic device including a display device. Since the principle is similar to the frame buffer implementation method, the implementation may refer to the implementation of the method. The repetitions are not repeated here. The computer program product comprises a computer readable storage medium and a computer program mechanism embodied therein, the computer program mechanism comprising instructions for performing the various steps of any of the foregoing methods.

为了描述的方便,以上所述装置的各部分以功能分为各种模块分别描述。当然,在实施本发明时可以把各模块或单元的功能在同一个或多个软件或硬件中实现。For the convenience of description, the various parts of the above-described apparatus are separately described by functions into various modules. Of course, the functions of the various modules or units may be implemented in one or more software or hardware in the practice of the invention.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通 过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing device to produce a machine that enables Instructions executed by a processor of a computer or other programmable data processing device generate means for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。 While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and

Claims (12)

一种帧缓存实现方法,其特征在于,所述方法包括:A frame buffer implementation method, the method comprising: 确定显示设备对应的物理帧缓存地址映射至用户空间的虚拟地址;Determining that the physical frame cache address corresponding to the display device is mapped to the virtual address of the user space; 响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。Responding to a request by the client to obtain a storage area address corresponding to its virtual frame buffer address, assigning the virtual address to a client, such that the client establishes a virtual frame buffer address of the client and the virtual address Mapping relations. 如权利要求1所述的方法,其特征在于,所述响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系,包括:The method of claim 1 wherein said virtual address is assigned to a client in response to a request by a client to obtain a memory area address corresponding to its virtual frame buffer address for said client to establish The mapping relationship between the virtual frame cache address of the client and the virtual address includes: 在所述客户机启动时,响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。When the client is started, in response to a request by the client to obtain a storage area address corresponding to its virtual frame buffer address, the virtual address is assigned to the client to cause the client to establish a virtual frame of the client The mapping relationship between the cache address and the virtual address. 如权利要求1所述的方法,其特征在于,在所述响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系之后,还包括:The method of claim 1 wherein said virtual address is assigned to a client in response to a request by the client to obtain a memory area address corresponding to its virtual frame buffer address to cause said client After the mapping between the virtual frame cache address of the client and the virtual address is established, the method further includes: 当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息;When the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the foreground, an operation instruction is sent to the physical frame cache, and is returned to the guest operating system. Successful operation information; 当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为后台运行的操作系统时,不向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。When the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the background, the operating instruction is not sent to the physical frame cache, and is directed to the guest operating system. Returns information that the operation was successful. 如权利要求3所述的方法,其特征在于,所述当运行于所述客户机的 客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息,包括:The method of claim 3 wherein said operating on said client The guest operating system operates the virtual frame cache, and when the operating system is an operating system running in the foreground, the operating instruction is sent to the physical frame cache, and the information about the successful operation is returned to the guest operating system, including: 当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,通过设置所述虚拟帧缓存的寄存器,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。When the guest operating system running on the client operates the virtual frame buffer, and the operating system is an operating system running in the foreground, the virtual frame buffer is set to be buffered to the physical frame. Send operation instructions and return information about successful operations to the guest operating system. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 wherein the method further comprises: 获取所述物理帧缓存的物理帧缓存参数;Obtaining a physical frame buffer parameter of the physical frame buffer; 当接收到运行于所述客户机的客户操作系统的帧缓存参数查询请求时,提供所述物理帧缓存参数。The physical frame buffer parameter is provided when a frame buffer parameter query request of a guest operating system running on the client is received. 一种帧缓存实现装置,其特征在于,所述装置包括:A frame buffer implementation device, characterized in that the device comprises: 确定模块,用于确定显示设备对应的物理帧缓存地址映射至用户空间的虚拟地址;a determining module, configured to determine that a physical frame cache address corresponding to the display device is mapped to a virtual address of the user space; 地址分配模块,用于响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。An address allocation module, configured to allocate the virtual address to a client in response to a request by the client to obtain a storage area address corresponding to a virtual frame buffer address thereof, so that the client establishes a virtual frame cache address of the client A mapping relationship with the virtual address. 如权利要求6所述的装置,其特征在于,The device of claim 6 wherein: 所述地址分配模块具体用于,在所述客户机启动时,响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系。The address allocation module is specifically configured to, when the client starts, allocate the virtual address to a client in response to a request of the client to obtain a storage area address corresponding to the virtual frame cache address thereof, so that the client The machine establishes a mapping relationship between the virtual frame cache address of the client and the virtual address. 如权利要求6所述的装置,其特征在于,所述装置还包括:The device of claim 6 wherein said device further comprises: 操作模块,用于在所述地址分配模块响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户 机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系之后:An operation module, configured to allocate the virtual address to a client in response to a request by the address allocation module to obtain a storage area address corresponding to a virtual frame cache address thereof, so that the client After establishing a mapping relationship between the virtual frame cache address of the client and the virtual address: 当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息;When the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the foreground, an operation instruction is sent to the physical frame cache, and is returned to the guest operating system. Successful operation information; 当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为后台运行的操作系统时,不允许向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。When the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the background, the operation instruction is not allowed to be sent to the physical frame cache, and is operated to the client. The system returns information that the operation was successful. 如权利要求8所述的装置,其特征在于,The device of claim 8 wherein: 所述操作模块具体用于,在所述地址分配模块响应于客户机获取其虚拟帧缓存地址对应的存储区地址的请求,将所述虚拟地址分配给客户机,以使所述客户机建立所述客户机的虚拟帧缓存地址与所述虚拟地址的映射关系之后,当运行于所述客户机的客户操作系统对所述虚拟帧缓存进行操作,并且所述操作系统为前台运行的操作系统时,通过设置所述虚拟帧缓存的寄存器,向所述物理帧缓存下发操作指令,并向客户操作系统返回操作成功的信息。The operation module is specifically configured to allocate the virtual address to a client in response to a request by the address allocation module to obtain a storage area address corresponding to a virtual frame cache address thereof, so that the client establishes a location After the virtual frame cache address of the client is mapped to the virtual address, when the guest operating system running on the client operates the virtual frame cache, and the operating system is an operating system running in the foreground And setting an operation instruction to the physical frame cache by setting a register of the virtual frame buffer, and returning information of successful operation to the guest operating system. 如权利要求6所述的装置,其特征在于,The device of claim 6 wherein: 所述地址分配模块,还用于获取所述物理帧缓存的物理帧缓存参数;The address allocation module is further configured to acquire a physical frame buffer parameter of the physical frame buffer; 所述操作模块,还用于当接收到运行于所述客户机的客户操作系统的帧缓存参数查询请求时,提供所述物理帧缓存参数。The operation module is further configured to provide the physical frame cache parameter when receiving a frame buffer parameter query request of a guest operating system running on the client. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, comprising: 显示设备,存储器,一个或多个处理器;以及一个或多个模块,所述一个或多个模块被存储在所述存储器中,并被配置成由所述一个或多个处理器执行,所述一个或多个模块包括用于执行权利要求1-5中任一所述方法中各个步骤的指令。a display device, a memory, one or more processors; and one or more modules, the one or more modules being stored in the memory and configured to be executed by the one or more processors, The one or more modules include instructions for performing the various steps of the method of any of claims 1-5. 一种与包括显示设备的电子设备结合使用的计算机程序产品,所述计 算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括用于执行权利要求1-5中任一所述方法中各个步骤的指令。 A computer program product for use in conjunction with an electronic device including a display device The computer program product comprises a computer readable storage medium and a computer program mechanism embodied therein, the computer program mechanism comprising instructions for performing the various steps of the method of any of claims 1-5.
PCT/CN2016/108925 2016-12-07 2016-12-07 Method and apparatus for achieving frame buffering, electronic device and computer program product Ceased WO2018103022A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680002798.0A CN107077376B (en) 2016-12-07 2016-12-07 Frame buffer implementation method and device, electronic equipment and computer program product
PCT/CN2016/108925 WO2018103022A1 (en) 2016-12-07 2016-12-07 Method and apparatus for achieving frame buffering, electronic device and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/108925 WO2018103022A1 (en) 2016-12-07 2016-12-07 Method and apparatus for achieving frame buffering, electronic device and computer program product

Publications (1)

Publication Number Publication Date
WO2018103022A1 true WO2018103022A1 (en) 2018-06-14

Family

ID=59624500

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/108925 Ceased WO2018103022A1 (en) 2016-12-07 2016-12-07 Method and apparatus for achieving frame buffering, electronic device and computer program product

Country Status (2)

Country Link
CN (1) CN107077376B (en)
WO (1) WO2018103022A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110456994A (en) * 2019-07-19 2019-11-15 南京芯驰半导体科技有限公司 A remote display system and method
CN114153615A (en) * 2021-12-09 2022-03-08 腾讯科技(深圳)有限公司 Memory management method, apparatus, device, computer program and storage medium
CN115277924A (en) * 2022-07-26 2022-11-01 努比亚技术有限公司 Dynamic screen locking display control method and device and computer readable storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174010A1 (en) * 2018-03-15 2019-09-19 深圳前海达闼云端智能科技有限公司 Hardware control method and apparatus, electronic device, and computer-readable medium
CN110012346B (en) * 2019-03-26 2022-07-15 合肥杰发科技有限公司 Method, device and equipment for user application to quickly acquire frame data in frame cache
CN117170883B (en) * 2023-11-02 2024-01-30 西安芯云半导体技术有限公司 Rendering and display methods, devices, equipment and storage media

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211270A (en) * 2006-12-31 2008-07-02 联想(北京)有限公司 Display card, virtual machine system using same and display processing method
US20080215770A1 (en) * 2007-02-08 2008-09-04 Liu Yongfeng Method, apparatus and system for seamlessly sharing a graphics card amongst virtual machines
CN102999393A (en) * 2011-09-13 2013-03-27 联想(北京)有限公司 Data transmission method and device and electronic device
CN104750623A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Memory virtualization method and memory virtualization device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093258A1 (en) * 2001-11-14 2003-05-15 Roman Fishstein Method and apparatus for efficient simulation of memory mapped device access
US20070180157A1 (en) * 2006-02-01 2007-08-02 International Business Machines Corporation Method for cache hit under miss collision handling
US8065687B2 (en) * 2007-01-05 2011-11-22 Moka5, Inc. Bypass virtualization
CN101567849B (en) * 2009-04-30 2011-09-21 炬才微电子(深圳)有限公司 Data buffer caching method and device
CN102231138B (en) * 2011-07-08 2013-07-03 上海交通大学 Accurate memory data acquisition system and method for computer
CN103680461B (en) * 2012-09-20 2017-06-23 广东新岸线计算机系统芯片有限公司 A kind of method and display system for realizing showing frame buffer switching
US9804969B2 (en) * 2012-12-20 2017-10-31 Qualcomm Incorporated Speculative addressing using a virtual address-to-physical address page crossing buffer
CN105095094B (en) * 2014-05-06 2018-11-30 华为技术有限公司 EMS memory management process and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211270A (en) * 2006-12-31 2008-07-02 联想(北京)有限公司 Display card, virtual machine system using same and display processing method
US20080215770A1 (en) * 2007-02-08 2008-09-04 Liu Yongfeng Method, apparatus and system for seamlessly sharing a graphics card amongst virtual machines
CN102999393A (en) * 2011-09-13 2013-03-27 联想(北京)有限公司 Data transmission method and device and electronic device
CN104750623A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Memory virtualization method and memory virtualization device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110456994A (en) * 2019-07-19 2019-11-15 南京芯驰半导体科技有限公司 A remote display system and method
CN110456994B (en) * 2019-07-19 2023-03-10 南京芯驰半导体科技有限公司 A remote display system and method
CN114153615A (en) * 2021-12-09 2022-03-08 腾讯科技(深圳)有限公司 Memory management method, apparatus, device, computer program and storage medium
CN115277924A (en) * 2022-07-26 2022-11-01 努比亚技术有限公司 Dynamic screen locking display control method and device and computer readable storage medium
CN115277924B (en) * 2022-07-26 2024-05-17 努比亚技术有限公司 Dynamic lock screen display control method, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN107077376B (en) 2020-10-16
CN107077376A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
US11256445B2 (en) Virtual disk file format conversion method and apparatus
CN107077376B (en) Frame buffer implementation method and device, electronic equipment and computer program product
CN107003892B (en) GPU virtualization method, apparatus, system and electronic device, computer program product
CN101847105B (en) Computer and internal memory sharing method of a plurality of operation systems
US9811366B2 (en) Dynamically using system memory as video memory for virtual graphics processing units
US10055254B2 (en) Accelerated data operations in virtual environments
CN111309649A (en) A data transmission and task processing method, device and device
US12105648B2 (en) Data processing method, apparatus, and device
CN107077375B (en) Display method and device for multiple operating systems and electronic equipment
CN106796536A (en) Memory pool access method, device and electronic equipment for multiple operating system
CN107577733B (en) A method and system for accelerating data replication
US9436395B2 (en) Mechanisms to save user/kernel copy for cross device communications
CN117009258B (en) Method, device and equipment for accessing file system disk
US20190317716A1 (en) Video display method, electronic device and computer program product thereof
CN115454358B (en) Data storage control method and device and image processing system
WO2015154226A1 (en) Method, device and processor for data communication in virtualized environment
CN113485791B (en) Configuration method, access method, device, virtualization system and storage medium
CN105718211B (en) Information processing equipment and information processing method
TWI452468B (en) Method for sharing memory of virtual machine and computer system using the same
WO2017113329A1 (en) Cache management method for host cluster and host
CN120429067B (en) GPU (graphics processing unit) virtualized video memory management method, device, storage medium and program product
CN119883120A (en) Data migration method, device, chip, equipment, medium and product
CN120743496A (en) Memory mapping method, device, equipment and medium of QXL display equipment
CN120950228A (en) Data processing methods and electronic equipment
CN117829170A (en) SD card read/write speed determination method, medium and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16923526

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.10.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16923526

Country of ref document: EP

Kind code of ref document: A1