Method, system, terminal and storage medium for accessing virtual devices across bus domains

By using address mapping information in the control bridge to determine and replace the address of access requests between virtual devices, the system chaos caused by complex access request types in the virtual scenario of cross-bus domain devices is solved, and the correct routing and forwarding of access requests is achieved.

CN118445219BActive Publication Date: 2024-12-27SHENZHEN CONFIDENTIAL COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410549444.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-12-27
Estimated Expiration
2044-05-06

AI Technical Summary

Technical Problem

In the virtual scenario of device across bus domains, the types of access requests between devices are complex, which can easily lead to confusion in system access.

Method used

The access request of the virtual device is obtained through the control bridge, and the access type is determined using the preset address mapping information. If it is accessed between virtual devices, the address is replaced and an update access request is generated to ensure that the correct route is forwarded to the specific person on the device lender Address space.

Benefits of technology

It solves the problem of system access chaos caused by complex access request types in virtual scenarios of cross-bus domain devices, and ensures that access requests can be correctly routed and forwarded to the target address space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118445219B_ABST
    Figure CN118445219B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, terminal and storage medium for inter-virtual device access across bus domains, and relates to the field of virtual device technology. When the present invention obtains an active external access request from a virtual device of a device lender, the access type of the access request is determined by pre-established address mapping information, and the request address is replaced in time when the access type is determined to be an inter-virtual device access, so as to ensure that the updated access request after the address replacement can be correctly routed and forwarded to the specific address space of the device lender. This solves the problem in the prior art that in a device virtualization scenario across bus domains, the types of inter-device access requests are complex, which easily leads to system access confusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual device technology, and in particular to a method, system, terminal and storage medium for accessing virtual devices across bus domains. Background Art

[0002] The device virtualization of the PCI-Express (PCIe) standard refers to the device borrower generating a corresponding virtual PCIe device locally through virtualization technology based on the physical device in the device lender (i.e., the virtualized PCIe device). In this cross-bus domain device virtualization scenario, the access request between the virtualized devices may represent the normal access request between the devices in the device lender, or it may represent the access request between the virtual devices in the device borrower. Therefore, in the cross-bus domain device virtualization scenario, the types of access requests between devices are complex, which can easily lead to system access confusion.

[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the invention

[0004] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a method, system, terminal and storage medium for accessing virtual devices across bus domains are provided, aiming to solve the problem in the prior art that in a device virtualization scenario across bus domains, the types of access requests between devices are complex, which easily leads to system access confusion.

[0005] The technical solution adopted by the present invention to solve the problem is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for accessing virtual devices across bus domains. The method is applied to a control bridge, and the control bridge is used to connect a bus of a virtual device and a device lender. The method includes:

[0007] Obtaining an access request from a virtual device connected to the virtual device to another virtual device in the device lender;

[0008] Obtaining preset address mapping information, and determining the access type according to the request address of the access request and the address mapping information, wherein the address mapping information is used to reflect the address mapping relationship between other virtualized devices and corresponding virtual devices, except for the virtualized device connected to the device itself, and the virtual device is a device virtualized by the device borrower based on the virtualized device in the device lender;

[0009] If the access type is inter-virtual device access, performing address replacement on the request address of the access request according to the address mapping information to obtain an update access request;

[0010] The update access request is sent.

[0011] In one implementation, the method for generating the address mapping information includes:

[0012] Obtaining the addresses corresponding to all virtualized devices in the device lender, except for the virtualized device connected to the device itself;

[0013] Obtaining the addresses of all virtual devices in the device borrower except the virtual device corresponding to the virtual device connected to the device;

[0014] The address mapping information is generated according to the acquired addresses of all virtualized devices and virtual devices, and the corresponding relationships between all virtualized devices and virtual devices.

[0015] In one implementation, generating the address mapping information according to the acquired addresses of all virtualized devices and virtual devices, and the correspondence between all virtualized devices and virtual devices, includes:

[0016] Generate a plurality of table entries according to the acquired addresses of all virtualized devices and virtual devices, and the correspondence between all virtualized devices and virtual devices, wherein each of the table entries is used to reflect the address of a virtualized device in the device lender, the address of the virtual device corresponding to the virtualized device in the device borrower, and space size information;

[0017] The address mapping information is obtained according to all the table entries.

[0018] In one implementation, the determining the access type according to the request address of the access request and the address mapping information includes:

[0019] According to the address mapping information, determining whether the request address of the access request has a matching address of the device borrower;

[0020] If the request address of the access request has a matching address of the device borrower, then the access type is determined to be access between virtual devices.

[0021] In one implementation, the performing address replacement on the request address of the access request according to the address mapping information to obtain the update access request includes:

[0022] Determine the target device borrower address according to the address of the device borrower matched with the request address of the access request;

[0023] Determine the target lender address according to the address of the device lender corresponding to the target device borrower address in the address mapping information;

[0024] The request address of the access request is replaced according to the target lender address.

[0025] In one implementation, the replacing the request address of the access request according to the target lender address includes:

[0026] Determine the low-order offset address according to the address within the space range corresponding to the target lender address;

[0027] The request address of the access request is replaced according to the target lender address and the low offset address.

[0028] In the second aspect, an embodiment of the present invention also provides a system for accessing virtual devices across bus domains, the system corresponding to a device lender, and the system comprising a number of virtualized devices and control bridges corresponding to each virtualized device; each of the control bridges is used to connect the bus of the virtualized device corresponding to itself and the device lender, and is used to execute a method for accessing virtual devices across bus domains as described above.

[0029] In one embodiment, the system further comprises:

[0030] The bridge driver is used to configure the memory space information of the control bridge, wherein the memory space information of the control bridge includes the addresses and space size information of other virtualized devices and corresponding virtual devices except the virtualized device connected to the bridge itself.

[0031] In a third aspect, an embodiment of the present invention further provides a terminal comprising a memory and one or more processors; the memory stores one or more programs; the program comprises instructions for executing a method for accessing virtual devices across bus domains as described above; and the processor is used to execute the program.

[0032] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a plurality of instructions are stored, wherein the instructions are suitable for being loaded and executed by a processor to implement any of the steps of the above-mentioned method for accessing virtual devices across bus domains.

[0033] Beneficial effects of the present invention: When the embodiment of the present invention obtains the active external access request of the virtualized device of the device lender, it will determine the access type of the access request through the pre-established address mapping information, and replace the request address in time when the access type is determined to be an access between virtual devices, so as to ensure that the updated access request after the address replacement can be correctly routed and forwarded to the specific address space of the device lender. This solves the problem in the prior art that the types of access requests between devices are complex in the device virtualization scenario across bus domains, which easily leads to system access confusion. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is a flowchart of a method for accessing virtual devices across bus domains provided by an embodiment of the present invention.

[0036] Figure 2 It is a module diagram of a virtual device access system across bus domains provided by an embodiment of the present invention.

[0037] Figure 3 It is a principle block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The present invention discloses a method, system, terminal and storage medium for accessing virtual devices across bus domains. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0039] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0040] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0041] In view of the above-mentioned defects of the prior art, the present invention provides a method for accessing virtual devices across bus domains, characterized in that the method is applied to a control bridge, the control bridge is used to connect a bus of a virtualized device and a device lender, and the method includes: obtaining an access request of a virtualized device connected to itself to another virtualized device in the device lender; obtaining preset address mapping information, and judging the access type according to the request address of the access request and the address mapping information, wherein the address mapping information is used to reflect the address mapping relationship between other virtualized devices and corresponding virtual devices except the virtualized device connected to itself, and the virtual device is a device virtualized by the device borrower based on the virtualized device in the device lender; if the access type is access between virtual devices, the request address of the access request is replaced according to the address mapping information to obtain an updated access request; and the updated access request is sent. When the present invention obtains the active external access request of the virtualized device of the device lender, it will determine the access type of the access request through the pre-established address mapping information, and replace the request address in time when the access type is determined to be an access between virtual devices, so as to ensure that the updated access request after the address replacement can be correctly routed and forwarded to the specific address space of the device lender. This solves the problem in the prior art that the types of access requests between devices are complex in the device virtualization scenario across bus domains, which easily leads to system access confusion.

[0042] For example, in the scenario of device virtualization across bus domains and multi-device virtualization, it is assumed that the device lender is the host machine H1, and the bus of H1 is connected to device A through the control bridge of device A, and is connected to device B through the control bridge of device B; the device borrower is the host machine H2, and the virtual device a corresponding to device A and the virtual device b corresponding to device B are mounted on the bus of H2. Since H1 and H2 correspond to different bus domains, in order to achieve device access across bus domains, the bus domains of H1 and H2 are connected through a connection bridge. The control bridge of device A obtains the access request of device A to device B, and determines that the access type of the access request is inter-virtual device access according to the pre-stored address mapping information. Then, the request address in the access request is actually the address of virtual device b in the host machine H2, and the access of device A to device B cannot be achieved. Therefore, the control bridge of device A needs to perform address conversion on the request address of the access request through the address mapping information, so that the updated access request after the address conversion can point to the address of device B in the host machine H1. Finally, the update access request is sent from the bus of the host machine H1 through the control bridge of device A.

[0043] like Figure 1 As shown, the method is applied to a control bridge, the control bridge is used to connect a virtual device and a bus of a device lender, and the method includes:

[0044] Step S100: Obtain an access request from a virtual device connected to itself to another virtual device in the device lender.

[0045] Specifically, the host machine of the device lender may contain multiple virtualized devices. Since the virtualized devices are accessed directly through the bus of the host machine of the device lender, the device access security is low. Therefore, each virtualized device has its own corresponding control bridge. The control bridge connects the virtualized device to the bus of the host machine of the device lender to achieve further control of the virtualized device and improve the security of device access. In actual application scenarios, taking a virtualized device as an example, if the virtualized device needs to actively access the outside world, its corresponding control bridge will first receive the access request, and the access request needs to be sent from the bus of the host machine of the device lender through the control bridge.

[0046] Step S200, obtain preset address mapping information, and determine the access type according to the request address of the access request and the address mapping information, wherein the address mapping information is used to reflect the address mapping relationship between other virtualized devices and corresponding virtual devices except for the virtualized device connected to itself, and the virtual device is a device virtualized by the device borrower based on the virtualized device in the device lender.

[0047] Specifically, in order to solve the problem of chaotic forwarding of access requests in device virtualization across bus domains and multi-device virtualization scenarios, the memory space of the control bridge corresponding to each virtualized device stores an address mapping information, which contains the address mapping relationship between other virtualized devices and corresponding virtual devices except the virtualized device corresponding to itself, that is, the address mapping relationship between other physical addresses except itself and virtual addresses. Since the address mapping information contains the address mapping relationship of the two bus domains of the device lender and the device borrower, the access type of the access request can be determined by comparing the request address of the access request with the address mapping information. This embodiment helps to improve the forwarding correctness and orderliness of subsequent access requests by identifying the access type of the access request.

[0048] In one implementation, the method for generating the address mapping information includes:

[0049] Obtaining the addresses corresponding to all virtualized devices in the device lender, except for the virtualized device connected to the device itself;

[0050] Obtaining the addresses of all virtual devices in the device borrower except the virtual device corresponding to the virtual device connected to the device;

[0051] The address mapping information is generated according to the acquired addresses of all virtualized devices and virtual devices, and the corresponding relationships between all virtualized devices and virtual devices.

[0052] Specifically, the host machine of the device lender may include multiple virtualized devices, and there is a one-to-one correspondence between the virtualized devices and the control bridges, that is, one control bridge is used to mount one virtualized device on the bus of the host machine of the device lender. Therefore, the address mapping information stored in the control bridge of each virtualized device is actually different. Taking the control bridge of a virtualized device as an example, the address mapping information stored in it does not contain the addresses of the virtualized devices connected to it and the corresponding virtual devices, but contains the addresses of other virtualized devices and their corresponding virtual devices, as well as the correspondence between different addresses.

[0053] For example, the host machine H1 of the device lender includes virtual devices A, B, and C, and the host machine H2 of the device borrower includes virtual devices a, b, and c corresponding to virtual devices A, B, and C, respectively. The address mapping information stored by the control bridge of virtual device A includes the address mapping relationship between virtual device B and virtual device b, and the address mapping relationship between virtual device C and virtual device c. The address mapping information stored by the control bridge of virtual device B includes the address mapping relationship between virtual device A and virtual device a, and the address mapping relationship between virtual device C and virtual device c. The address mapping information stored by the control bridge of virtual device C includes the address mapping relationship between virtual device B and virtual device b, and the address mapping relationship between virtual device A and virtual device a.

[0054] In one implementation, the generating of the address mapping information according to the acquired addresses of all virtualized devices and virtual devices, and the correspondence between all virtualized devices and virtual devices, includes:

[0055] Generate a plurality of table entries according to the acquired addresses of all virtualized devices and virtual devices, and the correspondence between all virtualized devices and virtual devices, wherein each of the table entries is used to reflect the address of a virtualized device in the device lender, the address of the virtual device corresponding to the virtualized device in the device borrower, and space size information;

[0056] The address mapping information is obtained according to all the table entries.

[0057] Specifically, the address mapping information in this embodiment can be stored in a table form, that is, the address mapping information can be an address mapping table. The address mapping table contains multiple entries, and the information of each entry is used to reflect the address of a virtualized device, the address of the corresponding virtual device and the space size, and the address spaces of all entries cannot overlap.

[0058] For example, since the address mapping information reflects the point-to-point address mapping relationship between the virtualized device and the virtual device, the corresponding table can be defined as a P2P address mapping table. The P2P address mapping table needs to meet the following conditions when it is constructed: except for the virtualized device connected to the control bridge itself, each other virtualized device occupies a table entry, and each table entry includes the device borrower address (i.e. the address of the virtual device), the device lender address (i.e. the address of the virtualized device), and the space size; the address spaces of all table entries cannot overlap.

[0059] In one implementation, the determining the access type according to the request address of the access request and the address mapping information includes:

[0060] According to the address mapping information, determining whether the request address of the access request has a matching address of the device borrower;

[0061] If the request address of the access request has a matching address of the device borrower, then the access type is determined to be access between virtual devices.

[0062] Specifically, the control bridge matches the request address of the access request with the address of each device borrower in the address mapping information. If the match is successful, it means that the access request is for access between virtual devices.

[0063] For example, when the address mapping information is a P2P address mapping table, the control bridge determines whether the request address of the access request hits the P2P address mapping table: when the request address of the access request is between the address of the device borrower corresponding to any table entry + the space size, it means that the request address of the access request hits the table entry. When any table entry is hit, it means that the P2P address mapping table is hit, and the access type of the access request is inter-virtual device access. When no table entry is hit, it means that the P2P address mapping table is not hit, and the access type of the access request is not inter-virtual device access, and the subsequent processing steps will not continue.

[0064] Step S300: If the access type is access between virtual devices, the request address of the access request is replaced according to the address mapping information to obtain an update access request.

[0065] Specifically, if the current access request is for inter-virtual device access, the address of the virtual device initiating the access and the virtual device being accessed, recognized by the former, is actually the latter's virtual address, that is, the address of the virtual device corresponding to the latter in the device borrower. The virtual address cannot be correctly routed and forwarded in the bus domain corresponding to the device lender, so the control bridge needs to replace the request address of the access request with the address of the corresponding device lender through address mapping information to achieve inter-virtual device access.

[0066] In one implementation, the performing address replacement on the request address of the access request according to the address mapping information to obtain the update access request includes:

[0067] Determine the target device borrower address according to the address of the device borrower matched with the request address of the access request;

[0068] Determine the target lender address according to the address of the device lender corresponding to the target device borrower address in the address mapping information;

[0069] The request address of the access request is replaced according to the target lender address.

[0070] Specifically, this embodiment uses the address of the device borrower hit by the request address of the access request in the address mapping information as the target borrower address, and uses the address of the device lender that has a corresponding relationship with the target borrower address as the target lender address. Then, the target lender address is used to replace the request address of the access request, so that the updated access request after the address replacement can point to the specific address space of the device lender.

[0071] In one implementation, the replacing the request address of the access request according to the target lender address includes:

[0072] Determine the low-order offset address according to the address within the space range corresponding to the target lender address;

[0073] The request address of the access request is replaced according to the target lender address and the low offset address.

[0074] Specifically, this embodiment replaces the request address of the access request with the target lender address + low-order offset address. The offset address is related to the space size, and the addresses within the space size corresponding to the target lender address are all low-order offset addresses. For example, if the space size of the target lender address is 1GB, the lower 30 bits of the target lender address are all low-order offset addresses.

[0075] Step S400: Send the update access request.

[0076] Specifically, the control bridge sends the update access request after the address is replaced from the bus of the host machine of the device lender, and the update access request will be correctly routed to the virtual device being accessed, thereby realizing point-to-point access between virtual devices.

[0077] Based on the above embodiments, the present invention also provides a virtual device access system across bus domains, such as Figure 2 As shown, the system corresponds to a device lender, and the system includes a number of virtualized devices and control bridges corresponding to each virtualized device; each control bridge is used to connect the bus of the virtualized device corresponding to itself and the device lender, and is used to execute the cross-bus domain access method between virtual devices as described in any of the above.

[0078] Specifically, the aforementioned explanation of the embodiment of the method for accessing virtual devices across bus domains is also applicable to the system for accessing virtual devices across bus domains of this embodiment, and therefore the respective functional roles of the device lender, device borrower, virtualized device, virtual device, and control bridge will not be repeated here.

[0079] In one implementation, the system further includes:

[0080] A bridge driver is used to configure the information of the memory space of the control bridge, wherein the information of the memory space of the control bridge includes the addresses and space size information of other virtual devices and corresponding virtual devices except the virtual device connected to itself, wherein the information of the memory space of the control bridge includes the addresses and space size information of other virtual devices and corresponding virtual devices except the virtual device connected to itself.

[0081] Specifically, Figure 2 As shown, a bridge driver is also provided in the host machine of the device lender. The control bridge in this embodiment provides memory space, and the information of the memory space is configured by the bridge driver during the initialization configuration phase, including the address of other virtual device P2P access space (such as GPU video memory space) on the device lender, the address of the device on the device borrower after the device is virtualized, and space size information. Then the control bridge can establish a P2P address mapping table through the information configured by the bridge driver, which is used to implement subsequent P2P access between virtual devices.

[0082] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Figure 3As shown. The terminal includes a processor, a memory, a network interface, and a display screen connected via a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for accessing virtual devices across bus domains is implemented. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.

[0083] Those skilled in the art will understand that Figure 3 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0084] In one implementation, the memory of the terminal stores one or more programs, and is configured to be executed by one or more processors. The one or more programs include instructions for performing a method for accessing virtual devices across bus domains.

[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0086] In summary, the present invention discloses a method, system, terminal and storage medium for inter-virtual device access across bus domains. The method is applied to a control bridge, which is used to connect a bus of a virtualized device and a device lender, and the method includes: obtaining an access request from a virtualized device connected to itself to another virtualized device in the device lender; obtaining preset address mapping information, and judging the access type according to the request address of the access request and the address mapping information, wherein the address mapping information is used to reflect the address mapping relationship between other virtualized devices and corresponding virtual devices except the virtualized device connected to itself, and the virtual device is a device virtualized by the device borrower based on the virtualized device in the device lender; if the access type is inter-virtual device access, the request address of the access request is replaced according to the address mapping information to obtain an updated access request; and the updated access request is sent. When the present invention obtains the active external access request of the virtualized device of the device lender, it will determine the access type of the access request through the pre-established address mapping information, and replace the request address in time when the access type is determined to be an access between virtual devices, so as to ensure that the updated access request after the address replacement can be correctly routed and forwarded to the specific address space of the device lender. This solves the problem in the prior art that the types of access requests between devices are complex in the device virtualization scenario across bus domains, which easily leads to system access confusion.

[0087] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for accessing virtual devices across bus domains, characterized in that: The method is applied to a control bridge, the control bridge is used to connect a bus of a virtualized device and a device lender, and the method comprises: Obtaining an access request from a virtual device connected to the virtual device to another virtual device in the device lender; Obtaining preset address mapping information, and determining the access type according to the request address of the access request and the address mapping information, wherein the address mapping information is used to reflect the address mapping relationship between other virtualized devices and virtual devices corresponding to other virtualized devices, except for the virtualized device connected to the device itself, and the virtual device is a device virtualized by the device borrower based on the virtualized device in the device lender; If the access type is inter-virtual device access, performing address replacement on the request address of the access request according to the address mapping information to obtain an update access request; sending the update access request; The determining the access type according to the request address of the access request and the address mapping information includes: According to the address mapping information, determining whether the request address of the access request has a matching address of the device borrower; If the request address of the access request has a matching address of the device borrower, determining that the access type is an access between virtual devices; The step of replacing the request address of the access request according to the address mapping information to obtain an update access request includes: Determine the target device borrower address according to the address of the device borrower matched with the request address of the access request; Determine the target lender address according to the address of the device lender corresponding to the target device borrower address in the address mapping information; The request address of the access request is replaced according to the target lender address.

2. The method for accessing virtual devices across bus domains according to claim 1, characterized in that: The method for generating the address mapping information comprises: Obtaining addresses corresponding to other virtualized devices in the device lender, except for the virtualized device connected to the device itself; Obtaining addresses of other virtual devices in the device borrower, except for the virtual device corresponding to the virtual device connected to the device; The address mapping information is generated according to the acquired addresses of the other virtualized devices and the other virtual devices, and the corresponding relationship between the other virtualized devices and the other virtual devices.

3. The method for accessing virtual devices across bus domains according to claim 2, characterized in that: The generating the address mapping information according to the acquired addresses of the other virtualized devices and the other virtual devices, and the corresponding relationship between the other virtualized devices and the other virtual devices, comprises: Generate a plurality of table entries according to the acquired addresses of the other virtualized devices and the other virtual devices, and the correspondence between the other virtualized devices and the other virtual devices, wherein each of the table entries is used to reflect the address of a virtualized device in the device lender, the address of the virtual device corresponding to the virtualized device in the device borrower, and space size information; The address mapping information is obtained according to all the table entries.

4. The method for accessing virtual devices across bus domains according to claim 1, characterized in that: The step of replacing the request address of the access request according to the target lender address includes: Determine the low-order offset address according to the address within the space range corresponding to the target lender address; The request address of the access request is replaced according to the target lender address and the low offset address.

5. A virtual device access system across bus domains, characterized in that: The system corresponds to a device lender, and the system includes a number of virtualized devices and control bridges corresponding to each virtualized device; each control bridge is used to connect the bus of the virtualized device corresponding to itself and the device lender, and is used to execute the cross-bus domain virtual device access method as described in any one of claims 1-4 above.

6. The cross-bus domain virtual device access system according to claim 5, characterized in that: The system further comprises: The bridge driver is used to configure the memory space information of the control bridge, wherein the memory space information of the control bridge includes the addresses and space size information of other virtualized devices and virtual devices corresponding to other virtualized devices in addition to the virtualized device connected to itself.

7. A terminal, characterized in that: The terminal includes a memory and at least one processor; the memory stores a program; the program contains instructions for executing the method for accessing virtual devices across bus domains as described in any one of claims 1-4; and the processor is used to execute the program.

8. A computer-readable storage medium having a plurality of instructions stored thereon, characterized in that: The instructions are suitable for being loaded and executed by a processor to implement the steps of the method for accessing virtual devices across bus domains as described in any one of claims 1 to 4 above.