ES2710625T3 - Process of memory management of virtual machine, physical main machine, PCIE device and configuration procedure thereof, and migration management device - Google Patents

Process of memory management of virtual machine, physical main machine, PCIE device and configuration procedure thereof, and migration management device Download PDF

Info

Publication number
ES2710625T3
ES2710625T3 ES15879666T ES15879666T ES2710625T3 ES 2710625 T3 ES2710625 T3 ES 2710625T3 ES 15879666 T ES15879666 T ES 15879666T ES 15879666 T ES15879666 T ES 15879666T ES 2710625 T3 ES2710625 T3 ES 2710625T3
Authority
ES
Spain
Prior art keywords
service
clat
processed
virtual machine
memory
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.)
Active
Application number
ES15879666T
Other languages
Spanish (es)
Inventor
Shengwen Lu
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Application granted granted Critical
Publication of ES2710625T3 publication Critical patent/ES2710625T3/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/15Use in a specific computing environment
    • G06F2212/151Emulated environment, e.g. virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory
    • G06F2212/6042Allocation of cache space to multiple users or processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/68Details of translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Abstract

Un procedimiento para gestionar una memoria de una máquina virtual, en el que la máquina virtual se ejecuta en un ordenador central físico, el ordenador central físico está conectado a un dispositivo de interconexión exprés de componentes periféricos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualización I/O de una sola raíz, SR-IOV, y el dispositivo PCIE tiene al menos una función física, PF, y al menos una función virtual, VF, en el que un número de función único se configura para cada PF y cada VF por separado; en el que la máquina virtual ejecuta un servicio usando una VF de la al menos una VF, y la máquina virtual corresponde a un número de función de la VF de la al menos una VF; y el procedimiento comprende: asignar, mediante la máquina virtual, una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio comprende múltiples bloques de memoria, cada uno de los múltiples bloques de memoria se utiliza para guardar información de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una sección de espacio de memoria en la que direcciones físicas de invitado son consecutivas; generar, mediante la máquina virtual, una tabla de direcciones base, BAT, y una tabla de direcciones lógicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT comprende una dirección base de entrada de CLAT correspondiente a cada servicio, y la CLAT comprende una primera dirección de cada bloque de memoria; enviar al dispositivo PCIE, mediante la máquina virtual, una dirección de la BAT y un número de función correspondiente a la máquina virtual, donde una correspondencia entre la dirección de la BAT y el número de función correspondiente a la máquina virtual se guarda en una tabla de configuración de máquina virtual, VCT, del dispositivo PCIE conectado al ordenador central físico; en el que cuando la máquina virtual se migra desde el ordenador central físico a un ordenador central físico de destino, los bloques de memoria, la BAT y la CLAT se migran a la máquina virtual migrada en el ordenador central físico de destino; y en el que después de la migración, una correspondencia entre la dirección de la BAT y un número de función que corresponde a la máquina virtual migrada, y es de una VF en un dispositivo PCIE conectado al ordenador central físico de destino, se configura en una VCT en el dispositivo PCIE conectado al ordenador central físico de destino.A method for managing a memory of a virtual machine, in which the virtual machine is executed in a physical central computer, the physical central computer is connected to an express interface interconnection device, PCIE, the PCIE device is a device for hardware that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, in which a unique function number is configure for each PF and each VF separately; wherein the virtual machine executes a service using a VF of the at least one VF, and the virtual machine corresponds to a function number of the VF of the at least one VF; and the method comprises: assigning, by means of the virtual machine, a memory to at least one service located in the PCIE device, where the memory allocated to each service comprises multiple blocks of memory, each of the multiple blocks of memory being used to store operating information of a corresponding service, and each memory block is a section of memory space in which physical guest addresses are consecutive; generate, through the virtual machine, a table of base addresses, BAT, and a chip logical address table, CLAT, according to the memory assigned to each service, where the BAT comprises a base CLAT entry address corresponding to each service, and the CLAT comprises a first address of each memory block; send to the PCIE device, via the virtual machine, a BAT address and a function number corresponding to the virtual machine, where a correspondence between the BAT address and the function number corresponding to the virtual machine is stored in a table of virtual machine configuration, VCT, of the PCIE device connected to the physical central computer; wherein when the virtual machine is migrated from the physical central computer to a destination physical host, the memory blocks, the BAT and the CLAT are migrated to the migrated virtual machine in the destination physical host; and in which after migration, a correspondence between the address of the BAT and a function number corresponding to the migrated virtual machine, and is of a VF in a PCIE device connected to the destination physical host, is configured in a VCT on the PCIE device connected to the target physical host.

Description

DESCRIPCIONDESCRIPTION

Procedimiento de gestion de memoria de maquina virtual, maquina principal ffsica, dispositivo PCIE y procedimiento de configuracion del mismo, y dispositivo de gestion de migracionProcess of memory management of virtual machine, physical main machine, PCIE device and configuration procedure thereof, and migration management device

Campo tecnicoTechnical field

La presente invencion se refiere al campo de las maquinas virtuales y, en particular, a un procedimiento para gestionar una memoria de una maquina virtual, a un ordenador central ffsico, a un dispositivo PCIE y un procedimiento de configuracion del mismo, y a un dispositivo de gestion de migracion.The present invention relates to the field of virtual machines and, in particular, to a method for managing a memory of a virtual machine, a physical central computer, a PCIE device and a configuration procedure thereof, and a device for migration management.

AntecedentesBackground

En una arquitectura de aplicaciones ffpica de una maquina virtual, un gestor de maquina virtual (en ingles: Virtual Machine Manager, VMM por sus siglas) que proporciona una funcion de gestion de una maquina virtual esta instalado en un ordenador central ffsico. El VMM gestiona una o mas maquinas virtuales, y cada maquina virtual puede ejecutar un sistema operativo (en ingles: Operating System, OS por sus siglas) y diversas aplicaciones. En general, el hardware del ordenador central ffsico incluye principalmente: cierto hardware relacionado con la ejecucion de una maquina virtual, por ejemplo, una unidad central de procesamiento (en ingles: Central Processing Unit, CPU por sus siglas), una memoria, un disco duro y cierto hardware con funciones relativamente independientes que no esta configurado directamente para ejecutar una maquina virtual, sino que esta configurado para ejecutar algunos servicios particulares, por ejemplo, un dispositivo de interconexion expres de componentes perifericos (PCIE) (tal como un adaptador de red y una tarjeta de video) del ordenador central ffsico.In a typical application architecture of a virtual machine, a virtual machine manager (in English: Virtual Machine Manager, VMM for short) that provides a management function of a virtual machine is installed in a physical central computer. The VMM manages one or more virtual machines, and each virtual machine can run an operating system (in English: Operating System, OS for short) and various applications. In general, the hardware of the physical central computer mainly includes: certain hardware related to the execution of a virtual machine, for example, a central processing unit (in English: Central Processing Unit, CPU for short), a memory, a disk hard and certain hardware with relatively independent functions that is not directly configured to run a virtual machine, but is configured to run some particular services, for example, an peripheral interconnection device (PCIE) (such as a network adapter) and a video card) of the physical central computer.

La virtualizacion I/O de una sola rafz (en ingles: Single-Root I/O Virtualization, SR-IOV por sus siglas) es una tecnologfa de virtualizacion de entrada/salida (en ingles: Input/Output, I/O por sus siglas). Gracias a la tecnologfa pueden obtenerse multiples adaptadores PCIE virtuales por medio de la virtualizacion en un adaptador PCIE ffsico. Esto se conoce como funcion virtual (en ingles: Virtual Function, VF por sus siglas). Usando un adaptador de red que admite la SR-IOV como ejemplo, pueden obtenerse multiples adaptadores de red virtuales por medio de la virtualizacion en un adaptador de red ffsico, y una VF de cada maquina virtual se corresponde con un adaptador de red virtual.The single-root I / O virtualization (in English: Single-Root I / O Virtualization, SR-IOV for short) is an input / output virtualization technology (in English: Input / Output, I / O for its acronym). Thanks to the technology, multiple virtual PCIE adapters can be obtained through virtualization in a physical PCIE adapter. This is known as virtual function (in English: Virtual Function, VF by its abbreviations). Using a network adapter that supports the SR-IOV as an example, multiple virtual network adapters can be obtained through virtualization on a physical network adapter, and one VF of each virtual machine corresponds to a virtual network adapter.

Despues de ser virtualizado, un servidor puede implementar facilmente una migracion en vivo de una maquina virtual. Una tecnologfa de migracion en vivo para una maquina virtual se refiere a que una maquina virtual se transfiere desde un ordenador central ffsico a otro ordenador central ffsico por medio de una migracion en vivo, y el procesamiento de los servicios apenas se ve afectado en el proceso de migracion.After being virtualized, a server can easily implement a live migration of a virtual machine. A live migration technology for a virtual machine refers to a virtual machine being transferred from a physical central computer to another physical central computer through a live migration, and the processing of the services is hardly affected in the process. of migration.

En un proceso de implementacion de la presente invencion, el inventor ha observado que la tecnica anterior tiene al menos los siguientes problemas:In an implementation process of the present invention, the inventor has observed that the prior art has at least the following problems:

En la tecnica anterior, durante la migracion en vivo de una maquina virtual, los datos almacenados en una memoria tienen que ser migrados a un ordenador central ffsico de destino, y los estados de registros guardados en un adaptador PCIE tambien tienen que ser migrados al ordenador central ffsico de destino. Estos registros estan generalmente configurados para registrar informacion de funcionamiento de los servicios procesados por el adaptador PCIE. La informacion de funcionamiento se utiliza para la recopilacion de estadfsticas de servicios, el control de servicios y el registro de estados de servicio. Sin embargo, los registros que guardan la informacion de funcionamiento de los servicios estan muy descentralizados. Si se realiza una migracion en vivo, los estados de estos registros deben ser guardados y restaurados de forma individual, lo que es muy engorroso.In the prior art, during the live migration of a virtual machine, the data stored in a memory have to be migrated to a physical host computer, and the record states stored in a PCIE adapter also have to be migrated to the computer physical central destination. These registries are generally configured to register operation information of the services processed by the PCIE adapter. The operating information is used for the collection of service statistics, the control of services and the recording of service states. However, the registries that keep the operating information of the services are very decentralized. If a live migration is performed, the states of these records must be saved and restored individually, which is very cumbersome.

El documento US 2012/0042034 A1 describe que antes de la migracion de una maquina virtual (VM), la VM accede directamente a una unidad de almacenamiento usando una funcion virtual (VF), en concreto la VF de acceso de IO directa desde la VM a la unidad de almacenamiento, por tanto sustancialmente sin la intervencion de un intermediario de virtualizacion. Durante la migracion de la VM, la informacion de estado se transfiere desde la VF al intermediario de virtualizacion, la VM accede a la unidad de almacenamiento usando una funcion ffsica (PF) en lugar de la VF, y el intermediario de virtualizacion interviene en el acceso IO desde la MV a la unidad de almacenamiento. El documento US 2012/0137292 A1 describe que un ordenador de origen de migracion lleva a cabo un procesamiento para enviar informacion de direccion ffsica de ordenador central de una region MMIO correspondiente a un dispositivo utilizado por una maquina virtual a traves de I/O dirigida a un ordenador de destino de migracion. El ordenador de destino de migracion lleva a cabo un procesamiento para asignar una region MMIO correspondiente a la informacion de direccion ffsica de ordenador central enviada por el ordenador de origen de migracion, al dispositivo conectado a los ordenadores mediante el dispositivo de conmutacion.The document US 2012/0042034 A1 describes that before the migration of a virtual machine (VM), the VM directly accesses a storage unit using a virtual function (VF), in particular the direct VF access VF from the VM to the storage unit, therefore substantially without the intervention of a virtualization intermediary. During the migration of the VM, the status information is transferred from the VF to the virtualization intermediary, the VM accesses the storage unit using a physical function (PF) instead of the VF, and the virtualization intermediary intervenes in the IO access from the MV to the storage unit. Document US 2012/0137292 A1 discloses that a migration originating computer carries out a processing to send physical address information of the central computer of an MMIO region corresponding to a device used by a virtual machine through I / O addressed to a destination computer of migration. The migration destination computer performs processing to allocate an MMIO region corresponding to the physical address information of the central computer sent by the migration originating computer, to the device connected to the computers by means of the switching device.

El documento WO 2014/032233 A1 describe que el nodo de gestion se utiliza para convertir una relacion de conexion entre un modulo VF utilizado por la Mv antes de la migracion en vivo y un servidor de origen en una relacion de conexion entre el modulo VF y un servidor de destino por medio del conmutador PCIE. Document WO 2014/032233 A1 discloses that the management node is used to convert a connection relationship between a VF module used by the M v before the live migration and a source server in a connection relationship between the VF module and a destination server through the PCIE switch.

ResumenSummary

Para resolver el problema de la tecnica anterior, la presente invencion proporciona un procedimiento para gestionar una memoria de una maquina virtual, un ordenador central ffsico, un dispositivo PCIE y un procedimiento de configuracion del mismo, y un dispositivo de gestion de migracion. Las soluciones tecnicas son las siguientes:To solve the problem of the prior art, the present invention provides a method for managing a memory of a virtual machine, a physical central computer, a PCIE device and a configuration procedure thereof, and a migration management device. The technical solutions are the following:

Segun las reivindicaciones independientes se proporciona un procedimiento para gestionar una memoria de una maquina virtual, un ordenador central ffsico, un dispositivo PClE y un procedimiento de configuracion del mismo, y un dispositivo de gestion de la migracion. Las reivindicaciones dependientes proporcionan formas de realizacion preferidas.According to the independent claims there is provided a method for managing a memory of a virtual machine, a physical central computer, a PClE device and a configuration procedure thereof, and a migration management device. The dependent claims provide preferred embodiments.

De acuerdo con un primer aspecto, una forma de realizacion de la presente invencion proporciona un procedimiento para gestionar una memoria de una maquina virtual, donde la maquina virtual se ejecuta en un ordenador central ffsico, el ordenador central ffsico esta conectado a un dispositivo de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; y el procedimiento incluye:According to a first aspect, an embodiment of the present invention provides a method for managing a memory of a virtual machine, where the virtual machine is executed in a physical central computer, the physical central computer is connected to an interconnection device. peripheral component expression, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately; and the procedure includes:

asignar, mediante la maquina virtual, una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas;assign, by means of the virtual machine, a memory to at least one service located in the PCIE device, where the memory assigned to each service includes multiple blocks of memory, each one of the multiple blocks of memory is used to store operating information of a corresponding service, and each memory block is a section of memory space in which the physical guest addresses are consecutive;

generar, mediante la maquina virtual, una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria; ygenerate, through the virtual machine, a table of base addresses, BAT, and a table of logical addresses of chip, CLAT, according to the memory assigned to each service, where the BAT includes a base entry address of CLAT corresponding to each service, and the CLAT includes a first address of each block of memory; Y

enviar al dispositivo PCIE, mediante la maquina virtual, una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual.send to the PCIE device, through the virtual machine, a BAT address and a function number corresponding to the virtual machine.

En una primera manera de implementacion posible del primer aspecto, el al menos un servicio incluye un servicio a procesar, y el procedimiento incluye ademas:In a first possible way of implementing the first aspect, the at least one service includes a service to be processed, and the procedure also includes:

recibir un mensaje de solicitud que se utiliza para obtener informacion de funcionamiento del servicio a procesar y que es enviado por el dispositivo PCIE, donde el mensaje de solicitud incluye la direccion de la BAT, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar; y enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar.receive a request message that is used to obtain operation information of the service to be processed and that is sent by the PCIE device, where the request message includes the address of the BAT, a service type of the service to be processed and a number of service of the service to be processed; and sending, to the PCIE device according to the request message, operation information in a block of memory corresponding to the service to be processed.

De acuerdo con la primera manera de implementacion posible del primer aspecto, el enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar incluye:According to the first possible way of implementing the first aspect, sending, to the PCIE device according to the request message, operating information in a memory block corresponding to the service to be processed includes:

obtener la BAT correspondiente a la direccion de la BAT;obtain the BAT corresponding to the address of the BAT;

determinar, de acuerdo con el tipo de servicio del servicio a procesar y la BAT, una direccion base de entrada de CLAT correspondiente al tipo de servicio;determine, according to the type of service of the service to be processed and the BAT, a base entry address of CLAT corresponding to the type of service;

determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; obtener, de acuerdo con la direccion base de entrada de CLAT y el desplazamiento de entrada, una entrada de CLAT correspondiente al servicio a procesar; ydetermine an entry displacement according to the service number of the service to be processed; obtain, in accordance with the CLAT entry base address and the entry offset, a CLAT entry corresponding to the service to be processed; Y

enviar, al dispositivo PCIE, informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT que se corresponde con el servicio a procesar.send, to the PCIE device, operating information in a block of memory corresponding to the CLAT input corresponding to the service to be processed.

De acuerdo con la segunda manera de implementacion posible del primer aspecto, en una tercera manera de implementacion posible del primer aspecto, la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles incluye N niveles de CLAT, donde N>2, y N es un numero entero; cada nivel de CLAT incluye multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria. De acuerdo con la tercera manera de implementacion posible del primer aspecto, en una cuarta manera de implementacion posible del primer aspecto, los tamanos de los multiples bloques de memoria asignados al servicio a procesar son los mismos; y el determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar incluye:According to the second possible way of implementing the first aspect, in a third way of possible implementation of the first aspect, the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels includes N levels of CLAT, where N> 2, and N is an integer number; each level of CLAT includes multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks. According to the third possible way of implementing the first aspect, in a fourth way of possible implementation of the first aspect, the sizes of the multiple blocks of memory assigned to the service to be processed are the same; and determining an entry displacement according to the service number of the service to be processed includes:

cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to be processed, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the remainder for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or

cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement includes an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:

Figure imgf000004_0001
Figure imgf000004_0001

donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar, y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed, and C is the number of entries in the N-th level of CLAT.

De acuerdo con un segundo aspecto, una forma de realizacion de la presente invencion proporciona ademas un procedimiento para configurar un dispositivo de interconexion expres de componentes perifericos, PCIE, donde el dispositivo PCIE esta conectado a un ordenador central ffsico, al menos una maquina virtual se ejecuta en el ordenador central ffsico, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; cada maquina virtual incluye una tabla de direcciones base, BAT, donde la BAT es generada por una maquina virtual, a la que pertenece la bAt , segun una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE; la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas; la BAT incluye una direccion base de entrada de tabla de direcciones logicas de chip, CLAT, correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria; yAccording to a second aspect, an embodiment of the present invention further provides a method for configuring an peripheral interconnect device of peripheral components, PCIE, where the PCIE device is connected to a physical central computer, at least one virtual machine is running on the physical central computer, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately; each virtual machine includes a table of base addresses, BAT, where the BAT is generated by a virtual machine, to which the bAt belongs, according to a memory assigned to at least one service located in the PCIE device; the memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, each memory block is a section of memory space in which the physical addresses of Guest are consecutive; the BAT includes a base entry address of the logical chip address table, CLAT, corresponding to each service, and the CLAT includes a first address of each memory block; Y

el procedimiento incluye:The procedure includes:

recibir, mediante el dispositivo PCIE, una direccion de la tabla de direcciones base, BAT, en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual; yreceive, through the PCIE device, a address from the base address table, BAT, in each virtual machine and a function number corresponding to each virtual machine; Y

guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT.save a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT.

En una primera manera de implementacion posible del segundo aspecto, el al menos un servicio incluye un servicio a procesar, y el procedimiento incluye ademas:In a first possible way of implementing the second aspect, the at least one service includes a service to be processed, and the procedure also includes:

determinar, de acuerdo con informacion de servicio del servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar; ydetermine, according to the service information of the service to be processed and the VCT, a BAT address corresponding to the service to be processed; Y

obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.obtain, from a memory corresponding to the service to be processed, operating information of the service to be processed in accordance with the BAT address corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed. process.

De acuerdo con la primera manera de implementacion posible del segundo aspecto, en una segunda manera de implementacion posible del segundo aspecto, el determinar, segun informacion de servicio del servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar incluye:According to the first possible way of implementing the second aspect, in a second way of possible implementation of the second aspect, determining, according to the service information of the service to be processed and the VCT, a BAT address corresponding to the service to be processed includes :

recibir la informacion de servicio, enviada por un lado de ordenador central o un lado de red, del servicio a procesar;receive the service information, sent by one side of a central computer or a network side, of the service to be processed;

determinar un numero de funcion correspondiente al servicio a procesar, de acuerdo con una caractenstica de la informacion de servicio, enviada por el lado de ordenador central, del servicio a procesar o de acuerdo con una interfaz PCIE utilizada cuando se recibe la informacion de servicio, transmitida por el lado de ordenador central, del servicio a procesar, donde la caractenstica se usa para indicar el numero de funcion correspondiente al servicio a procesar; ydetermine a function number corresponding to the service to be processed, in accordance with a feature of the service information, sent by the central computer side, of the service to be processed or in accordance with a PCIE interface used when the service information is received, transmitted by the central computer side of the service to be processed, where the feature is used to indicate the function number corresponding to the service to be processed; Y

determinar, de acuerdo con la VCT y el numero de funcion determinado correspondiente al servicio a procesar, la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar. determine, in accordance with the VCT and the function number determined corresponding to the service to be processed, the address of the BAT corresponding to the function number corresponding to the service to be processed.

De acuerdo con la segunda manera de implementacion posible del segundo aspecto, en una tercera manera de implementacion posible del segundo aspecto, el obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar incluye:According to the second way of possible implementation of the second aspect, in a third way of possible implementation of the second aspect, obtaining, from a memory corresponding to the service to be processed, operation information of the service to be processed according to the address of the BAT corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed includes:

enviar un mensaje de solicitud a una maquina virtual correspondiente al numero de funcion determinado que se corresponde con el servicio a procesar, donde el mensaje de solicitud incluye la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar, el tipo de servicio del servicio a procesar y el numero de servicio del servicio a procesar; ysend a request message to a virtual machine corresponding to the function number determined that corresponds to the service to be processed, where the request message includes the address of the BAT corresponding to the function number corresponding to the service to be processed, the type of service of the service to be processed and the service number of the service to be processed; Y

recibir informacion de funcionamiento, del servicio a procesar, enviada por la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar, donde la informacion de funcionamiento del servicio a procesar se obtiene a partir de un bloque de memoria correspondiente al mensaje de solicitud mediante la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar.receive operating information of the service to be processed, sent by the virtual machine corresponding to the function number corresponding to the service to be processed, where the operating information of the service to be processed is obtained from a block of memory corresponding to the message of request by means of the virtual machine corresponding to the number of function that corresponds with the service to be processed.

De acuerdo con la primera o la segunda manera de implementacion posible del segundo aspecto, en una cuarta manera de implementacion posible del segundo aspecto, el obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar incluye:According to the first or second way of possible implementation of the second aspect, in a fourth way of possible implementation of the second aspect, obtaining, from a memory corresponding to the service to process, operation information of the service to be processed according to with the address of the BAT corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed includes:

leer, de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, la BAT correspondiente al servicio a procesar;read, according to the address of the BAT corresponding to the service to be processed, the BAT corresponding to the service to be processed;

determinar, de acuerdo con el tipo de servicio del servicio a procesar, una direccion base de entrada de CLAT correspondiente al tipo de servicio del servicio a procesar de la BAT correspondiente al servicio a procesar; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; leer una entrada de CLAT correspondiente al desplazamiento de entrada y la direccion base de entrada de CLAT que se corresponde con el tipo de servicio del servicio a procesar; ydetermine, according to the type of service of the service to be processed, a base CLAT entry address corresponding to the type of service of the service to be processed of the BAT corresponding to the service to be processed; determine an entry displacement according to the service number of the service to be processed; read a CLAT entry corresponding to the entry displacement and the CLAT entry base address that corresponds to the service type of the service to be processed; Y

leer informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT.read operation information in a block of memory corresponding to the CLAT input.

De acuerdo con la cuarta manera de implementacion posible del segundo aspecto, en una quinta manera de implementacion posible del segundo aspecto, la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles incluye N niveles de CLAT, donde N>2, y N es un numero entero; cada nivel de CLAT incluye multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.According to the fourth possible way of implementing the second aspect, in a fifth way of possible implementation of the second aspect, the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels includes N levels of CLAT, where N> 2, and N is an integer number; each level of CLAT includes multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks.

De acuerdo con la quinta manera de implementacion posible del segundo aspecto, en una sexta manera de implementacion posible del segundo aspecto, los tamanos de los multiples bloques de memoria asignados al servicio a procesar son los mismos; yAccording to the fifth possible way of implementation of the second aspect, in a sixth possible way of implementing the second aspect, the sizes of the multiple blocks of memory assigned to the service to be processed are the same; Y

el determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar incluye: cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; odetermining an entry displacement according to the service number of the service to be processed includes: when the CLAT is a single-level CLAT, multiply the service number of the service to be processed by a size of a memory occupied by the information of operation of the service to be processed, and divide the result of the multiplication by the size of the memory block assigned to the service to be processed, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a only level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or

cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement includes an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:

Figure imgf000005_0001
Figure imgf000005_0001

donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar, y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the level If CLAT is equal to 0, the input displacement of the CLAT x-th level is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the information of operation of the service to be processed, B is the size of the memory block assigned to the service to be processed, and C is the number of entries in the N-th level of CLAT.

De acuerdo con un tercer aspecto, una forma de realizacion de la presente invencion proporciona ademas un procedimiento para gestionar una memoria de una maquina virtual, donde el procedimiento incluye:According to a third aspect, an embodiment of the present invention also provides a method for managing a memory of a virtual machine, wherein the method includes:

obtener, mediante un dispositivo de gestion de migracion en un ordenador central ffsico de destino, una direccion de una tabla de direcciones base, BAT, en una maquina virtual de un ordenador central ffsico de origen durante una migracion en vivo, donde el ordenador central ffsico de destino y el ordenador central ffsico de origen estan conectados a diferentes dispositivos de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; obtener un numero de funcion correspondiente a una maquina virtual migrada; yobtaining, by means of a migration management device in a physical host computer, a address of a table of base addresses, BAT, in a virtual machine of a physical home computer during a live migration, where the physical central computer of destination and the originating physical host computer are connected to different peripheral interconnect devices of peripheral components, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately; obtain a function number corresponding to a migrated virtual machine; Y

configurar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, en un dispositivo PCIE conectado al ordenador central ffsico de destino.configure a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, in a PCIE device connected to the physical host computer.

De acuerdo con un cuarto aspecto, una forma de realizacion de la presente invencion proporciona ademas un ordenador central ffsico, donde una maquina virtual se ejecuta en el ordenador central ffsico, el ordenador central ffsico esta conectado a un dispositivo de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; y la maquina virtual incluye:According to a fourth aspect, an embodiment of the present invention also provides a physical central computer, where a virtual machine is executed in the physical central computer, the physical central computer is connected to an express interconnection device of peripheral components, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately; and the virtual machine includes:

un modulo de asignacion, configurado para asignar una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas;an assignment module, configured to assign a memory to at least one service located in the PCIE device, where the memory assigned to each service includes multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, and each memory block is a section of memory space in which the physical guest addresses are consecutive;

un modulo de generacion de entradas, configurado para generar una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria; ya module of generation of inputs, configured to generate a table of base addresses, BAT, and a table of logical addresses of chip, CLAT, according to the memory assigned to each service, where the BAT includes a base entry address of CLAT corresponding to each service, and the CLAT includes a first address of each memory block; Y

un modulo de envfo, configurado para enviar al dispositivo PCIE una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual.a sending module, configured to send to the PCIE device a BAT address and a function number corresponding to the virtual machine.

En una primera manera de implementacion posible del cuarto aspecto, el al menos un servicio incluye un servicio a procesar, y la maquina virtual incluye ademas:In a first possible way of implementing the fourth aspect, the at least one service includes a service to be processed, and the virtual machine also includes:

un modulo de recepcion, configurado para recibir un mensaje de solicitud que se utiliza para obtener informacion de funcionamiento del servicio a procesar y que es enviado por el dispositivo PCIE, donde el mensaje de solicitud incluye la direccion de la BAT, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar; ya receiving module, configured to receive a request message that is used to obtain operation information of the service to be processed and sent by the PCIE device, where the request message includes the address of the BAT, a service type of the service to be processed and a service number of the service to be processed; Y

el modulo de envfo esta configurado ademas para enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar. De acuerdo con la primera manera de implementacion posible del cuarto aspecto, en una segunda manera de implementacion posible del cuarto aspecto, el modulo de envfo esta configurado espedficamente para:the sending module is also configured to send, to the PCIE device according to the request message, operation information in a memory block corresponding to the service to be processed. According to the first possible way of implementing the fourth aspect, in a second way of possible implementation of the fourth aspect, the sending module is specifically configured to:

obtener la BAT correspondiente a la direccion de la BAT; determinar, de acuerdo con el tipo de servicio del servicio a procesar y la BAT, una direccion base de entrada de CLAT correspondiente al tipo de servicio; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; obtener, de acuerdo con la direccion base de entrada de CLAT y el desplazamiento de entrada, una entrada de CLAT correspondiente al servicio a procesar; y enviar, al dispositivo PCIE, informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT que se corresponde con el servicio a procesar.obtain the BAT corresponding to the address of the BAT; determine, according to the type of service of the service to be processed and the BAT, a base entry address of CLAT corresponding to the type of service; determine an entry displacement according to the service number of the service to be processed; obtain, in accordance with the CLAT entry base address and the entry offset, a CLAT entry corresponding to the service to be processed; and sending, to the PCIE device, operating information in a block of memory corresponding to the CLAT entry corresponding to the service to be processed.

De acuerdo con la segunda manera de implementacion posible del cuarto aspecto, en una tercera manera de implementacion posible del cuarto aspecto, la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles incluye N niveles de CLAT, donde N>2, y N es un numero entero; cada nivel de CLAT incluye multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+l)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria. According to the second possible way of implementing the fourth aspect, in a third possible way of implementing the fourth aspect, the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels includes N levels of CLAT, where N> 2, and N is an integer number; each level of CLAT includes multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + l) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks.

De acuerdo con la tercera manera de implementacion posible del cuarto aspecto, en una cuarta manera de implementacion posible del cuarto aspecto, los tamanos de los multiples bloques de memoria asignados al servicio a procesar son los mismos; yAccording to the third possible way of implementing the fourth aspect, in a fourth possible way of implementing the fourth aspect, the sizes of the multiple blocks of memory assigned to the service to be processed are the same; Y

el modulo de envfo esta configurado espedficamente para:the shipping module is specifically configured to:

cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or

cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement includes an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:

Figure imgf000007_0001
Figure imgf000007_0001

donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed and C is the number of entries in the N-th level of CLAT.

De acuerdo con un quinto aspecto, una forma de realizacion de la presente invencion proporciona ademas un dispositivo PCIE, donde el dispositivo PCIE esta conectado a un ordenador central ffsico, al menos una maquina virtual se ejecuta en el ordenador central ffsico, el dispositivo PCIE es un dispositivo de hardware que satisface la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; cada maquina virtual incluye una tabla de direcciones base, BAT, donde la BAT es generada por una maquina virtual, a la que pertenece la BAT, segun una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE; la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas; la BAT incluye una direccion base de entrada de tabla de direcciones logicas de chip, CLAT, correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria; y el dispositivo PCIE incluye ademas:According to a fifth aspect, an embodiment of the present invention further provides a PCIE device, where the PCIE device is connected to a physical central computer, at least one virtual machine is executed in the physical central computer, the PCIE device is a hardware device that satisfies the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number it is configured for each PF and each VF separately; each virtual machine includes a table of base addresses, BAT, where the BAT is generated by a virtual machine, to which the BAT belongs, according to a memory assigned to at least one service located in the PCIE device; the memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, each memory block is a section of memory space in which the physical addresses of Guest are consecutive; the BAT includes a base entry address of the logical chip address table, CLAT, corresponding to each service, and the CLAT includes a first address of each memory block; and the PCIE device also includes:

un modulo de recepcion, configurado para recibir una direccion de la tabla de direcciones base, BAT, en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual; ya reception module, configured to receive a address from the base address table, BAT, in each virtual machine and a function number corresponding to each virtual machine; Y

un modulo de generacion, configurado para guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT.a generation module, configured to store a correspondence between the BAT address and the function number in a virtual machine configuration table, VCT.

En una primera manera de implementacion posible del quinto aspecto, el al menos un servicio incluye un servicio a procesar, y el dispositivo PCIE incluye ademas:In a first possible way of implementing the fifth aspect, the at least one service includes a service to be processed, and the PCIE device also includes:

un modulo de determinacion, configurado para determinar, de acuerdo con la informacion de servicio del servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar; ya determination module, configured to determine, in accordance with the service information of the service to be processed and the VCT, a address of a BAT corresponding to the service to be processed; Y

un modulo de obtencion, configurado para obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.a obtaining module, configured to obtain, from a memory corresponding to the service to be processed, operation information of the service to be processed according to the BAT address corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed.

De acuerdo con la primera manera de implementacion posible del quinto aspecto, en una segunda manera de implementacion posible del quinto aspecto,According to the first possible way of implementation of the fifth aspect, in a second way of possible implementation of the fifth aspect,

el modulo de recepcion esta configurado ademas para recibir la informacion de servicio, enviada por un lado de ordenador central o un lado de red, del servicio a procesar; y the reception module is further configured to receive the service information sent by one side of the central computer or a network side of the service to be processed; Y

el modulo de determinacion esta configurado esped ficamente para:The determination module is specifically configured to:

determinar un numero de funcion correspondiente al servicio a procesar, de acuerdo con una caractenstica de la informacion de servicio, enviada por el lado de ordenador central, del servicio a procesar o de acuerdo con una interfaz PCIE utilizada cuando se recibe la informacion de servicio, transmitida por el lado de ordenador central, del servicio a procesar, donde la caractenstica se usa para indicar el numero de funcion correspondiente al servicio a procesar; ydetermine a function number corresponding to the service to be processed, in accordance with a feature of the service information, sent by the central computer side, of the service to be processed or in accordance with a PCIE interface used when the service information is received, transmitted by the central computer side of the service to be processed, where the feature is used to indicate the function number corresponding to the service to be processed; Y

determinar, de acuerdo con la VCT y el numero de funcion determinado correspondiente al servicio a procesar, la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar.determine, in accordance with the VCT and the function number determined corresponding to the service to be processed, the address of the BAT corresponding to the function number corresponding to the service to be processed.

De acuerdo con la segunda manera de implementacion posible del quinto aspecto, en una tercera manera de implementacion posible del quinto aspecto, el modulo de obtencion esta configurado esped ficamente para:According to the second possible way of implementing the fifth aspect, in a third possible way of implementing the fifth aspect, the obtaining module is specifically configured to:

enviar un mensaje de solicitud a una maquina virtual correspondiente al numero de funcion determinado que se corresponde con el servicio a procesar, donde el mensaje de solicitud incluye la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar, el tipo de servicio del servicio a procesar y el numero de servicio del servicio a procesar; y recibir informacion de funcionamiento, del servicio a procesar, enviada por la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar, donde la informacion de funcionamiento del servicio a procesar se obtiene a partir de un bloque de memoria correspondiente al mensaje de solicitud mediante la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar.send a request message to a virtual machine corresponding to the function number determined that corresponds to the service to be processed, where the request message includes the address of the BAT corresponding to the function number corresponding to the service to be processed, the type of service of the service to be processed and the service number of the service to be processed; and receive operating information of the service to be processed, sent by the virtual machine corresponding to the function number corresponding to the service to be processed, where the operation information of the service to be processed is obtained from a memory block corresponding to the request message through the virtual machine corresponding to the function number that corresponds to the service to be processed.

De acuerdo con la primera o la segunda manera de implementacion posible del quinto aspecto, en una cuarta manera de implementacion posible del quinto aspecto, el modulo de obtencion esta configurado espedficamente para:According to the first or second possible way of implementation of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the obtaining module is specifically configured to:

leer, de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, la BAT correspondiente al servicio a procesar; determinar, de acuerdo con el tipo de servicio del servicio a procesar, una direccion base de entrada de CLAT correspondiente al tipo de servicio del servicio a procesar de la BAT correspondiente al servicio a procesar; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; leer una entrada de CLAT correspondiente al desplazamiento de entrada y la direccion base de entrada de CLAT que se corresponde con el tipo de servicio del servicio a procesar; y leer informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT.read, according to the address of the BAT corresponding to the service to be processed, the BAT corresponding to the service to be processed; determine, according to the type of service of the service to be processed, a base CLAT entry address corresponding to the type of service of the service to be processed of the BAT corresponding to the service to be processed; determine an entry displacement according to the service number of the service to be processed; read a CLAT entry corresponding to the entry displacement and the CLAT entry base address that corresponds to the service type of the service to be processed; and read operation information in a block of memory corresponding to the CLAT input.

De acuerdo con la cuarta manera de implementacion posible del quinto aspecto, en una quinta manera de implementacion posible del quinto aspecto, la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles incluye N niveles de CLAT, donde N>2, y N es un numero entero; cada nivel de CLAT incluye multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+l)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.According to the fourth possible implementation manner of the fifth aspect, in a fifth possible implementation manner of the fifth aspect, the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels includes N levels of CLAT, where N> 2, and N is an integer number; each level of CLAT includes multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + l) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks.

De acuerdo con la quinta manera de implementacion posible del quinto aspecto, en una sexta manera de implementacion posible del quinto aspecto, los tamanos de los multiples bloques de memoria asignados al servicio a procesar son los mismos; yAccording to the fifth possible way of implementation of the fifth aspect, in a sixth possible way of implementing the fifth aspect, the sizes of the multiple blocks of memory assigned to the service to be processed are the same; Y

el modulo de obtencion esta configurado esped ficamente para:the obtaining module is specifically configured to:

cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or

cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement includes an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:

2 donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar, y C es la cantidad de entradas en el nivel N-esimo de CLAT.two where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed, and C is the number of entries in the N-th level of CLAT.

De acuerdo con un sexto aspecto, una forma de realizacion de la presente invencion proporciona ademas un dispositivo de gestion de migracion, donde el dispositivo de gestion de migracion esta dispuesto en un ordenador central ffsico de destino, y el dispositivo de gestion de migracion incluye:According to a sixth aspect, an embodiment of the present invention further provides a migration management device, wherein the migration management device is arranged in a physical host computer, and the migration management device includes:

un primer modulo de obtencion, configurado para obtener una direccion de una tabla de direcciones base, BAT, en una maquina virtual de un ordenador central ffsico de origen durante una migracion en vivo, donde el ordenador central ffsico de destino y el ordenador central ffsico de origen estan conectados a diferentes dispositivos de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado;a first module of obtaining, configured to obtain a direction of a table of base addresses, BAT, in a virtual machine of a physical central computer of origin during a live migration, where the physical central computer of destination and the physical central computer of are connected to different peripheral interconnection devices of peripheral components, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one function. physical, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately;

un segundo modulo de obtencion, configurado para obtener un numero de funcion correspondiente a una maquina virtual migrada; ya second obtaining module, configured to obtain a function number corresponding to a migrated virtual machine; Y

un modulo de configuracion, configurado para configurar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, en un dispositivo PCIE conectado al ordenador central ffsico de destino.a configuration module, configured to configure a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, in a PCIE device connected to the physical host computer.

De acuerdo con un septimo aspecto, una forma de realizacion de la presente invencion proporciona ademas un ordenador central ffsico, donde el ordenador central ffsico incluye un procesador, una memoria, una unidad de entrada/salida y un bus; la memoria esta configurada para almacenar una instruccion ejecutable por ordenador; el procesador esta conectado a la memoria usando el bus; y cuando el ordenador central ffsico esta en funcionamiento, el procesador ejecuta la instruccion ejecutable por ordenador almacenada en la memoria, de modo que el ordenador ejecuta el procedimiento para la gestion de una memoria de una maquina virtual proporcionado en el primer aspecto o el tercer aspecto.According to a seventh aspect, one embodiment of the present invention further provides a physical central computer, wherein the physical central computer includes a processor, a memory, an input / output unit and a bus; the memory is configured to store an executable instruction by computer; the processor is connected to the memory using the bus; and when the physical central computer is in operation, the processor executes the executable instruction by computer stored in the memory, so that the computer executes the procedure for managing a memory of a virtual machine provided in the first aspect or the third aspect .

Efectos beneficiosos de las soluciones tecnicas proporcionadas en la presente invencion son los siguientes:Beneficial effects of the technical solutions provided in the present invention are the following:

Durante el procesamiento de servicios se busca informacion de funcionamiento en un bloque de memoria de acuerdo con una caractenstica en un paquete de servicio y un numero de servicio, y la informacion de funcionamiento es lefda por medio de una unidad de almacenamiento temporal. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, y una VMM migra de manera automatica y directa un bloque de memoria, una BAT y una CLAT a una maquina virtual de destino, siempre que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una primera direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un adaptador PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad.During service processing, operation information is sought in a memory block according to a feature in a service packet and a service number, and the operation information is read by means of a temporary storage unit. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, and a VMM automatically and directly migrates a block of memory, a BAT and a CLAT to a virtual machine of destination, provided that a correspondence between a number of function corresponding to a virtual machine migrated and a first address of the BAT in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE adapter after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime.

Breve descripcion de los dibujosBrief description of the drawings

Para describir con mayor claridad las soluciones tecnicas de las formas de realizacion de la presente invencion, a continuacion se exponen brevemente los dibujos adjuntos requeridos para describir las formas de realizacion. Evidentemente, los dibujos adjuntos de la siguiente descripcion muestran solamente algunas formas de realizacion de la presente invencion, y los expertos en la tecnica pueden obtener otros dibujos a partir de estos dibujos adjuntos sin realizar investigaciones adicionales.To more clearly describe the technical solutions of the embodiments of the present invention, the attached drawings required to describe the embodiments are briefly set forth below. Obviously, the accompanying drawings of the following description show only some embodiments of the present invention, and other drawings may be obtained by those skilled in the art from these accompanying drawings without further investigation.

La FIG. 1 es un diagrama de un escenario de aplicacion de acuerdo con las formas de realizacion de la presente invencion.FIG. 1 is a diagram of an application scenario according to the embodiments of the present invention.

La FIG. 2 es un diagrama de flujo de un procedimiento para gestionar una memoria de una maquina virtual de acuerdo con la forma de realizacion 1 de la presente invencion.FIG. 2 is a flow chart of a method for managing a memory of a virtual machine according to the embodiment 1 of the present invention.

La FIG. 3 es un diagrama de flujo de un procedimiento para configurar un dispositivo PCIE de acuerdo con la forma de realizacion 2 de la presente invencion.FIG. 3 is a flow chart of a method for configuring a PCIE device according to embodiment 2 of the present invention.

La FIG. 4 es un diagrama de flujo de un procedimiento para gestionar una memoria de una maquina virtual de acuerdo con la forma de realizacion 3 de la presente invencion.FIG. 4 is a flowchart of a method for managing a memory of a virtual machine according to the embodiment 3 of the present invention.

La FIG. 5 es un diagrama de flujo de un procedimiento para gestionar una memoria de una maquina virtual de acuerdo con la forma de realizacion 4 de la presente invencion.FIG. 5 is a flowchart of a method for managing a memory of a virtual machine of according to embodiment 4 of the present invention.

La FIG. 6 es un diagrama esquematico de una CLAT de un solo nivel de acuerdo con la forma de realizacion 4 de la presente invencion.FIG. 6 is a schematic diagram of a single level CLAT according to the embodiment 4 of the present invention.

La FIG. 7 es un diagrama esquematico de una CLAT de multiples niveles de acuerdo con la forma de realizacion 4 de la presente invencion.FIG. 7 is a schematic diagram of a multi-level CLAT according to the embodiment 4 of the present invention.

La FIG. 8 es un diagrama de bloques estructural de un ordenador central ffsico de acuerdo con la forma de realizacion 5 de la presente invencion.FIG. 8 is a structural block diagram of a physical central computer according to embodiment 5 of the present invention.

La FIG. 9 es un diagrama de bloques estructural de un ordenador central ffsico de acuerdo con la forma de realizacion 6 de la presente invencion.FIG. 9 is a structural block diagram of a physical central computer according to embodiment 6 of the present invention.

La FIG. 10 es un diagrama de bloques estructural de un dispositivo PCIE de acuerdo con la forma de realizacion 7 de la presente invencion.FIG. 10 is a structural block diagram of a PCIE device according to embodiment 7 of the present invention.

La FIG. 11 es un diagrama de bloques estructural de un dispositivo PCIE de acuerdo con la forma de realizacion 8 de la presente invencion.FIG. 11 is a structural block diagram of a PCIE device according to embodiment 8 of the present invention.

La FIG. 12 es un diagrama de bloques estructural de un dispositivo de gestion de migracion de acuerdo con la forma de realizacion 9 de la presente invencion.FIG. 12 is a structural block diagram of a migration management device according to embodiment 9 of the present invention.

Descripcion de formas de realizacionDescription of forms of realization

Para entender con mayor claridad los objetivos, las soluciones tecnicas y las ventajas de la presente invencion, a continuacion se describen en detalle las formas de realizacion de la presente invencion con referencia a los dibujos adjuntos.In order to understand more clearly the objectives, the technical solutions and the advantages of the present invention, the embodiments of the present invention are described in detail below with reference to the attached drawings.

Para facilitar la descripcion de las formas de realizacion, a continuacion se describe brevemente en primer lugar un escenario de aplicacion de las formas de realizacion de la presente invencion. Haciendo referencia a la FIG. 1, un gestor de maquina virtual, VMM, y al menos una maquina virtual se ejecutan un ordenador central ffsico. El VMM puede gestionar una o mas maquinas virtuales. Cada maquina virtual puede ejecutar un sistema operativo, OS, y varias aplicaciones. El ordenador central ffsico puede estar conectado a un dispositivo PCIE, y el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOv . El dispositivo PCIE tiene al menos una funcion ffsica (en ingles: Physical Function, PF por sus siglas) y al menos una funcion virtual, VF. Un numero de funcion unico se configura para cada PF y cada VF por separado. La maquina virtual ejecuta un servicio particular usando una PF o una VF. Cada PF o VF se corresponde con una maquina virtual. Una correspondencia entre un numero de funcion de una PF o un numero de funcion de una VF y una maquina virtual puede guardarse en el dispositivo PCIE.To facilitate the description of the forms of embodiment, a scenario of application of the embodiments of the present invention is briefly described first. With reference to FIG. 1, a virtual machine manager, VMM, and at least one virtual machine are running a physical central computer. The VMM can manage one or more virtual machines. Each virtual machine can run an operating system, OS, and several applications. The physical central computer can be connected to a PCIE device, and the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOv. The PCIE device has at least one physical function (in English: Physical Function, PF for short) and at least one virtual function, VF. A unique function number is configured for each PF and each VF separately. The virtual machine executes a particular service using a PF or a VF. Each PF or VF corresponds to a virtual machine. A correspondence between a function number of a PF or a function number of a VF and a virtual machine can be saved in the PCIE device.

El ordenador central ffsico incluye hardware relacionado con la ejecucion de una maquina virtual, por ejemplo, una CPU y al menos una unidad de almacenamiento (un disco duro, una memoria y similares) de un medio de almacenamiento legible por ordenador. Ademas, el ordenador central ffsico puede incluir una unidad de comunicaciones, una unidad de entrada, una unidad de visualizacion y similares. El dispositivo PCIE puede ser un adaptador PCIE, por ejemplo, un adaptador de red y una tarjeta de video.The physical central computer includes hardware related to the execution of a virtual machine, for example, a CPU and at least one storage unit (a hard disk, a memory and the like) of a computer readable storage medium. In addition, the physical central computer may include a communications unit, an input unit, a display unit and the like. The PCIE device can be a PCIE adapter, for example, a network adapter and a video card.

El ordenador central ffsico puede incluir ademas un dispositivo de gestion de migracion. Durante la migracion en vivo de una maquina virtual, un dispositivo de gestion de migracion en un ordenador central ffsico de origen migra los datos almacenados en una memoria a un ordenador central ffsico de destino. En una manera de implementacion, el dispositivo de gestion de migracion puede ser el VMM anterior.The physical central computer may also include a migration management device. During the live migration of a virtual machine, a migration management device in a physical home computer migrates the data stored in a memory to a physical host of destination. In one embodiment, the migration management device may be the previous VMM.

Cabe senalar que los tipos de dispositivo y las maneras de conexion anteriores son solamente ejemplos, y la presente invencion no impone ninguna limitacion en los mismos.It should be noted that the types of device and the above connection modes are only examples, and the present invention does not impose any limitations on them.

Forma de realizacion 1Form of realization 1

Esta forma de realizacion de la presente invencion proporciona un procedimiento para gestionar una memoria de una maquina virtual. El procedimiento es ejecutado por una de la al menos una maquina virtual anterior. Haciendo referencia a la FIG. 2, el procedimiento incluye las siguientes etapas.This embodiment of the present invention provides a method for managing a memory of a virtual machine. The procedure is executed by one of the at least one previous virtual machine. With reference to FIG. 2, the procedure includes the following stages.

Etapa 101. La maquina virtual asigna una memoria a al menos un servicio ubicado en un dispositivo PCIE, donde la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas. Step 101. The virtual machine allocates a memory to at least one service located in a PCIE device, where the memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory being used to store operating information of a corresponding service, and each memory block is a section of memory space in which the physical guest addresses are consecutive.

Etapa 102. La maquina virtual genera una tabla de direcciones base (en ingles: Base Address Table, BAT por sus siglas) y una tabla de direcciones logicas de chip (en ingles: Chip Logic Address Table, CLAT por sus siglas) de acuerdo con la memoria asignada a cada servicio, donde la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria.Stage 102. The virtual machine generates a table of base addresses (in English: Base Address Table, BAT by its acronyms) and a table of logical addresses of chip (in English: Chip Logic Address Table, CLAT by its abbreviations) in agreement with the memory assigned to each service, where the BAT includes a base entry address of CLAT corresponding to each service, and the CLAT includes a first address of each memory block.

Etapa 103. La maquina virtual envfa al dispositivo PCIE una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual, donde el dispositivo PCIE esta configurado para: registrar una correspondencia entre la direccion de la BAT y el numero de funcion, y obtener, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion.Step 103. The virtual machine sends to the PCIE device a BAT address and a function number corresponding to the virtual machine, where the PCIE device is configured to: register a correspondence between the BAT address and the function number, and obtain, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number.

La correspondencia entre la direccion de la BAT y el numero de funcion puede guardarse en una tabla de configuracion de maquina virtual (en ingles: VM Configuration Table, VCT por sus siglas).The correspondence between the address of the BAT and the function number can be saved in a virtual machine configuration table (in English: VM Configuration Table, VCT for short).

En esta forma de realizacion de la presente invencion, una maquina virtual asigna una memoria a al menos un servicio ubicado en un dispositivo PCIE, genera una BAT y una CLAT de acuerdo con la memoria asignada a cada servicio, y envfa una direccion de la BAT y un numero de funcion al dispositivo PCIE, por lo que el dispositivo PCIE puede registrar una correspondencia entre la direccion de la BAT y el numero de funcion. Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a una maquina ffsica de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad. Forma de realizacion 2In this embodiment of the present invention, a virtual machine assigns a memory to at least one service located in a PCIE device, generates a BAT and a CLAT according to the memory assigned to each service, and sends a BAT address. and a function number to the PCIE device, so that the PCIE device can register a correspondence between the BAT address and the function number. During the processing of services, the PCIE device obtains, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are migrated directly to a physical machine of destination, and that a correspondence between a number of function corresponding to a migrated virtual machine and a BAT address in a virtual machine of a physical central computer of this origin configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime. Form 2

Esta forma de realizacion de la presente invencion proporciona un procedimiento para configurar un dispositivo PCIE. El procedimiento es ejecutado por el dispositivo PCIE anterior. Haciendo referencia a la FIG. 3, el procedimiento incluye las siguientes etapas.This embodiment of the present invention provides a method for configuring a PCIE device. The procedure is executed by the previous PCIE device. With reference to FIG. 3, the procedure includes the following stages.

Etapa 201. El dispositivo PCIE recibe una direccion de una BAT en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual, donde cada maquina virtual incluye una tabla de direcciones base, BAT, la BAT es generada por una maquina virtual, a la que la bAt pertenece, de acuerdo con una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE; la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas; la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y una CLAT incluye una primera direccion de cada bloque de memoria.Stage 201. The PCIE device receives a BAT address in each virtual machine and a function number corresponding to each virtual machine, where each virtual machine includes a table of base addresses, BAT, the BAT is generated by a virtual machine, a the one that b A t belongs to, according to a memory assigned to at least one service located in the PCIE device; the memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, each memory block is a section of memory space in which the physical addresses of Guest are consecutive; the BAT includes a base entry address of CLAT corresponding to each service, and a CLAT includes a first address of each memory block.

Etapa 202. Guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, de modo que la VCT incluye la correspondencia entre el numero de funcion y la direccion de la BAT.Step 202. Save a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, so that the VCT includes the correspondence between the function number and the BAT address.

En esta forma de realizacion de la presente invencion, un dispositivo PCIE recibe una direccion de una BAT y un numero de funcion, y guarda una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, v Ct . Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de una maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a un ordenador central ffsico de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad.In this embodiment of the present invention, a PCIE device receives a BAT address and a function number, and stores a correspondence between the address of the BAT and the function number in a virtual machine configuration table, v C t . During the processing of services, the PCIE device obtains, from a virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are migrated directly to a physical host computer of destination, and that a correspondence between a number of function corresponding to a virtual machine migrated and a BAT address in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime.

Forma de realizacion 3Form 3

Esta forma de realizacion de la presente invencion proporciona un procedimiento para gestionar una memoria de una maquina virtual. El procedimiento es ejecutado por el dispositivo de gestion de migracion anterior. Haciendo referencia a la FIG. 4, el procedimiento incluye las siguientes etapas.This embodiment of the present invention provides a method for managing a memory of a virtual machine. The procedure is executed by the previous migration management device. With reference to FIG. 4, the procedure includes the following stages.

Etapa 301. El dispositivo de gestion de migracion en un ordenador central ffsico de destino obtiene una direccion de una tabla de direcciones base, BAT, en una maquina virtual de un ordenador central ffsico de origen durante una migracion en vivo, donde el ordenador central ffsico de destino y el ordenador central ffsico de origen estan conectados a diferentes dispositivos de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado.Step 301. The migration management device in a destination physical host obtains a address from a table of base addresses, BAT, in a virtual machine of a physical home computer during a Live migration, where the physical host computer of origin and the physical home computer are connected to different devices of peripheral interconnection of peripheral components, PCIE, the PCIE device is a hardware device that supports the I / O virtualization standard of a single root, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately.

El dispositivo de gestion de migracion en esta forma de realizacion puede ser un VMM.The migration management device in this embodiment may be a VMM.

Etapa 302. El dispositivo de gestion de migracion obtiene un numero de funcion correspondiente a una maquina virtual migrada.Step 302. The migration management device obtains a function number corresponding to a migrated virtual machine.

Etapa 303. El dispositivo de gestion de migracion configura una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, en un dispositivo PCIE conectado al ordenador central ffsico de destino.Step 303. The migration management device configures a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, in a PCIE device connected to the physical host computer of destination.

En esta forma de realizacion de la presente invencion, durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren de manera automatica y directa a una maquina ffsica de destino durante un proceso de migracion, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad.In this embodiment of the present invention, during the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are automatically and directly migrated to a physical machine of destination during a migration process, and that a correspondence between a number of function corresponding to a virtual machine migrated and a BAT address in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE device after migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime.

Forma de realizacion 4Form of realization 4

Esta forma de realizacion de la presente invencion proporciona un procedimiento para gestionar una memoria de una maquina virtual. Haciendo referencia a la FIG. 5, el procedimiento incluye las siguientes etapas.This embodiment of the present invention provides a method for managing a memory of a virtual machine. With reference to FIG. 5, the procedure includes the following stages.

Etapa 401. Una maquina virtual asigna una memoria a al menos un servicio ubicado en un dispositivo PCIE, donde la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado (en ingles: Guest Physical Address, GPA por sus siglas) son consecutivas.Step 401. A virtual machine allocates a memory to at least one service located in a PCIE device, where the memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory being used to store operating information of a corresponding service, and each memory block is a section of memory space in which the physical guest addresses (in English: Guest Physical Address, GPA for short) are consecutive.

Cuando se inicia la maquina virtual, la maquina virtual se aplica para una memoria de un ordenador central ffsico para el dispositivo PCIE y asigna la memoria que se aplica a un servicio. Espedficamente, despues de recibir una aplicacion desde la maquina virtual, un controlador de dispositivo PCIE del ordenador central ffsico asigna una memoria a la maquina virtual. El controlador de dispositivo PCIE del ordenador central ffsico se refiere a un controlador que se utiliza para hacer funcionar el dispositivo PCIE y que esta instalado en un disco duro del ordenador central ffsico.When the virtual machine is started, the virtual machine is applied to a memory of a physical central computer for the PCIE device and allocates the memory that is applied to a service. Specifically, after receiving an application from the virtual machine, a PCIE device driver of the physical central computer allocates a memory to the virtual machine. The PCIE device driver of the physical central computer refers to a driver that is used to operate the PCIE device and is installed on a hard disk of the physical central computer.

En esta forma de realizacion, la informacion de funcionamiento del servicio puede ser informacion de configuracion, una tabla de contexto, un recurso de servicio o una tabla acerca del entorno. En la tabla de contexto se registran varios estados del servicio, tales como un estado de ejecucion, un estado de puesta en cola, un estado de temporizador y un estado de recopilacion de estadfsticas.In this embodiment, the operation information of the service can be configuration information, a context table, a service resource or a table about the environment. In the context table, various states of the service are recorded, such as an execution status, a queuing state, a timer status and a statistics collection state.

En esta forma de realizacion, los bloques de memoria asignados por la maquina virtual a cada servicio son de un tamano constante e incluyen GPA consecutivas, es decir, los tamanos de los multiples bloques de memoria asignados a cada servicio son identicos. Espedficamente, un servicio puede ocupar de manera independiente un bloque de memoria, o multiples servicios pueden ocupar conjuntamente un bloque de memoria. Ademas, en esta forma de realizacion, un tamano irffnimo del bloque de memoria es un tamano de una pagina de memoria y es generalmente de 4K.In this embodiment, the memory blocks assigned by the virtual machine to each service are of a constant size and include consecutive GPAs, that is, the sizes of the multiple memory blocks assigned to each service are identical. Specifically, a service can occupy independently a block of memory, or multiple services can occupy a block of memory together. In addition, in this embodiment, an unimportant size of the memory block is a size of a memory page and is generally 4K.

Etapa 402. La maquina virtual genera una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria.Step 402. The virtual machine generates a table of base addresses, BAT, and a table of logical addresses of chip, CLAT, according to the memory assigned to each service, where the BAT includes a base entry address of CLAT corresponding to each service, and the CLAT includes a first address of each memory block.

Si hay varios servicios de un mismo tipo de servicio en la CLAT, para diferenciar entre los diversos servicios del mismo tipo de servicio, un numero de servicio puede asignarse a cada servicio. El numero de servicio puede utilizarse para el calculo de un desplazamiento de entrada de CLAT, y los detalles se describen a continuacion. En el presente documento, el tipo de servicio es un tipo de un servicio que puede ser ejecutado por el dispositivo PCIE, por ejemplo, un servicio de desvfo, un servicio de segmentacion y un servicio de suma de control, que se ejecuta mediante un adaptador de red.If there are several services of the same type of service in the CLAT, to differentiate between the different services of the same type of service, a service number can be assigned to each service. The service number can be used for the calculation of a CLAT input offset, and the details are described below. In this document, the type of service is a type of a service that can be executed by the PCIE device, for example, a divert service, a segmentation service and a checksum service, which is executed by an adapter of network.

Ademas, cuando la memoria se asigna al servicio en la etapa 401, un bloque de memoria puede asignarse ademas a la BAT y la CLAT. Una cantidad de bits en una primera direccion del bloque de memoria es constante, y por lo tanto, una cantidad de octetos en la primera direccion del bloque de memoria tambien es constante. Por ejemplo, la cantidad de bits en la primera direccion del bloque de memoria es de 64, y una cantidad de octetos ocupados por una primera direccion de cada bloque de memoria es de 8B. Por lo tanto, si un tamano de una memoria asignada a la CLAT es de 4K, una cantidad maxima de entradas en cada CLAT es de 4K/8=512. Cuando las entradas en una CLAT no son suficientes, es necesario generar una CLAT de multiples niveles para almacenar una primera direccion de un bloque de memoria. Es decir, la CLAT puede ser una CLAT de un solo nivel o una CLAT de multiples niveles. La CLAT de multiples niveles incluye N niveles de CLAT, donde N>2 y N es un numero entero. Cada nivel de CLAT incluye multiples entradas. Cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+l)-esimo de CLAT, donde 2<n<n+1<N y n es un numero entero. Cada entrada del nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.In addition, when the memory is allocated to the service in step 401, a memory block may be further allocated. to BAT and CLAT. A number of bits in a first address of the memory block is constant, and therefore, a number of octets in the first address of the memory block is also constant. For example, the number of bits in the first address of the memory block is 64, and a number of octets occupied by a first address of each memory block is 8B. Therefore, if a size of a memory assigned to the CLAT is 4K, a maximum number of entries in each CLAT is 4K / 8 = 512. When the entries in a CLAT are not sufficient, it is necessary to generate a CLAT of multiple levels to store a first address of a block of memory. That is, the CLAT can be a single level CLAT or a multiple level CLAT. The CLAT of multiple levels includes N levels of CLAT, where N> 2 and N is an integer number. Each level of CLAT includes multiple entries. Each entry in the nth level of CLAT is used to indicate a direction of the level (n + l) -this CLAT, where 2 <n <n + 1 <N and n is an integer. Each entry of the N-th level of CLAT is used to indicate a first address of one of the memory blocks.

Tal y como se muestra en la FIG. 6, en la CLAT de un solo nivel, cada entrada de la CLAT corresponde a un bloque de memoria.As shown in FIG. 6, in the CLAT of a single level, each entry of the CLAT corresponds to a block of memory.

Tal y como se muestra en la FIG. 7, en la CLAT de multiples niveles, que utiliza una CLAT de dos niveles como ejemplo, una entrada en el primer nivel de CLAT corresponde a multiples entradas en el segundo nivel de CLAT, y una entrada en el segundo nivel de CLAT corresponde a un bloque de memoria.As shown in FIG. 7, in the CLAT of multiple levels, which uses a CLAT of two levels as an example, an entry in the first level of CLAT corresponds to multiple entries in the second level of CLAT, and an entry in the second level of CLAT corresponds to a memory block.

Por lo tanto, la BAT puede incluir ademas un tamano de una entrada de CLAT (es decir, un tamano de un bloque de memoria asignado a la CLAT), el tamano del bloque de memoria, una cantidad de niveles de la CLAT y similares. Etapa 403. La maquina virtual envfa al dispositivo PCIE una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual.Therefore, the BAT may further include a size of a CLAT entry (i.e., a size of a memory block allocated to the CLAT), the size of the memory block, a number of levels of the CLAT and the like. Step 403. The virtual machine sends to the PCIE device a BAT address and a function number corresponding to the virtual machine.

La direccion de la BAT puede ser una primera direccion de la BAT. El numero de funcion es un numero de funcion de una PF o VF correspondiente a la maquina virtual.The address of the BAT can be a first address of the BAT. The function number is a function number of a PF or VF corresponding to the virtual machine.

Espedficamente, el numero de funcion de la PF o VF correspondiente a la maquina virtual puede ser especificado por la maquina virtual o por un VMM. Por lo tanto, la etapa 403 puede realizarse, de manera alternativa, por el VMM. Ademas, en esta forma de realizacion, la maquina virtual puede guardar, ademas, una correspondencia entre la direccion de la BAT y el numero de funcion para su uso posterior.Specifically, the function number of the PF or VF corresponding to the virtual machine can be specified by the virtual machine or by a VMM. Therefore, step 403 may be performed, alternatively, by the VMM. Furthermore, in this embodiment, the virtual machine can also store a correspondence between the BAT address and the function number for later use.

Etapa 404. El dispositivo PCIE recibe una direccion de una BAT en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual, y guarda una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, de modo que la VCT incluye la correspondencia entre el numero de funcion y la direccion de la BAT.Step 404. The PCIE device receives a BAT address in each virtual machine and a function number corresponding to each virtual machine, and it keeps a correspondence between the BAT address and the function number in a virtual machine configuration table , VCT, so that the VCT includes the correspondence between the function number and the address of the BAT.

La VCT se guarda en el dispositivo PCIE (por ejemplo, un adaptador de red), y la BAT y la CLAT se guardan en la maquina virtual. Espedficamente, la VCT puede generarse por adelantado, y despues de recibir la direccion de la BAT y el numero de funcion, el dispositivo PCIE escribe la direccion de la BAT y el numero de funcion en la VCT. Mas espedficamente, la VCT puede ser generada por un VMM o la PCIE.The VCT is stored in the PCIE device (for example, a network adapter), and the BAT and CLAT are saved in the virtual machine. Specifically, the VCT can be generated in advance, and after receiving the BAT address and the function number, the PCIE device writes the address of the BAT and the function number in the VCT. More specifically, the VCT can be generated by a VMM or the PCIE.

Espedficamente, la direccion de la BAT puede ser una direccion ffsica del ordenador central ffsico (tambien denominada direccion ffsica de ordenador central, en ingles: Host Physical Address, HPA por sus siglas), o una direccion ffsica de la maquina virtual (tambien denominada GPA). Si la direccion de la BAT es la GPA, cuando se accede a la direccion, el dispositivo PCIE necesita implementar una conversion de GPA a HPA mediante el uso de VT-D (una tecnologfa de Intel) o IOMMU (una tecnologfa de AMD) en una CPU, u otra tecnologfa que pueda implementar automaticamente la conversion de direcciones de GPA a HPA.Specifically, the address of the BAT can be a physical address of the physical central computer (also called the physical address of the central computer, in English: Host Physical Address, or HPA by its initials), or a physical address of the virtual machine (also called GPA). ). If the address of the BAT is the GPA, when the address is accessed, the PCIE device needs to implement a conversion from GPA to HPA through the use of VT-D (an Intel technology) or IOMMU (an AMD technology) in a CPU, or other technology that can automatically implement the conversion of addresses from GPA to HPA.

Etapa 405. El dispositivo PCIE determina, de acuerdo con la informacion de servicio de un servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar, donde el al menos un servicio incluye el servicio a procesar.Step 405. The PCIE device determines, according to the service information of a service to be processed and the VCT, a address of a BAT corresponding to the service to be processed, where the at least one service includes the service to be processed.

La informacion de servicio del servicio a procesar incluye informacion de servicio enviada por un lado de ordenador central o informacion de servicio enviada por un lado de red. La informacion de servicio enviada por el lado de ordenador central es generalmente datos de servicio. La informacion de servicio enviada por el lado de red es generalmente un paquete de servicio.The service information of the service to be processed includes service information sent by a central computer side or service information sent by a network side. The service information sent by the central computer side is generally service data. The service information sent by the network side is generally a service pack.

Espedficamente, la etapa 405 puede implementarse de la siguiente manera:Specifically, step 405 can be implemented in the following manner:

recibir la informacion de servicio, enviada por el lado de ordenador central o el lado de red, del servicio a procesar;receive the service information sent by the central computer side or the network side of the service to be processed;

determinar un numero de funcion correspondiente al servicio a procesar, de acuerdo con una caractenstica de la informacion de servicio, enviada por el lado de ordenador central, del servicio a procesar o de acuerdo con una interfaz PCIE utilizada cuando se recibe la informacion de servicio, transmitida por el lado de ordenador central, del servicio a procesar, donde la caractenstica se usa para indicar el numero de funcion correspondiente al servicio a procesar; ydetermine a function number corresponding to the service to be processed, in accordance with a feature of the service information sent by the central computer side of the service to be processed or agreed with a PCIE interface used when receiving the service information, transmitted by the central computer side, of the service to be processed, where the feature is used to indicate the function number corresponding to the service to be processed; Y

determinar, de acuerdo con la VCT y el numero de funcion determinado correspondiente al servicio a procesar, la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar.determine, in accordance with the VCT and the function number determined corresponding to the service to be processed, the address of the BAT corresponding to the function number corresponding to the service to be processed.

En esta forma de realizacion, una caractenstica en el paquete de servicio enviado por el lado de red puede ser un campo en el paquete de servicio. Un campo utilizado como una caractenstica en el presente documento puede variar con un tipo de un dispositivo PCIE. Por ejemplo, cuando el dispositivo PCIE es un adaptador de red, una direccion de control de acceso al medio (en ingles: Media Access Control, MAC por sus siglas) de destino puede utilizarse como una caractenstica. Es decir, cuando se recibe un paquete de servicio, el adaptador de red puede determinar un numero de funcion correspondiente de acuerdo con la direccion MAC de destino en el paquete de servicio. En un caso en el que el lado de ordenador central envfa los datos de servicio, un numero de funcion correspondiente puede determinarse de acuerdo con una interfaz de PCIE utilizada cuando se reciben los datos de servicio transmitidos por el lado de ordenador central.In this embodiment, a feature in the service packet sent by the network side may be a field in the service pack. A field used as a feature in this document may vary with a type of a PCIE device. For example, when the PCIE device is a network adapter, a destination access control address (MAC) address can be used as a feature. That is, when a service packet is received, the network adapter can determine a corresponding function number according to the destination MAC address in the service pack. In a case in which the central computer side sends the service data, a corresponding function number can be determined according to a PCIE interface used when the service data transmitted by the central computer side is received.

El lado de ordenador central se refiere a un sistema que incluye una CPU, una memoria y un disco duro que son de un ordenador central ffsico. El lado de red se refiere a un lado de red externa conectado al ordenador central ffsico. Etapa 406. El dispositivo PCIE obtiene, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.The central computer side refers to a system that includes a CPU, a memory and a hard disk that are from a physical central computer. The network side refers to an external network side connected to the physical central computer. Step 406. The PCIE device obtains, from a memory corresponding to the service to be processed, operating information of the service to be processed in accordance with the BAT address corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed.

En esta forma de realizacion, la etapa 406 puede implementarse de las dos maneras siguientes.In this embodiment, step 406 can be implemented in the following two ways.

Manera de implementacion 1:Way of implementation 1:

En primer lugar, el dispositivo PCIE envfa un mensaje de solicitud a una maquina virtual correspondiente al numero de funcion determinado que se corresponde con el servicio a procesar. El mensaje de solicitud incluye la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar, el tipo de servicio del servicio a procesar y el numero de servicio del servicio a procesar. El tipo de servicio es un tipo de un servicio correspondiente al paquete de servicio o a los datos de servicio recibidos por el dispositivo PCIE. El servicio correspondiente al paquete de servicio es un servicio ubicado en el paquete de servicio. El servicio correspondiente a los datos de servicio es un servicio transportado en un paquete de servicio que se obtiene despues de que el dispositivo PCIE procese los datos de servicio.In the first place, the PCIE device sends a request message to a virtual machine corresponding to the determined function number that corresponds to the service to be processed. The request message includes the address of the BAT corresponding to the function number corresponding to the service to be processed, the type of service of the service to be processed and the service number of the service to be processed. The type of service is a type of a service corresponding to the service pack or service data received by the PCIE device. The service corresponding to the service package is a service located in the service package. The service corresponding to the service data is a service transported in a service package that is obtained after the PCIE device processes the service data.

En segundo lugar, la maquina virtual recibe el mensaje de solicitud que se utiliza para obtener la informacion de funcionamiento del servicio a procesar y que es enviado por el dispositivo PCIE.Secondly, the virtual machine receives the request message that is used to obtain the operation information of the service to be processed and that is sent by the PCIE device.

En tercer lugar, la maquina virtual envfa, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar.Third, the virtual machine sends, to the PCIE device according to the request message, operation information in a block of memory corresponding to the service to be processed.

Espedficamente, esta etapa puede incluir las etapas siguientes.Specifically, this stage can include the following stages.

Etapa 1. La maquina virtual obtiene la BAT correspondiente a la direccion de la BAT.Stage 1. The virtual machine obtains the BAT corresponding to the address of the BAT.

Ademas, el mensaje de solicitud puede llevar alternativamente solo el numero de funcion pero no incluir la direccion de la BAT. La maquina virtual obtiene la BAT de acuerdo con el numero de funcion y la correspondencia, almacenada en la maquina virtual, entre la direccion de la BAT y el numero de funcion.In addition, the request message can alternately carry only the function number but not include the address of the BAT. The virtual machine obtains the BAT according to the function number and correspondence, stored in the virtual machine, between the BAT address and the function number.

Etapa 2. La maquina virtual determina, de acuerdo con el tipo de servicio del servicio a procesar y la BAT, una direccion base de entrada de CLAT correspondiente al tipo de servicio.Stage 2. The virtual machine determines, according to the type of service of the service to be processed and the BAT, a base entry address of CLAT corresponding to the type of service.

Etapa 3. La maquina virtual determina un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar.Stage 3. The virtual machine determines an entry displacement according to the service number of the service to be processed.

Espedficamente, los tamanos de multiples bloques de memoria asignados al servicio a procesar son identicos. La maquina virtual calcula el desplazamiento de entrada de la siguiente manera: Cuando la CLAT es una CLAT de un solo nivel, el numero de servicio del servicio a procesar se multiplica por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y el resultado de la multiplicacion se divide por el tamano del bloque de memoria asignado al servicio a procesar para obtener un cociente y un resto para la CLAT de un solo nivel. Cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1. Specifically, the sizes of multiple blocks of memory assigned to the service to be processed are identical. The virtual machine calculates the input displacement in the following way: When the CLAT is a single-level CLAT, the service number of the service to be processed is multiplied by a size of a memory occupied by the operating information of the service to be processed. , and the result of the multiplication is divided by the size of the memory block assigned to the service to be processed to obtain a quotient and a remainder for the CLAT of a single level. When the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the displacement of entry is equal to the quotient for the CLAT of a single level minus 1.

Cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, un desplazamiento de entrada del nivel x-esimo de CLAT se calcula de la siguiente manera:When the CLAT is a multi-level CLAT, where the input offset includes an entry offset of each CLAT level, an entry offset of the CLAT X-level is calculated as follows:

Figure imgf000015_0001
Figure imgf000015_0001

Cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar y C es la cantidad de entradas en el nivel N-esimo de CLAT.When a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed and C is the number of entries in the N-th level of CLAT.

Cuando el desplazamiento de entrada del nivel x-esimo de CLAT es 0, indica que una entrada correspondiente es la primera entrada en el nivel x-esimo de CLAT, cuando el desplazamiento de entrada del nivel x-esimo de CLAT es 1, indica que una entrada correspondiente es la segunda entrada en el nivel x-esimo de CLAT, y asf sucesivamente. Debe observarse que un resto para el nivel N-esimo de CLAT (es decir, el ultimo nivel de CLAT) se utiliza para indicar la informacion de funcionamiento, correspondiente al numero de servicio, en un bloque de memoria determinado. Cuando el resto para el nivel N-esimo de CLAT es igual a 0, la informacion de funcionamiento correspondiente al numero de servicio es el ultimo elemento de informacion de funcionamiento en el bloque de memoria determinado. Cuando el resto para el nivel N-esimo de CLAT es mayor que 0, la informacion de funcionamiento correspondiente al numero de servicio es el elemento m-esimo de informacion de funcionamiento en el bloque de memoria determinado, y m es igual al resto para el nivel N-esimo de CLAT.When the input displacement of the CLAT x-th level is 0, it indicates that a corresponding entry is the first entry in the x-th level of CLAT, when the entry offset of the x-th level of CLAT is 1, it indicates that a corresponding entry is the second entry in the x-th level of CLAT, and so on. It should be noted that a remainder for the N-th level of CLAT (ie, the last CLAT level) is used to indicate the operation information, corresponding to the service number, in a given memory block. When the remainder for the Nth level of CLAT is equal to 0, the operation information corresponding to the service number is the last element of operation information in the given memory block. When the remainder for the N-th level of CLAT is greater than 0, the operation information corresponding to the service number is the m-th element of operating information in the given memory block, and m is equal to the rest for the level N-th of CLAT.

El calculo del desplazamiento de entrada se describe a continuacion por medio de un ejemplo. Por ejemplo, un tamano de cada memoria utilizada es de 1 KB, un tamano de un bloque de memoria es de 4 KB, una cantidad de bits en una primera direccion de un bloque de memoria es de 64, y un tamano de un bloque de memoria asignado a una CLAT es tambien de 4 KB.The calculation of the input offset is described below by means of an example. For example, a size of each used memory is 1 KB, a size of a memory block is 4 KB, a number of bits in a first address of a memory block is 64, and a size of a block of memory is 64. memory assigned to a CLAT is also 4 KB.

En lo que respecta a una CLAT de un solo nivel, se supone que hay 2K servicios en la maquina virtual, y 512 bloques de memoria con un tamano de 4K se asignan a los 2K servicios en la etapa 401. Primeras direcciones de los 512 bloques de memoria se almacenan en una CLAT. Cuando un numero de servicio en el mensaje de solicitud recibido es de 100, un desplazamiento de entrada se calcula de la siguiente manera: 100*1K/4K = 25, donde el cociente es 25 y el resto es 0. Por lo tanto, el desplazamiento de entrada es 24, y la informacion de funcionamiento correspondiente a un servicio cuyo numero de servicio es 100 es el ultimo elemento de informacion de funcionamiento en un bloque de memoria que se corresponde con la 25a entrada.As regards a single level CLAT, it is assumed that there are 2K services in the virtual machine, and 512 memory blocks with a size of 4K are assigned to the 2K services in the 401 stage. First addresses of the 512 blocks of memory are stored in a CLAT. When a service number in the received request message is 100, an entry shift is calculated as follows: 100 * 1K / 4K = 25, where the quotient is 25 and the remainder is 0. Therefore, the The input offset is 24, and the operation information corresponding to a service whose service number is 100 is the last operating information element in a memory block corresponding to the 25th input.

En lo que respecta a una CLAT de multiples niveles, se supone que hay 16K servicios en la maquina virtual, y una CLAT de dos niveles puede admitir 512*512*4=1M servicios. Por lo tanto, si es necesario dar soporte a los 16K servicios y se utiliza la CLAT de dos niveles, el primer nivel de CLAT solo tiene que incluir ocho entradas. Cuando se inicia la maquina virtual, 4K bloques de memoria con un tamano de 4K se asignan a los 16K servicios. Despues, un bloque de memoria con el tamano de 4K se utiliza para generar el primer nivel de CLAT, y ocho bloques de memoria con el tamano de 4K se utilizan para generar el segundo nivel de CLAT.With respect to a multi-level CLAT, it is assumed that there are 16K services in the virtual machine, and a two-tier CLAT can support 512 * 512 * 4 = 1M services. Therefore, if it is necessary to support the 16K services and the two-tier CLAT is used, the first CLAT level only has to include eight entries. When the virtual machine is started, 4K memory blocks with a size of 4K are assigned to the 16K services. Then, a block of memory with the size of 4K is used to generate the first level of CLAT, and eight blocks of memory with the size of 4K are used to generate the second level of CLAT.

Cuando un numero de servicio en el mensaje de solicitud recibido es de 2054, un desplazamiento de entrada del primer nivel de CLAT se calcula de la siguiente manera: 2054*1024/4096/5122'1=1, donde el resto es 6. Por lo tanto, el desplazamiento de entrada del primer nivel de CLAT es 1, es decir, se determina que una entrada en el primer nivel de CLAT es la segunda entrada. Un desplazamiento de entrada del segundo nivel de CLAT se calcula como sigue: 6*1024/4096/5122'2=1, donde el resto es 2. Por lo tanto, el desplazamiento de entrada del segundo nivel de CLAT es 1, y la informacion de funcionamiento correspondiente a un servicio cuyo numero de servicio es 2054 es el segundo elemento de informacion de funcionamiento en un bloque de memoria que se corresponde con la segunda entrada en el segundo nivel de CLAT.When a service number in the received request message is 2054, an entry offset of the first CLAT level is calculated as follows: 2054 * 1024/4096 / 5122'1 = 1, where the remainder is 6. therefore, the entry displacement of the first level of CLAT is 1, that is, it is determined that an entry in the first level of CLAT is the second entry. An input offset of the second CLAT level is calculated as follows: 6 * 1024/4096 / 5122'2 = 1, where the remainder is 2. Therefore, the input offset of the second CLAT level is 1, and the operating information corresponding to a service whose service number is 2054 is the second operating information element in a memory block corresponding to the second entry in the second level of CLAT.

El numero de servicio se asigna cuando se inicia cada servicio. Por ejemplo, en un servicio de protocolo de control de transmision (en ingles: Retransmisor Control Protocol, TCP por sus siglas), un numero de servicio se asigna al servicio cuando se establece una conexion TCP. El numero de servicio puede asignarse secuencialmente a partir de 1 o 0. En la formula anterior, el calculo se realiza de acuerdo con el numero de servicio que se asigna secuencialmente a partir de 1. Cuando el numero de servicio se asigna a partir de 0, el calculo debe realizarse sumando 1 al numero de servicio. Antes de esta etapa, cuando se env^an los datos de servicio al dispositivo PCIE, el lado de ordenador central envfa al dispositivo PCIE un numero de servicio correspondiente a los datos de servicio. Un numero de servicio del paquete de servicio se determina cuando se establece el servicio, y el dispositivo PCIE puede guardar el numero de servicio para su uso.The service number is assigned when each service starts. For example, in a transmission control protocol (TCP) service, a service number is assigned to the service when a TCP connection is established. The service number can be assigned sequentially from 1 or 0. In the previous formula, the calculation is made according to the service number assigned sequentially from 1. When the service number is assigned from 0 , the calculation must be done adding 1 to the service number. Prior to this step, when the service data is sent to the PCIE device, the host computer side sends a service number corresponding to the service data to the PCIE device. A service pack service number is determined when the service is established, and the PCIE device can store the service number for use.

Etapa 4. La maquina virtual obtiene, de acuerdo con la direccion base de entrada de CLAT y el desplazamiento de entrada, una entrada de CLAT correspondiente al servicio a procesar.Step 4. The virtual machine obtains, according to the CLAT entry base address and the entry offset, a CLAT entry corresponding to the service to be processed.

Etapa 5. La maquina virtual envfa, al dispositivo PCIE, informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT que se corresponde con el servicio a procesar.Step 5. The virtual machine sends, to the PCIE device, operating information in a block of memory corresponding to the CLAT entry corresponding to the service to be processed.

Ademas, en esta etapa, la maquina virtual escribe, en una memoria cache del dispositivo PCIE, la informacion de funcionamiento del bloque de memoria, y el dispositivo PCIE lee, de la memoria cache, la informacion de funcionamiento del bloque de memoria, mejorandose asf la eficacia de la lectura de datos y aumentando, ademas, la velocidad de procesamiento de servicio.Furthermore, at this stage, the virtual machine writes, in a cache memory of the PCIE device, the operating information of the memory block, and the PCIE device reads, from the cache memory, the operating information of the memory block, thereby improving the efficiency of reading data and increasing, in addition, the speed of service processing.

Ademas, cuando se envfa la entrada de BAT y de CLAT al dispositivo PCIE, la maquina virtual puede escribir la entrada de BAT y de CLAT en la memoria cache del dispositivo PCIE para su uso posterior por parte del dispositivo PCIE.In addition, when the BAT and CLAT input is sent to the PCIE device, the virtual machine can write the BAT and CLAT entries into the cache memory of the PCIE device for later use by the PCIE device.

En cuarto lugar, el dispositivo PCIE recibe la informacion de funcionamiento enviada por la maquina virtual, donde la informacion de funcionamiento se obtiene por medio de la maquina virtual a partir de un bloque de memoria correspondiente al mensaje de solicitud.Fourth, the PCIE device receives the operation information sent by the virtual machine, where the operating information is obtained by means of the virtual machine from a block of memory corresponding to the request message.

Manera de implementacion 2:Way of implementation 2:

En primer lugar, el dispositivo PCIE lee, de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, la BAT correspondiente al servicio a procesar.In the first place, the PCIE device reads, according to the BAT address corresponding to the service to be processed, the BAT corresponding to the service to be processed.

En segundo lugar, el dispositivo PCIE determina, de acuerdo con el tipo de servicio del servicio a procesar, una direccion base de entrada de CLAT correspondiente al tipo de servicio del servicio a procesar de la BAT correspondiente al servicio a procesar.Secondly, the PCIE device determines, according to the type of service of the service to be processed, a base CLAT entry address corresponding to the type of service of the service to be processed of the BAT corresponding to the service to be processed.

En tercer lugar, el dispositivo PCIE determina un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar.Third, the PCIE device determines an entry displacement according to the service number of the service to be processed.

En esta etapa, la manera de determinar el desplazamiento de entrada es la misma que en la manera de implementacion 1, y los detalles no se describen de nuevo en el presente documento.In this step, the manner of determining the entry offset is the same as in the implementation manner 1, and the details are not described again in this document.

En cuarto lugar, el dispositivo PCIE lee una entrada de CLAT correspondiente al desplazamiento de entrada y la direccion base de entrada de CLAT que se corresponde con el tipo de servicio del servicio a procesar.Fourth, the PCIE device reads a CLAT entry corresponding to the entry offset and the CLAT entry base address that corresponds to the service type of the service to be processed.

En quinto lugar, el dispositivo PCIE lee informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT.Fifth, the PCIE device reads operation information in a block of memory corresponding to the CLAT input.

En esta etapa, el dispositivo PCIE puede leer, de una memoria cache del dispositivo PCIE, la informacion de funcionamiento del bloque de memoria para su uso posterior, mejorandose de este modo la velocidad de procesamiento de servicio.In this step, the PCIE device can read, from a cache memory of the PCIE device, the operating information of the memory block for later use, thereby improving the service processing speed.

En esta forma de realizacion de la presente invencion, la manera de implementacion 2 puede ejecutarse por un modulo de lectura/escritura de acceso directo a memoria (en ingles: Direct Memory Access, DMA por sus siglas) del dispositivo PCIE.In this embodiment of the present invention, the implementation mode 2 can be executed by a read / write module of direct memory access (in English: Direct Memory Access, DMA for short) of the PCIE device.

Etapa 407. El dispositivo PCIE procesa la informacion de servicio de acuerdo con la informacion de funcionamiento. Espedficamente, un paquete es procesado por una VF correspondiente al numero de funcion anterior.Step 407. The PCIE device processes the service information in accordance with the operating information. Specifically, a packet is processed by a VF corresponding to the previous function number.

Etapa 408. Un dispositivo de gestion de migracion en un ordenador central ffsico de origen migra directamente un bloque de memoria, una BAT y una CLAT que estan en un ordenador central ffsico de origen a un ordenador central ffsico de destino durante la migracion en vivo.Step 408. A migration management device in a physical home computer migrates directly a memory block, a BAT and a CLAT that are in a physical central computer of origin to a physical host computer during the live migration.

El ordenador central ffsico de destino y el ordenador central ffsico de origen estan conectados a diferentes dispositivos de interconexion expres de componentes perifericos, PCIE. El dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV. El dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, y un numero de funcion unico se configura para cada PF y cada VF por separado. The physical host computer and the physical home computer are connected to different peripheral interconnection devices of peripheral components, PCIE. The PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV. The PCIE device has at least one physical function, PF, and at least one virtual function, VF, and a unique function number is configured for each PF and each VF separately.

Ademas, el dispositivo de gestion de migracion en el ordenador central ffsico de origen escribe, en una memoria del ordenador central ffsico de destino, los datos que se encuentran en una memoria cache de un dispositivo PCIE conectado al ordenador central ffsico de origen.In addition, the migration management device in the physical home computer writes, in a memory of the physical host computer, the data that is in a cache memory of a PCIE device connected to the physical home computer.

Etapa 409. Un dispositivo de gestion de migracion en el ordenador central ffsico de destino configura una correspondencia entre una direccion de una tabla de direcciones base, BAT, de una maquina virtual del ordenador central ffsico de origen y un numero de funcion correspondiente a una maquina virtual migrada en una tabla de configuracion de maquina virtual VCT de un dispositivo PCIE conectado al ordenador central ffsico de destino.Step 409. A migration management device in the physical host computer configures a correspondence between a base address table address, BAT, of a virtual machine of the physical home computer of origin and a function number corresponding to a machine. Migrated virtual in a VCT virtual machine configuration table of a PCIE device connected to the target physical host.

Espedficamente, el dispositivo de gestion de migracion en el ordenador central ffsico de destino obtiene la direccion de la tabla de direcciones base, BAT, de la maquina virtual del ordenador central ffsico de origen y el numero de funcion (el numero de funcion puede ser especificado por la maquina virtual o asignado por un VMM) correspondiente a la maquina virtual de destino migrada. El dispositivo de gestion de migracion en el ordenador central ffsico de destino envfa al dispositivo PCIE la direccion de la BAT y el numero de funcion correspondiente a la maquina virtual de destino migrada. El dispositivo PCIE conectado al ordenador central ffsico de destino guarda la correspondencia entre la direccion de la bAt y el numero de funcion en la tabla de configuracion de maquina virtual, VCT.Specifically, the migration management device in the destination physical host obtains the address of the base address table, BAT, of the virtual machine of the physical home computer of origin and the function number (the function number can be specified by the virtual machine or assigned by a VMM) corresponding to the virtual machine of the migrated destination. The migration management device in the destination physical central computer sends the BAT address and the corresponding function number to the migrated destination virtual machine to the PCIE device. The PCIE device connected to the physical host computer stores the correspondence between the address of the bAt and the function number in the virtual machine configuration table, VCT.

En esta forma de realizacion, el dispositivo de gestion de migracion puede ser un VMM.In this embodiment, the migration management device can be a VMM.

En esta forma de realizacion de la presente invencion, una maquina virtual asigna una memoria a al menos un servicio ubicado en un dispositivo PCIE, genera una BAT y una CLAT de acuerdo con la memoria asignada a cada servicio, y envfa una direccion de la BAT y un numero de funcion al dispositivo PCIE, por lo que el dispositivo PCIE puede registrar una correspondencia entre la direccion de la BAT y el numero de funcion. Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a una maquina ffsica de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad. Forma de realizacion 5In this embodiment of the present invention, a virtual machine assigns a memory to at least one service located in a PCIE device, generates a BAT and a CLAT according to the memory assigned to each service, and sends a BAT address. and a function number to the PCIE device, so that the PCIE device can register a correspondence between the BAT address and the function number. During the processing of services, the PCIE device obtains, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are migrated directly to a physical machine of destination, and that a correspondence between a number of function corresponding to a migrated virtual machine and a BAT address in a virtual machine of a physical central computer of this origin configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime. Form 5

Esta forma de realizacion de la presente invencion proporciona un ordenador central ffsico, que se aplica con el procedimiento proporcionado en la forma de realizacion 1. Haciendo referencia a la FIG. 8, una maquina virtual 510 se ejecuta en el ordenador central ffsico 51, y el ordenador central ffsico 51 esta conectado a un dispositivo de interconexion expres de componentes perifericos, PCIE, 52. El dispositivo PCIE 52 es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOv . El dispositivo PCIE 52 tiene al menos una funcion ffsica, PF, 521 y al menos una funcion virtual, VF, 522, y un numero de funcion unico se configura para cada PF 521 y cada VF 522 por separado. La maquina virtual 510 incluye:This embodiment of the present invention provides a physical central computer, which is applied with the method provided in the embodiment 1. Referring to FIG. 8, a virtual machine 510 is executed in the physical central computer 51, and the physical central computer 51 is connected to an peripheral interconnect device, PCIE, 52. The PCIE 52 device is a hardware device that supports the standard Virtualization I / O of a single root, SR-IO v . The PCIE device 52 has at least one physical function, PF, 521 and at least one virtual function, VF, 522, and a unique function number is configured for each PF 521 and each VF 522 separately. The virtual machine 510 includes:

un modulo de asignacion 511, configurado para asignar una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas;an allocation module 511, configured to allocate a memory to at least one service located in the PCIE device, where the memory allocated to each service includes multiple memory blocks, each of the multiple blocks of memory being used to store operating information of a corresponding service, and each memory block is a section of memory space in which the physical guest addresses are consecutive;

un modulo de generacion de entradas 512, configurado para generar una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria; yan input generation module 512, configured to generate a table of base addresses, BAT, and a table of logical chip addresses, CLAT, according to the memory assigned to each service, where the BAT includes a base address of CLAT corresponding to each service, and the CLAT includes a first address of each memory block; Y

un modulo de envfo 513, configurado para enviar al dispositivo PCIE una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual, donde el dispositivo PCIE esta configurado para: registrar una correspondencia entre la direccion de la BAT y el numero de funcion, y obtener, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion.a send module 513, configured to send to the PCIE device a BAT address and a function number corresponding to the virtual machine, where the PCIE device is configured to: register a correspondence between the BAT address and the function number , and obtain, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number.

En esta forma de realizacion de la presente invencion, una maquina virtual asigna una memoria a al menos un servicio ubicado en un dispositivo PCIE, genera una BAT y una CLAT de acuerdo con la memoria asignada a cada servicio, y envfa una direccion de la BAT y un numero de funcion al dispositivo PCIE, por lo que el dispositivo PCIE puede registrar una correspondencia entre la direccion de la BAT y el numero de funcion. Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a una maquina ffsica de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad. Forma de realizacion 6In this embodiment of the present invention, a virtual machine assigns a memory to at least one service located in a PCIE device, generates a BAT and a CLAT according to the memory assigned to each service, and sends a BAT address. and a function number to the PCIE device, so that the PCIE device can register a correspondence between the BAT address and the function number. During the processing of services, the PCIE device obtains, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records, whenever a block of memory, a BAT and a CLAT are migrated directly to a physical machine of destination, and that a correspondence between a number of function corresponding to a virtual machine migrated and a BAT address in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime. Form of realization 6

Esta forma de realizacion de la presente invencion proporciona un ordenador central ffsico, que se aplica con el procedimiento proporcionado en la forma de realizacion 4. Haciendo referencia a la FIG. 9, una maquina virtual 610 se ejecuta en el ordenador central ffsico 61, y el ordenador central ffsico 61 esta conectado a un dispositivo de interconexion expres de componentes perifericos, PCIE, 62. El dispositivo PCIE 62 es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOv . El dispositivo PCIE 62 tiene al menos una funcion ffsica, PF, 621 y al menos una funcion virtual, VF 622, y un numero de funcion unico se configura para cada PF 621 y cada VF 622 por separado. La maquina virtual 610 incluye un modulo de asignacion 611, un modulo de generacion de entradas 612 y un modulo de envfo 613.This embodiment of the present invention provides a physical central computer, which is applied with the method provided in the embodiment 4. Referring to FIG. 9, a virtual machine 610 is executed in the physical central computer 61, and the physical central computer 61 is connected to an peripheral interconnection device, PCIE, 62. The PCIE 62 device is a hardware device that supports the standard Virtualization I / O of a single root, SR-IOv. The PCIE device 62 has at least one physical function, PF, 621 and at least one virtual function, VF 622, and a unique function number is configured for each PF 621 and each VF 622 separately. The virtual machine 610 includes an assignment module 611, an input generation module 612 and a delivery module 613.

El modulo de asignacion 611 esta configurado para asignar una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas.The assignment module 611 is configured to allocate a memory to at least one service located in the PCIE device, where the memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory being used to store operating information. of a corresponding service, and each memory block is a section of memory space in which the physical guest addresses are consecutive.

Cuando se inicia la maquina virtual 610, la maquina virtual 610 se aplica para una memoria de un ordenador central ffsico para el dispositivo PCIE 62 y asigna la memoria que se aplica a un servicio. Espedficamente, despues de recibir una aplicacion desde la maquina virtual, un controlador de dispositivo PCIE del ordenador central ffsico 61 asigna una memoria a la maquina virtual. El controlador de dispositivo PCIE del ordenador central ffsico 61 se refiere a un controlador que se utiliza para hacer funcionar el dispositivo PCIE y que esta instalado en un disco duro del ordenador central ffsico.When the virtual machine 610 is started, the virtual machine 610 is applied to a memory of a physical central computer for the PCIE 62 device and allocates the memory that is applied to a service. Specifically, after receiving an application from the virtual machine, a PCIE device driver of the physical central computer 61 allocates a memory to the virtual machine. The PCIE device driver of the physical central computer 61 refers to a driver that is used to operate the PCIE device and that is installed on a hard disk of the physical central computer.

En esta forma de realizacion, la informacion de funcionamiento del servicio puede ser informacion de configuracion, una tabla de contexto, un recurso de servicio o una tabla acerca del entorno. En la tabla de contexto se registran varios estados del servicio, tales como un estado de ejecucion, un estado de puesta en cola, un estado de temporizador y un estado de recopilacion de estadfsticas.In this embodiment, the operation information of the service can be configuration information, a context table, a service resource or a table about the environment. In the context table, various states of the service are recorded, such as an execution status, a queuing state, a timer status and a statistics collection state.

En esta forma de realizacion, los bloques de memoria asignados por la maquina virtual 610 a cada servicio son de un tamano constante e incluyen GPA consecutivas, es decir, los tamanos de los multiples bloques de memoria asignados a cada servicio son identicos. Espedficamente, un servicio puede ocupar de manera independiente un bloque de memoria, o multiples servicios pueden ocupar conjuntamente un bloque de memoria. Ademas, en esta forma de realizacion, un tamano irffnimo del bloque de memoria es un tamano de una pagina de memoria y es generalmente de 4K.In this embodiment, the memory blocks assigned by the virtual machine 610 to each service are of a constant size and include consecutive GPAs, that is, the sizes of the multiple memory blocks assigned to each service are identical. Specifically, a service can occupy independently a block of memory, or multiple services can occupy a block of memory together. In addition, in this embodiment, an unimportant size of the memory block is a size of a memory page and is generally 4K.

El modulo de generacion de entradas 612 esta configurado para generar una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria. Espedficamente, una primera direccion de la BAT puede ser una direccion ffsica del ordenador central ffsico (HPA), o una direccion ffsica de la maquina virtual (GPA). Si la primera direccion de la BAT es la GPA, cuando se accede a la direccion, un adaptador PCIE necesita implementar una conversion de GPA a HPA mediante el uso de VT-D (una tecnologfa de Intel) o IOMMU (una tecnologfa de AMD) en una CPU, u otra tecnologfa que pueda implementar automaticamente la conversion de direcciones de GPA a HPA.The input generation module 612 is configured to generate a table of base addresses, BAT, and a table of logical chip addresses, CLAT, according to the memory assigned to each service, where the BAT includes a base address of CLAT corresponding to each service, and the CLAT includes a first address of each memory block. Specifically, a first address of the BAT may be a physical address of the physical central computer (HPA), or a physical address of the virtual machine (GPA). If the first address of the BAT is the GPA, when the address is accessed, a PCIE adapter needs to implement a conversion from GPA to HPA through the use of VT-D (an Intel technology) or IOMMU (an AMD technology). on a CPU, or other technology that can automatically implement the conversion of addresses from GPA to HPA.

Si hay varios servicios de un mismo tipo de servicio en la CLAT, para diferenciar entre los diversos servicios del mismo tipo de servicio, un numero de servicio puede asignarse a cada servicio. El numero de servicio puede utilizarse para el calculo de un desplazamiento de entrada de CLAT, y los detalles se describen a continuacion. En el presente documento, el tipo de servicio es un tipo de un servicio que puede ser ejecutado por el dispositivo PCIE 62, por ejemplo, un servicio de desvfo, un servicio de segmentacion y un servicio de suma de control, que se ejecuta mediante un adaptador de red.If there are several services of the same type of service in the CLAT, to differentiate between the different services of the same type of service, a service number can be assigned to each service. The service number can be used for the calculation of a CLAT input offset, and the details are described below. In the present document, the type of service is a type of a service that can be executed by the PCIE 62 device, for example, a divert service, a segmentation service and a checksum service, which is executed by a network adapter.

Ademas, el modulo de asignacion 611 puede asignar un bloque de memoria a la BAT y la CLAT. Una cantidad de bits en una primera direccion del bloque de memoria es constante, y por lo tanto, una cantidad de octetos en la primera direccion del bloque de memoria tambien es constante. Por ejemplo, la cantidad de bits en la primera direccion del bloque de memoria es de 64, y una cantidad de octetos ocupados por una primera direccion de cada bloque de memoria es de 8B. Por lo tanto, si un tamano de una memoria asignada a la CLAt es de 4K, una cantidad maxima de entradas en cada CLAT es de 4K/8=512. Cuando las entradas en una CLAT no son suficientes, es necesario generar una CLAT de multiples niveles para almacenar una primera direccion de un bloque de memoria. In addition, the assignment module 611 can allocate a block of memory to the BAT and the CLAT. A number of bits in a first address of the memory block is constant, and therefore, a number of octets in the first address of the memory block is also constant. For example, the number of bits in the first address of the memory block is 64, and a number of octets occupied by a first address of each memory block is 8B. Therefore, if a size of a memory assigned to the CLA t is 4K, a maximum number of entries in each CLAT is 4K / 8 = 512. When the entries in a CLAT are not sufficient, it is necessary to generate a CLAT of multiple levels to store a first address of a block of memory.

Es dedr, la CLAT puede ser una CLAT de un solo nivel o una CLAT de multiples niveles. La CLAT de multiples niveles incluye N niveles de CLAT, donde N>2 y N es un numero entero. Cada nivel de CLAT incluye multiples entradas. Cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N y n es un numero entero. Cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.It is, the CLAT can be a CLAT of a single level or a CLAT of multiple levels. The CLAT of multiple levels includes N levels of CLAT, where N> 2 and N is an integer number. Each level of CLAT includes multiple entries. Each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -third of CLAT, where 2 <n <n + 1 <N and n is an integer number. Each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks.

Tal y como se muestra en la FIG. 6, en la CLAT de un solo nivel, cada entrada de la CLAT corresponde a un bloque de memoria.As shown in FIG. 6, in the CLAT of a single level, each entry of the CLAT corresponds to a block of memory.

Tal y como se muestra en la FIG. 7, en la CLAT de multiples niveles, utilizando una CLAT de dos niveles como ejemplo, una entrada en el primer nivel de CLAT corresponde a multiples entradas en el segundo nivel de CLAT, y una entrada en el segundo nivel de CLAT corresponde a un bloque de memoria.As shown in FIG. 7, in the CLAT of multiple levels, using a CLAT of two levels as an example, an entry in the first level of CLAT corresponds to multiple entries in the second level of CLAT, and an entry in the second level of CLAT corresponds to a block of memory.

Por lo tanto, la BAT puede incluir ademas un tamano de una entrada de CLAT (un tamano de un bloque de memoria asignado a la CLAT), el tamano del bloque de memoria, una cantidad de niveles de la CLAT y similares.Therefore, the BAT may also include a size of a CLAT entry (a size of a memory block allocated to the CLAT), the size of the memory block, a number of levels of the CLAT and the like.

El modulo de envfo 613 esta configurado para enviar al dispositivo PCIE una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual, donde el dispositivo PCIE esta configurado para: registrar una correspondencia entre la direccion de la BAT y el numero de funcion, y obtener, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion.The sending module 613 is configured to send to the PCIE device a BAT address and a function number corresponding to the virtual machine, where the PCIE device is configured to: register a correspondence between the BAT address and the function number. , and obtain, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number.

La direccion de la BAT puede ser una primera direccion de la BAT. El numero de funcion es un numero de funcion de una PF o VF correspondiente a la maquina virtual. El numero de funcion de la PF o la VF correspondiente a la maquina virtual puede ser especificado por la maquina virtual o por un VMM.The address of the BAT can be a first address of the BAT. The function number is a function number of a PF or VF corresponding to the virtual machine. The function number of the PF or the VF corresponding to the virtual machine can be specified by the virtual machine or by a VMM.

Ademas, la maquina virtual 610 puede incluir un modulo de recepcion 614.In addition, the virtual machine 610 may include a reception module 614.

El modulo de recepcion 614 esta configurado para recibir un mensaje de solicitud que se utiliza para obtener informacion de funcionamiento de un servicio a procesar y que es enviado por el dispositivo PCIE, donde el mensaje de solicitud incluye la direccion de la BAT, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.The reception module 614 is configured to receive a request message that is used to obtain operation information of a service to be processed and that is sent by the PCIE device, where the request message includes the address of the BAT, a type of Service of the service to be processed and a service number of the service to be processed.

El modulo de envfo 613 esta configurado ademas para enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar.The sending module 613 is further configured to send, to the PCIE device according to the request message, operation information in a memory block corresponding to the service to be processed.

En esta forma de realizacion, el modulo de envfo 613 puede estar configurado espedficamente para:In this embodiment, the sending module 613 can be specifically configured to:

obtener la BAT correspondiente a la direccion de la BAT; determinar, de acuerdo con el tipo de servicio del servicio a procesar y la BAT, una direccion base de entrada de CLAT correspondiente al tipo de servicio; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; obtener, de acuerdo con la direccion base de entrada de CLAT y el desplazamiento de entrada, una entrada de CLAT correspondiente al servicio a procesar; y enviar, al dispositivo PCIE, informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT que se corresponde con el servicio a procesar.obtain the BAT corresponding to the address of the BAT; determine, according to the type of service of the service to be processed and the BAT, a base entry address of CLAT corresponding to the type of service; determine an entry displacement according to the service number of the service to be processed; obtain, in accordance with the CLAT entry base address and the entry offset, a CLAT entry corresponding to the service to be processed; and sending, to the PCIE device, operating information in a block of memory corresponding to the CLAT entry corresponding to the service to be processed.

Ademas, la maquina virtual 610 escribe, en una memoria cache del dispositivo PCIE, la informacion de funcionamiento en el bloque de memoria, y el dispositivo PCIE lee, de la memoria cache, la informacion de funcionamiento en el bloque de memoria, mejorandose asf la eficacia de la lectura de datos y aumentando, ademas, la velocidad de procesamiento de servicio.In addition, the virtual machine 610 writes, in a cache memory of the PCIE device, the operating information in the memory block, and the PCIE device reads, from the cache memory, the operating information in the memory block, thereby improving the efficiency of reading data and increasing, in addition, the speed of service processing.

Ademas, cuando se envfa la entrada de BAT y de CLAT al dispositivo PCIE, la maquina virtual 610 puede escribir la entrada de BAT y de CLAT en la memoria cache del dispositivo PCIE para su uso posterior por parte del dispositivo PCIE.Further, when the BAT and CLAT input is sent to the PCIE device, the virtual machine 610 can write the BAT and CLAT input into the cache memory of the PCIE device for later use by the PCIE device.

Ademas, los tamanos de multiples bloques de memoria asignados al servicio a procesar son identicos.In addition, the sizes of multiple blocks of memory assigned to the service to be processed are identical.

El modulo de envfo puede estar configurado espedficamente para:The shipping module can be configured specifically to:

cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; o when the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or

cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement includes an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:

Figure imgf000020_0001
Figure imgf000020_0001

donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar, y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed, and C is the number of entries in the N-th level of CLAT.

Cuando el desplazamiento de entrada del nivel x-esimo de CLAT es 0, indica que una entrada correspondiente es la primera entrada en el nivel x-esimo de CLAT, cuando el desplazamiento de entrada del nivel x-esimo de CLAT es 1, indica que una entrada correspondiente es la segunda entrada en el nivel x-esimo de CLAT, y asf sucesivamente. Cabe senalar que un resto para el nivel N-esimo de CLAT (es decir, el ultimo nivel de CLAT) se utiliza para indicar la informacion de funcionamiento, correspondiente al numero de servicio, en un bloque de memoria determinado. Cuando el resto para el nivel N-esimo de CLAT es igual a 0, la informacion de funcionamiento correspondiente al numero de servicio es el ultimo elemento de informacion de funcionamiento en el bloque de memoria determinado. Cuando el resto para el nivel N-esimo de CLAT es mayor que 0, la informacion de funcionamiento correspondiente al numero de servicio es el elemento m-esimo de informacion de funcionamiento en el bloque de memoria determinado, y m es igual al resto para el nivel N-esimo de CLAT.When the input displacement of the CLAT x-th level is 0, it indicates that a corresponding entry is the first entry in the x-th level of CLAT, when the entry offset of the x-th level of CLAT is 1, it indicates that a corresponding entry is the second entry in the x-th level of CLAT, and so on. It should be noted that a remainder for the N-th level of CLAT (ie, the last CLAT level) is used to indicate the operation information, corresponding to the service number, in a given memory block. When the remainder for the Nth level of CLAT is equal to 0, the operation information corresponding to the service number is the last element of operation information in the given memory block. When the remainder for the N-th level of CLAT is greater than 0, the operation information corresponding to the service number is the m-th element of operating information in the given memory block, and m is equal to the rest for the level N-th of CLAT.

En cuanto a un ejemplo espedfico, se hace referencia a la etapa 406 en la forma de realizacion 4. Descripciones detalladas se omiten en el presente documento.As for a specific example, reference is made to step 406 in the embodiment 4. Detailed descriptions are omitted in the present document.

En esta forma de realizacion de la presente invencion, una maquina virtual asigna una memoria a al menos un servicio ubicado en un dispositivo PCIE, genera una BAT y una CLAT de acuerdo con la memoria asignada a cada servicio, y envfa una direccion de la BAT y un numero de funcion al dispositivo PCIE, por lo que el dispositivo PCIE puede registrar una correspondencia entre la direccion de la BAT y el numero de funcion. Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de la maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a una maquina ffsica de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad. Forma de realizacion 7In this embodiment of the present invention, a virtual machine assigns a memory to at least one service located in a PCIE device, generates a BAT and a CLAT according to the memory assigned to each service, and sends a BAT address. and a function number to the PCIE device, so that the PCIE device can register a correspondence between the BAT address and the function number. During the processing of services, the PCIE device obtains, from the virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are migrated directly to a physical machine of destination, and that a correspondence between a number of function corresponding to a migrated virtual machine and a BAT address in a virtual machine of a physical central computer of this origin configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime. Form of realization 7

Esta forma de realizacion de la presente invencion proporciona un adaptador PCIE, que se aplica con el procedimiento proporcionado en la forma de realizacion 2. Haciendo referencia a la FIG. 10, el dispositivo de PCIE 71 esta conectado a un ordenador central ffsico 72, y al menos una maquina virtual 720 se ejecuta en el ordenador central ffsico 72. El dispositivo PCIE es un dispositivo de hardware que satisface la norma de virtualizacion I/O de una sola rafz, SR-IOV. El dispositivo PCIE 71 tiene al menos una funcion ffsica PF 711 y al menos una funcion virtual VF 712, y un numero de funcion unico se configura para cada PF 711 y cada VF 712 por separado. Cada maquina virtual 720 incluye una tabla de direcciones base, BAT, y la BAT es generada por una maquina virtual, a la que pertenece la BAT, segun una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE. La memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que las direcciones ffsicas de invitado son consecutivas. La BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y una CLAT incluye una primera direccion de cada bloque de memoria. El dispositivo PCIE 71 incluye ademas:This embodiment of the present invention provides a PCIE adapter, which is applied with the method provided in embodiment 2. Referring to FIG. 10, the PCIE device 71 is connected to a physical central computer 72, and at least one virtual machine 720 is executed in the physical central computer 72. The PCIE device is a hardware device that satisfies the I / O virtualization standard of a single root, SR-IOV. The PCIE device 71 has at least one physical function PF 711 and at least one virtual function VF 712, and a unique function number is configured for each PF 711 and each VF 712 separately. Each virtual machine 720 includes a table of base addresses, BAT, and the BAT is generated by a virtual machine, to which the BAT belongs, according to a memory assigned to at least one service located in the PCIE device. The memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, and each memory block is a section of memory space in which the physical addresses of guest are consecutive. The BAT includes a base CLAT entry address corresponding to each service, and a CLAT includes a first address of each memory block. The PCIE 71 device also includes:

un modulo de recepcion 713, configurado para recibir una direccion de la tabla de direcciones base, BAT, en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual; y a reception module 713, configured to receive a address from the base address table, BAT, in each virtual machine and a function number corresponding to each virtual machine; Y

un modulo de generacion 714, configurado para guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, de modo que la VCT incluye la correspondencia entre el numero de funcion y la direccion de la BAT.a generation module 714, configured to store a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, so that the VCT includes the correspondence between the function number and the address of the the BAT.

En esta forma de realizacion de la presente invencion, un dispositivo PCIE recibe una direccion de una BAT y un numero de funcion, y guarda una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, v Ct . Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de una maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a un ordenador central ffsico de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad.In this embodiment of the present invention, a PCIE device receives a BAT address and a function number, and stores a correspondence between the address of the BAT and the function number in a virtual machine configuration table, v Ct. During the processing of services, the PCIE device obtains, from a virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are migrated directly to a physical host computer of destination, and that a correspondence between a number of function corresponding to a virtual machine migrated and a BAT address in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime.

Forma de realizacion 8Form of realization 8

Esta forma de realizacion de la presente invencion proporciona un adaptador PCIE, que se aplica con el procedimiento proporcionado en la forma de realizacion 4. Haciendo referencia a la FIG. 11, el dispositivo PCIE 81 esta conectado a un ordenador central ffsico 82, y al menos una maquina virtual 820 se ejecuta en el ordenador central ffsico 82. El dispositivo PCIE es un dispositivo de hardware que satisface la norma de virtualizacion I/O de una sola rafz, SR-IOV. El dispositivo PCIE 81 tiene al menos una funcion ffsica, PF 811 y al menos una funcion virtual, VF 812, y un numero de funcion unico se configura para cada PF 811 y cada VF 812 por separado. Cada maquina virtual 820 incluye una tabla de direcciones base, BAT, y la BAT es generada por una maquina virtual, a la que pertenece la BAT, segun una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE. La memoria asignada a cada servicio incluye multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que direcciones ffsicas de invitado son consecutivas. La BAT incluye una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT incluye una primera direccion de cada bloque de memoria. El dispositivo PCIE 81 incluye ademas:This embodiment of the present invention provides a PCIE adapter, which is applied with the method provided in the embodiment 4. With reference to FIG. 11, the PCIE device 81 is connected to a physical central computer 82, and at least one virtual machine 820 is executed in the physical central computer 82. The PCIE device is a hardware device that satisfies the I / O virtualization standard of a single rafz, SR-IOV. The PCIE device 81 has at least one physical function, PF 811 and at least one virtual function, VF 812, and a unique function number is configured for each PF 811 and each VF 812 separately. Each virtual machine 820 includes a table of base addresses, BAT, and the BAT is generated by a virtual machine, to which the BAT belongs, according to a memory allocated to at least one service located in the PCIE device. The memory allocated to each service includes multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, and each memory block is a section of memory space in which physical addresses of guest are consecutive. The BAT includes a CLAT entry base address corresponding to each service, and the CLAT includes a first address of each memory block. The PCIE 81 device also includes:

un modulo de recepcion 813, configurado para recibir una direccion de la tabla de direcciones base, BAT, en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual; ya reception module 813, configured to receive a address from the base address table, BAT, in each virtual machine and a function number corresponding to each virtual machine; Y

un modulo de generacion 814, configurado para guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, de modo que la VCT incluye la correspondencia entre el numero de funcion y la direccion de la BAT.a generation module 814, configured to store a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, so that the VCT includes the correspondence between the function number and the address of the the BAT.

La VCT se guarda en el dispositivo PCIE (por ejemplo, un adaptador de red), y la BAT y la CLAT se guardan en la maquina virtual. Espedficamente, la VCT puede generarse por adelantado, y despues de recibir la direccion de la BAT y el numero de funcion, el dispositivo PCIE escribe la direccion de la BAT y el numero de funcion en la VCT. Mas espedficamente, la VCT puede ser generada por un VMM o la PCIE.The VCT is stored in the PCIE device (for example, a network adapter), and the BAT and CLAT are saved in the virtual machine. Specifically, the VCT can be generated in advance, and after receiving the BAT address and the function number, the PCIE device writes the address of the BAT and the function number in the VCT. More specifically, the VCT can be generated by a VMM or the PCIE.

Espedficamente, la direccion de la BAT puede ser una HPA o una GPA. Si la direccion de la BAT es la GPA, cuando se accede a la direccion, el dispositivo PCIE necesita implementar una conversion de GPA a HPA mediante el uso de VT-D (una tecnologfa de Intel) o IOMMU (una tecnologfa de AMD) en una CPU, u otra tecnologfa que pueda implementar automaticamente la conversion de direcciones de GPA a HPA.Specifically, the address of the BAT can be an HPA or a GPA. If the address of the BAT is the GPA, when the address is accessed, the PCIE device needs to implement a conversion from GPA to HPA through the use of VT-D (an Intel technology) or IOMMU (an AMD technology) in a CPU, or other technology that can automatically implement the conversion of addresses from GPA to HPA.

Ademas, el dispositivo PCIE 81 puede incluir ademas un modulo de determinacion 815 y un modulo de obtencion 816.In addition, the PCIE device 81 may further include a determination module 815 and a obtaining module 816.

El modulo de determinacion 815 esta configurado para determinar, de acuerdo con informacion de servicio de un servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar.The determination module 815 is configured to determine, in accordance with service information of a service to be processed and the VCT, a BAT address corresponding to the service to be processed.

La informacion de servicio incluye informacion de servicio enviada por un lado de ordenador central o informacion de servicio enviada por un lado de red. La informacion de servicio enviada por el lado de ordenador central es generalmente datos de servicio. La informacion de servicio enviada por el lado de red es generalmente un paquete de servicio.The service information includes service information sent by a central computer side or service information sent by a network side. The service information sent by the central computer side is generally service data. The service information sent by the network side is generally a service pack.

El modulo de obtencion 816 esta configurado para obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.The obtaining module 816 is configured to obtain, from a memory corresponding to the service to be processed, operating information of the service to be processed according to the BAT address corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed.

En esta forma de realizacion de la presente invencion, el modulo de recepcion 813 puede estar configurado ademas para recibir la informacion de servicio enviada por el lado de ordenador central o el lado de red. In this embodiment of the present invention, the reception module 813 can also be configured to receive the service information sent by the central computer side or the network side.

El modulo de determinacion 815 puede estar configurado espedficamente para:The determination module 815 can be specifically configured to:

determinar un numero de funcion correspondiente al servicio a procesar, de acuerdo con una caractenstica de la informacion de servicio, enviada por el lado de ordenador central, del servicio a procesar o de acuerdo con una interfaz PCIE utilizada cuando se recibe la informacion de servicio, transmitida por el lado de ordenador central, del servicio a procesar, donde la caractenstica se usa para indicar el numero de funcion correspondiente al servicio a procesar; ydetermine a function number corresponding to the service to be processed, in accordance with a feature of the service information, sent by the central computer side, of the service to be processed or in accordance with a PCIE interface used when the service information is received, transmitted by the central computer side of the service to be processed, where the feature is used to indicate the function number corresponding to the service to be processed; Y

determinar, de acuerdo con la VCT y el numero de funcion determinado correspondiente al servicio a procesar, la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar.determine, in accordance with the VCT and the function number determined corresponding to the service to be processed, the address of the BAT corresponding to the function number corresponding to the service to be processed.

En esta forma de realizacion, una caractenstica en el paquete de servicio enviado por el lado de red puede ser un campo en el paquete de servicio. Un campo utilizado como una caractenstica en el presente documento puede variar con un tipo de un dispositivo PCIE. Por ejemplo, cuando el dispositivo PCIE es un adaptador de red, una direccion MAC de destino puede usarse como una caractenstica. Es decir, cuando se recibe un paquete de servicios, el adaptador de red puede determinar un numero de funcion correspondiente de acuerdo con la direccion MAC de destino en el paquete de servicio. En un caso en el que el lado de ordenador central envfa los datos de servicio, un numero de funcion correspondiente puede determinarse de acuerdo con una interfaz PCIE utilizada cuando se reciben los datos de servicio transmitidos por el lado de ordenador central.In this embodiment, a feature in the service packet sent by the network side may be a field in the service pack. A field used as a feature in this document may vary with a type of a PCIE device. For example, when the PCIE device is a network adapter, a destination MAC address can be used as a feature. That is, when a service packet is received, the network adapter can determine a corresponding function number according to the destination MAC address in the service pack. In a case in which the central computer side sends the service data, a corresponding function number can be determined according to a PCIE interface used when the service data transmitted by the central computer side is received.

El lado de ordenador central se refiere a un sistema que incluye una CPU, una memoria y un disco duro que son de un ordenador central ffsico. El lado de red se refiere a un lado de red externa conectado al ordenador central ffsico. En una manera de implementacion de esta forma de realizacion de la presente invencion, el modulo de obtencion 816 puede estar configurado espedficamente para:The central computer side refers to a system that includes a CPU, a memory and a hard disk that are from a physical central computer. The network side refers to an external network side connected to the physical central computer. In a manner of implementing this embodiment of the present invention, the obtaining module 816 can be specifically configured to:

enviar un mensaje de solicitud a una maquina virtual correspondiente al numero de funcion determinado que se corresponde con el servicio a procesar, donde el mensaje de solicitud incluye la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar, el tipo de servicio del servicio a procesar y el numero de servicio del servicio a procesar; y recibir informacion de funcionamiento, del servicio a procesar, enviada por la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar, donde la informacion de funcionamiento del servicio a procesar se obtiene a partir de un bloque de memoria correspondiente al mensaje de solicitud mediante la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar.send a request message to a virtual machine corresponding to the function number determined that corresponds to the service to be processed, where the request message includes the address of the BAT corresponding to the function number corresponding to the service to be processed, the type of service of the service to be processed and the service number of the service to be processed; and receive operating information of the service to be processed, sent by the virtual machine corresponding to the function number corresponding to the service to be processed, where the operation information of the service to be processed is obtained from a memory block corresponding to the request message through the virtual machine corresponding to the function number that corresponds to the service to be processed.

El tipo de servicio es un tipo de un servicio correspondiente al paquete de servicio o a los datos de servicio recibidos por el dispositivo PCIE. El servicio correspondiente al paquete de servicio es un servicio transportado en el paquete de servicio. El servicio correspondiente a los datos de servicio es un servicio transportado en un paquete de servicio que se obtiene despues de que el dispositivo PCIE procese los datos de servicio.The type of service is a type of a service corresponding to the service pack or service data received by the PCIE device. The service corresponding to the service package is a service transported in the service package. The service corresponding to the service data is a service transported in a service package that is obtained after the PCIE device processes the service data.

En otra manera de implementacion de esta forma de realizacion de la presente invencion, el modulo de obtencion 816 puede estar configurado espedficamente para:In another embodiment of this embodiment of the present invention, the obtaining module 816 can be specifically configured to:

leer, de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, la BAT correspondiente al servicio a procesar; determinar, de acuerdo con el tipo de servicio del servicio a procesar, una direccion base de entrada de CLAT correspondiente al tipo de servicio del servicio a procesar de la BAT correspondiente al servicio a procesar; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; leer una entrada de CLAT correspondiente al desplazamiento de entrada y la direccion base de entrada de CLAT que se corresponde con el tipo de servicio del servicio a procesar; y leer informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT.read, according to the address of the BAT corresponding to the service to be processed, the BAT corresponding to the service to be processed; determine, according to the type of service of the service to be processed, a base CLAT entry address corresponding to the type of service of the service to be processed of the BAT corresponding to the service to be processed; determine an entry displacement according to the service number of the service to be processed; read a CLAT entry corresponding to the entry displacement and the CLAT entry base address that corresponds to the service type of the service to be processed; and read operation information in a block of memory corresponding to the CLAT input.

En esta forma de realizacion de la presente invencion, la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles. La CLAT de multiples niveles incluye N niveles de CLAT, donde N>2 y N es un numero entero. Cada nivel de CLAT incluye multiples entradas. Cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N y n es un numero entero. Cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.In this embodiment of the present invention, the CLAT is a single level CLAT or a multiple level CLAT. The CLAT of multiple levels includes N levels of CLAT, where N> 2 and N is an integer number. Each level of CLAT includes multiple entries. Each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -third of CLAT, where 2 <n <n + 1 <N and n is an integer number. Each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks.

En esta forma de realizacion de la presente invencion, los tamanos de los multiples bloques de memoria asignados al servicio a procesar son identicos.In this embodiment of the present invention, the sizes of the multiple memory blocks assigned to the service to be processed are identical.

El modulo de obtencion 816 puede estar configurado espedficamente para:The obtaining module 816 can be configured specifically for:

cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, for obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or

cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada incluye un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement includes an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:

Figure imgf000023_0001
Figure imgf000023_0001

donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar, y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed, and C is the number of entries in the N-th level of CLAT.

Cuando el desplazamiento de entrada del nivel x-esimo de CLAT es 0, indica que una entrada correspondiente es la primera entrada en el nivel x-esimo de CLAT, cuando el desplazamiento de entrada del nivel x-esimo de CLAT es 1, indica que una entrada correspondiente es la segunda entrada en el nivel x-esimo de CLAT, y asf sucesivamente. Cabe senalar que un resto para el nivel N-esimo de CLAT (es decir, el ultimo nivel de CLAT) se utiliza para indicar la informacion de funcionamiento, correspondiente al numero de servicio, en un bloque de memoria determinado. Cuando el resto para el nivel N-esimo de CLAT es igual a 0, la informacion de funcionamiento correspondiente al numero de servicio es el ultimo elemento de informacion de funcionamiento en el bloque de memoria determinado. Cuando el resto para el nivel N-esimo de CLAT es mayor que 0, la informacion de funcionamiento correspondiente al numero de servicio es el elemento m-esimo de informacion de funcionamiento en el bloque de memoria determinado, y m es igual al resto para el nivel N-esimo de CLAT.When the input displacement of the CLAT x-th level is 0, it indicates that a corresponding entry is the first entry in the x-th level of CLAT, when the entry offset of the x-th level of CLAT is 1, it indicates that a corresponding entry is the second entry in the x-th level of CLAT, and so on. It should be noted that a remainder for the N-th level of CLAT (ie, the last CLAT level) is used to indicate the operation information, corresponding to the service number, in a given memory block. When the remainder for the Nth level of CLAT is equal to 0, the operation information corresponding to the service number is the last element of operation information in the given memory block. When the remainder for the N-th level of CLAT is greater than 0, the operation information corresponding to the service number is the m-th element of operating information in the given memory block, and m is equal to the rest for the level N-th of CLAT.

El calculo del desplazamiento de entrada se describe a continuacion por medio de un ejemplo. Por ejemplo, un tamano de cada memoria utilizada es de 1 KB, un tamano de un bloque de memoria es de 4 KB, una cantidad de bits en una primera direccion de un bloque de memoria es de 64, y un tamano de un bloque de memoria asignado a una CLAT es tambien de 4 KB.The calculation of the input offset is described below by means of an example. For example, a size of each used memory is 1 KB, a size of a memory block is 4 KB, a number of bits in a first address of a memory block is 64, and a size of a block of memory is 64. memory assigned to a CLAT is also 4 KB.

En cuanto a un ejemplo espedfico, se hace referencia a la etapa 406 en la forma de realizacion 4. Descripciones detalladas se omiten en el presente documento.As for a specific example, reference is made to step 406 in the embodiment 4. Detailed descriptions are omitted in the present document.

En esta forma de realizacion de la presente invencion, un dispositivo PCIE recibe una direccion de una BAT y un numero de funcion, y guarda una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, v Ct . Durante el procesamiento de servicios, el dispositivo PCIE obtiene, a partir de una maquina virtual, informacion de funcionamiento de un servicio de acuerdo con la correspondencia entre la direccion de la BAT y el numero de funcion. Esto es facil de realizar y requiere menos tiempo. Durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren directamente a un ordenador central ffsico de destino, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad.In this embodiment of the present invention, a PCIE device receives a BAT address and a function number, and stores a correspondence between the address of the BAT and the function number in a virtual machine configuration table, v Ct. During the processing of services, the PCIE device obtains, from a virtual machine, operating information of a service according to the correspondence between the BAT address and the function number. This is easy to do and requires less time. During the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are migrated directly to a physical host computer of destination, and that a correspondence between a number of function corresponding to a virtual machine migrated and a BAT address in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE device after the migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime.

Forma de realizacion 9Form of realization 9

Esta forma de realizacion de la presente invencion proporciona un dispositivo de gestion de migracion. El dispositivo de gestion de migracion esta dispuesto en un ordenador central ffsico de destino y se aplica con el procedimiento proporcionado en la forma de realizacion 3. Haciendo referencia a la FIG. 12, el dispositivo de gestion de migracion incluye:This embodiment of the present invention provides a migration management device. The migration management device is arranged in a physical host computer and is applied with the procedure provided in the embodiment 3. Referring to FIG. 12, the migration management device includes:

un primer modulo de obtencion 901, configurado para obtener una direccion de una tabla de direcciones base, BAT, en una maquina virtual de un ordenador central ffsico de origen durante una migracion en vivo, donde el ordenador central ffsico de destino y el ordenador central ffsico de origen estan conectados a diferentes dispositivos de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado;a first obtaining module 901, configured to obtain a address from a base address table, BAT, in a virtual machine of a physical home computer during a live migration, where the physical host computer and the physical central computer of origin are connected to Different peripheral interconnection devices of peripheral components, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately;

un segundo modulo de obtencion 902, configurado para obtener un numero de funcion correspondiente a una maquina virtual migrada; ya second obtaining module 902, configured to obtain a function number corresponding to a migrated virtual machine; Y

un modulo de configuracion 903, configurado para configurar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT, en un dispositivo PCIE conectado al ordenador central ffsico de destino.a configuration module 903, configured to configure a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT, in a PCIE device connected to the physical host computer.

En esta forma de realizacion de la presente invencion, durante la migracion en vivo de una maquina virtual se evitan los problemas causados por la migracion de registros, siempre que un bloque de memoria, una BAT y una CLAT se migren de manera automatica y directa a una maquina ffsica de destino durante un proceso de migracion, y que una correspondencia entre un numero de funcion correspondiente a una maquina virtual migrada y una direccion de la BAT en una maquina virtual de un ordenador central ffsico de origen este configurada en una VCT en un dispositivo PCIE despues de la migracion. Esto es simple y facil de implementar, aumenta en gran medida la velocidad de migracion en vivo de una maquina virtual y reduce el tiempo de inactividad.In this embodiment of the present invention, during the live migration of a virtual machine the problems caused by the migration of records are avoided, provided that a block of memory, a BAT and a CLAT are automatically and directly migrated to a physical machine of destination during a migration process, and that a correspondence between a number of function corresponding to a virtual machine migrated and a BAT address in a virtual machine of a physical central computer of origin this configured in a VCT in a PCIE device after migration. This is simple and easy to implement, greatly increases the speed of live migration of a virtual machine and reduces downtime.

Debe observarse que cuando la maquina virtual proporcionada en las anteriores formas de realizacion gestiona una memoria de la maquina virtual, la division de los modulos funcionales anteriores es solo un ejemplo para la descripcion. En una aplicacion real, las funciones anteriores pueden implementarse por diferentes modulos funcionales de acuerdo con un requisito, o una funcion de las mismas puede implementarse por mas modulos, o multiples funciones de las mismas son implementadas por un modulo. Es decir, una estructura interna de un dispositivo se divide en diferentes modulos funcionales para implementar todas o algunas de las funciones descritas anteriormente. Ademas, el ordenador central ffsico proporcionado en las anteriores formas de realizacion y las formas de realizacion del procedimiento para la gestion de una memoria de una maquina virtual pertenecen a una misma idea. En cuanto a un proceso de implementacion espedfico de los mismos, se hace referencia a las formas de realizacion de procedimiento, y los detalles no se describen de nuevo en el presente documento.It should be noted that when the virtual machine provided in the previous embodiments manages a memory of the virtual machine, the division of the above functional modules is only an example for the description. In a real application, the above functions can be implemented by different functional modules according to a requirement, or a function thereof can be implemented by more modules, or multiple functions thereof are implemented by a module. That is, an internal structure of a device is divided into different functional modules to implement all or some of the functions described above. Furthermore, the physical central computer provided in the previous embodiments and the embodiments of the procedure for managing a memory of a virtual machine belong to the same idea. As for a specific implementation process thereof, reference is made to the procedural embodiments, and the details are not described again in this document.

Los numeros de secuencia de las anteriores formas de realizacion de la presente invencion solo tienen fines ilustrativos y no estan destinados a indicar prioridades de las formas de realizacion.The sequence numbers of the previous embodiments of the present invention are for illustrative purposes only and are not intended to indicate priorities of the embodiments.

Un experto en la tecnica puede entender que todas o algunas de las etapas de las formas de realizacion pueden implementarse mediante hardware o un programa que da ordenes a un hardware relacionado. El programa puede estar almacenado en un medio de almacenamiento legible por ordenador. El medio de almacenamiento puede incluir: una memoria de solo lectura, un disco magnetico, un disco optico o similar.One skilled in the art can understand that all or some of the stages of the embodiments can be implemented by hardware or a program that gives orders to a related hardware. The program can be stored in a computer readable storage medium. The storage medium may include: a read-only memory, a magnetic disk, an optical disk or the like.

Las descripciones anteriores son simplemente ejemplos de formas de realizacion de la presente invencion y no pretenden limitar la presente invencion. The above descriptions are merely examples of embodiments of the present invention and are not intended to limit the present invention.

Claims (24)

REIVINDICACIONES 1. Un procedimiento para gestionar una memoria de una maquina virtual, en el que la maquina virtual se ejecuta en un ordenador central ffsico, el ordenador central ffsico esta conectado a un dispositivo de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-lOv, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, en el que un numero de funcion unico se configura para cada PF y cada VF por separado; en el que la maquina virtual ejecuta un servicio usando una VF de la al menos una VF, y la maquina virtual corresponde a un numero de funcion de la VF de la al menos una VF; y el procedimiento comprende:1. A procedure for managing a memory of a virtual machine, in which the virtual machine is executed in a physical central computer, the physical central computer is connected to an peripheral interconnection device of peripheral components, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-lOv, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, in which a function number only one is configured for each PF and each VF separately; wherein the virtual machine executes a service using a VF of the at least one VF, and the virtual machine corresponds to a function number of the VF of the at least one VF; and the procedure comprises: asignar, mediante la maquina virtual, una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio comprende multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que direcciones ffsicas de invitado son consecutivas;assign, by means of the virtual machine, a memory to at least one service located in the PCIE device, where the memory assigned to each service comprises multiple blocks of memory, each one of the multiple memory blocks is used to store operating information of a corresponding service, and each memory block is a section of memory space in which physical guest addresses are consecutive; generar, mediante la maquina virtual, una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT comprende una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT comprende una primera direccion de cada bloque de memoria;generate, through the virtual machine, a table of base addresses, BAT, and a table of logical chip addresses, CLAT, according to the memory assigned to each service, where the BAT comprises a base entry address of CLAT corresponding to each service, and the CLAT comprises a first address of each memory block; enviar al dispositivo PCIE, mediante la maquina virtual, una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual, donde una correspondencia entre la direccion de la BAT y el numero de funcion correspondiente a la maquina virtual se guarda en una tabla de configuracion de maquina virtual, VCT, del dispositivo PCIE conectado al ordenador central ffsico;send to the PCIE device, through the virtual machine, a BAT address and a function number corresponding to the virtual machine, where a correspondence between the BAT address and the function number corresponding to the virtual machine is stored in a table of configuration of virtual machine, VCT, of the PCIE device connected to the physical central computer; en el que cuando la maquina virtual se migra desde el ordenador central ffsico a un ordenador central ffsico de destino, los bloques de memoria, la BAT y la CLAT se migran a la maquina virtual migrada en el ordenador central ffsico de destino; ywherein when the virtual machine is migrated from the physical central computer to a physical host computer, the memory blocks, the BAT and the CLAT are migrated to the virtual machine migrated in the physical host computer of destination; Y en el que despues de la migracion, una correspondencia entre la direccion de la BAT y un numero de funcion que corresponde a la maquina virtual migrada, y es de una VF en un dispositivo PCIE conectado al ordenador central ffsico de destino, se configura en una v Ct en el dispositivo PCIE conectado al ordenador central ffsico de destino.in which after the migration, a correspondence between the address of the BAT and a number of function corresponding to the migrated virtual machine, and is of a VF in a PCIE device connected to the physical central computer of destination, is configured in a v Ct on the PCIE device connected to the target physical host. 2. El procedimiento segun la reivindicacion 1, en el que el al menos un servicio comprende un servicio a procesar, y el procedimiento comprende ademas:The method according to claim 1, wherein the at least one service comprises a service to be processed, and the method further comprises: recibir un mensaje de solicitud que se utiliza para obtener informacion de funcionamiento del servicio a procesar y que es enviado por el dispositivo PCIE, donde el mensaje de solicitud comprende la direccion de la BAT, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar; y enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar.receiving a request message that is used to obtain operating information of the service to be processed and sent by the PCIE device, where the request message comprises the address of the BAT, a service type of the service to be processed and a number of service of the service to be processed; and sending, to the PCIE device according to the request message, operation information in a block of memory corresponding to the service to be processed. 3. El procedimiento segun la reivindicacion 2, en el que el enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar comprende:3. The method according to claim 2, wherein sending, to the PCIE device according to the request message, operation information in a memory block corresponding to the service to be processed comprises: obtener la BAT correspondiente a la direccion de la BAT;obtain the BAT corresponding to the address of the BAT; determinar, de acuerdo con el tipo de servicio del servicio a procesar y la BAT, una direccion base de entrada de CLAT correspondiente al tipo de servicio;determine, according to the type of service of the service to be processed and the BAT, a base entry address of CLAT corresponding to the type of service; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; obtener, de acuerdo con la direccion base de entrada de CLAT y el desplazamiento de entrada, una entrada de CLAT correspondiente al servicio a procesar; ydetermine an entry displacement according to the service number of the service to be processed; obtain, in accordance with the CLAT entry base address and the entry offset, a CLAT entry corresponding to the service to be processed; Y enviar, al dispositivo PCIE, informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT que se corresponde con el servicio a procesar.send, to the PCIE device, operating information in a block of memory corresponding to the CLAT input corresponding to the service to be processed. 4. El procedimiento segun la reivindicacion 3, en el que4. The method according to claim 3, wherein la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles comprende N niveles de CLAT, donde N>2 y N es un numero entero; cada nivel de CLAT comprende multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.the CLAT is a CLAT of a single level or a CLAT of multiple levels; the CLAT of multiple levels comprises N levels of CLAT, where N> 2 and N is an integer number; each level of CLAT comprises multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks. 5. El procedimiento segun la reivindicacion 4, en el que los tamanos de los multiples bloques de memoria asignados al servicio a procesar son identicos; yThe method according to claim 4, wherein the sizes of the multiple memory blocks assigned to the service to be processed are identical; Y el determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar comprende:The determination of an entry displacement according to the service number of the service to be processed comprises: cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la c La T de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; oWhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operation information of the service to be processed, and divide the result of the multiplication by the size of the memory block assigned to the service to be processed, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the c The T of a single level is greater than 0, the offset of input is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada comprende un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement comprises an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:
Figure imgf000026_0001
Figure imgf000026_0001
donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed and C is the number of entries in the N-th level of CLAT.
6. Un procedimiento para configurar un dispositivo de interconexion expres de componentes perifericos, PCIE, donde el dispositivo PCIE esta conectado a un ordenador central ffsico, al menos una maquina virtual se ejecuta en el ordenador central ffsico, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; cada maquina virtual comprende una tabla de direcciones base, BAT, donde la BAT es generada por una maquina virtual, a la que pertenece la BAT, segun una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE; la memoria asignada a cada servicio comprende multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, cada bloque de memoria es una seccion de espacio de memoria en la que direcciones ffsicas de invitado son consecutivas; la BAT comprende una direccion base de entrada de tabla de direcciones logicas de chip, CLAT, correspondiente a cada servicio, y la CLAT comprende una primera direccion de cada bloque de memoria; y6. A method for configuring an peripheral interconnect device of peripheral components, PCIE, where the PCIE device is connected to a physical central computer, at least one virtual machine is running on the physical central computer, the PCIE device is a hardware device which supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately; each virtual machine comprises a table of base addresses, BAT, where the BAT is generated by a virtual machine, to which the BAT belongs, according to a memory assigned to at least one service located in the PCIE device; the memory allocated to each service comprises multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, each memory block is a section of memory space in which physical addresses of guest they are consecutive; the BAT comprises a base entry address of chip logic address table, CLAT, corresponding to each service, and the CLAT comprises a first address of each memory block; Y el procedimiento comprende:The procedure includes: recibir, mediante el dispositivo PCIE, una direccion de la tabla de direcciones base, BAT, en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual;receive, through the PCIE device, a address from the base address table, BAT, in each virtual machine and a function number corresponding to each virtual machine; guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT; ysave a correspondence between the address of the BAT and the function number in a virtual machine configuration table, VCT; Y en el que una maquina virtual ejecuta al menos un servicio usando una VF de la al menos una VF, y la maquina virtual corresponde a un numero de funcion de la VF de la al menos una VF; cuando la maquina virtual se migra desde el ordenador central ffsico a un ordenador central ffsico de destino, los bloques de memoria, la BAT y la CLAT de la maquina virtual se migran a la maquina virtual migrada en el ordenador central ffsico de destino; y despues de la migracion, una correspondencia entre la direccion de la BAT de la maquina virtual y un numero de funcion que corresponde a la maquina virtual migrada, y es de una VF en un dispositivo PCIE conectado al ordenador central ffsico de destino, se configura en una VCT en el dispositivo PCIE conectado al ordenador central ffsico de destino.wherein a virtual machine executes at least one service using a VF of the at least one VF, and the virtual machine corresponds to a function number of the VF of the at least one VF; when the virtual machine is migrated from the physical central computer to a physical host computer, the memory blocks, the BAT and the CLAT of the virtual machine are migrated to the virtual machine migrated in the physical host computer of destination; and after the migration, a correspondence between the address of the BAT of the virtual machine and a number of function corresponding to the migrated virtual machine, and is of a VF in a PCIE device connected to the physical central computer of destination, is configured in a VCT on the PCIE device connected to the target physical host. 7. El procedimiento segun la reivindicacion 6, en el que el al menos un servicio comprende un servicio a procesar, y el procedimiento comprende ademas:The method according to claim 6, wherein the at least one service comprises a service to be processed, and the method further comprises: determinar, de acuerdo con la informacion de servicio del servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar; ydetermine, in accordance with the service information of the service to be processed and the VCT, a BAT address corresponding to the service to be processed; Y obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.obtain, from a memory corresponding to the service to be processed, operating information of the service to be processed in accordance with the BAT address corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed. process. 8. El procedimiento segun la reivindicacion 7, en el que el determinar, de acuerdo con informacion de servicio del servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar comprende:The method according to claim 7, wherein determining, in accordance with service information of the service to be processed and the VCT, a BAT address corresponding to the service to be processed comprises: recibir la informacion de servicio, enviada por un lado de ordenador central o un lado de red, del servicio a procesar;receive the service information sent by one side of the central computer or one network side of the service to process; determinar un numero de funcion correspondiente al servicio a procesar, de acuerdo con una caractenstica de la informacion de servicio, enviada por el lado de ordenador central, del servicio a procesar o de acuerdo con una interfaz PCIE utilizada cuando se recibe la informacion de servicio, transmitida por el lado de ordenador central, del servicio a procesar, donde la caractenstica se usa para indicar el numero de funcion correspondiente al servicio a procesar; ydetermine a function number corresponding to the service to be processed, in accordance with a feature of the service information, sent by the central computer side, of the service to be processed or in accordance with a PCIE interface used when the service information is received, transmitted by the central computer side of the service to be processed, where the feature is used to indicate the function number corresponding to the service to be processed; Y determinar, de acuerdo con la VCT y el numero de funcion determinado correspondiente al servicio a procesar, la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar.determine, in accordance with the VCT and the function number determined corresponding to the service to be processed, the address of the BAT corresponding to the function number corresponding to the service to be processed. 9. El procedimiento segun la reivindicacion 8, en el que el obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar comprende:9. The method according to claim 8, wherein obtaining, from a memory corresponding to the service to be processed, operation information of the service to be processed in accordance with the BAT address corresponding to the service to be processed, a type of Service of the service to be processed and a service number of the service to be processed comprises: enviar un mensaje de solicitud a una maquina virtual correspondiente al numero de funcion determinado que se corresponde con el servicio a procesar, donde el mensaje de solicitud comprende la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar, el tipo de servicio del servicio a procesar y el numero de servicio del servicio a procesar; ysend a request message to a virtual machine corresponding to the determined function number corresponding to the service to be processed, where the request message comprises the address of the BAT corresponding to the function number corresponding to the service to be processed, the type of service of the service to be processed and the service number of the service to be processed; Y recibir informacion de funcionamiento, del servicio a procesar, enviada por la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar, donde la informacion de funcionamiento del servicio a procesar se obtiene a partir de un bloque de memoria correspondiente al mensaje de solicitud mediante la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar.receive operating information of the service to be processed, sent by the virtual machine corresponding to the function number corresponding to the service to be processed, where the operating information of the service to be processed is obtained from a block of memory corresponding to the message of request by means of the virtual machine corresponding to the number of function that corresponds with the service to be processed. 10. El procedimiento segun la reivindicacion 7 u 8, en el que el obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar comprende:The method according to claim 7 or 8, wherein obtaining, from a memory corresponding to the service to be processed, operation information of the service to be processed in accordance with the BAT address corresponding to the service to be processed, a type of service of the service to be processed and a service number of the service to be processed comprises: leer, de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, la BAT correspondiente al servicio a procesar;read, according to the address of the BAT corresponding to the service to be processed, the BAT corresponding to the service to be processed; determinar, de acuerdo con el tipo de servicio del servicio a procesar, una direccion base de entrada de CLAT correspondiente al tipo de servicio del servicio a procesar de la BAT correspondiente al servicio a procesar; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; leer una entrada de CLAT correspondiente al desplazamiento de entrada y la direccion base de entrada de CLAT que se corresponde con el tipo de servicio del servicio a procesar; ydetermine, according to the type of service of the service to be processed, a base CLAT entry address corresponding to the type of service of the service to be processed of the BAT corresponding to the service to be processed; determine an entry displacement according to the service number of the service to be processed; read a CLAT entry corresponding to the entry displacement and the CLAT entry base address that corresponds to the service type of the service to be processed; Y leer informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT.read operation information in a block of memory corresponding to the CLAT input. 11. El procedimiento segun la reivindicacion 10, en el que la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles comprende N niveles de CLAT, donde N>2 y N es un numero entero; cada nivel de CLAT comprende multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.The method according to claim 10, wherein the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels comprises N levels of CLAT, where N> 2 and N is an integer number; each level of CLAT comprises multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks. 12. El procedimiento segun la reivindicacion 11, en el que los tamanos de los multiples bloques de memoria asignados al servicio a procesar son identicos; yThe method according to claim 11, wherein the sizes of the multiple memory blocks assigned to the service to be processed are identical; Y el determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar comprende:The determination of an entry displacement according to the service number of the service to be processed comprises: cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada comprende un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera: when the CLAT is a CLAT of multiple levels, where the entry displacement comprises an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:
Figure imgf000028_0001
Figure imgf000028_0001
donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed and C is the number of entries in the N-th level of CLAT.
13. Un ordenador central ffsico, en el que una maquina virtual se ejecuta en el ordenador central ffsico, el ordenador central ffsico esta conectado a un dispositivo de interconexion expres de componentes perifericos, PCIE, el dispositivo PCIE es un dispositivo de hardware que admite la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, en el que un numero de funcion unico se configura para cada PF y cada VF por separado; en el que la maquina virtual ejecuta un servicio usando una VF de la al menos una VF, y la maquina virtual corresponde a un numero de funcion de la VF de la al menos una VF; y la maquina virtual comprende:13. A physical central computer, in which a virtual machine is executed in the physical central computer, the physical central computer is connected to an express interconnection device of peripheral components, PCIE, the PCIE device is a hardware device that supports the single-root I / O virtualization standard, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, in which a unique function number is configured for each PF and each VF separately; wherein the virtual machine executes a service using a VF of the at least one VF, and the virtual machine corresponds to a function number of the VF of the at least one VF; and the virtual machine comprises: un modulo de asignacion, configurado para asignar una memoria a al menos un servicio ubicado en el dispositivo PCIE, donde la memoria asignada a cada servicio comprende multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, y cada bloque de memoria es una seccion de espacio de memoria en la que direcciones ffsicas de invitado son consecutivas;an allocation module, configured to allocate a memory to at least one service located in the PCIE device, where the memory allocated to each service comprises multiple blocks of memory, each of the multiple blocks of memory being used to store operating information of a corresponding service, and each memory block is a section of memory space in which physical guest addresses are consecutive; un modulo de generacion de entradas, configurado para generar una tabla de direcciones base, BAT, y una tabla de direcciones logicas de chip, CLAT, de acuerdo con la memoria asignada a cada servicio, donde la BAT comprende una direccion base de entrada de CLAT correspondiente a cada servicio, y la CLAT comprende una primera direccion de cada bloque de memoria; ya module of generation of inputs, configured to generate a table of base addresses, BAT, and a table of logical addresses of chip, CLAT, according to the memory assigned to each service, where the BAT comprises a base entry address of CLAT corresponding to each service, and the CLAT comprises a first address of each memory block; Y un modulo de envfo, configurado para enviar al dispositivo PCIE una direccion de la BAT y un numero de funcion correspondiente a la maquina virtual, en el que una correspondencia entre la direccion de la BAT y el numero de funcion correspondiente a la maquina virtual se guarda en una tabla de configuracion de maquina virtual, VCT, del dispositivo PCIE conectado al ordenador central ffsico;a sending module, configured to send to the PCIE device a BAT address and a function number corresponding to the virtual machine, in which a correspondence between the address of the BAT and the function number corresponding to the virtual machine is saved in a virtual machine configuration table, VCT, of the PCIE device connected to the physical central computer; en el que cuando la maquina virtual se migra desde el ordenador central ffsico a un ordenador central ffsico de destino, los bloques de memoria, la BAT y la CLAT se migran a la maquina virtual migrada en el ordenador central ffsico de destino; ywherein when the virtual machine is migrated from the physical central computer to a physical host computer, the memory blocks, the BAT and the CLAT are migrated to the virtual machine migrated in the physical host computer of destination; Y en el que despues de la migracion, una correspondencia entre la direccion de la BAT y un numero de funcion que corresponde a la maquina virtual migrada, y es de una VF en un dispositivo PCIE conectado al ordenador central ffsico de destino, se configura en una v Ct en el dispositivo PCIE conectado al ordenador central ffsico de destino.in which after the migration, a correspondence between the address of the BAT and a number of function corresponding to the migrated virtual machine, and is of a VF in a PCIE device connected to the physical central computer of destination, is configured in a v Ct on the PCIE device connected to the target physical host. 14. El ordenador central ffsico segun la reivindicacion 13, en el que el al menos un servicio comprende un servicio a procesar, y la maquina virtual comprende ademas:14. The physical central computer according to claim 13, wherein the at least one service comprises a service to be processed, and the virtual machine further comprises: un modulo de recepcion, configurado para recibir un mensaje de solicitud que se utiliza para obtener informacion de funcionamiento del servicio a procesar y que es enviado por el dispositivo PCIE, donde el mensaje de solicitud comprende la direccion de la BAT, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar; ya reception module, configured to receive a request message that is used to obtain operation information of the service to be processed and which is sent by the PCIE device, where the request message comprises the address of the BAT, a service type of the service to be processed and a service number of the service to be processed; Y el modulo de envfo esta configurado ademas para enviar, al dispositivo PCIE de acuerdo con el mensaje de solicitud, informacion de funcionamiento en un bloque de memoria correspondiente al servicio a procesar. the sending module is also configured to send, to the PCIE device according to the request message, operation information in a memory block corresponding to the service to be processed. 15. El ordenador central ffsico segun la reivindicacion 14, en el que el modulo de envfo esta configurado espedficamente para:15. The physical central computer according to claim 14, wherein the sending module is specifically configured to: obtener la BAT correspondiente a la direccion de la BAT; determinar, de acuerdo con el tipo de servicio del servicio a procesar y la BAT, una direccion base de entrada de CLAT correspondiente al tipo de servicio; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; obtener, de acuerdo con la direccion base de entrada de CLAT y el desplazamiento de entrada, una entrada de CLAT correspondiente al servicio a procesar; y enviar, al dispositivo PCIE, informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAT que se corresponde con el servicio a procesar. obtain the BAT corresponding to the address of the BAT; determine, according to the type of service of the service to be processed and the BAT, a base entry address of CLAT corresponding to the type of service; determine an entry displacement according to the service number of the service to be processed; obtain, in accordance with the CLAT entry base address and the entry offset, a CLAT entry corresponding to the service to be processed; and sending, to the PCIE device, operating information in a block of memory corresponding to the CLAT entry corresponding to the service to be processed. 16. El ordenador central ffsico segun la reivindicacion 15, en el que la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles comprende N niveles de CLAT, donde N>2 y N es un numero entero; cada nivel de CLAT comprende multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N, y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.16. The physical central computer according to claim 15, wherein the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels comprises N levels of CLAT, where N> 2 and N is an integer number; each level of CLAT comprises multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -this CLAT, where 2 <n <n + 1 <N, and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks. 17. El ordenador central ffsico segun la reivindicacion 16, en el que los tamanos de los multiples bloques de memoria asignados al servicio a procesar son identicos; y17. The physical central computer according to claim 16, wherein the sizes of the multiple blocks of memory assigned to the service to be processed are identical; Y el modulo de envfo esta configurado espedficamente para:the shipping module is specifically configured to: cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada comprende un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera:when the CLAT is a CLAT of multiple levels, where the entry displacement comprises an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:
Figure imgf000029_0001
Figure imgf000029_0001
donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar y C es la cantidad de entradas en el nivel N-esimo de CLAT.where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed and C is the number of entries in the N-th level of CLAT.
18. Un dispositivo de interconexion expres de componentes perifericos, PCIE, donde el dispositivo PCIE esta conectado a un ordenador central ffsico, al menos una maquina virtual se ejecuta en el ordenador central ffsico, el dispositivo PCIE es un dispositivo de hardware que satisface la norma de virtualizacion I/O de una sola rafz, SR-IOV, y el dispositivo PCIE tiene al menos una funcion ffsica, PF, y al menos una funcion virtual, VF, donde un numero de funcion unico se configura para cada PF y cada VF por separado; cada maquina virtual comprende una tabla de direcciones base, BAT, donde la BAT es generada por una maquina virtual, a la que pertenece la BAT, segun una memoria asignada a al menos un servicio ubicado en el dispositivo PCIE; la memoria asignada a cada servicio comprende multiples bloques de memoria, cada uno de los multiples bloques de memoria se utiliza para guardar informacion de funcionamiento de un servicio correspondiente, cada bloque de memoria es una seccion de espacio de memoria en la que direcciones ffsicas de invitado son consecutivas; la BAT comprende una direccion base de entrada de tabla de direcciones logicas de chip, CLAT, correspondiente a cada servicio, y una CLAT comprende una primera direccion de cada bloque de memoria; y el dispositivo PCIE comprende ademas:18. An express interconnection device of peripheral components, PCIE, where the PCIE device is connected to a physical central computer, at least one virtual machine runs on the physical central computer, the PCIE device is a hardware device that satisfies the standard Virtualization I / O of a single root, SR-IOV, and the PCIE device has at least one physical function, PF, and at least one virtual function, VF, where a unique function number is configured for each PF and each VF separately; each virtual machine comprises a table of base addresses, BAT, where the BAT is generated by a virtual machine, to which the BAT belongs, according to a memory assigned to at least one service located in the PCIE device; the memory allocated to each service comprises multiple blocks of memory, each of the multiple blocks of memory is used to store operating information of a corresponding service, each memory block is a section of memory space in which physical addresses of guest they are consecutive; the BAT comprises a base entry address of chip logical address table, CLAT, corresponding to each service, and a CLAT comprises a first address of each memory block; and the PCIE device also comprises: un modulo de recepcion, configurado para recibir una direccion de la tabla de direcciones base, BAT, en cada maquina virtual y un numero de funcion correspondiente a cada maquina virtual;a reception module, configured to receive a address from the base address table, BAT, in each virtual machine and a function number corresponding to each virtual machine; un modulo de generacion, configurado para guardar una correspondencia entre la direccion de la BAT y el numero de funcion en una tabla de configuracion de maquina virtual, VCT; ya generation module, configured to store a correspondence between the BAT address and the function number in a virtual machine configuration table, VCT; Y en el que una maquina virtual ejecuta al menos un servicio usando una VF de la al menos una VF, y la maquina virtual corresponde a un numero de funcion de la VF de la al menos una VF; cuando la maquina virtual se migra desde el ordenador central ffsico a un ordenador central ffsico de destino, los bloques de memoria, la BAT y la CLAT de la maquina virtual se migran a la maquina virtual migrada en el ordenador central ffsico de destino; y despues de la migracion, una correspondencia entre la direccion de la BAT de la maquina virtual y un numero de funcion que corresponde a la maquina virtual migrada, y es de una VF en un dispositivo PCIE conectado al ordenador central ffsico de destino, se configura en una VCT en el dispositivo PCIE conectado al ordenador central ffsico de destino.wherein a virtual machine executes at least one service using a VF of the at least one VF, and the virtual machine corresponds to a function number of the VF of the at least one VF; when the virtual machine is migrated from the physical central computer to a physical host computer, the memory blocks, the BAT and the CLAT of the virtual machine are migrated to the virtual machine migrated in the physical host computer of destination; and after the migration, a correspondence between the address of the BAT of the virtual machine and a number of function corresponding to the migrated virtual machine, and is of a VF in a PCIE device connected to the physical central computer of destination, is configured in a VCT on the PCIE device connected to the target physical host. 19. El dispositivo PCIE segun la reivindicacion 18, en el que el al menos un servicio comprende un servicio a procesar, y el dispositivo PCIE comprende ademas: 19. The PCIE device according to claim 18, wherein the at least one service comprises a service to be processed, and the PCIE device further comprises: un modulo de determinacion, configurado para determinar, de acuerdo con la informacion de servicio del servicio a procesar y la VCT, una direccion de una BAT correspondiente al servicio a procesar; ya determination module, configured to determine, in accordance with the service information of the service to be processed and the VCT, a address of a BAT corresponding to the service to be processed; Y un modulo de obtencion, configurado para obtener, a partir de una memoria correspondiente al servicio a procesar, informacion de funcionamiento del servicio a procesar de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, un tipo de servicio del servicio a procesar y un numero de servicio del servicio a procesar.a obtaining module, configured to obtain, from a memory corresponding to the service to be processed, operation information of the service to be processed according to the BAT address corresponding to the service to be processed, a service type of the service to be processed and a service number of the service to be processed. 20. El dispositivo PCIE segun la reivindicacion 19, en el que:20. The PCIE device according to claim 19, wherein: el modulo de recepcion esta configurado ademas para recibir la informacion de servicio, enviada por un lado de ordenador central o un lado de red, del servicio a procesar; ythe reception module is further configured to receive the service information sent by one side of the central computer or a network side of the service to be processed; Y el modulo de determinacion esta configurado espedficamente para:the determination module is specifically configured to: determinar un numero de funcion correspondiente al servicio a procesar, de acuerdo con una caractenstica de la informacion de servicio, enviada por el lado de ordenador central, del servicio a procesar o de acuerdo con una interfaz PCIE utilizada cuando se recibe la informacion de servicio, transmitida por el lado de ordenador central, del servicio a procesar, donde la caractenstica se usa para indicar el numero de funcion correspondiente al servicio a procesar; ydetermine a function number corresponding to the service to be processed, in accordance with a feature of the service information, sent by the central computer side, of the service to be processed or in accordance with a PCIE interface used when the service information is received, transmitted by the central computer side of the service to be processed, where the feature is used to indicate the function number corresponding to the service to be processed; Y determinar, de acuerdo con la VCT y el numero de funcion determinado correspondiente al servicio a procesar, la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar.determine, in accordance with the VCT and the function number determined corresponding to the service to be processed, the address of the BAT corresponding to the function number corresponding to the service to be processed. 21. El dispositivo PCIE segun la reivindicacion 20, en el que el modulo de obtencion esta configurado espedficamente para:21. The PCIE device according to claim 20, wherein the obtaining module is specifically configured for: enviar un mensaje de solicitud a una maquina virtual correspondiente al numero de funcion determinado que se corresponde con el servicio a procesar, donde el mensaje de solicitud comprende la direccion de la BAT correspondiente al numero de funcion que se corresponde con el servicio a procesar, el tipo de servicio del servicio a procesar y el numero de servicio del servicio a procesar; y recibir informacion de funcionamiento, del servicio a procesar, enviada por la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar, donde la informacion de funcionamiento del servicio a procesar se obtiene a partir de un bloque de memoria correspondiente al mensaje de solicitud mediante la maquina virtual correspondiente al numero de funcion que se corresponde con el servicio a procesar.send a request message to a virtual machine corresponding to the determined function number corresponding to the service to be processed, where the request message comprises the address of the BAT corresponding to the function number corresponding to the service to be processed, the type of service of the service to be processed and the service number of the service to be processed; and receive operating information of the service to be processed, sent by the virtual machine corresponding to the function number corresponding to the service to be processed, where the operation information of the service to be processed is obtained from a memory block corresponding to the request message through the virtual machine corresponding to the function number that corresponds to the service to be processed. 22. El dispositivo PCIE segun la reivindicacion 19 o 20, en el que el modulo de obtencion esta configurado espedficamente para:22. The PCIE device according to claim 19 or 20, wherein the obtaining module is specifically configured for: leer, de acuerdo con la direccion de la BAT correspondiente al servicio a procesar, la BAT correspondiente al servicio a procesar; determinar, de acuerdo con el tipo de servicio del servicio a procesar, una direccion base de entrada de CLAT correspondiente al tipo de servicio del servicio a procesar de la BAT correspondiente al servicio a procesar; determinar un desplazamiento de entrada de acuerdo con el numero de servicio del servicio a procesar; leer una entrada de CLAT correspondiente al desplazamiento de entrada y la direccion base de entrada de CLAT que se corresponde con el tipo de servicio del servicio a procesar; y leer informacion de funcionamiento en un bloque de memoria correspondiente a la entrada de CLAt .read, according to the address of the BAT corresponding to the service to be processed, the BAT corresponding to the service to be processed; determine, according to the type of service of the service to be processed, a base CLAT entry address corresponding to the type of service of the service to be processed of the BAT corresponding to the service to be processed; determine an entry displacement according to the service number of the service to be processed; read a CLAT entry corresponding to the entry displacement and the CLAT entry base address that corresponds to the service type of the service to be processed; and read operating information in a block of memory corresponding to the CLAt input. 23. El dispositivo PCIE segun la reivindicacion 21, en el que la CLAT es una CLAT de un solo nivel o una CLAT de multiples niveles; la CLAT de multiples niveles comprende N niveles de CLAT, donde N>2 y N es un numero entero; cada nivel de CLAT comprende multiples entradas; cada entrada en el nivel n-esimo de CLAT se utiliza para indicar una direccion del nivel (n+1)-esimo de CLAT, donde 2<n<n+1<N y n es un numero entero; y cada entrada en el nivel N-esimo de CLAT se utiliza para indicar una primera direccion de uno de los bloques de memoria.23. The PCIE device according to claim 21, wherein the CLAT is a single level CLAT or a multiple level CLAT; the CLAT of multiple levels comprises N levels of CLAT, where N> 2 and N is an integer number; each level of CLAT comprises multiple entries; each entry in the nth level of CLAT is used to indicate a direction of the level (n + 1) -this CLAT, where 2 <n <n + 1 <N and n is an integer; and each entry in the N-th level of CLAT is used to indicate a first address of one of the memory blocks. 24. El dispositivo PCIE segun la reivindicacion 23, en el que los tamanos de los multiples bloques de memoria asignados al servicio a procesar son identicos; y24. The PCIE device according to claim 23, wherein the sizes of the multiple memory blocks assigned to the service to be processed are identical; Y el modulo de obtencion esta configurado espedficamente para:The obtaining module is specifically configured to: cuando la CLAT es una CLAT de un solo nivel, multiplicar el numero de servicio del servicio a procesar por un tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, y dividir el resultado de la multiplicacion por el tamano del bloque de memoria asignado al servicio a procesar, para obtener un cociente y un resto para la CLAT de un solo nivel, donde cuando el resto para la CLAT de un solo nivel es mayor que 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel, o cuando el resto para la CLAT de un solo nivel es igual a 0, el desplazamiento de entrada es igual al cociente para la CLAT de un solo nivel menos 1; owhen the CLAT is a CLAT of a single level, multiply the service number of the service to be processed by a size of a memory occupied by the operating information of the service to be processed, and divide the result of the multiplication by the size of the block of memory assigned to the service to process, to obtain a quotient and a remainder for the CLAT of a single level, where when the rest for the CLAT of a single level is greater than 0, the entry displacement is equal to the quotient for the CLAT of a single level, or when the rest for the CLAT of a single level is equal to 0, the entry displacement is equal to the quotient for the CLAT of a single level minus 1; or cuando la CLAT es una CLAT de multiples niveles, donde el desplazamiento de entrada comprende un desplazamiento de entrada de cada nivel de CLAT, calcular un desplazamiento de entrada del nivel x-esimo de CLAT de la siguiente manera: when the CLAT is a CLAT of multiple levels, where the entry displacement comprises an entry displacement of each level of CLAT, calculate an entry displacement of the X-th level of CLAT in the following way:
Figure imgf000031_0001
Figure imgf000031_0001
donde cuando un resto para el nivel x-esimo de CLAT es mayor que 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT; o cuando un resto para el nivel x-esimo de CLAT es igual a 0, el desplazamiento de entrada del nivel x-esimo de CLAT es igual a un cociente para el nivel x-esimo de CLAT menos 1, donde A es el tamano de una memoria ocupada por la informacion de funcionamiento del servicio a procesar, B es el tamano del bloque de memoria asignado al servicio a procesar y C es la cantidad de entradas en el nivel N-esimo de CLAT. where when a remainder for the x-th level of CLAT is greater than 0, the entry offset of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT; or when a remainder for the x-th level of CLAT is equal to 0, the entry displacement of the x-th level of CLAT is equal to a quotient for the x-th level of CLAT minus 1, where A is the size of a memory occupied by the operation information of the service to be processed, B is the size of the memory block assigned to the service to be processed and C is the number of entries in the N-th level of CLAT.
ES15879666T 2015-01-27 2015-09-16 Process of memory management of virtual machine, physical main machine, PCIE device and configuration procedure thereof, and migration management device Active ES2710625T3 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510041416.2A CN104636186B (en) 2015-01-27 2015-01-27 Virutal machine memory management method, physical host, PCIE device and its collocation method and migration management equipment
PCT/CN2015/089811 WO2016119468A1 (en) 2015-01-27 2015-09-16 Virtual machine memory management method, physical main machine, pcie device and configuration method therefor, and migration management device

Publications (1)

Publication Number Publication Date
ES2710625T3 true ES2710625T3 (en) 2019-04-26

Family

ID=53214978

Family Applications (1)

Application Number Title Priority Date Filing Date
ES15879666T Active ES2710625T3 (en) 2015-01-27 2015-09-16 Process of memory management of virtual machine, physical main machine, PCIE device and configuration procedure thereof, and migration management device

Country Status (5)

Country Link
US (1) US10496427B2 (en)
EP (1) EP3211530B1 (en)
CN (1) CN104636186B (en)
ES (1) ES2710625T3 (en)
WO (1) WO2016119468A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636186B (en) * 2015-01-27 2018-02-13 华为技术有限公司 Virutal machine memory management method, physical host, PCIE device and its collocation method and migration management equipment
CN106168883A (en) * 2016-05-05 2016-11-30 诸葛晴凤 A kind of efficient data tissue and access method
CN107797937A (en) * 2016-09-05 2018-03-13 康齐科技股份有限公司 Internal storage management system and its method
US10019288B2 (en) * 2016-09-12 2018-07-10 Mediatek, Inc. Fast and stable mechanism for allocating contiguous memory
TWI645293B (en) * 2017-11-30 2018-12-21 財團法人工業技術研究院 Method and device for live migration of virtual machine in a multi-root i/o virtualization (mr-iov) environment and computing host thereof
US10852967B2 (en) * 2018-04-26 2020-12-01 Mellanox Technologies, Ltd. Facilitating virtual functions using memory allocation in a virtualization environment
US11188369B2 (en) 2018-11-26 2021-11-30 International Business Machines Corporation Interrupt virtualization
CN112306650B (en) * 2019-07-31 2024-03-26 华为技术有限公司 Virtual machine thermomigration method and communication equipment
EP4018304B1 (en) * 2020-08-19 2024-03-13 Huawei Technologies Co., Ltd. Interchangeable interface role remapping
CN113194161B (en) * 2021-04-26 2022-07-08 山东英信计算机技术有限公司 Method and device for setting MMIO base address of server system
CN114817115A (en) * 2022-05-20 2022-07-29 深圳市广和通无线通信软件有限公司 Serial port communication method and related device

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4934642B2 (en) * 2008-06-11 2012-05-16 株式会社日立製作所 Computer system
US8521915B2 (en) * 2009-08-18 2013-08-27 Fusion-Io, Inc. Communicating between host computers and peripheral resources in an input/output (I/O) virtualization system
JP5598148B2 (en) * 2010-08-05 2014-10-01 富士通株式会社 Switching apparatus, information processing apparatus, and switching apparatus control method
US8489699B2 (en) * 2010-08-13 2013-07-16 Vmware, Inc. Live migration of virtual machine during direct access to storage over SR IOV adapter
JP5541117B2 (en) * 2010-11-26 2014-07-09 富士通株式会社 Virtual machine migration system, virtual machine migration program, and virtual machine migration method
US9397954B2 (en) * 2012-03-26 2016-07-19 Oracle International Corporation System and method for supporting live migration of virtual machines in an infiniband network
CN102819447B (en) * 2012-05-29 2015-06-03 中国科学院计算技术研究所 Direct I/O virtualization method and device used for multi-root sharing system
WO2014032233A1 (en) * 2012-08-29 2014-03-06 华为技术有限公司 System and method for live migration of virtual machine
KR20140098919A (en) * 2013-01-31 2014-08-11 한국전자통신연구원 Method of providing virtual machine for real time virtual desktop service and service gateway of the same
US9003071B2 (en) * 2013-03-13 2015-04-07 Futurewei Technologies, Inc. Namespace access control in NVM express PCIe NVM with SR-IOV
US10489175B2 (en) * 2013-06-10 2019-11-26 Amazon Technologies, Inc. Pre-configure and pre-launch compute resources
US9256559B2 (en) * 2013-08-19 2016-02-09 International Business Machines Corporation Function transfer using virtualized mapping
CN103942087B (en) * 2014-03-31 2017-11-17 华为技术有限公司 Live migration of virtual machine method and relevant apparatus and group system
CN104281532B (en) * 2014-05-15 2017-04-12 浙江大学 Method for monitoring access to virtual machine memory on basis of NUMA (Non Uniform Memory Access) framework
US9898430B2 (en) * 2014-11-12 2018-02-20 Vmware, Inc. Tracking virtual machine memory modified by a single root I/O virtualization (SR-IOV) device
CN104636186B (en) * 2015-01-27 2018-02-13 华为技术有限公司 Virutal machine memory management method, physical host, PCIE device and its collocation method and migration management equipment

Also Published As

Publication number Publication date
CN104636186A (en) 2015-05-20
CN104636186B (en) 2018-02-13
EP3211530A4 (en) 2018-01-03
EP3211530A1 (en) 2017-08-30
US10496427B2 (en) 2019-12-03
EP3211530B1 (en) 2018-11-14
US20170286149A1 (en) 2017-10-05
WO2016119468A1 (en) 2016-08-04

Similar Documents

Publication Publication Date Title
ES2710625T3 (en) Process of memory management of virtual machine, physical main machine, PCIE device and configuration procedure thereof, and migration management device
US10248468B2 (en) Using hypervisor for PCI device memory mapping
US20210216453A1 (en) Systems and methods for input/output computing resource control
US9465760B2 (en) Method and apparatus for delivering MSI-X interrupts through non-transparent bridges to computing resources in PCI-express clusters
US7571273B2 (en) Bus/device/function translation within and routing of communications packets in a PCI switched-fabric in a multi-host environment utilizing multiple root switches
EP3306870B1 (en) Network configuration method, network system and device
CN108984465B (en) Message transmission method and device
EP3125126A1 (en) Data processing system and data processing method
US10275362B2 (en) Dynamic address translation table allocation
US11194735B2 (en) Technologies for flexible virtual function queue assignment
US10067900B2 (en) Virtualized I/O device sharing within a distributed processing node system
US10645051B2 (en) Memory-mapped input/output (I/O) channel
US8996774B2 (en) Performing emulated message signaled interrupt handling
JP7089333B2 (en) Computer implementation methods, systems, and computer programs for dynamic address translation of virtual machines
CN112306624A (en) Information processing method, physical machine and PCIE (peripheral component interface express) equipment
CN115298656A (en) System and method for scheduling sharable PCIE endpoint devices
US9727521B2 (en) Efficient CPU mailbox read access to GPU memory
CN109857553B (en) Memory management method and device
US10127177B2 (en) Unified device interface for a multi-bus system
US10223284B2 (en) Flexible I/O DMA address allocation in virtualized systems
CN107533528B (en) Data channel allocation
TW201824016A (en) Resource allocation system, apparatus allocation controller, and apparatus recognizing method