CN116821033A - A PCIe equipment control method and device - Google Patents
A PCIe equipment control method and device Download PDFInfo
- Publication number
- CN116821033A CN116821033A CN202310779405.9A CN202310779405A CN116821033A CN 116821033 A CN116821033 A CN 116821033A CN 202310779405 A CN202310779405 A CN 202310779405A CN 116821033 A CN116821033 A CN 116821033A
- Authority
- CN
- China
- Prior art keywords
- identifier
- slot
- bridge
- terminal device
- bridge device
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000006870 function Effects 0.000 claims description 65
- 238000012545 processing Methods 0.000 claims description 31
- 238000012217 deletion Methods 0.000 claims description 8
- 230000037430 deletion Effects 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 5
- 230000006399 behavior Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 23
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 6
- 238000003860 storage Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 241000699670 Mus sp. Species 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
本申请涉及一种PCIe设备控制方法及装置。其中方法包括:当从系统中扫描到桥设备时,判断所述桥设备是否支持热插拔;当所述桥设备支持热插拔时,为所述桥设备连接的插槽分配标识符;所述标识符为唯一的标识符;将所述插槽的标识符分配给所述插槽中的终端设备,并通过设备驱动初始化所述终端设备。采用本方法,在设备扫描的过程中预先为支持热插拔的桥设备连接的插槽分配唯一的标识符,当终端设备插入插槽后,将该插槽的标识符分配给该终端设备,从而防止终端设备的热插拔操作引起盘符漂移。
The present application relates to a PCIe equipment control method and device. The method includes: when a bridge device is scanned from the system, determining whether the bridge device supports hot plugging; when the bridge device supports hot plugging, assigning an identifier to a slot connected to the bridge device; The identifier is a unique identifier; assign the identifier of the slot to the terminal device in the slot, and initialize the terminal device through the device driver. Using this method, in the process of device scanning, a unique identifier is assigned in advance to the slot connected to the bridge device that supports hot plugging. When the terminal device is inserted into the slot, the identifier of the slot is assigned to the terminal device. This prevents drive letter drift caused by the hot-swap operation of terminal equipment.
Description
技术领域Technical field
本申请涉及PCIe设备控制领域,特别是涉及一种PCIe设备控制方法及装置。The present application relates to the field of PCIe device control, and in particular to a PCIe device control method and device.
背景技术Background technique
PCIe(peripheral component interconnect express,外围组件快速互连)是PCI总线之后的第三代I/O总线标准,它相对于PCI总线的主要优势是数据传输速率高,抗干扰能力强,传输距离远并且功耗较低。PCIe在消费者的电脑设备、企业大型服务器、交换机系统中被广泛使用,使用PCIe的设备称为PCIe设备。PCIe (peripheral component interconnect express) is the third generation I/O bus standard after the PCI bus. Its main advantages over the PCI bus are high data transmission rate, strong anti-interference ability, long transmission distance and Lower power consumption. PCIe is widely used in consumer computer equipment, enterprise large servers, and switch systems. Equipment using PCIe is called PCIe equipment.
随着科学技术的发展,对于计算机的性能要求越来越高,在要求计算机有快速的计算能力的同时,还要求计算机具有强大的存储能力。其中,计算能力主要取决于计算机CPU,存储能力主要取决于硬盘,当两者的性能都达到一定程度后,那么整个计算机的处理能力又取决于其对数据的处理能力。为了满足更快更高的数据处理要求,诞生了硬盘接口标准NVME(non-volatile memory express,非易失性内存主机控制器接口规范),符合这一标准的硬盘被称之为NVME硬盘。With the development of science and technology, the performance requirements for computers are getting higher and higher. While computers are required to have fast computing capabilities, they are also required to have powerful storage capabilities. Among them, the computing power mainly depends on the computer CPU, and the storage capacity mainly depends on the hard disk. When the performance of both reaches a certain level, the processing power of the entire computer depends on its data processing ability. In order to meet faster and higher data processing requirements, the hard disk interface standard NVME (non-volatile memory express, non-volatile memory host controller interface specification) was born. Hard disks that meet this standard are called NVME hard disks.
当使用计算机系统的时候,如果出现部件损坏,例如磁盘损坏时,往往需要将系统断电之后才能操作更换。对于大型系统来说,一旦断电停止运营,就会造成严重影响。为了避免对大型系统进行频繁断电影响运营,提出了热插拔技术,该技术包括热添加和热删除操作,热插拔技术可以实现在不断电的情况下进行硬盘的更换。目前的多数操作系统都支持NVME热插拔技术,当对系统进行设备的热插拔操作时,通过中断触发热插拔驱动进而执行不同的动作。When using a computer system, if a component is damaged, such as a disk, it is often necessary to power off the system before it can be replaced. For large systems, once the power is cut off and operations cease, it will have a serious impact. In order to avoid frequent power outages affecting operations of large-scale systems, hot-swap technology is proposed. This technology includes hot-add and hot-deletion operations. Hot-swap technology can replace hard disks without power interruption. Most current operating systems support NVME hot-plug technology. When a device is hot-plugged into the system, the hot-plug driver is triggered by interrupts to perform different actions.
但是,现有的字符设备添加方式存在盘符漂移的问题。例如:插槽slot1上插有设备nvme1,该设备对应盘符标识为1;插槽slot2上插有设备nvme2,该设备对应盘符标识为2,此时操作系统中字符设备的对应关系为:字符设备/dev/nvme1指向nvme1磁盘,字符设备/dev/nvme2指向nvme2磁盘。当拔掉设备nvme1和设备nvme2后,先插入设备nvme2,然后再插入设备nvme1,则设备nvme2的盘符标识变为1,设备nvme1的盘符标识变为2,此时操作系统下字符设备也会发生相应的改变:字符设备/dev/nvme1实际指向nvme2磁盘,字符设备/dev/nvme2实际指向nvme1磁盘。因为nvme1的标识符变成了2,这对上层业务来说是一个非常严重的错误,在盘符发生漂移的情况下,需要改变业务的配置才能使业务正常进行,这对于不可中断类型的业务来说是灾难性的。因此,需要找到一种方法避免设备的热插拔操作造成盘符漂移进而影响上层业务的正常运行。However, the existing method of adding character devices has the problem of drive letter drift. For example: there is device nvme1 inserted in slot 1, and the corresponding drive letter ID of this device is 1; there is device nvme2 inserted in slot 2, and the corresponding drive letter ID of this device is 2. At this time, the corresponding relationship between character devices in the operating system is: The character device /dev/nvme1 points to the nvme1 disk, and the character device /dev/nvme2 points to the nvme2 disk. After unplugging device nvme1 and device nvme2, insert device nvme2 first, and then insert device nvme1. Then the drive letter ID of device nvme2 changes to 1, and the drive letter ID of device nvme1 changes to 2. At this time, the character device under the operating system also Corresponding changes will occur: the character device /dev/nvme1 actually points to the nvme2 disk, and the character device /dev/nvme2 actually points to the nvme1 disk. Because the identifier of nvme1 has changed to 2, this is a very serious error for the upper-layer business. When the drive letter drifts, the business configuration needs to be changed to make the business proceed normally. This is not suitable for uninterruptible business. It's catastrophic. Therefore, it is necessary to find a way to prevent the hot-swap operation of the device from causing drive letter drift and thus affecting the normal operation of upper-layer services.
发明内容Contents of the invention
有鉴于此,本申请旨在提出一种PCIe设备控制方法及装置,以解决设备热插拔操作造成盘符漂移的问题。In view of this, this application aims to propose a PCIe device control method and device to solve the problem of drive letter drift caused by device hot-plug operation.
本申请实施例第一方面提供一种PCIe设备控制方法,所述方法包括:The first aspect of the embodiment of the present application provides a PCIe device control method, the method includes:
当从系统中扫描到桥设备时,判断所述桥设备是否支持热插拔;When a bridge device is scanned from the system, determine whether the bridge device supports hot plugging;
当所述桥设备支持热插拔时,为所述桥设备连接的插槽分配标识符;所述标识符为唯一的标识符;When the bridge device supports hot plugging, assign an identifier to the slot connected to the bridge device; the identifier is a unique identifier;
将所述插槽的标识符分配给所述插槽中的终端设备,并通过设备驱动初始化所述终端设备。The identifier of the slot is assigned to the terminal device in the slot, and the terminal device is initialized through the device driver.
可选地,当从系统中扫描到桥设备时,判断所述桥设备是否支持热插拔,包括:Optionally, when a bridge device is scanned from the system, determine whether the bridge device supports hot plugging, including:
查询所述桥设备是否开启了中断功能;所述中断功能包括MSI中断以及MSI-X中断;Query whether the bridge device has enabled the interrupt function; the interrupt function includes MSI interrupt and MSI-X interrupt;
若所述桥设备开启了中断功能,则进一步读取该桥设备的寄存器,判断该桥设备是否支持热插拔;If the interrupt function is enabled on the bridge device, the register of the bridge device is further read to determine whether the bridge device supports hot swapping;
若所述桥设备未开启中断功能,则所述桥设备不支持热插拔。If the bridge device does not enable the interrupt function, the bridge device does not support hot plugging.
可选地,为所述桥设备连接的插槽分配标识符,包括:Optionally, assign an identifier to the slot to which the bridge device is connected, including:
向所述桥设备对应的数据结构中添加用于保存所述插槽的标识符的变量;Add a variable for storing the identifier of the slot to the data structure corresponding to the bridge device;
获取一个标识符,将所述标识符存储到所述变量中。Get an identifier and store the identifier into the variable.
可选地,将所述插槽的标识符分配给所述插槽中的终端设备,包括:Optionally, assigning the identifier of the slot to the terminal device in the slot includes:
在所述设备驱动中,执行获取与所述插槽相连的桥设备的操作;In the device driver, perform an operation of obtaining the bridge device connected to the slot;
从所述桥设备对应的数据结构中读取保存有所述插槽的标识符的变量,从所述变量中获取所述插槽的标识符;Read the variable storing the identifier of the slot from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
将所述插槽的标识符分配给所述终端设备。An identifier of the slot is assigned to the terminal device.
可选地,为所述桥设备连接的插槽分配标识符,包括:Optionally, assign an identifier to the slot to which the bridge device is connected, including:
在所述设备驱动中,执行向所述桥设备对应的数据结构中添加用于保存所述插槽的标识符的变量的操作;In the device driver, perform an operation of adding a variable used to save the identifier of the slot to the data structure corresponding to the bridge device;
获取一个标识符,将所述标识符存储到所述变量中。Get an identifier and store the identifier into the variable.
可选地,将所述插槽的标识符分配给所述插槽中的终端设备,包括:Optionally, assigning the identifier of the slot to the terminal device in the slot includes:
在所述设备驱动中,执行获取与所述插槽相连的桥设备的操作;In the device driver, perform an operation of obtaining the bridge device connected to the slot;
从所述桥设备对应的数据结构中读取保存有所s述插槽的标识符的变量,从所述变量中获取所述插槽的标识符;Read the variable holding the identifier of the slot from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
将所述插槽的标识符分配给所述终端设备。An identifier of the slot is assigned to the terminal device.
可选地,所述PCIe设备控制方法,还包括:Optionally, the PCIe device control method also includes:
当系统启动时,初始化系统的配置;When the system starts, initialize the system configuration;
初始化PCIe设备的数据结构,生成用于描述PCIe设备信息的数据结构;所述描述PCIe设备信息的数据结构包括:设备所属总线,设备类型以及设备ID;所述描述PCIe设备信息的数据结构为树状结构;Initialize the data structure of the PCIe device and generate a data structure used to describe the PCIe device information; the data structure describing the PCIe device information includes: the bus to which the device belongs, device type and device ID; the data structure describing the PCIe device information is a tree like structure;
扫描所述系统中的设备,判断当前扫描到的设备的类型;所述设备为桥设备或终端设备,任一终端设备与一个桥设备一对一连接。Scan the devices in the system and determine the type of the currently scanned device; the device is a bridge device or a terminal device, and any terminal device is connected to a bridge device one-to-one.
可选地,所述PCIe设备控制方法,还包括:Optionally, the PCIe device control method also includes:
为当前扫描到的终端设备分配对应的设备资源;所述设备资源包括总线资源与内存资源;Allocate corresponding device resources to the currently scanned terminal device; the device resources include bus resources and memory resources;
调用总线探测接口,为所述终端设备匹配对应的设备驱动。Call the bus detection interface to match the corresponding device driver for the terminal device.
可选地,所述PCIe设备控制方法,还包括:Optionally, the PCIe device control method also includes:
当所述桥设备支持热插拔时,为所述桥设备预留待分配的资源;所述待分配的资源包括总线资源以及内存资源;When the bridge device supports hot plugging, resources to be allocated are reserved for the bridge device; the resources to be allocated include bus resources and memory resources;
当所述桥设备不支持热插拔时,返回并继续扫描所述系统中的其他设备。When the bridge device does not support hot plugging, return and continue scanning other devices in the system.
可选地,所述PCIe设备控制方法,还包括:Optionally, the PCIe device control method also includes:
当所述桥设备支持热插拔时,创建中断回调函数;When the bridge device supports hot plugging, create an interrupt callback function;
通过所述中断回调函数,创建中断工作队列与事件处理回调函数;Create an interrupt work queue and event processing callback function through the interrupt callback function;
所述事件处理回调函数根据系统中的终端设备的热插拔行为,执行添加或删除操作,包括:The event processing callback function performs add or delete operations based on the hot plug behavior of the terminal device in the system, including:
通过所述事件处理回调函数获取中断信息,并判断中断类型;Obtain interrupt information through the event processing callback function and determine the interrupt type;
若所述中断类型为设备添加,则重新扫描所述系统中的设备,当扫描到新添加的终端设备时,调用所述设备驱动;If the interrupt type is device addition, rescan the devices in the system, and when the newly added terminal device is scanned, call the device driver;
在所述设备驱动中执行获取与所述新添加的终端设备的所在的插槽相连的桥设备的操作;Execute in the device driver the operation of obtaining the bridge device connected to the slot where the newly added terminal device is located;
从所述桥设备对应的数据结构中读取保存有所述新添加的终端设备所在的插槽的标识符的变量,从所述变量中获取所述插槽的标识符;Read the variable holding the identifier of the slot where the newly added terminal device is located from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
将所述插槽的标识符分配给所述新添加的终端设备;Assign the identifier of the slot to the newly added terminal device;
在所述设备驱动中初始化所述新添加的终端设备;Initialize the newly added terminal device in the device driver;
若所述中断类型为设备删除,则调用删除操作函数停止对应的终端设备,删除与所述终端设备连接的桥设备对应的数据结构中对应的数据,并释放分配给所述终端设备的设备资源;所述设备资源包括总线资源以及内存资源。If the interruption type is device deletion, call the delete operation function to stop the corresponding terminal device, delete the corresponding data in the data structure corresponding to the bridge device connected to the terminal device, and release the device resources allocated to the terminal device. ; The device resources include bus resources and memory resources.
根据本申请实施例的第二方面,提供一种PCIe设备控制装置,用于实现本申请实施例的第一方面所提供的PCIe设备控制方法,所述装置包括:According to the second aspect of the embodiment of the present application, a PCIe device control device is provided for implementing the PCIe device control method provided by the first aspect of the embodiment of the present application. The device includes:
设备扫描模块,被配置为当从系统中扫描到桥设备时,判断所述桥设备是否支持热插拔;A device scanning module configured to determine whether the bridge device supports hot swap when a bridge device is scanned from the system;
标识符分配模块,被配置为当所述桥设备支持热插拔时,为所述桥设备连接的插槽分配标识符;An identifier allocation module configured to allocate an identifier to a slot connected to the bridge device when the bridge device supports hot plugging;
设备初始化模块,被配置为将所述插槽的标识符分配给所述插槽中的终端设备,并通过设备驱动初始化所述终端设备。The device initialization module is configured to allocate the identifier of the slot to the terminal device in the slot, and initialize the terminal device through a device driver.
采用本申请所提供的PCIe设备控制方法,在系统中扫描到桥设备时,对该桥设备是否支持热插拔进行判断,当该桥设备支持热插拔时,就为该桥设备连接的插槽分配一个唯一的标识符,当该插槽中插入了终端设备后,可将该插槽的标识符分配给该终端设备。Using the PCIe device control method provided by this application, when a bridge device is scanned in the system, it is judged whether the bridge device supports hot plugging. When the bridge device supports hot plugging, the plug-in connection for the bridge device is determined. The slot is assigned a unique identifier. When a terminal device is inserted into the slot, the slot's identifier can be assigned to the terminal device.
本申请提供的PCIe设备控制方法中,通过在系统中进行设备扫描,判断当前扫描到的桥设备是否支持热插拔,在设备扫描的过程中预先为支持热插拔的桥设备连接的插槽分配唯一的标识符,在终端设备插入插槽后,将该插槽的标识符分配给该终端设备,从而防止终端设备的热插拔操作引起盘符漂移。In the PCIe device control method provided by this application, by performing device scanning in the system, it is determined whether the currently scanned bridge device supports hot plugging, and during the device scanning process, a slot is connected to the bridge device that supports hot plugging in advance. Allocate a unique identifier. After the terminal device is inserted into the slot, the identifier of the slot is assigned to the terminal device, thereby preventing the hot-swap operation of the terminal device from causing drive letter drift.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. , for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative labor.
图1是本申请一实施例提出的PCIe设备控制方法的流程图;Figure 1 is a flow chart of a PCIe device control method proposed by an embodiment of the present application;
图2是本申请一实施例提出的PCIe设备控制装置的示意图;Figure 2 is a schematic diagram of a PCIe device control device proposed by an embodiment of the present application;
图3是本申请一实施例提出的PCIe设备初始化的流程图;Figure 3 is a flow chart of PCIe device initialization proposed by an embodiment of the present application;
图4是相关技术中PCIe设备初始化的流程图;Figure 4 is a flow chart of PCIe device initialization in related technology;
图5是本申请一实施例中进行热插拔管理的流程图。Figure 5 is a flow chart of hot plug management in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。It will be understood that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.
在本申请的各种实施例中,应理解,下述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。In the various embodiments of this application, it should be understood that the size of the sequence numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not be implemented in this application. The implementation of the examples does not constitute any limitations.
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the appended claims.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。It should be noted that, as long as there is no conflict, the embodiments and features in the embodiments of this application can be combined with each other.
热插拔技术即带电插拔技术,热插拔允许用户在不关闭系统,不切断电源的情况下取出和更换损坏的硬盘、电源或板卡等部件,采用热插拔技术能够提高系统的可靠性、扩展性和灵活性,同时使系统具有快速维修性、冗余性和对灾难的及时恢复能力。Hot-swap technology is hot-swap technology. Hot-swap technology allows users to remove and replace damaged hard drives, power supplies, boards and other components without shutting down the system or cutting off the power supply. The use of hot-swap technology can improve the reliability of the system. performance, scalability and flexibility, while enabling the system to have rapid repairability, redundancy and timely recovery capabilities from disasters.
计算机系统的热插拔包括热添加和热删除。其中,热添加主要是读取插槽的寄存器信息,根据信息判断出是不是有设备插入信号,如果有则继续则进一步对插槽进行遍历,最终调用到硬盘的驱动,在硬盘的驱动中会进行系统中的文件创建以及设备的添加,进而完成整个设备的初始化。Hot plugging of computer systems includes hot addition and hot deletion. Among them, hot add mainly reads the register information of the slot, and determines whether there is a device inserted signal based on the information. If so, continue to further traverse the slot, and finally call the hard disk driver. In the hard disk driver, it will Create files in the system and add devices to complete the initialization of the entire device.
系统中存在字符设备和块设备,其中字符设备是指依字节流串行顺序方式依次进行访问的设备,对它的读写是以字节为单位,常见的字符设备有鼠标、键盘等;块设备是指可以从设备的任意位置读取一定长度数据的设备,常见的块设备有硬盘、磁盘、U盘等。系统中的终端设备通常为字符设备,在进行终端设备的添加时,驱动会通过IDA(一种盘符分配机制)机制获取一个唯一标识ID,然后根据此标识创建相应的终端设备。本实施例旨在解决系统中终端设备的热插拔操作引起的盘符漂移问题。There are character devices and block devices in the system. Character devices refer to devices that are accessed sequentially in a byte stream serial order. Reading and writing to them are in bytes. Common character devices include mice, keyboards, etc.; A block device refers to a device that can read data of a certain length from any location on the device. Common block devices include hard disks, magnetic disks, USB flash drives, etc. Terminal devices in the system are usually character devices. When adding a terminal device, the driver will obtain a unique identification ID through the IDA (a drive letter allocation mechanism) mechanism, and then create the corresponding terminal device based on this identification. This embodiment aims to solve the problem of drive letter drift caused by the hot plug operation of terminal equipment in the system.
对于PCIe初始化过程来说,在初始化过程中扫描的设备分为终端设备和桥设备两大类型。终端设备指计算机外接设备如硬盘,内存卡等。桥设备是PCIe中的一种特殊设备,其主要用途是用于扩展其他类型的设备,如终端设备、桥设备,即一个桥设备可以连接终端设备,也可以连接其他桥设备。在本实施例中,所有的终端设备都是一对一连接到桥设备上的,一个支持热插拔的桥设备,也只扩展一个热插拔的终端设备。For the PCIe initialization process, the devices scanned during the initialization process are divided into two types: terminal devices and bridge devices. Terminal equipment refers to computer external equipment such as hard drives, memory cards, etc. A bridge device is a special device in PCIe. Its main purpose is to expand other types of devices, such as terminal devices and bridge devices. That is, a bridge device can connect to terminal devices and other bridge devices. In this embodiment, all terminal devices are connected to the bridge device one-to-one, and a bridge device that supports hot-swappable devices can only extend one hot-swappable terminal device.
图4是相关技术中PCIe设备初始化的流程图。如图4所示,在一般情况下,系统进行PCI设备初始化的过程如下:Figure 4 is a flow chart of PCIe device initialization in related art. As shown in Figure 4, under normal circumstances, the system initializes PCI devices as follows:
S1:在系统启动时进行系统的初始化。这里的系统初始化主要指系统开机后进行的一部分设置,例如内存的初始化,系统启用或者禁用某些功能的设置等;S1: Initialize the system when the system starts. The system initialization here mainly refers to some settings made after the system is turned on, such as memory initialization, system enabling or disabling certain functions, etc.;
S2:在系统初始化后,开始进行PCIe结构的初始化,该初始化是指建立用来描述系统中的PCIe设备信息的数据结构,该数据结构中包括系统中的设备所属总线,设备类型,设备ID等信息,为了方便管理所有的PCIe设备,会将所有的PCIe设备结构串联起来形成树状结构;S2: After the system is initialized, the initialization of the PCIe structure begins. This initialization refers to the establishment of a data structure used to describe the PCIe device information in the system. The data structure includes the bus to which the device in the system belongs, device type, device ID, etc. Information, in order to facilitate the management of all PCIe devices, all PCIe device structures will be connected in series to form a tree structure;
S3:在PCIe结构初始化完成后进入设备扫描阶段,这一步主要是进行扫描系统中有哪些PCIe设备;S3: After the PCIe structure initialization is completed, enter the device scanning stage. This step is mainly to scan which PCIe devices are in the system;
S4:当扫描到终端设备时,会则给该终端设备分配相应的设备资源,然后调用设备驱动对该终端设备进行初始化;S4: When a terminal device is scanned, the corresponding device resources will be allocated to the terminal device, and then the device driver will be called to initialize the terminal device;
S5:当扫描到桥设备时,由于桥设备后面需要接别的设备,因此会为该桥设备预留一些资源,比如总线号资源和内存资源;S5: When a bridge device is scanned, because the bridge device needs to be connected to other devices, some resources will be reserved for the bridge device, such as bus number resources and memory resources;
S6:进行PCIe设备的初始化,在设备驱动中通过IDA机制(调用IDA接口)动态获取一个唯一的标识符用于标识设备唯一性,然后接着创建对应的设备。S6: Initialize the PCIe device, dynamically obtain a unique identifier through the IDA mechanism (calling the IDA interface) in the device driver to identify the uniqueness of the device, and then create the corresponding device.
IDA机制(盘符分配机制)是内核管理整数资源的一种方法,其可以管理大量的整数资源并且在检索资源的时候非常高效。The IDA mechanism (drive letter allocation mechanism) is a method for the kernel to manage integer resources. It can manage a large number of integer resources and is very efficient when retrieving resources.
在上述步骤S6中存在盘符漂移的问题,这是由于设备驱动在每一次对终端设备进行初始化时,都是动态获取一个标识符分配给该终端设备,因此一旦拔掉该终端设备再重新插入,就会引起盘符漂移。In the above step S6, there is a problem of drive letter drift. This is because the device driver dynamically obtains an identifier and assigns it to the terminal device every time it initializes the terminal device. Therefore, once the terminal device is unplugged and re-inserted, , which will cause drive letter drift.
由于系统中发生盘符漂移现象主要是由于终端设备的热插拔操作引起的,而连接热插拔的插槽的桥设备是否支持热插拔,其实在系统初始化过程中通过扫描寄存器就能够获知,因此在调用设备驱动对接入的终端设备进行初始化之前,可以通过预先为插槽预留标识符来解决盘符漂移的问题。并且,一个操作系统外接的设备数量是有限的,其存储设备的数量更是有限的,因此预先为外接设备预留标识符并不会造成标识符的资源紧张。Since the phenomenon of drive letter drift in the system is mainly caused by the hot-swapping operation of the terminal device, whether the bridge device connected to the hot-swappable slot supports hot-swapping can actually be known by scanning the register during the system initialization process. , so before calling the device driver to initialize the connected terminal device, the problem of drive letter drift can be solved by reserving an identifier for the slot in advance. Moreover, the number of external devices connected to an operating system is limited, and the number of storage devices is even more limited. Therefore, reserving identifiers for external devices in advance will not cause a shortage of identifier resources.
下面将参考附图并结合实施例来详细说明本申请。The present application will be described in detail below with reference to the accompanying drawings and embodiments.
图1是本申请一实施例提出的PCIe设备控制方法的流程图。如图1所示,该方法包括:Figure 1 is a flow chart of a PCIe device control method proposed by an embodiment of the present application. As shown in Figure 1, the method includes:
S11:当从系统中扫描到桥设备时,判断所述桥设备是否支持热插拔;S11: When a bridge device is scanned from the system, determine whether the bridge device supports hot swapping;
S12:当所述桥设备支持热插拔时,为所述桥设备连接的插槽分配标识符;所述标识符为唯一的标识符;S12: When the bridge device supports hot plugging, assign an identifier to the slot connected to the bridge device; the identifier is a unique identifier;
S13:将所述插槽的标识符分配给所述插槽中的终端设备,并通过设备驱动初始化所述终端设备。S13: Assign the identifier of the slot to the terminal device in the slot, and initialize the terminal device through the device driver.
在一种实施例中,系统启动时将对系统中的设备寄存器进行扫描,当扫描到桥设备时,判断该桥设备是否支持热插拔。当获知该桥设备支持热插拔时,就可以为与该桥设备连接的插槽分配一个唯一的标识符。本实施例中,一个支持热插拔的桥设备只连接一个插槽,即一个桥设备只能扩展一个终端设备。In one embodiment, when the system starts, the device registers in the system are scanned. When a bridge device is scanned, it is determined whether the bridge device supports hot plugging. When it is known that the bridge device supports hot plugging, a unique identifier can be assigned to the slot to which the bridge device is connected. In this embodiment, a bridge device that supports hot swapping is only connected to one slot, that is, one bridge device can only expand one terminal device.
当该插槽中插入有外接的终端设备时,先将该插槽的标识符分配给该终端设备,再通过与该终端设备对应的设备驱动,完成该终端设备的后续初始化。本实施例中,当系统初始化过程中扫描到桥设备时,就为桥设备连接的插槽预留唯一的标识符,当插槽中有终端设备插入时即可将该插槽的唯一的标识符分配给终端设备,解决盘符漂移的问题。When an external terminal device is inserted into the slot, the identifier of the slot is first assigned to the terminal device, and then subsequent initialization of the terminal device is completed through the device driver corresponding to the terminal device. In this embodiment, when a bridge device is scanned during system initialization, a unique identifier is reserved for the slot to which the bridge device is connected. When a terminal device is inserted into the slot, the unique identifier of the slot can be The drive letter is assigned to the terminal device to solve the problem of drive letter drift.
S111:查询所述桥设备是否开启了中断功能;所述中断功能包括MSI中断以及MSI-X中断;S111: Query whether the bridge device has enabled the interrupt function; the interrupt function includes MSI interrupt and MSI-X interrupt;
若所述桥设备开启了中断功能,则进一步读取该桥设备的寄存器,判断该桥设备是否支持热插拔;If the interrupt function is enabled on the bridge device, the register of the bridge device is further read to determine whether the bridge device supports hot swapping;
若所述桥设备未开启中断功能,则所述桥设备不支持热插拔。If the bridge device does not enable the interrupt function, the bridge device does not support hot plugging.
在一种实施例中,首先查询桥设备是否开启了中断功能。当查询到该桥设备开启了中断功能时,进一步读取该桥设备的寄存器,判断该桥设备是否支持热插拔。例如,读取到寄存器中相关的值为1,则说明该桥设备支持热插拔,若读取到寄存器中相关的值为0,则说明该桥设备不支持热插拔。如果查询到该桥设备没有开启中断功能,则说明该桥设备不支持热插拔。In one embodiment, the bridge device is first queried whether the interrupt function is enabled. When it is found that the interrupt function of the bridge device is enabled, the register of the bridge device is further read to determine whether the bridge device supports hot plugging. For example, if the relevant value read in the register is 1, it means that the bridge device supports hot plugging. If the relevant value read in the register is 0, it means the bridge device does not support hot plugging. If the query shows that the bridge device does not have the interrupt function enabled, it means that the bridge device does not support hot swapping.
本实施例中,桥设备开启的中断功能可以是MSI中断或MSI-X中断。MSI(MessageSignaled Interrupts,讯息式中断)是一种通过在内存中写入信息来产生中断的方式,其中内存地址由设备驱动程序和硬件设备协商确定。MSI与传统的中断线不同,它不需要单独的中断线,而是通过PCI总线进行通信;MSI-X(Extended Message Signaled Interrupts,扩展消息信号中断)是在MSI的基础上扩展的一种中断方式,它允许设备使用多个独立的中断信号,从而提高了中断处理的效率。常用于需要高速响应的应用程序,例如虚拟化或者高性能计算。In this embodiment, the interrupt function enabled by the bridge device may be an MSI interrupt or an MSI-X interrupt. MSI (MessageSignaled Interrupts) is a way to generate interrupts by writing information in memory, where the memory address is negotiated between the device driver and the hardware device. MSI is different from traditional interrupt lines. It does not require a separate interrupt line, but communicates through the PCI bus; MSI-X (Extended Message Signaled Interrupts, Extended Message Signaled Interrupts) is an extension based on MSI Interrupt mode, which allows the device to use multiple independent interrupt signals, thereby improving the efficiency of interrupt processing. Commonly used in applications that require high-speed response, such as virtualization or high-performance computing.
本实施例中,在扫描到桥设备时,首先判断该桥设备是否开启了中断功能,以便为开启中断功能且支持热插拔的桥设备连接的插槽预留标识符,当桥设备未开启中断功能时,则无需再进行下一步判断,从而节省系统资源,加快初始化速度。In this embodiment, when the bridge device is scanned, it is first determined whether the interrupt function is enabled on the bridge device, so as to reserve an identifier for the slot connected to the bridge device that enables the interrupt function and supports hot plugging. When the bridge device is not enabled, When the function is interrupted, there is no need to make the next step of judgment, thereby saving system resources and speeding up initialization.
S121:向所述桥设备对应的数据结构中添加用于保存所述插槽的标识符的变量;S121: Add a variable for storing the identifier of the slot to the data structure corresponding to the bridge device;
S122:获取一个标识符,将所述标识符存储到所述变量中。S122: Obtain an identifier and store the identifier into the variable.
在一种实施例中,当系统启动对该系统内的设备进行扫描时,就为扫描到的插槽分配标识符。具体地,在扫描到桥设备并确定该桥设备支持热插拔后,意味着该桥设备连接的插槽可以插入外接终端设备,此时,在PCIe结构初始化形成的数据结构中,向该桥设备对应的部分结构中添加用于保存该桥设备连接的插槽的标识符的变量。该变量用于存储该插槽的标识符,该变量可以自行定义,例如将变量名设置为int32_t instance_id。In one embodiment, when the system starts scanning for devices within the system, identifiers are assigned to the scanned slots. Specifically, after the bridge device is scanned and it is determined that the bridge device supports hot plugging, it means that the slot connected to the bridge device can be plugged into an external terminal device. At this time, in the data structure formed by the PCIe structure initialization, the bridge device is Add a variable to save the identifier of the slot to which the bridge device is connected in the partial structure corresponding to the device. This variable is used to store the identifier of the slot. This variable can be defined by itself, for example, set the variable name to int32_t instance_id.
当向数据结构中添加变量后,获取一个标识符,该标识符将作为该插槽的唯一的标识符,将该标识符存储到该变量中,以便后续进行读取。When a variable is added to the data structure, an identifier is obtained, which will be used as the unique identifier of the slot, and the identifier is stored in the variable for subsequent reading.
需要说明的是,在本实施例中,获取标识符的方式既可以是调用IDA接口获取,也可以不使用IDA机制获取标识符,本实施例中获取标识符的方法没有具体限定,只要获取到的唯一的标识符即可。It should be noted that in this embodiment, the method of obtaining the identifier can be to call the IDA interface to obtain the identifier, or to obtain the identifier without using the IDA mechanism. The method of obtaining the identifier in this embodiment is not specifically limited, as long as the identifier is obtained A unique identifier is sufficient.
S131:在所述设备驱动中,执行获取与所述插槽相连的桥设备的操作;S131: In the device driver, perform the operation of obtaining the bridge device connected to the slot;
S132:从所述桥设备对应的数据结构中读取保存有所述插槽的标识符的变量,从所述变量中获取所述插槽的标识符;S132: Read the variable storing the identifier of the slot from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
S133:将所述插槽的标识符分配给所述终端设备。S133: Assign the identifier of the slot to the terminal device.
在一种实施例中,在对终端设备进行初始化时,在设备驱动中为该终端设备分配唯一的标识符。具体地,当设备驱动初始化该终端设备之前,设备驱动会先获取该终端设备所在的插槽,查找并获取到与该插槽相连的桥设备。In one embodiment, when the terminal device is initialized, a unique identifier is assigned to the terminal device in the device driver. Specifically, before the device driver initializes the terminal device, the device driver will first obtain the slot where the terminal device is located, and find and obtain the bridge device connected to the slot.
根据该桥设备从数据结构中找到对应的部分,再从中读取已经保存在这部分数据结构中的变量,该变量用于保存该插槽的唯一的标识符,即读取到该插槽的唯一的标识符。Find the corresponding part from the data structure according to the bridge device, and then read the variables that have been saved in this part of the data structure. This variable is used to save the unique identifier of the slot, that is, the value of the slot is read. Unique identifier.
在读取到该插槽的标识符后,设备驱动将该插槽的标识符分配给该终端设备。在本实施例中,设备驱动通过读取终端设备所在的插槽对应的桥设备,并从该桥设备对应的数据结构中获取到该插槽的唯一的标识符,将该标识符作为该终端设备的标识符,使得终端设备的标识符取决于其所在插槽的标识符,因此终端设备进行热插拔操作不会引起标识符的改变,从而避免发生盘符漂移。After reading the slot identifier, the device driver assigns the slot identifier to the terminal device. In this embodiment, the device driver reads the bridge device corresponding to the slot where the terminal device is located, obtains the unique identifier of the slot from the data structure corresponding to the bridge device, and uses the identifier as the terminal device. The identifier of the device makes the identifier of the terminal device depend on the identifier of the slot in which it is located. Therefore, the hot-swap operation of the terminal device will not cause the identifier to change, thereby avoiding drive letter drift.
S121’:在所述设备驱动中,执行向所述桥设备对应的数据结构中添加用于保存所述插槽的标识符的变量的操作;S121’: In the device driver, perform the operation of adding a variable for storing the identifier of the slot to the data structure corresponding to the bridge device;
S122’:获取一个标识符,将所述标识符存储到所述变量中。S122’: Obtain an identifier and store the identifier into the variable.
在一种实施例中,可直接通过设备驱动为插槽分配唯一的标识符。具体地,在设备驱动中增加为插槽分配标识的程序或代码语句,查找该终端设备所在的插槽连接的桥设备,并向该桥设备对应的数据结构中添加用于保存该插槽的标识符的变量。在添加变量后,获取一个标识符,该标识符将作为该插槽的唯一的标识符,将该标识符存储到该变量中,以便后续进行读取。In one embodiment, the slot may be assigned a unique identifier directly through the device driver. Specifically, add a program or code statement for assigning an identifier to a slot in the device driver, find the bridge device connected to the slot where the terminal device is located, and add a data structure for saving the slot to the data structure corresponding to the bridge device. Identifier variable. After adding the variable, obtain an identifier that will serve as a unique identifier for the slot and store the identifier in the variable for subsequent reading.
S131’:在所述设备驱动中,执行获取与所述插槽相连的桥设备的操作;S131’: In the device driver, perform the operation of obtaining the bridge device connected to the slot;
S132’:从所述桥设备对应的数据结构中读取保存有所述插槽的标识符的变量,从所述变量中获取所述插槽的标识符;S132’: Read the variable storing the identifier of the slot from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
S133’:将所述插槽的标识符分配给所述终端设备。S133': Assign the identifier of the slot to the terminal device.
在一种实施例中,通过设备驱动给插槽分配唯一的标识符后,设备驱动会将该插槽的标识符分配给该终端设备。具体地,设备驱动获取该终端设备所在的插槽连接的桥设备,并从该桥设备对应的数据结构中读取保存该插槽的唯一的标识符的变量,即读取到该插槽的唯一的标识符。将该插槽的标识符作为该终端设备的标识符,之后设备驱动继续进行该终端设备的初始化。In one embodiment, after the device driver assigns a unique identifier to the slot, the device driver assigns the slot identifier to the terminal device. Specifically, the device driver obtains the bridge device connected to the slot where the terminal device is located, and reads the variable that holds the unique identifier of the slot from the data structure corresponding to the bridge device, that is, reads the variable of the slot. Unique identifier. The identifier of the slot is used as the identifier of the terminal device, and then the device driver continues to initialize the terminal device.
在本实施例中,在设备驱动中为终端设备所在的插槽分配标识符,并将插槽的标识符分配给该终端设备,使得终端设备的标识符取决于其所在插槽的标识符,因此终端设备进行热插拔操作不会引起标识符的改变,从而避免发生盘符漂移。In this embodiment, an identifier is allocated in the device driver for the slot where the terminal device is located, and the identifier of the slot is assigned to the terminal device, so that the identifier of the terminal device depends on the identifier of the slot where it is located, Therefore, the hot-swappable operation of the terminal device will not cause the identifier to change, thereby avoiding drive letter drift.
在一种实施例中,该PCIe设备控制方法,还包括:In one embodiment, the PCIe device control method further includes:
S101:当系统启动时,初始化系统的配置;S101: When the system starts, initialize the system configuration;
S102:初始化PCIe设备的数据结构,生成用于描述PCIe设备信息的数据结构;所述描述PCIe设备信息的数据结构包括:设备所属总线,设备类型以及设备ID;所述描述PCIe设备信息的数据结构为树状结构;S102: Initialize the data structure of the PCIe device and generate a data structure used to describe the PCIe device information; the data structure describing the PCIe device information includes: the bus to which the device belongs, device type and device ID; the data structure describing the PCIe device information It is a tree structure;
S103:扫描所述系统中的设备,判断当前扫描到的设备的类型;所述设备为桥设备或终端设备,任一终端设备与一个桥设备一对一连接。S103: Scan the devices in the system and determine the type of the currently scanned device; the device is a bridge device or a terminal device, and any terminal device is connected to a bridge device one-to-one.
在上述实施例中,在系统为终端设备分配唯一的标识符之前,系统首先需要进行初始化配置,系统的初始化配置主要指系统开机后进行的一部分设置,比如内存的初始化,系统启用或者禁用某些功能的设置等。In the above embodiment, before the system allocates a unique identifier to the terminal device, the system first needs to perform initial configuration. The initial configuration of the system mainly refers to some settings made after the system is turned on, such as memory initialization, system enabling or disabling certain Function settings, etc.
在进行系统初始化以后,进行PCIe结构的初始化。PCIe结构初始化主要是建立系统中描述PCIe设备信息的数据结构,其包括了各PCIe设备的数据结构与连接信息,具体地,包括设备所属总线,设备类型,设备ID等信息。为了方便管理,在一种实施例中,将PCIe设备的数据结构进行串联,并形成树状结构进行管理。After system initialization, initialize the PCIe structure. PCIe structure initialization is mainly to establish a data structure describing PCIe device information in the system, which includes the data structure and connection information of each PCIe device. Specifically, it includes the bus to which the device belongs, device type, device ID and other information. In order to facilitate management, in one embodiment, the data structures of PCIe devices are concatenated and formed into a tree structure for management.
在PCIe数据结构初始化以后,对系统中的PCIe设备进行扫描。具体地,读取设备的寄存器,如果成功读取到数据则说明存在设备,进一步读取设备类型相关的寄存器来获取该设备的类型。After the PCIe data structure is initialized, scan the PCIe devices in the system. Specifically, the register of the device is read. If the data is successfully read, it means that the device exists. The register related to the device type is further read to obtain the type of the device.
S123:为当前扫描到的终端设备分配对应的设备资源;所述设备资源包括总线资源与内存资源。S123: Allocate corresponding device resources to the currently scanned terminal device; the device resources include bus resources and memory resources.
在上述实施例中,当扫描到终端设备时,需要为终端设备分配对应的设备资源,以便后续初始化后的终端设备能够正常使用。为终端设备分配的资源通常为总线资源与内存资源。In the above embodiment, when a terminal device is scanned, corresponding device resources need to be allocated to the terminal device so that the terminal device can be used normally after subsequent initialization. The resources allocated to terminal devices are usually bus resources and memory resources.
S124:调用总线探测接口,为所述终端设备匹配对应的设备驱动。S124: Call the bus detection interface to match the corresponding device driver for the terminal device.
为终端设备进行初始化,需要通过设备驱动进行。在一种实施例中,通过设备驱动进行设备的初始化之前,还需要调用总线探测接口,根据该终端设备的类型,为其匹配相应的设备驱动,然后通过该对应的设备驱动执行该终端设备的初始化。Initializing the terminal device needs to be done through the device driver. In one embodiment, before initializing the device through the device driver, it is also necessary to call the bus detection interface, match the corresponding device driver according to the type of the terminal device, and then execute the terminal device through the corresponding device driver. initialization.
S125:当所述桥设备支持热插拔时,为所述桥设备预留待分配的资源;所述待分配的资源包括总线资源以及内存资源;S125: When the bridge device supports hot plugging, reserve resources to be allocated for the bridge device; the resources to be allocated include bus resources and memory resources;
S126:当所述桥设备不支持热插拔时,返回并继续扫描所述系统中的其他设备。S126: When the bridge device does not support hot plugging, return and continue scanning other devices in the system.
在上述实施例中,当扫描到的桥设备支持热插拔时,需要为该桥设备预留部分资源,以供后续通过该桥设备外接终端设备时,为终端设备分配对应的设备资源。本实施例中,为桥设备预留的资源包括总线号资源与内存资源。In the above embodiment, when the scanned bridge device supports hot swapping, some resources need to be reserved for the bridge device so that when the terminal device is subsequently connected to an external terminal device through the bridge device, corresponding device resources are allocated to the terminal device. In this embodiment, the resources reserved for the bridge device include bus number resources and memory resources.
S104:当所述桥设备支持热插拔时,创建事件处理回调函数,所述事件处理回调函数根据系统中的终端设备的热插拔行为,执行添加或删除操作。S104: When the bridge device supports hot plugging, create an event processing callback function, and the event processing callback function performs an adding or deleting operation according to the hot plugging behavior of the terminal device in the system.
在一种实施例中,通过创建事件处理回调函数来进行外接终端设备的热插拔管理,本实施例中,热插拔管理包括添加和删除,当有外接终端设备插入插槽,或有终端设备从插槽中拔出时,通过事件处理回调函数进行相应的添加或删除设备的操作。In one embodiment, the hot-plug management of external terminal devices is performed by creating an event processing callback function. In this embodiment, hot-plug management includes addition and deletion. When an external terminal device is inserted into the slot, or there is a terminal When the device is unplugged from the slot, the corresponding operation of adding or deleting the device is performed through the event processing callback function.
图5是本申请一实施例中进行热插拔管理的流程图。如图5所示,系统中热插拔管理中,终端设备的添加与删除包括以下步骤:Figure 5 is a flow chart of hot plug management in an embodiment of the present application. As shown in Figure 5, in hot-plug management in the system, adding and deleting terminal devices includes the following steps:
S1041:当所述桥设备支持热插拔时,创建中断回调函数,通过所述中断回调函数创建中断工作队列与事件处理回调函数。S1041: When the bridge device supports hot plugging, create an interrupt callback function, and create an interrupt work queue and event processing callback function through the interrupt callback function.
在一种实施例中,当扫描到桥设备时,首先检查该桥设备是否开启了中断(MSI中断或MSI-X中断)功能。当该桥设备开启了中断功能时,创建中断回调函数。中断回调函数会进一步创建中断工作队列以及事件处理回调函数。In one embodiment, when a bridge device is scanned, it is first checked whether the bridge device has an interrupt (MSI interrupt or MSI-X interrupt) function enabled. When the bridge device enables the interrupt function, create an interrupt callback function. The interrupt callback function will further create an interrupt work queue and event processing callback function.
S1042:通过所述事件处理回调函数获取中断信息,并判断中断类型。S1042: Obtain interrupt information through the event processing callback function and determine the interrupt type.
在本实施例中,事件处理回调函数获取系统的中断信息,例如设备接入或设备拔出的中断信息。In this embodiment, the event processing callback function obtains the interrupt information of the system, such as the interrupt information of device access or device removal.
S1043:若所述中断类型为设备添加,则重新扫描所述系统中的设备,当扫描到新添加的终端设备时,调用所述设备驱动;S1043: If the interrupt type is device addition, rescan the devices in the system, and when the newly added terminal device is scanned, call the device driver;
在所述设备驱动中执行获取与所述新添加的终端设备的所在的插槽相连的桥设备的操作;Execute in the device driver the operation of obtaining the bridge device connected to the slot where the newly added terminal device is located;
从所述桥设备对应的数据结构中读取保存有所述新添加的终端设备所在的插槽的标识符的变量,从所述变量中获取所述插槽的标识符;Read the variable holding the identifier of the slot where the newly added terminal device is located from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
将所述插槽的标识符分配给所述新添加的终端设备;Assign the identifier of the slot to the newly added terminal device;
在所述设备驱动中初始化所述新添加的终端设备。Initialize the newly added terminal device in the device driver.
本实施例中,在获取到系统的中断信息后,事件处理回调函数进一步判断该中断信息的类型。如果中断信息的类型是设备添加(即插入磁盘触发的事件),则在系统中进行设备的重新扫描,如果扫描到了新添加的终端设备,则进一步调用设备驱动,通过读取该终端设备所在插槽的唯一标识符,确定该终端设备的标识符,从而在设备驱动为该终端设备进行初始化之前为新添加的终端设备分配唯一的标识符,防止盘符漂移。In this embodiment, after obtaining the interrupt information of the system, the event processing callback function further determines the type of the interrupt information. If the type of interrupt information is device addition (that is, an event triggered by inserting a disk), the device will be rescanned in the system. If a newly added terminal device is scanned, the device driver will be further called to read the socket where the terminal device is located. The unique identifier of the slot determines the identifier of the terminal device, thereby assigning a unique identifier to the newly added terminal device before the device driver initializes the terminal device to prevent drive letter drift.
设备驱动会通过上述实施例中提供的方法,获取该新添加的终端设备的标识符,然后在系统中创建相应的字符设备,完成该终端设备的添加过程。The device driver will obtain the identifier of the newly added terminal device through the method provided in the above embodiment, and then create a corresponding character device in the system to complete the adding process of the terminal device.
S1044:若所述中断类型为设备删除,则调用删除操作函数停止对应的终端设备,删除与所述终端设备连接的桥设备对应的数据结构中对应的数据,并释放分配给所述终端设备的设备资源;所述设备资源包括总线资源以及内存资源。S1044: If the interrupt type is device deletion, call the delete operation function to stop the corresponding terminal device, delete the corresponding data in the data structure corresponding to the bridge device connected to the terminal device, and release the data allocated to the terminal device. Device resources; the device resources include bus resources and memory resources.
如果是中断信息的类型是设备删除(例如:拔出设备触发的中断事件),则事件处理回调函数会调用相应的删除操作函数,停止该拔出的终端设备的运行进程,并删除该拔出的终端设备所对应的数据,释放相关资源,例如,删除并释放在终端设备初始化时为该终端设备分配的总线资源以及内存资源,以供后续为新插入该插槽的终端设备重新分配。If the type of interrupt information is device deletion (for example: an interrupt event triggered by unplugging the device), the event processing callback function will call the corresponding delete operation function to stop the running process of the unplugged terminal device and delete the unplugged terminal device. Data corresponding to the terminal device and release related resources, for example, delete and release the bus resources and memory resources allocated to the terminal device when the terminal device is initialized for subsequent reallocation for the terminal device newly inserted into the slot.
基于同一发明构思,本申请一实施例提供一种PCIe设备控制装置。参考图2,图2是本申请一实施例提出的PCIe设备控制装置200的示意图。如图2所示,该装置包括:Based on the same inventive concept, an embodiment of the present application provides a PCIe device control device. Referring to Figure 2, Figure 2 is a schematic diagram of a PCIe device control device 200 proposed by an embodiment of the present application. As shown in Figure 2, the device includes:
设备扫描模块201,被配置为当从系统中扫描到桥设备时,判断所述桥设备是否支持热插拔;The device scanning module 201 is configured to determine whether the bridge device supports hot plugging when scanning a bridge device from the system;
标识符分配模块202,被配置为当所述桥设备支持热插拔时,为所述桥设备连接的插槽分配标识符;The identifier allocation module 202 is configured to allocate an identifier to the slot connected to the bridge device when the bridge device supports hot plugging;
设备初始化模块203,被配置为将所述插槽的标识符分配给所述插槽中的终端设备,并通过设备驱动初始化所述终端设备。The device initialization module 203 is configured to assign the identifier of the slot to the terminal device in the slot, and initialize the terminal device through the device driver.
可选地,所述设备扫描模块201还包括查询子模块,所述查询子模块被配置为查询所述桥设备是否开启了中断功能;所述中断功能包括MSI中断以及MSI-X中断;Optionally, the device scanning module 201 also includes a query sub-module configured to query whether the bridge device has an interrupt function enabled; the interrupt function includes MSI interrupt and MSI-X interrupt;
若所述桥设备开启了中断功能,则进一步读取该桥设备的寄存器,判断该桥设备是否支持热插拔;If the interrupt function is enabled on the bridge device, the register of the bridge device is further read to determine whether the bridge device supports hot swapping;
若所述桥设备未开启中断功能,则所述桥设备不支持热插拔。If the bridge device does not enable the interrupt function, the bridge device does not support hot plugging.
可选地,所述PCIe设备控制装置200还包括设备标识符分配模块,所述设备标识符分配模块,被配置为向所述桥设备对应的数据结构中添加用于保存所述插槽的标识符的变量;Optionally, the PCIe device control apparatus 200 further includes a device identifier allocation module configured to add the identification of the slot to the data structure corresponding to the bridge device. symbol variable;
获取一个标识符,将所述标识符存储到所述变量中。Get an identifier and store the identifier into the variable.
在一种实施例中,将分配标识并存储对应的标识数据的程序或代码语句封装为设备标识符分配模块,方便在任何需要分配标识符时可直接进行调用。当为插槽或设备分配标识符时,可在执行PCIe设备的扫描过程中,调用该设备标识符分配模块对插槽预先分配标识符;也可以在进行终端设备的初始化时,通过设备驱动调用设备标识符分配模块为终端设备所在的插槽分配标识符。在设备标识符分配模块分配完标识符后,将该标识符数据存储到对应的数据结构中。In one embodiment, the program or code statement that allocates identifiers and stores corresponding identification data is encapsulated as a device identifier allocation module, so that it can be directly called whenever an identifier needs to be allocated. When assigning an identifier to a slot or device, the device identifier allocation module can be called during the scanning process of the PCIe device to pre-allocate an identifier for the slot; it can also be called through the device driver when initializing the terminal device. The device identifier assignment module assigns identifiers to the slots in which the terminal devices are located. After the device identifier allocation module allocates the identifier, the identifier data is stored in the corresponding data structure.
可选地,所述PCIe设备控制装置200还包括设备标识符获取模块,所所述设备标识符获取模块,被配置为获取与所述插槽相连的桥设备;Optionally, the PCIe device control apparatus 200 further includes a device identifier acquisition module, and the device identifier acquisition module is configured to acquire a bridge device connected to the slot;
从所述桥设备对应的数据结构中读取保存有所述插槽的标识符的变量,从所述变量中获取所述插槽的标识符;Read the variable storing the identifier of the slot from the data structure corresponding to the bridge device, and obtain the identifier of the slot from the variable;
将所述插槽的标识符分配给所述终端设备。An identifier of the slot is assigned to the terminal device.
在一种实施例中,将从相关数据结构中读取插槽的标识符的程序或代码语句封装为设备标识符获取模块,方便在任何需要获取插槽的标识符的时候可直接进行调用。当需要从数据结构中读取插槽的标识符时,调用设备标识符获取模块进行读取。In one embodiment, the program or code statement that reads the identifier of the slot from the relevant data structure is encapsulated as a device identifier acquisition module, so that it can be directly called whenever it is necessary to obtain the identifier of the slot. When the slot identifier needs to be read from the data structure, the device identifier acquisition module is called to read it.
图3是本申请一实施例提出的PCIe设备初始化的流程图。如图3所示,在一种实施例中,对终端设备的初始化步骤如下:Figure 3 is a flow chart of PCIe device initialization proposed by an embodiment of the present application. As shown in Figure 3, in one embodiment, the initialization steps for the terminal device are as follows:
S1:当系统启动时,进行系统的初始化;S1: When the system starts, perform system initialization;
S2:进行系统中PCIe结构的初始化;S2: Initialize the PCIe structure in the system;
S3:扫描系统中的设备;S3: Scan devices in the system;
S4:在扫描设备的过程中,对支持热插拔的桥设备预先分配资源,并调用设备标识符分配模块为插槽预分配唯一的标识符;S4: During the process of scanning the device, pre-allocate resources to the bridge device that supports hot-swapping, and call the device identifier allocation module to pre-allocate a unique identifier for the slot;
S5:在扫描到终端设备时,在设备驱动中调用设备标识符获取模块获取该终端设备所在插槽的标识符,并将该标识符分配给该终端设备,完成该终端设备后续的初始化。S5: When a terminal device is scanned, call the device identifier acquisition module in the device driver to obtain the identifier of the slot where the terminal device is located, and assign the identifier to the terminal device to complete subsequent initialization of the terminal device.
可选地,所述PCIe设备控制装置200,还包括:Optionally, the PCIe device control device 200 also includes:
系统初始化模块,被配置为当系统启动时,初始化系统的配置;The system initialization module is configured to initialize the system configuration when the system starts;
PCIe初始化模块,被配置为初始化PCIe设备的数据结构,生成用于描述PCIe设备信息的数据结构;所述描述PCIe设备信息的数据结构包括:设备所属总线,设备类型以及设备ID;所述描述PCIe设备信息的数据结构为树状结构;The PCIe initialization module is configured to initialize the data structure of the PCIe device and generate a data structure used to describe the PCIe device information; the data structure describing the PCIe device information includes: the bus to which the device belongs, the device type and the device ID; the describing PCIe The data structure of device information is a tree structure;
所述设备扫描模块201,还被配置为扫描所述系统中的设备,判断当前扫描到的设备的类型;所述设备为桥设备或终端设备,任一终端设备与一个桥设备一对一连接。The device scanning module 201 is also configured to scan the devices in the system and determine the type of the currently scanned device; the device is a bridge device or a terminal device, and any terminal device is connected to a bridge device one-to-one. .
可选地,所述PCIe设备控制装置200,还包括:Optionally, the PCIe device control device 200 also includes:
资源配置模块被配置为,为当前扫描到的终端设备分配对应的设备资源;所述设备资源包括总线资源与内存资源;The resource configuration module is configured to allocate corresponding device resources to the currently scanned terminal device; the device resources include bus resources and memory resources;
驱动匹配模块,被配置为调用总线探测接口,为所述终端设备匹配对应的设备驱动。The driver matching module is configured to call the bus detection interface to match the corresponding device driver for the terminal device.
可选地,所述资源配置模块还被配置为,当所述桥设备支持热插拔时,为所述桥设备预留待分配的资源;所述待分配的资源包括总线资源以及内存资源。Optionally, the resource configuration module is further configured to reserve resources to be allocated for the bridge device when the bridge device supports hot plugging; the resources to be allocated include bus resources and memory resources.
可选地,所述设备扫描模块201还被配置为,当所述桥设备不支持热插拔时,返回并继续扫描所述系统中的其他设备。Optionally, the device scanning module 201 is also configured to return and continue scanning other devices in the system when the bridge device does not support hot plugging.
可选地,所述PCIe设备控制装置200,还包括热插拔处理模块,被配置为当所述桥设备支持热插拔时,创建事件处理回调函数,根据系统中的终端设备的热插拔行为,执行添加或删除操作。Optionally, the PCIe device control device 200 also includes a hot plug processing module configured to create an event processing callback function when the bridge device supports hot plug, and according to the hot plug of the terminal device in the system Behavior, perform add or delete operations.
可选地,所述热插拔处理模块,还被配置为通过所述事件处理回调函数获取中断信息,并判断中断类型;Optionally, the hot-plug processing module is also configured to obtain interrupt information through the event processing callback function and determine the interrupt type;
若所述中断类型为设备添加,则重新扫描所述系统中的设备,在设备驱动中初始化新添加的终端设备;If the interrupt type is device addition, rescan the devices in the system and initialize the newly added terminal device in the device driver;
若所述中断类型为设备删除,则调用删除操作函数停止对应的终端设备,删除与所述终端设备连接的桥设备对应的数据结构中对应的数据,并释放设备资源;所述设备资源包括总线资源以及内存资源。If the interrupt type is device deletion, call the delete operation function to stop the corresponding terminal device, delete the corresponding data in the data structure corresponding to the bridge device connected to the terminal device, and release device resources; the device resources include a bus resources and memory resources.
可选地,所述热插拔处理模块,还被配置为创建中断回调函数;Optionally, the hot-swap processing module is also configured to create an interrupt callback function;
通过中断回调函数创建中断工作队列与所述事件处理回调函数。Create an interrupt work queue with the event processing callback function through the interrupt callback function.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the devices in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the present application. within the scope of protection.
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和部件并不一定是本申请所必须的。For the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, some steps Other orders or simultaneous steps are possible. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily necessary for this application.
本领域内的技术人员应明白,本申请实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine such that the instructions are executed by the processor of the computer or other programmable data processing terminal device. Means are generated for implementing the functions specified in the process or processes of the flowchart diagrams and/or the block or blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing terminal equipment to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the The instruction means implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, so that a series of operating steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby causing the computer or other programmable terminal equipment to perform a computer-implemented process. The instructions executed on provide steps for implementing the functions specified in a process or processes of the flow diagrams and/or a block or blocks of the block diagrams.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。Although preferred embodiments of the embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once the basic inventive concepts are understood. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or any such actual relationship or sequence between operations. Furthermore, the terms "comprises," "comprises," or any other variation thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or end device that includes a list of elements includes not only those elements, but also elements not expressly listed or other elements inherent to such process, method, article or terminal equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or terminal device including the stated element.
以上对本申请所提供的PCIe设备控制方法及装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The PCIe device control method and device provided by this application have been introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and implementation of this application. Its core idea; at the same time, for those of ordinary skill in the field, there will be changes in the specific implementation and application scope based on the ideas of this application. In summary, the content of this specification should not be understood as an infringement of this application. limit.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310779405.9A CN116821033A (en) | 2023-06-28 | 2023-06-28 | A PCIe equipment control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310779405.9A CN116821033A (en) | 2023-06-28 | 2023-06-28 | A PCIe equipment control method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116821033A true CN116821033A (en) | 2023-09-29 |
Family
ID=88127065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310779405.9A Pending CN116821033A (en) | 2023-06-28 | 2023-06-28 | A PCIe equipment control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116821033A (en) |
-
2023
- 2023-06-28 CN CN202310779405.9A patent/CN116821033A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7970974B2 (en) | Method and system for adding or removing a logical unit of a USB mass storage device | |
US7526578B2 (en) | Option ROM characterization | |
CN109324991B (en) | Hot plug device, method, medium and system of PCIE (peripheral component interface express) equipment | |
US7873754B2 (en) | Structure for option ROM characterization | |
JP2010182302A (en) | Method and apparatus for efficiently removing data duplication by metadata grouping | |
US10671403B2 (en) | Method and apparatus for identifying hardware device in operating system | |
CN105824678A (en) | Method and device for installing operating system | |
CN114667506A (en) | Management of multi-physical function non-volatile memory devices | |
CN104932922A (en) | Method and device for regulating boot sequence of SAS (Serial Attached SCSI) card hard disk | |
CN114020681B (en) | Method, device and system for distributing logical drive letter, electronic equipment and storage medium | |
CN105335306A (en) | Memory control method and memory control device | |
WO2025036201A1 (en) | Virtual resource creation method and apparatus, electronic device, chip, storage medium, and computer program product | |
CN110399168B (en) | System startup method, device and device for multi-data disk storage server | |
CN113986134B (en) | Method for storing data, method and device for reading data | |
US20060047858A1 (en) | ROM scan memory expander | |
WO2023123896A1 (en) | Disc loading control method, apparatus, and device, and readable storage medium | |
CN115185874B (en) | PCIE resource allocation method and related device | |
CN116821033A (en) | A PCIe equipment control method and device | |
CN111913806A (en) | A memory area management method, electronic device and storage medium | |
CN111625350A (en) | Memory allocation method, device, equipment and storage medium for network message data | |
CN115878327A (en) | Bus reservation method, device, server, electronic equipment and storage medium | |
TWI411921B (en) | Electronic systems, computer-readable storage medium and methods for interconnecting peripheral devices and electronic systems | |
CN115150268A (en) | Network configuration method, device, and electronic device for Kubernetes cluster | |
CN109271179B (en) | Virtual machine application program management method, device, equipment and readable storage medium | |
CN113986471A (en) | Method, device, equipment and storage medium for safely deleting mirror image file of virtual machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |