WO2022078375A1 - 一种芯片系统、处理虚拟中断的方法及相应装置 - Google Patents
一种芯片系统、处理虚拟中断的方法及相应装置 Download PDFInfo
- Publication number
- WO2022078375A1 WO2022078375A1 PCT/CN2021/123497 CN2021123497W WO2022078375A1 WO 2022078375 A1 WO2022078375 A1 WO 2022078375A1 CN 2021123497 W CN2021123497 W CN 2021123497W WO 2022078375 A1 WO2022078375 A1 WO 2022078375A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- virtual
- interrupt
- processor
- physical processor
- identifier
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 139
- 238000012545 processing Methods 0.000 title claims description 107
- 230000008569 process Effects 0.000 claims description 73
- 230000001960 triggered effect Effects 0.000 claims description 43
- 238000004590 computer program Methods 0.000 claims description 9
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000002093 peripheral effect Effects 0.000 description 44
- 238000010586 diagram Methods 0.000 description 22
- 238000004088 simulation Methods 0.000 description 12
- 230000005540 biological transmission Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 101100016034 Nicotiana tabacum APIC gene Proteins 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45545—Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/24—Handling requests for interconnection or transfer for access to input/output bus using interrupt
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
Definitions
- the present application relates to the field of virtualization technologies, and in particular, to a chip system, a method for processing virtual interrupts, and a corresponding device.
- Virtual interrupt is a necessary part of virtualization technology.
- a virtual machine runs in a computer device.
- Hardware devices such as disks and input/output (I/O) devices in the computer device are Notifications from the virtual machine, as well as various synchronization and coordination tasks within the virtual machine rely on virtual interrupts.
- a virtual interrupt is an event, which can come from various sources, and the processing process for the event will be different for different sources, but such events from each source will be notified in the form of an interrupt received when the virtual machine is running to the virtual machine.
- the host needs to use its own various mechanisms to complete the work of sending the virtual interrupt from the source to the destination virtual machine.
- the control flow of the processor needs to be switched from the executing virtual machine to the host, or from the user mode of the host to the kernel mode of the host, resulting in a large switching overhead.
- Embodiments of the present application provide a chip system, a method for processing virtual interrupts, and a corresponding device, which are used to reduce the switching from a virtual machine to a host machine, or from a user state of a host machine to a kernel state of the host machine due to virtual interrupts. overhead.
- the embodiments of the present application also provide corresponding computer devices, computer storage media, computer program products, and the like.
- a first aspect of the present application provides a chip system, including: a source physical processor, a control device, an intermediate device, a sending device, and a target physical processor, where the source physical processor is used to run a host machine or a virtual machine, and the control device includes a register, and the register It is used to receive information for triggering virtual interrupts, and the information used to trigger virtual interrupts can come from a host machine or a virtual machine; the control device is used to: send the information used to trigger virtual interrupts in the registers to the intermediate device; the intermediate device Used for: triggering the virtual interrupt according to the information for triggering the virtual interrupt, and sending the virtual interrupt to the sending device; the sending device is used for: receiving the virtual interrupt from the intermediate device, and sending the virtual interrupt to the target physical processor.
- the chip system may be a system on chip (system on chip, SOC), and the source physical processor and the target physical processor may each be a processing unit (processing unit), such as a physical core.
- processing unit processing unit
- the control device, the intermediate device and the sending device can all be implemented by hardware circuits or by software.
- the source physical processor and the target physical processor can be physical cores in a multi-core processor.
- the multi-core processor includes multiple physical cores.
- the physical core is the core integrated in the processor.
- the physical core is a processing unit, such as dual-core processing.
- a processor can be understood as a processor with two physical cores. Control means and transmission means may be deployed in the multi-core processor, coupled to the source physical processor and the target physical processor.
- the intermediary device may be deployed in the multi-core processor or on peripheral devices/peripheral components coupled to the multi-core processor.
- a system on a chip may include a multi-core processor and peripheral devices/peripheral components coupled to the multi-core processor. Any physical processor in the chip system can be used as both a source physical processor and a target physical processor.
- a virtual interrupt refers to a hardware device in a computer device, a host machine, a clock of the virtual machine or a virtual processor (virtual processor) of the virtual machine, etc. sent to a virtual machine (virtual machine, VM)
- the hardware device that generates the virtual interrupt may be a disk, a network card, a sound card, a mouse, a hard disk, etc. in the computer device.
- a physical interrupt refers to an interrupt sent by a hardware device to a physical processor. Physical interrupts are handled by the host, while virtual interrupts are handled by the virtual machine.
- a specific implementation manner of the virtual processor mentioned in the various embodiments of this application may be a virtual central processing unit (virtual central processing unit, vCPU).
- vCPU virtual central processing unit
- the "vCPU” mentioned later can also be replaced by “virtual processor” to understand.
- virtual interrupts may include virtual local interrupts, virtual software interrupts, virtual device interrupts, and direct peripheral interrupts.
- the virtual local interrupt refers to an interrupt issued by a virtual local device simulated by the virtual machine or an interrupt issued by a local device of a vCPU of the virtual machine, such as a clock interrupt issued by a timer of a vCPU of the virtual machine.
- a virtual software interrupt is triggered by software, usually refers to an interrupt sent by one vCPU of a virtual machine to another vCPU of the virtual machine.
- a virtual machine can have multiple vCPUs, and these vCPUs can run on different physical processors at a time.
- a virtual device interrupt refers to an interrupt triggered by a host computer emulating a hardware device, such as an interrupt generated by the host computer emulating a virtual machine disk controller or emulating other hardware devices.
- the control device may include at least one register, wherein each register may be configured to receive one type of information for triggering a virtual interrupt.
- each register may be configured to receive one type of information for triggering a virtual interrupt.
- three registers are included, one register is used to receive information for triggering virtual local interrupts, one register is used to receive information used to trigger virtual software interrupts, and one register is used to receive information used to trigger virtual device interrupts.
- only one register may be configured for the virtual interrupt, the information for triggering each type of virtual interrupt is different, and the type of the virtual interrupt can be identified by the information received by the register.
- the sending device may be that each physical processor has one sending device, or multiple physical processors may share one sending device.
- a register dedicated to processing virtual interrupts is set in the control device, so that the host or virtual machine in user mode or kernel mode can directly write information for triggering virtual interrupts into
- the control device can send the information for triggering the virtual interrupt to the intermediate device, the virtual interrupt is triggered by the intermediate device, and the intermediate device sends the virtual interrupt to the sending device, and the sending device sends the virtual interrupt to the Target physical processor.
- the host machine or the virtual machine can directly access the register, and write the information used to trigger the virtual interrupt into the register, so as to send the virtual interrupt out; therefore, compared with the prior art, the solution provided by the present application
- the source physical processor does not need to perform the switch from the virtual machine to the host, nor does the source physical processor need to perform the switch from the user mode of the host to the kernel mode of the host, thereby reducing the switching overhead generated by processing virtual interrupts.
- the performance of the chip system is improved.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used for: receiving the data written by the virtual machine for triggering the virtual local interrupt information
- the sending device is used for: sending the virtual partial interrupt to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the target physical processor and the source physical processor are the same physical processor.
- the intermediary device may be a timer, and the virtual local interrupt may be a clock interrupt.
- a physical processor can only run one vCPU of one virtual machine at a time, and the operation of sending the virtual local interrupt to the virtual machine can be completed by sending the virtual local interrupt to the vCPU. It can be known from this possible implementation that the process of processing the virtual local interrupt does not require the source physical processor to perform switching from the virtual machine to the host, thereby reducing the switching overhead generated by processing the virtual local interrupt and improving the performance of the chip system.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor
- the control device is used to: read the identifier of the second vCPU from the register, and obtain the identifier of the virtual machine; and, send the identifier of the virtual machine and the identifier of the second vCPU to the intermediate device
- the intermediate device is used for: according to the identification of the virtual machine and the identification of the second vCPU, from the first corresponding relationship, determine the target physical processor corresponding to the identification of the virtual machine and the identification of the second vCPU; wherein, the first corresponding relationship uses recording the correspondence between the target physical processor, the second vCPU running on the target processor and the virtual machine; sending the virtual software interrupt to the sending device corresponding to the target physical processor; the sending
- the virtual software interrupt is an interrupt sent by the first vCPU of the virtual machine to the second vCPU of the virtual machine. Therefore, when the first vCPU of the virtual machine wants to trigger the virtual software interrupt, the identifier of the second vCPU needs to be written into the register.
- a virtual machine can have multiple vCPUs, and vCPUs belonging to the same virtual machine can be run on a physical processor in a time-division multiplexing manner. After processor 1 finishes running the vCPU1, it can run the vCPU2 of the virtual machine 1 again. Multiple vCPUs belonging to the same virtual machine can also run on different physical processors, and can run on different physical processors at a time.
- Run different vCPUs for example: run vCPU1 of virtual machine 1 on physical processor 1, and run vCPU2 of virtual machine 1 on physical processor 2.
- the first vCPU runs on the source physical processor
- the second vCPU runs on the target physical processor.
- the control device may acquire the identity of the virtual machine from a register dedicated to storing the identity of the virtual machine running on the source physical processor. Because each virtual machine may have multiple vCPUs, and the identifiers of the vCPUs of different virtual machines may be the same, the control apparatus needs to send the identifier of the virtual machine and the identifier of the second vCPU to the intermediate apparatus.
- the above-mentioned first correspondence can be stored on the intermediate device, and the first correspondence can be located in the in-position vCPU identification group, and each physical processor, each physical processor in the chip system is recorded in the in-position vCPU identification group.
- the present application can target physical processors by searching for the in-position vCPU identification group. It can be known from this possible implementation that the process of processing the virtual software interrupt does not require the source physical processor to perform switching from the virtual machine to the host, thereby reducing the switching overhead caused by processing the virtual software interrupt and improving the performance of the chip system.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine
- the target interrupt number is a host simulation
- the identifier of the interrupt triggered by the hardware device the control device is used to: read the target interrupt number and the identifier of the virtual machine from the register, and send the identifier of the virtual machine and the target interrupt number to the intermediate device; the intermediate device is used for: according to the virtual machine
- the identifier of the machine and the target interrupt number look for the identifier of the first vCPU of the virtual machine corresponding to the identifier of the virtual machine and the target interrupt number in the second correspondence, and the second correspondence is used to record the virtual machine, the target interrupt number and the first vCPU.
- a correspondence between the vCPUs according to the identification of the virtual machine and the identification of the first vCPU, determine the target physical processor corresponding to the identification of the virtual machine and the identification of the first vCPU from the third correspondence; wherein, the third corresponding The relationship is used to record the corresponding relationship between the target physical processor, the first vCPU running on the target processor, and the virtual machine; send the virtual device interrupt to the sending device corresponding to the target physical processor; the sending device is used to: send the virtual device The device interrupt is sent to the first vCPU running on the target physical processor.
- the virtual device interrupt is an interrupt triggered by the simulated hardware device of the host in the user mode.
- the interrupt number of each type of hardware device is different. If the host computer simulates a disk, the target interrupt number is the interrupt number of the disk. Because there can be multiple virtual machines managed by the host, the host needs to write the identifier of the virtual machine and the target interrupt number into the register.
- the second correspondence may be located in the interrupt affinity table.
- the interrupt affinity table can be configured by the virtual machine, so there is one interrupt affinity table for each virtual machine.
- the interrupt affinity table of the virtual machine can be found according to the identifier of the virtual machine, and then the corresponding vCPU is determined from the interrupt affinity table of the virtual machine according to the target interrupt number, and the target interrupt number is 10. If in the interrupt affinity table, the interrupt number 10 corresponds to vCPU ID1, it can be determined that the vCPU ID corresponding to the target interrupt number is 1. After the routing device determines that the vCPU ID is 1, it can find the physical processor corresponding to the vCPU ID1 according to the in-position vCPU identification group. The meaning of the in-position vCPU identification group can be understood by referring to the description of the aforementioned virtual software interrupt.
- the third correspondence It can also be understood with reference to the foregoing first correspondence. It can be seen from this possible implementation that the process of processing the virtual device interrupt does not require the source physical processor to perform switching from the user mode of the host to the kernel mode of the host, thereby reducing the switching overhead generated by processing the virtual device interrupt and improving the performance of the virtual device. the performance of the system-on-chip.
- the intermediate device includes an address register, and the address register is used to store the address of the second correspondence in the memory and the identifier of the virtual machine; the intermediate device is further configured to: according to the identifier of the virtual machine The address register is found, and the second correspondence is obtained from the memory according to the address in the address register.
- the above-mentioned interrupt affinity table may be stored in an intermediate device or in a memory, and the intermediate device may provide an address register for each physical processor, and the address register may be a base
- the address register, the base address register can store the address of the interrupt affinity table in the memory and the identifier of the virtual machine. This avoids taking up too much storage space for the intermediate device.
- the sending device is configured to: write the virtual interrupt into a to-be-processed register of the target physical processor, and the to-be-processed register is used to receive a command of the process executed by the target physical processor.
- the to-be-processed register is used to receive a command to be executed by the target physical processor next, and the virtual interrupt is written into the to-be-processed register, then the target physical processor will execute the next command.
- This virtual interrupt can interrupt the currently executing process, thereby shielding the action of switching to the host in the existing solution. Reduces the switching overhead of the target physical processor from the virtual machine to the host.
- a second aspect of the present application provides a chip system
- the chip system includes a source physical processor, a control device, an intermediate device, a sending device, and a target physical processor, where the source physical processor is used to run a host machine or a virtual machine; the chip system further Including the hardware device that the virtual machine communicates directly with the virtual machine; the intermediate device is used to: receive the pass-through peripheral interrupt triggered by the hardware device; according to the physical interrupt number of the pass-through peripheral interrupt, find the corresponding virtual machine ID and ID from the virtual interrupt table.
- Virtual interrupt number the virtual interrupt table records the correspondence between the physical interrupt number and the virtual machine identifier and the virtual interrupt number; the corresponding interrupt affinity table is determined according to the virtual machine identifier, and the virtual machine is determined from the interrupt affinity table.
- the identifier of the target virtual processor vCPU corresponding to the virtual interrupt number, and the corresponding relationship between the virtual interrupt number and the virtual processor is recorded in the interrupt affinity table; According to the identifier of the target vCPU, determine the target vCPU from the in-position vCPU identifier group The identifier of the corresponding target physical processor; the pass-through peripheral interrupt is sent to the sending device corresponding to the target physical processor. The sending means sends the pass-through peripheral interrupt to the virtual machine running on the target physical processor.
- the pass-through peripheral device interrupt refers to an interrupt that is triggered by an external device passed through to the virtual machine, for example, an interrupt generated by a graphics card passed through to the virtual machine.
- the virtual interrupt table, the interrupt affinity table and the in-position vCPU identification group will be used in turn.
- the interrupt affinity table and the in-position vCPU identification group can refer to the possible The description in the implementation mode is understood, and the virtual interrupt table is introduced below.
- the virtual interrupt table maintains the corresponding relationship between the physical interrupt number and the ID of the virtual machine and the virtual interrupt number. Entering a physical interrupt number can output the ID of the virtual machine and the virtual interrupt number.
- the intermediate device receives the physical interrupt number sent by the pass-through peripheral, and searches the virtual interrupt table for the identifier and virtual interrupt number of the corresponding virtual machine through the physical interrupt number, for example: input a physical interrupt Number 100, the ID 1 of the virtual machine and the virtual interrupt number 10 can be output. Then, according to the ID 1 of the virtual machine and the virtual interrupt number 10, the interrupt affinity table is searched, and the corresponding vCPU ID is found, for example, the vCPU ID is found to be 1.
- the intermediate device can send the pass-through peripheral interrupt to the corresponding sending device of the physical processor 1, by The sending device sends the pass-through peripheral interrupt to the vCPU corresponding to the vCPU ID1.
- the sending process can be completed by searching three corresponding relationships, which improves the flexibility of the cut-through peripheral interrupt processing.
- a third aspect of the present application provides a control device.
- the control device is applied to a chip system.
- the chip system further includes a source physical processor, an intermediate device, and a sending device.
- the source physical processor is used to run a host machine or a virtual machine, and the control device includes a register. ;
- the register is used to receive the information used to trigger the virtual interrupt, and the information used to trigger the virtual interrupt comes from the host or the virtual machine;
- the control device is used to: read the information used to trigger the virtual interrupt from the register, and use it for The information for triggering the virtual interrupt is sent to the intermediate device, and the information for triggering the virtual interrupt is used to make the intermediate device trigger the virtual interrupt, and the virtual interrupt is sent by the sending device to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive the data written by the virtual machine for triggering the virtual local interrupt
- the control device is used to: send the information used to trigger the virtual partial interrupt to the intermediate device, and the information used to trigger the virtual partial interrupt is used to make the intermediate device trigger the virtual partial interrupt, and the virtual partial interrupt is sent by the sending device to the virtual machine
- the first virtual processor vCPU of the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first VCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor;
- the control device is used to: read the identifier of the second vCPU from the register, and obtain the identifier of the virtual machine; and, send the identifier of the virtual machine and the identifier of the second vCPU to the intermediate device , the identifier of the virtual machine and the identifier of the second vCPU are used by the intermediary device to determine the target physical processor and trigger a virtual software interrupt, and the virtual software interrupt is sent by the sending device to the second vCPU of the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine, and the target interrupt number is a host simulation
- the identifier of the interrupt triggered by the hardware device; the control device is used to: read the target interrupt number and the identifier of the virtual machine from the register, and send the identifier of the virtual machine and the target interrupt number to the intermediate device, the identifier of the virtual machine and the target interrupt
- the number is used by the intermediate device to determine the target physical processor and trigger the virtual device interrupt, and the virtual device interrupt is sent by the sending device to the first vCPU of the virtual machine of the target physical processor.
- a fourth aspect of the present application provides an intermediate device.
- the intermediate device is applied to a chip system.
- the chip system further includes a source physical processor, a control device, a sending device, and a target physical processor.
- the source physical processor is used to run a host machine or a virtual machine.
- the control device includes a register; the register is used to receive the information used to trigger the virtual interrupt, and the information used to trigger the virtual interrupt comes from the host machine or the virtual machine; the intermediate device is used to: receive the information used to trigger the virtual interrupt from the control device , triggering the virtual interrupt according to the information for triggering the virtual interrupt, and sending the virtual interrupt to the sending device, and the virtual interrupt is sent by the sending device to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive the virtual local interrupt written by the virtual machine for triggering the virtual local interrupt
- the intermediate device is used for: triggering the virtual local interrupt according to the information used to trigger the virtual local interrupt, and sending the virtual local interrupt to the sending device, and the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine , the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor
- the intermediate device is used for: receiving the identifier of the virtual machine and the identifier of the second vCPU from the control device; according to the identifier of the virtual machine and the identifier of the second vCPU, from the first correspondence Determine the target physical processor corresponding to the identifier of the virtual machine and the identifier of the second vCPU; wherein the first correspondence is used to record the correspondence between the target physical processor, the second vCPU running on the target processor, and the virtual machine triggering a virtual software interrupt; sending the virtual software interrupt to a sending device corresponding to the target physical processor, and the virtual software interrupt is sent by the sending device to the second vCPU of the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine
- the target interrupt number is a host simulation
- the identifier of the interrupt triggered when the hardware device is used; the intermediate device is used to: receive the identifier of the virtual machine and the target interrupt number from the control device; Identifies the identifier of the first vCPU of the virtual machine corresponding to the target interrupt number, and the second correspondence is used to record the correspondence between the virtual machine, the target interrupt number and the first vCPU; according to the identifier of the virtual machine and the identifier of the first vCPU , determine the target physical processor corresponding to the identifier of the virtual machine and the identifier of the first vCPU from the third correspondence; wherein, the third correspondence is used to record the target physical processor, the first vCPU running on the target processor, and Correspondence between virtual machines; triggering a virtual
- the intermediate device includes an address register, and the address register is used to store the address of the second correspondence in the memory and the identifier of the virtual machine; the intermediate device is further configured to: according to the identifier of the virtual machine The address register is found, and the second correspondence is obtained from the memory according to the address in the address register.
- a fifth aspect of the present application provides a sending device.
- the sending device is applied to a chip system.
- the chip system further includes a source physical processor, an intermediate device, and a target physical processor control device.
- the source physical processor is used to run a host machine or a virtual machine.
- the control device includes a register; the register is used to receive the information used to trigger the virtual interrupt, and the information used to trigger the virtual interrupt comes from the host machine or the virtual machine; the sending device is used to: receive the virtual interrupt from the intermediate device, and send the virtual interrupt to the virtual interrupt.
- the interrupt is sent to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the sending device is configured to: receive the virtual local interrupt from the intermediate device, and The virtual local interrupt is sent to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor;
- the sending device is used for: receiving the virtual software interrupt from the intermediate device, and sending the virtual software interrupt to the second vCPU running on the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into a register by the host and an identifier of the virtual machine, and the target interrupt number is a host simulation
- the identifier of the interrupt triggered by the hardware device; the sending device is used for: receiving the virtual device interrupt from the intermediate device, and sending the virtual device interrupt to the first vCPU running on the target physical processor.
- the sending device is configured to: write the virtual interrupt into a pending register of the target physical processor, and the pending register is used to receive a command of the process executed by the target physical processor.
- a sixth aspect of the present application provides a method for processing virtual interrupts.
- the method is applied to a control device in a chip system.
- the chip system further includes a source physical processor, an intermediate device, a sending device, and a target physical processor.
- the source physical processor uses For running a host machine or a virtual machine, the control device includes a register; the register is used for receiving information for triggering a virtual interrupt, and the information for triggering a virtual interrupt comes from the host machine or the virtual machine, and the method includes: reading from the register The information used to trigger the virtual interrupt; the information used to trigger the virtual interrupt is sent to the intermediate device, the information used to trigger the virtual interrupt is used by the intermediate device to trigger the virtual interrupt, and the virtual interrupt is sent by the sending device to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive the data written by the virtual machine and used to trigger the virtual local interrupt
- the information used to trigger the virtual local interrupt is used to make the intermediate device trigger the virtual local interrupt
- the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first VCPU of the virtual machine, and the second vCPU is running on the vCPU of the virtual machine on the target physical processor; the method further includes: acquiring the identifier of the virtual machine; sending the identifier of the virtual machine to the intermediate device, and the identifier of the virtual machine and the identifier of the second vCPU are used by the intermediate device to determine the target physical processing and triggers a virtual software interrupt, and the virtual software interrupt is sent by the sending device to the second vCPU of the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine, and the target interrupt number is a host simulation
- the identifier of the interrupt triggered by the hardware device; the identifier of the virtual machine and the target interrupt number are used by the intermediate device to determine the target physical processor and trigger the virtual device interrupt, and the virtual device interrupt is sent by the sending device to the first vCPU of the target physical processor.
- a seventh aspect of the present application provides a method for processing virtual interrupts.
- the method is applied to an intermediate device in a chip system.
- the chip system further includes a source physical processor, a control device, a sending device, and a target physical processor.
- the source physical processor is used for Running the host or virtual machine
- the control device includes a register; the register is used to receive information for triggering a virtual interrupt, the information for triggering a virtual interrupt comes from the host or the virtual machine
- the method includes: receiving the information from the control device. information for triggering the virtual interrupt; triggering the virtual interrupt according to the information for triggering the virtual interrupt; sending the virtual interrupt to the sending device, and the virtual interrupt is sent by the sending device to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive the virtual local interrupt written by the virtual machine for triggering the virtual local interrupt
- the information used to trigger the virtual local interrupt is used to trigger the virtual local interrupt
- the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor; the above steps: triggering the virtual interrupt according to the information for triggering the virtual interrupt, including: according to the identifier of the virtual machine and the identifier of the second vCPU, determining from the first correspondence relationship with the virtual machine The target physical processor corresponding to the identifier of the second vCPU and the identifier of the second vCPU; wherein, the first correspondence is used to record the correspondence between the target physical processor, the second vCPU running on the target processor and the virtual machine; trigger the virtual software interrupt, the virtual software interrupt is sent by the sending means to the second vCPU of the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine, and the target interrupt number is a host simulation
- the identifier of the interrupt triggered when the hardware device the above steps: triggering the virtual interrupt according to the information for triggering the virtual interrupt, including: according to the identifier of the virtual machine and the target interrupt number, searching for the identifier and the virtual machine in the second corresponding relationship.
- the identifier of the first vCPU of the virtual machine corresponding to the target interrupt number, and the second correspondence is used to record the corresponding relationship between the virtual machine, the target interrupt number and the first vCPU; according to the identifier of the virtual machine and the identifier of the first vCPU, from
- the target physical processor corresponding to the identifier of the virtual machine and the identifier of the first vCPU is determined; wherein, the third correspondence is used to record the target physical processor, the first vCPU running on the target processor, and the virtual machine
- the corresponding relationship between the virtual device interrupts is triggered, and the virtual device interrupts are sent by the sending device to the first vCPU of the target physical processor.
- the method further includes: finding an address register according to an identifier of the virtual machine, obtaining a second correspondence from a memory according to an address in the address register, and the address register is used to store the second correspondence The address of the correspondence in memory and the identifier of the virtual machine.
- An eighth aspect of the present application provides a method for processing virtual interrupts.
- the method is applied to a sending device in a chip system.
- the chip system further includes a source physical processor, an intermediate device, a control device, and a target physical processor.
- the source physical processor is used for Running a host machine or a virtual machine
- the control device includes a register; the register is used for receiving information for triggering a virtual interrupt, the information for triggering a virtual interrupt comes from the host machine or the virtual machine, and the method includes: receiving from the intermediate device. Virtual interrupt; sends a virtual interrupt to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor; the above steps: sending the virtual interrupt to the target physical processor, including: The virtual local interrupt is sent to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor; the above steps: sending the virtual interrupt to the target physical processor includes: sending the virtual software interrupt to the second vCPU running on the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into a register by the host and an identifier of the virtual machine, and the target interrupt number is a host simulation
- the identifier of the interrupt triggered by the hardware device; the above steps: sending the virtual interrupt to the target physical processor includes: sending the virtual device interrupt to the first vCPU running on the target physical processor.
- the method further includes: writing the virtual interrupt into a to-be-processed register of the target physical processor, where the to-be-processed register is used to receive a command of the process executed by the target physical processor.
- a ninth aspect of the present application provides a control device, the control device is applied in a chip system, the chip system further includes a source physical processor, an intermediate device, a sending device and a target physical processor, and the source physical processor is used to run a host or A virtual machine, the control device includes a register; the register is used to receive information for triggering a virtual interrupt, and the information for triggering a virtual interrupt comes from a host machine or a virtual machine, and the control device includes: a reading unit for reading from the register.
- the sending unit is used to send the information used to trigger the virtual interrupt to the intermediate device, the information used to trigger the virtual interrupt is used by the intermediate device to trigger the virtual interrupt, and the virtual interrupt is sent by the sending device to the intermediate device.
- Target physical processor
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive the virtual local interrupt written by the virtual machine for triggering the virtual local interrupt
- the information used to trigger the virtual local interrupt is used to make the intermediate device trigger the virtual local interrupt
- the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes an identifier of the second vCPU written into the register by the first VCPU of the virtual machine, and the second vCPU is running on the vCPU of the virtual machine on the target physical processor
- the control device further includes a processing unit, the processing unit is used to obtain the identifier of the virtual machine
- the sending unit is used to send the identifier of the virtual machine to the intermediate device, the identifier of the virtual machine and the identifier of the second vCPU are used by the intermediary device to determine the target physical processor and trigger a virtual software interrupt
- the virtual software interrupt is sent by the sending device to the second vCPU of the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine, and the target interrupt number is a host simulation
- the identifier of the interrupt triggered by the hardware device; the identifier of the virtual machine and the target interrupt number are used by the intermediate device to determine the target physical processor and trigger the virtual device interrupt, and the virtual device interrupt is sent by the sending device to the first vCPU of the target physical processor.
- a tenth aspect of the present application provides an intermediate device.
- the intermediate device is applied to a chip system, and the chip system further includes a source physical processor, a control device, a sending device, and a target physical processor.
- the source physical processor is used to run a host or A virtual machine
- the control device includes a register; the register is used to receive information for triggering a virtual interrupt, the information for triggering a virtual interrupt comes from a host machine or a virtual machine
- the intermediate device includes: a receiving unit for receiving information from the control device The information used to trigger the virtual interrupt; the processing unit is used to trigger the virtual interrupt according to the information used to trigger the virtual interrupt; the sending unit is used to send the virtual interrupt to the sending device, and the virtual interrupt is sent by the sending device to the target physical processor .
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive the data written by the virtual machine and used to trigger the virtual local interrupt
- the information used to trigger the virtual local interrupt is used to trigger the virtual local interrupt
- the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used for triggering the virtual interrupt includes an identifier of a second vCPU written into a register by the first vCPU of the virtual machine, and the second vCPU is running on The vCPU of the virtual machine on the target physical processor;
- the processing unit is used to determine, according to the identifier of the virtual machine and the identifier of the second vCPU, the target physical device corresponding to the identifier of the virtual machine and the identifier of the second vCPU from the first correspondence processor; wherein, the first correspondence is used to record the correspondence between the target physical processor, the second vCPU running on the target processor, and the virtual machine; triggering a virtual software interrupt, the virtual software interrupt is sent by the sending device to the target physical processor The processor's second vCPU.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host machine and an identifier of the virtual machine, and the target interrupt number is the host machine simulation
- the identifier of the interrupt triggered during the hardware device; the processing unit is used to search the first vCPU of the virtual machine corresponding to the identifier of the virtual machine and the target interrupt number in the second correspondence according to the identifier of the virtual machine and the target interrupt number.
- the second correspondence is used to record the correspondence between the virtual machine, the target interrupt number and the first vCPU; according to the identification of the virtual machine and the identification of the first vCPU, determine the identification and The target physical processor corresponding to the identifier of the first vCPU; wherein, the third corresponding relationship is used to record the corresponding relationship between the target physical processor, the first vCPU running on the target processor, and the virtual machine;
- the device interrupt is sent by the sending means to the first vCPU of the target physical processor.
- the processing unit is further configured to find the address register according to the identifier of the virtual machine, obtain the second correspondence from the memory according to the address in the address register, and the address register is used for storing The second corresponding relationship is the address in the memory and the identifier of the virtual machine.
- An eleventh aspect of the present application provides a sending device.
- the sending device is applied to a chip system.
- the chip system further includes a source physical processor, an intermediate device, a control device, and a target physical processor.
- the source physical processor is used to run a host machine. or virtual machine
- the control device includes a register; the register is used to receive information used to trigger a virtual interrupt, the information used to trigger a virtual interrupt comes from the host machine or the virtual machine
- the sending device includes: a receiving unit for receiving information from an intermediate The virtual interrupt of the device; the sending unit is used to send the virtual interrupt to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the sending unit is configured to send the virtual local interrupt to the virtual machine's
- the first virtual processor vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information used to trigger the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running the vCPU of the virtual machine on the target physical processor; the sending unit is configured to send the virtual software interrupt to the second vCPU running on the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information used to trigger the virtual interrupt includes a target interrupt number written into the register by the host and an identifier of the virtual machine, and the target interrupt number is the host machine
- the identifier of the interrupt triggered when the hardware device is simulated; the sending unit is configured to send the virtual device interrupt to the first vCPU running on the target physical processor.
- the sending unit is configured to write the virtual interrupt into a to-be-processed register of the target physical processor, and the to-be-processed register is used to receive a command of the process executed by the target physical processor.
- a twelfth aspect of the present application provides a computer-readable storage medium storing one or more computer-executable instructions.
- the processor executes any one of the above-mentioned sixth aspect or the sixth aspect. method of implementation.
- a thirteenth aspect of the present application provides a computer-readable storage medium storing one or more computer-executable instructions.
- the processor executes any one of the above seventh aspect or the seventh aspect. method of implementation.
- a fourteenth aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions.
- the processor executes the eighth aspect or any of the eighth aspects. method of implementation.
- a fifteenth aspect of the present application provides a computer program product that stores one or more computer-executable instructions.
- the processor executes any possible implementation of the sixth aspect or the sixth aspect. way method.
- a sixteenth aspect of the present application provides a computer program product that stores one or more computer-executable instructions.
- the processor executes any possible implementation of the seventh aspect or the seventh aspect. way method.
- a seventeenth aspect of the present application provides a computer program product that stores one or more computer-executable instructions.
- the processor executes the eighth aspect or any of the possible implementations of the eighth aspect. way method.
- An eighteenth aspect of the present application provides a computer device, where the computer device includes the chip system described in the first aspect or any possible implementation manner of the first aspect.
- a nineteenth aspect of the present application provides a chip system, where the chip system includes a source physical processor, a control device and a sending device, and a target physical processor.
- the control device is the aforementioned third aspect, the ninth aspect, any possible implementation manner of the third aspect or any possible implementation manner of the ninth aspect
- the sending device is any of the aforementioned fifth aspect, the eleventh aspect, and the eleventh aspect.
- the chip system may further include the intermediate device described in any possible implementation manner of the foregoing fourth aspect, tenth aspect, or tenth aspect, or any possible implementation manner of the fourth aspect.
- the chip system provided in the nineteenth aspect is a processor, the source physical processor and the target physical processor are physical cores in the processor, and the control device is located in the processor and is connected to the source physical processor.
- the physical core may include both a control device and a transmission device.
- a register dedicated to processing virtual interrupts is set in the control device.
- the host machine or virtual machine in the user state can directly write the information used to trigger the virtual interrupt into the register, and control the
- the device can send the information for triggering the virtual interrupt to the intermediate device, the virtual interrupt is triggered by the intermediate device, and the intermediate device sends the virtual interrupt to the sending device, and the sending device sends the virtual interrupt to the target physical processor.
- the host machine or the virtual machine can directly access the register, and write the information used to trigger the virtual interrupt into the register, so as to send the virtual interrupt out; therefore, compared with the prior art, the solution provided by the present application
- the source physical processor does not need to perform switching from the virtual machine to the host, or perform switching from the user mode of the host to the kernel mode of the host, thereby reducing the switching overhead generated by processing virtual interrupts and improving the performance of the chip system .
- FIG. 1 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of a type of virtual interrupt provided by an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of a chip system provided by an embodiment of the present application.
- FIG. 4 is another schematic structural diagram of a chip system provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of a virtual clock interruption provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of an example of an in-position virtual processor identification group provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of an example of a virtual software interrupt provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a routing device provided by an embodiment of the present application.
- FIG. 9 is a schematic diagram of an example of a cut-through peripheral interrupt provided by an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of a chip system in a RISC-V microarchitecture provided by an embodiment of the present application
- FIG. 11 is a schematic diagram of a process of processing clock interrupts in the RISC-V microarchitecture provided by an embodiment of the present application.
- FIG. 12 is a schematic diagram of a process for processing virtual software interrupts in the RISC-V microarchitecture provided by an embodiment of the present application
- FIG. 13 is a schematic diagram of a process for processing virtual device interrupts in the RISC-V microarchitecture provided by an embodiment of the present application
- FIG. 14 is a schematic diagram of another process for processing virtual device interrupts in the RISC-V microarchitecture provided by an embodiment of the present application.
- FIG. 15 is a schematic diagram of a process of processing a pass-through peripheral interrupt in the RISC-V micro-architecture provided by an embodiment of the present application;
- FIG. 16 is a schematic diagram of an embodiment of a method for processing a virtual interrupt provided by an embodiment of the present application.
- FIG. 17 is a schematic diagram of an embodiment of a control device provided by an embodiment of the present application.
- FIG. 18 is a schematic diagram of an embodiment of an intermediate device provided by an embodiment of the present application.
- FIG. 19 is a schematic diagram of an embodiment of a sending apparatus provided by an embodiment of the present application.
- FIG. 20 is another schematic structural diagram of a computer device provided by an embodiment of the present application.
- Embodiments of the present application provide a chip system, a method for processing virtual interrupts, and a corresponding device, which are used to reduce the switching from a virtual machine to a host machine, or from a user state of a host machine to a kernel state of the host machine due to virtual interrupts. overhead.
- the embodiments of the present application also provide corresponding computer devices, computer storage media, computer program products, and the like. Each of them will be described in detail below.
- Virtualization is to virtualize hardware resources (such as processors, storage space in memory, and network resources) in the hardware layer of a computer device and share them for use by multiple virtual computers.
- a virtual computer is a general term for a running environment virtualized by software in all types of virtualization devices, and the concept includes virtual machines or containers.
- the computer device 100 includes a hardware layer 112 , a host layer 109 and a virtualization layer, and the virtualization layer includes virtual machines 101 and 102 .
- the number of virtual machines may be more or less, and only two are taken as an example here.
- Hardware layer 112 includes processor system 114 , memory 113 , communication interface 115 and interrupt controller 116 .
- a virtual machine is simulated on a computer device through virtualization software.
- a guest operating system (guest OS) (105 and 106 in Fig. 1) can be installed on the virtual machine (101 and 102 in Fig. 1), and one or more applications (103 in Fig. 1) run on the guest operating system. and 104).
- Virtual machines can also access network resources. For applications running in a virtual machine, it is like working on a real computer.
- Virtual processor (107 and 108 in Figure 1): Under the virtualization technology, it represents a processing unit provided to a virtual computer in a shared or sharded manner, such as a virtual central processing unit (vCPU).
- a virtual computer can be served by one or more virtual processors. When there are multiple virtual processors, usually one virtual processor is the master virtual processor, and the others are slave virtual processors. Other virtual hardware resources such as virtual memory included in the virtual machine are not shown in FIG. 1 .
- the virtual processor is virtualized by virtualization software, and its operation is actually realized by the processor or physical core of the host machine reading and running the software program. For example, a physical core reads the software program and assists in the hardware of the physical core.
- the software program is run in a specific mode of virtualization (eg x86's non-Root mode) to implement a virtual processor.
- Multiple virtual processors of a virtual machine can be located on different physical cores.
- the vCPU mentioned in the various embodiments of this application is an optional specific implementation manner of the virtual processor.
- the "vCPU" mentioned in the various embodiments may be understood as being replaced by a "virtual processor”.
- Virtual processor trap (trap in) and virtual processor trap (trap out) The virtualization system includes two modes: host mode and guest mode.
- the host mode can also be referred to as the privilege level of the host, such as the user mode of the host or the kernel mode of the host, and the guest mode can also be referred to as the privilege level of the VM, such as the user mode of the VM or the kernel mode of the VM.
- trapping virtual
- the process of trapping can also be understood as the switching of the physical processor from the running host to the running virtual machine; when the physical processor leaves the guest mode, it is called trapping (virtual).
- the process of trapping can also be understood as the physical processor switching from running the virtual machine to running the host. After the trap, the physical processor will temporarily not execute the code of the virtual processor, so it can be understood that the virtual processor is not running at this time.
- running a virtual machine on a physical processor it will run one virtual processor of the virtual machine.
- a virtual machine can have multiple virtual processors.
- a physical processor only runs one virtual processor of the virtual machine at a time. Multiple virtual processors of the same virtual machine can run on the physical processor in a time-division multiplexing manner. For example, run vCPU1 of virtual machine 1 on physical processor 1 first, and physical processor 1 ends the vCPU1. After running, you can run the vCPU2 of the virtual machine 1 again.
- the host layer 109 is used as a management layer to complete the management and allocation of hardware resources, and to provide various virtual hardware resources for virtual machines, such as virtual processors (107, 108), virtual memory, virtual disks, virtual network cards, etc., It can also implement scheduling and isolation of virtual machines.
- the host layer 109 may include a host operating system 111 and a virtual monitoring device, such as a virtual machine monitor 110 (virtual machine monitor, VMM).
- the virtual monitor 110 may be deployed within the host operating system 111 , or may be deployed outside the host operating system 111 .
- the virtual monitoring device may also be referred to as a hypervisor or other types of virtual monitoring devices.
- the host layer 109 may also be referred to as a virtualization platform, and sometimes the host layer may also be simply referred to as a host.
- the privilege level of the host includes user mode and kernel mode.
- Hardware layer 112 The hardware platform on which the virtualization environment runs.
- the hardware layer may include a variety of hardware.
- the hardware layer may include a processor system 114 and a memory 113, and may also include a communication interface 115, such as a network interface card (NIC); and may also include interrupt control 116, input/output (I/O) devices, and the like.
- the processor system 114 may include one or more processors, such as processor 1 and processor 2 as listed in FIG. 1 .
- Each processor may include multiple physical cores, and the processor may further include multiple registers, such as general-purpose registers, floating-point registers, and the like.
- the processor system 114 may include multiple processors, such as processor 1 and processor 2 in FIG. 1 . Both the processor 1 and the processor 2 in FIG. 1 are physical processors, such as a source physical processor and a target physical processor. Each physical processor can be understood as a physical core.
- the processor system 114 may be embodied as a multi-core processor, and the multi-core processor includes a source physical processor and a target physical processor.
- a virtual processor and a physical core can be in a bound relationship, that is, a virtual processor is fixed to run on a certain physical core and cannot be scheduled to run on other physical cores, then the virtual processor is a bound core; a virtual processor If it can be scheduled to run on different physical cores as required, the virtual processor is a non-core bound.
- the interrupt controller 116 is set between the hardware that triggers the interrupt request and the processor, and is mainly used to collect the interrupt request generated by each hardware and send it to the processor according to a certain priority or other rules.
- Interrupts can include virtual interrupts and physical interrupts.
- Virtual interrupts refer to hardware devices in computer equipment, the host, the clock of the virtual machine, or the virtual central processing unit (vCPU) of the virtual machine.
- virtual machine, VM) interrupt the hardware device that generates the virtual interrupt may be a disk, a network card, a sound card, a mouse, a hard disk, etc. in the computer device.
- a physical interrupt refers to an interrupt notified to a physical processor by a hardware device. Physical interrupts are handled by the host, while virtual interrupts are handled by the virtual machine.
- ISR interrupt service routine
- An interrupt service routine also known as an interrupt handler, is a program used to process interrupt requests.
- the processor receives an interrupt request, it temporarily stops the execution of the current program and executes the interrupt service program corresponding to the interrupt request.
- the storage space (address space) provided by the memory 113 is divided for use by the virtual machine and the host machine.
- the host physical address (HPA) refers to the physical address space that the local host (host) can use;
- the host virtual address (HVA) is the virtual address that the local host (host) can use. space.
- the guest physical address (GPA) is the physical address space usable by the guest operating system of the virtual machine;
- the guest virtual address (GVA) is the virtual address space usable by the guest operating system of the virtual machine.
- the computer device 100 may be a physical device, such as a server or a terminal device.
- the end device may be a handheld device with wireless connectivity, or other processing device connected to a wireless modem.
- it can be a mobile phone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), a wearable device and an e-book reader (e -book reader), etc.; it can also be a portable, pocket-sized, hand-held, computer built-in or vehicle-mounted mobile device.
- the virtual machine or the host machine in the above-mentioned computer device 100 may send the information for triggering the virtual interrupt, and then the corresponding process of processing the virtual interrupt is completed by the chip system provided in the embodiment of the present application.
- the chip system provided by the embodiment of the present application may include the interrupt controller and the processor system in the foregoing FIG. 1 , or may include the interrupt controller or the processor system in the foregoing FIG. 1 .
- the virtual interrupt may include a virtual local interrupt (virtual local interrupt), a virtual software interrupt (virtual software interrupt), and a virtual device interrupt (virtual device interrupt) and direct peripheral interrupt.
- the virtual local interrupt refers to an interrupt simulated by a virtual machine, such as an interrupt issued by a virtual local device such as a virtual timer and a virtual mouse, or an interrupt issued by a local device of a vCPU of the virtual machine, such as the timing of a vCPU of the virtual machine.
- the interrupt issued by the timer is also called the clock interrupt.
- the clock interrupt refers to the interrupt issued by the timer when the time point configured by the virtual machine is reached by the timer.
- the virtual software interrupt is triggered by software, usually refers to the interrupt sent by one vCPU of the virtual machine to another vCPU of the virtual machine, such as the interrupt sent by the first vCPU belonging to the same virtual machine to the second vCPU in Figure 2,
- a virtual machine can have multiple vCPUs, and these vCPUs can run on different physical processors at a time to perform different tasks of the virtual machine. When the tasks executed by different vCPUs have dependencies or need to be scheduled, they will be A virtual software interrupt has occurred.
- a virtual device interrupt refers to an interrupt triggered by a host computer emulating a hardware device, such as an interrupt generated by the host computer emulating a virtual machine disk controller or emulating other hardware devices.
- Pass-through peripheral interrupts refer to interrupts that are triggered by external devices that are passed through to the virtual machine, for example, the interrupts generated by the graphics card passed through to the virtual machine.
- an embodiment of the present application provides a chip system, in the process of processing virtual interrupts, it is not necessary to switch the physical processor running the virtual machine from the virtual machine to the host machine, or from the user mode of the host machine to the host machine.
- the kernel mode can save switching overhead.
- the chip system includes: a source physical processor, a control device, an intermediate device, a sending device, and a target physical processor.
- the source physical processor is used to run a host machine or a virtual machine
- the control device includes Register, the register is used to receive the information for triggering the virtual interrupt, the information for triggering the virtual interrupt can come from the host machine or the virtual machine;
- the control device is used for: sending the information in the register for triggering the virtual interrupt to the middle device;
- the intermediate device is used for: triggering the virtual interrupt according to the information for triggering the virtual interrupt, and sending the virtual interrupt to the sending device;
- the sending device is used for: receiving the virtual interrupt from the intermediate device, and sending the virtual interrupt to the target physical device processor.
- the chip system can be applied to the computer device shown in FIG. 1 above, and the chip system can be the interrupt controller or the processor system in the above-mentioned FIG. 1 .
- the chip system provided in the embodiments of the present application may be a system on chip (SOC), and the source physical processor and the target physical processor may be respectively a processing unit.
- the source physical processor or the target physical processor may be The physical core is located in the same processor; the source physical processor and the target physical processor can also be different processors located in the same chip system.
- the control device, the intermediate device and the sending device can all be implemented by hardware circuits. Realized.
- the control device and the sending device can be deployed in the multi-core processor, coupled with the source physical processor and the target physical processor.
- the intermediate device can be deployed in the multi-core processor, or can be deployed in the multi-core processor coupled with the multi-core processor.
- a system-on-chip may include a multi-core processor and peripheral devices/peripheral components coupled with the multi-core processor. Any physical processor in the system-on-chip can be used as either a source physical processor or a target physical processor device.
- the source physical processor and the target physical processor are used in this application. It should be noted that the source physical processor and the target physical processor may be two physical cores in a multi-core processor, or may be located in different processors. of two physical cores. In an implementation manner, the source physical processor and the target physical processor may be the same physical entity. For example, in the scenario of a virtual partial interrupt, the source physical processor and the target physical processor may be the same physical processor.
- the control device may include at least one register, wherein each register may be configured to receive one type of information for triggering a virtual interrupt.
- each register may be configured to receive one type of information for triggering a virtual interrupt.
- three registers are included, one register is used to receive information for triggering virtual local interrupts, one register is used to receive information used to trigger virtual software interrupts, and one register is used to receive information used to trigger virtual device interrupts.
- only one register may be configured for the virtual interrupt, the information for triggering each type of virtual interrupt is different, and the type of the virtual interrupt can be identified by the information received by the register.
- the sending device may be that each physical processor has one sending device, or multiple physical processors may share one sending device.
- a register dedicated to processing virtual interrupts is set in the control device.
- the host machine or virtual machine in the user state can directly write the information used to trigger the virtual interrupt into the register, and control the
- the device can send the information for triggering the virtual interrupt to the intermediate device, the virtual interrupt is triggered by the intermediate device, and the intermediate device sends the virtual interrupt to the sending device, and the sending device sends the virtual interrupt to the target physical processor,
- the source physical processor does not need to perform switching from the virtual machine to the host, or perform switching from the user mode of the host to the kernel mode of the host, thereby reducing the switching overhead generated by processing virtual interrupts and improving the performance of the chip system .
- the intermediate device can be a virtual local interrupt generating device or a routing device. If the virtual interrupt is a virtual local interrupt, the intermediate device can be called a local interrupt generating device (such as a timer). If the virtual interrupt is a virtual local interrupt If it is a virtual software interrupt or a virtual device interrupt, the intermediate device may be called a routing device.
- register 1 is used for receiving information for triggering virtual device interrupt
- register 2 is used for receiving information for triggering virtual software interrupt
- register 3 is used for receiving information for triggering virtual local interrupt.
- the source physical processor is used to run the host or virtual machine, and both the host and the virtual machine can have permission level 1 and permission level 2, wherein permission level 1 can be user mode, permission level 2 Can be in kernel state.
- permission level 1 can be user mode
- permission level 2 Can be in kernel state.
- the states corresponding to the first permission level and the second permission level may be different, which are not limited in this embodiment of the present application.
- FIG. 4 of the present application four types of virtual interrupts are marked with four different lines.
- the line marked with number 1 represents the process of processing virtual local interrupts
- the line marked with number 2 represents the process of processing virtual software.
- the interrupt process, the line marked with number 3 represents the process of processing virtual device interrupts, and the line marked with number 4 represents the process of processing the interrupt of the pass-through peripheral.
- the involved register is register 3, and the intermediate device may be called a local interrupt generating device. Since the virtual local interrupt is an in-core interrupt, the target physical processor and the source physical processor are the same physical processor, and the transmitting device corresponds to the source physical processor.
- the register is used to: receive the information written by the virtual machine for triggering the virtual local interrupt.
- the local interrupt generating device is used for generating a virtual local interrupt according to the information for triggering the virtual local interrupt.
- the sending device is used for: sending the virtual partial interrupt to the first virtual processor vCPU of the virtual machine, where the first vCPU runs on the source physical processor.
- one physical processor can only run one vCPU of one virtual machine at a time, and sending the virtual local interrupt to the vCPU can complete the sending of the virtual local interrupt to the virtual machine operation.
- the above-mentioned local interrupt generating device in FIG. 4 may be a timer, and the virtual local interrupt may be a clock interrupt. In the case of clock interruption, the implementation of this process can be understood by referring to FIG. 5 .
- the virtual machine writes the interruption time into the control device (this process can be understood by referring to the third register in Figure 4), the control device will write the interruption time into the timer, and the timer will follow After starting, the timer sends a clock interrupt after the preset time expires. After receiving the clock interrupt, the sending device determines that the first vCPU of the virtual machine is running, and sends the clock interrupt to the first vCPU.
- the process of processing the virtual local interrupt does not require the source physical processor to perform switching from the virtual machine to the host machine, thereby reducing the switching overhead generated by processing the virtual local interrupt and improving the chip system. performance.
- the virtual software is interrupted.
- the involved register is register 2, and the intermediate device may be called a routing device.
- the source physical processor runs the first vCPU of the virtual machine
- the target physical processor runs the second vCPU of the virtual machine.
- the register is used to: receive the identifier of the second vCPU written by the first vCPU.
- the control device is used for: reading the identifier of the second vCPU from the register, and acquiring the identifier of the virtual machine; and sending the identifier of the virtual machine and the identifier of the second vCPU to the intermediate device.
- the intermediate device is used to: determine the target physical processor corresponding to the identifier of the virtual machine and the identifier of the second vCPU from the first correspondence according to the identifier of the virtual machine and the identifier of the second vCPU; wherein the first correspondence is used for The correspondence between the target physical processor, the second vCPU running on the target processor, and the virtual machine is recorded; the virtual software interrupt is sent to the sending device corresponding to the target physical processor.
- the sending means is used for: sending the virtual software interrupt to the second vCPU running on the target physical processor.
- the control apparatus may acquire the identifier of the virtual machine from a register specially used for storing the identifier of the virtual machine running on the source physical processor. Because each virtual machine may have multiple vCPUs, and the identifiers of the vCPUs of different virtual machines may be the same, the control apparatus needs to send the identifier of the virtual machine and the identifier of the second vCPU to the intermediate apparatus.
- the above-mentioned first correspondence can be stored on the intermediate device, and the first correspondence can be located in the in-position vCPU identification group, and each physical processor, each physical processor in the chip system is recorded in the in-position vCPU identification group.
- the present application can target physical processors by searching for the in-position vCPU identification group.
- the process of processing the virtual software interrupt does not require the source physical processor to perform switching from the virtual machine to the host, thereby reducing the switching overhead generated by processing the virtual software interrupt and improving the performance of the chip system.
- the above-mentioned in-position vCPU identification group can be understood by referring to FIG. 6 .
- the meaning represented in Figure 6 is: vCPU1 of VM1 runs on physical processor 1, vCPU2 of VM1 runs on physical processor 2, vCPU1 of VM2 runs on physical processor 3, and vCPU1 of VM2 runs on physical processor 4.
- vCPU2. If the identification of VM1 and the identification of vCPU2 are received by the routing device from the control device, it can be determined that vCPU2 is running on physical processor 2 according to the in-position vCPU identification group shown in FIG. 6, and the virtual software can be interrupted to send To the sending device corresponding to the physical processor 2 , the sending device corresponding to the physical processor 2 sends the virtual software interrupt to the vCPU 2 running on the physical processor 2 .
- the routing device can send the virtual software interrupt to the sending device of the source physical processor, and the sending device of the source physical processor The device sends the virtual software interrupt to the host, and after the second vCPU goes online, the host sends the virtual software interrupt to the second vCPU.
- the in-position vCPU identification group in the above-mentioned routing device of the in-position vCPU identification group may be the source physical Managed by the host on the processor.
- the process of processing virtual software interruption in the embodiment of the present application can be understood by referring to FIG. 7 .
- the virtual machine runs on the source physical processor, and the first vCPU of the virtual machine runs on the source physical processor.
- the second vCPU runs on another physical processor. If the first vCPU wants to send a virtual software interrupt to the second vCPU, the first vCPU of the virtual machine writes the identifier of the second vCPU to the register 2 of the control device.
- the control device finds the identifier of the virtual machine, and then sends the identifier of the virtual machine and the identifier of the second vCPU to the routing device.
- the routing device searches, for example, the in-position vCPU identification group shown in FIG.
- the routing device sends the virtual software interrupt to the sending device corresponding to the target physical processor, and the sending device corresponding to the target physical processor sends the virtual software interrupt to the second vCPU, that is, to the virtual software interrupt running on the target physical processor virtual machine.
- the processing process of the virtual software interrupt provided by the embodiment of the present application does not require the source physical processor to perform switching from the virtual machine to the host machine, thereby reducing the processing of virtual software interrupts.
- the resulting switching overhead improves the performance of the chip system.
- the virtual device is interrupted.
- the involved register is register 1
- the intermediate device is the routing device.
- the host runs on the source physical processor, and the host is in user mode.
- the register is used to: receive the target interrupt number written by the host and the identifier of the virtual machine, and the target interrupt number is the identifier of the interrupt triggered when the host simulates the hardware device.
- the control device is used for: reading the target interrupt number and the identifier of the virtual machine from the register, and sending the identifier of the virtual machine and the target interrupt number to the intermediate device.
- the intermediate device is used to: according to the identifier of the virtual machine and the target interrupt number, find the identifier of the first vCPU of the virtual machine corresponding to the identifier of the virtual machine and the target interrupt number in the second correspondence, and the second correspondence is used to record the virtual machine.
- the sending means is used for: sending the virtual device interrupt to the first vCPU running on the target physical processor.
- the virtual device interrupt is an interrupt triggered by the simulated hardware device of the host in the user mode.
- the interrupt number of each type of hardware device is different.
- the target interrupt number is the interrupt number of the disk. Because there can be multiple virtual machines managed by the host, the host needs to write the identifier of the virtual machine and the target interrupt number into the register.
- the second correspondence may be located in the interrupt affinity table.
- the interrupt affinity table can be configured by the virtual machine, so there is one interrupt affinity table for each virtual machine.
- the interrupt affinity table of the virtual machine can be found according to the identifier of the virtual machine, and then the corresponding vCPU is determined from the interrupt affinity table of the virtual machine according to the target interrupt number, and the target interrupt number is 10. If in the interrupt affinity table, the interrupt number 10 corresponds to vCPU ID1, it can be determined that the vCPU ID corresponding to the target interrupt number is 1. After the routing device determines that the vCPU ID is 1, it can find the physical processor corresponding to the vCPU ID1 according to the in-position vCPU identification group. The meaning of the in-position vCPU identification group can be understood by referring to the description of the aforementioned virtual software interrupt. The third correspondence It can also be understood with reference to the foregoing first correspondence.
- Table 1 is just an example, and is not limited to the ones listed in Table 1 in fact, and there may also be corresponding forms of other expressions, and there may be more in number.
- An additional column may also be added to the table 1, and the additional column is used to store the identifier of the virtual machine in FIG. 4 .
- the interrupt affinity table can be stored in the routing device or in the memory.
- the routing device can provide each physical processor with an address register, and the address register can be a base address register.
- the memory address of the interrupt affinity table and the identifier of the virtual machine may be stored.
- the base address register 1 on the routing device corresponds to the physical processor 1
- the base address register 2 corresponds to the physical processor 2
- the base address register 3 corresponds to the physical processor 3
- the base address register 4 corresponds to the physical processor device 4 corresponds.
- the address in each base address register points to an interrupt affinity table, such as: base address register 1 points to interrupt affinity table 1, base address register 2 points to interrupt affinity table 2, and base address register 3 points to interrupt affinity table Affinity table 3, base address register 4 points to interrupt affinity table 4.
- the addresses in the base address registers corresponding to the two physical processors may be the same, and the pointed interrupt affinity table may be the same table.
- the virtual machine writes the target interrupt number into the register 1, and the control device reads the currently running virtual machine from the register specially used for storing the virtual machine running on the source physical processor Then, the control device sends the target interrupt number and the identifier of the virtual machine to the routing device.
- the routing device determines the corresponding interrupt affinity table according to the identifier of the virtual machine, and then uses the target interrupt number to find the identifier of the corresponding vCPU from the interrupt affinity table. If the target interrupt number is 10, the corresponding vCPU can be determined.
- the ID of the vCPU is 1.
- the routing device After the routing device determines that the identifier of the vCPU is 1, it can find that the processor corresponding to the vCPU 1 is the physical processor 1 according to the in-position vCPU identifier group shown in FIG. 6 .
- the routing device may send the virtual device interrupt to the sending device corresponding to the physical processor 1, and the sending device sends the virtual device interrupt to the first vCPU corresponding to the vCPU1.
- the routing device can send the virtual software interrupt to the sending device of the source physical processor, and the sending device of the source physical processor The device sends the virtual software interrupt to the host, and after the first vCPU goes online, the host sends the virtual software interrupt to the first vCPU.
- the processing process of the virtual device interrupt provided by the embodiment of the present application does not require the source physical processor to execute the process from the user state of the host machine to the kernel state of the host machine. Switching, thereby reducing the switching overhead generated by processing the virtual device interrupt, and improving the performance of the chip system.
- the pass-through peripheral interrupt is an interrupt triggered by a hardware device that is directly connected to the virtual machine, such as a graphics card that is connected to the virtual machine.
- the intermediate device can be called a routing device.
- This type of interrupt handling process can be completed, which includes:
- the intermediate device is used to: receive the pass-through peripheral interrupt triggered by the hardware device; according to the physical interrupt number of the pass-through peripheral interrupt, look up the corresponding virtual machine identifier and virtual interrupt number from the virtual interrupt table, and the physical interrupt is recorded in the virtual interrupt table.
- the corresponding relationship between the ID of the virtual machine and the virtual interrupt number; the corresponding interrupt affinity table is determined according to the ID of the virtual machine, and the target virtual processor corresponding to the ID of the virtual machine and the virtual interrupt number is determined from the interrupt affinity table.
- the corresponding relationship between the virtual interrupt number and the virtual processor is recorded in the interrupt affinity table; according to the identification of the target vCPU, the target physical processor corresponding to the identification of the target vCPU is determined from the in-position vCPU identification group; It is assumed that the interrupt is sent to the sending device corresponding to the target physical processor.
- the sending device is used for: sending the pass-through peripheral interrupt to the virtual machine running on the target physical processor.
- the virtual interrupt table, the interrupt affinity table, and the in-position vCPU identification group are sequentially used, and the interrupt affinity table and the in-position vCPU identification group may refer to the previous description.
- the following describes the virtual interrupt table.
- the virtual interrupt table maintains the corresponding relationship between the physical interrupt number and the ID of the virtual machine and the virtual interrupt number. Entering a physical interrupt number can output the ID of the virtual machine and the virtual interrupt number.
- the virtual interrupt table can be understood by referring to Table 2.
- inputting a physical interrupt number 100 can output the ID 1 of the virtual machine and the virtual interrupt number 10.
- the virtual interrupt table in this application can be stored in the routing device or in the memory, and the location of the virtual interrupt table in the memory is indicated by another register similar to the base address register.
- the routing device receives the physical interrupt number sent by the pass-through peripheral, and searches the virtual interrupt table for the identifier and virtual interrupt number of the corresponding virtual machine through the physical interrupt number, For example, inputting a physical interrupt number 100 can output the ID 1 of the virtual machine and the virtual interrupt number 10. Then, look up the interrupt affinity table of Table 1 according to the identifier 1 of the virtual machine and the virtual interrupt number 10, and find the identifier of the corresponding vCPU. For example, the identifier of the vCPU is found to be 1. Further, according to the vCPU1, the corresponding physical processor is searched from the in-position vCPU identification group shown in FIG. 6, for example, if the physical processor 1 is found, the routing device can send the pass-through peripheral interrupt to the corresponding physical processor 1. A sending device, and the sending device sends the pass-through peripheral interrupt to the first vCPU corresponding to the vCPU1.
- the routing device can send the virtual software interrupt to the sending device of the source physical processor, and the sending device of the source physical processor The device sends the virtual software interrupt to the host, and after the first vCPU goes online, the host sends the virtual software interrupt to the first vCPU.
- the sending device sends them to the corresponding target physical processor.
- the above several types of virtual interrupts are written into the pending register, the pending register is used to receive the command to be executed by the target physical processor next, and the virtual interrupt is written into the pending register, then the The target physical processor will then execute the virtual interrupt, so that the currently executing process can be interrupted. If the target vCPU is executing, interrupt the target vCPU and send the interrupt to the target vCPU. If the host is executing, interrupt the host and send the interrupt directly to the running host.
- the host After the corresponding target vCPU goes online, the host will pass the interrupt to the target vCPU.
- the target vCPU can be the one described above.
- FIG. 10 is a schematic structural diagram of the chip system on RISC-V .
- the system-on-a-chip includes control and transmission means and interrupt routers for interacting with the physical processor.
- the interrupt router includes the routing device described in the above embodiments.
- RISC-V-CPU represents the central processing unit in the RISC-V architecture
- HU-mode represents the user mode of the host
- HS-mode represents the sink
- VU-mode represents the user mode of the virtual machine
- VS-mode represents the kernel mode of the virtual machine.
- the supervisor generates the information of the inter-processor interrupt logic (supervisor generate inter-processor interrupt, sgenipi) for triggering the virtual software interrupt, and the supervisor time compare logic (stimecmp) is used to trigger the register of the information of the virtual local interrupt.
- stimecmp supervisor time compare logic
- the information used to trigger the virtual software interrupt can be sent to the virtual supervisor of the control device through sgenipi to generate an inter-processor interrupt (virtual supervisor generate inter-processor).
- interrupt, vsgenipi) register, the vsgenipi register is the register described in the foregoing embodiment for receiving information for triggering a virtual software interrupt, such as register 2 .
- the information for triggering the virtual local interrupt can be sent to the virtual supervisor time compare (virtual supervisor time compare, vstimecmp) register of the control device through stimecmp, and the vstimecmp register is described in the above-mentioned embodiment for receiving the virtual supervisor for triggering the virtual interrupt.
- Registers for local interrupt information such as: register 3.
- the user-generate virtual supervisor external interrupt (user generate virtual supervisor external interrupt, ugenvsei) register is a register for receiving information for triggering a virtual device interrupt, such as register 1 described in the above embodiment.
- the virtual device simulation logic of the host user mode can directly send the information used to trigger the virtual device interrupt to the ugenvsei register.
- the interrupt router implementation includes registers of virtual heart shared interrupt mapping (vhsimap), a set of registers of virtual interrupt affinity table (virtual table base, vtblbase) (1-n), and a set of interrupt control interface mapping (interface). mapping, ifmap) registers.
- the vhsimap(1-n) register is used to point to the virtual interrupt table stored in memory.
- Each vtblbase register in a set of vtblbase(1-n) registers corresponds to a physical processor in the RISC-V system, and is used to point to the virtual interrupt affinity defined by the virtual machine to which the vCPU running on the physical processor belongs surface.
- the virtual machine uses stimecmp to write the interrupt time into the vstimecmp register, and the control device writes the time when the next virtual clock interrupt is triggered into the clock device dedicated to the virtual machine.
- the clock device dedicated to the virtual machine triggers the virtual clock interrupt.
- the virtual clock interrupt is sent to the sending device.
- one vCPU of the virtual machine (which may be referred to as the source vCPU in this scenario) runs on CPU1, which may be the source physical processor in the foregoing embodiment, and the source vCPU of the virtual machine uses the identifier of the target vCPU Write sgenipi, and write the identifier of the target vCPU into the vsgenipi register in the control device through the sgenipi, the control device obtains the identifier of the virtual machine, and combines the identifier of the virtual machine and the identifier of the target vCPU (vhartid: RISC-V represents vCPU ID) to the interrupt router, the interrupt router searches ifmapx, and the serial number x of the ifmapx register containing the VMID and vhartid is the ID of the corresponding physical processor (mhartid: the ID of the physical processor in RISC-V).
- the identification of the physical processor is CPU2 in FIG. 12
- the CPU2 can also be understood by referring to the target physical processor in the foregoing embodiment.
- the host in user mode writes the ID of the virtual machine and the virtual interrupt number to ugenvsei.
- the control device sends the identification of the virtual machine and the virtual interrupt number to the interrupt router.
- the interrupt router looks up the vtblbasex registers and finds one of the vtblbasex registers with the identity of the virtual machine. Look up the interrupt affinity table held in the memory pointed to by this register. Obtain the vhartid of the vCPU defined by the virtual machine that handles the interrupt from the interrupt affinity table.
- the interrupt router searches ifmapx and finds the serial number x of the physical processor corresponding to the register with the VMID and vhartid, where x is the mhartid of the target physical processor.
- the host computer writes the ID of the virtual machine and the virtual interrupt number to ugenvsei.
- the control device sends the identification of the virtual machine and the virtual interrupt number to the interrupt router.
- Interrupt routers do not implement vtblbasex and by default send virtual interrupts to any vCPU with that virtual machine.
- the interrupt router searches ifmapx, and finds the serial number x of the physical processor corresponding to the register with the identifier of the virtual machine, where x is the mhartid of the target physical processor.
- the host performs processing on its behalf, that is, after the virtual machine goes online, the host sends the virtual device interrupt to the virtual machine.
- the hardware device that communicates directly with the virtual machine triggers the pass-through peripheral interrupt
- the interrupt router searches the virtual interrupt table pointed to by vhlimap, finds out the ID of the virtual machine to which the interrupt is passed through, and the virtual machine after the pass-through. This virtual interrupt number is considered within.
- the interrupt router looks up the vtblbasex registers, finds one of the vtblbasex registers with that VM ID, and looks up the virtual interrupt affinity table held by the memory pointed to by that register. Obtain the vhartid of the vCPU defined by the virtual machine that handles the interrupt from the interrupt affinity table.
- the interrupt router searches ifmapx and finds the serial number x of the physical processor corresponding to the register with the VMID and vhartid, where x is the mhartid of the target physical processor.
- the interrupt router sends a pass-through peripheral interrupt to the sending device of the physical processor of mhartid.
- the host performs processing on its behalf, that is, after the virtual machine goes online, the host sends the pass-through peripheral interrupt to the virtual machine.
- the virtual local interrupt is realized from the local interrupt device to the vCPU and the whole process is not trapped to the host machine.
- the virtual software interrupt is realized through the control device, the routing device and the sending device without software cooperation between the virtual machine and the host machine, and the whole process from the sending end vCPU to the receiving end vCPU does not fall out to the host machine.
- the control device, the routing device, and the sending device realize that the virtual device interrupts from the host simulation logic to the receiving end host vCPU without switching context/trapping to the host. Therefore, the solution provided by the embodiment of the present application can accelerate the performance of virtual machine I/O, clock, scheduling, etc.
- the simulation data shows that the Redis is improved by 80% when the virtual local interrupt is processed by this solution. 6% improvement in handling virtual software interrupts.
- the process of processing virtual interrupts implemented by means of hardware circuits has been described above.
- the process of processing virtual interrupts provided by the embodiments of the present application may also be implemented by means of software, and the process implemented by software may also be combined in the above-mentioned system of chips , the chip system includes a source physical processor, a control device, an intermediate device and a transmission device, and the control device includes a register; the register is used to receive information for triggering a virtual interrupt, and the functions of the control device, the intermediate device and the transmission device can be passed through It is implemented in the form of software codes, which will be introduced below in conjunction with the accompanying drawings.
- an embodiment of the method for processing a virtual interrupt provided by an embodiment of the present application includes:
- the control device reads the information for triggering the virtual interrupt from the register.
- the information for triggering the virtual interrupt comes from the host or virtual machine running in the source physical processor.
- the control device sends the information for triggering the virtual interrupt to the intermediate device, and correspondingly, the intermediate device receives the information for triggering the virtual interrupt.
- the intermediate device triggers the virtual interrupt according to the information for triggering the virtual interrupt.
- the intermediate device sends the virtual interrupt to the sending device, and correspondingly, the sending device receives the virtual interrupt.
- the sending device sends the virtual interrupt to the target physical processor.
- a register dedicated to processing virtual interrupts is set in the control device, so that the host machine or virtual machine in the user state can directly write the information for triggering the virtual interrupt into the register, and the control device.
- the information for triggering the virtual interrupt can be sent to the intermediate device, the virtual interrupt is triggered by the intermediate device, and the intermediate device sends the virtual interrupt to the sending device, and the sending device sends the virtual interrupt to the target physical processor.
- the host machine or the virtual machine can directly access the register, and write the information used to trigger the virtual interrupt into the register, so as to send the virtual interrupt out; therefore, compared with the prior art, the solution provided by the present application
- the source physical processor does not need to perform the switch from the virtual machine to the host, or the source physical processor performs the switch from the user mode of the host to the kernel mode of the host, thereby reducing the switching overhead generated by processing virtual interrupts and improving the performance. system-on-chip performance.
- the target physical processor and the source physical processor are the same physical processor; the register receives the information written by the virtual machine for triggering the virtual local interrupt.
- the intermediate device generates a virtual local interrupt according to the information for triggering the virtual local interrupt.
- the sending device sends the virtual local interrupt to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the information for triggering the virtual interrupt read from the register in the above step 101 includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is running on the target physical device.
- the vCPU of the virtual machine on the processor.
- step 102 the control device obtains the identifier of the virtual machine; then step 103 specifically includes sending the identifier of the virtual machine and the identifier of the second vCPU to the intermediate device.
- Step 103 specifically includes the intermediate device determining the target physical processor corresponding to the identifier of the virtual machine and the identifier of the second vCPU from the first correspondence according to the identifier of the virtual machine and the identifier of the second vCPU; wherein, the first correspondence uses The corresponding relationship between the target physical processor, the second vCPU running on the target processor and the virtual machine is recorded; the virtual software interrupt is triggered.
- Step 104 includes: the intermediary device sends the virtual software interrupt to the sending device corresponding to the target physical processor.
- Step 105 includes: the sending means sends the virtual software interrupt to the second vCPU running on the target physical processor.
- the information for triggering the virtual interrupt read from the register in the above step 101 includes the target interrupt number written into the register by the host machine and the identifier of the virtual machine, and the target interrupt number is the simulated hardware device of the host machine. The ID of the interrupt that was triggered.
- Step 102 includes: the control device sends the identifier of the virtual machine and the target interrupt number to the intermediate device.
- Step 103 includes: according to the identifier of the virtual machine and the target interrupt number, the intermediate device searches for the identifier of the first vCPU of the virtual machine corresponding to the identifier of the virtual machine and the target interrupt number in the second correspondence, and the second correspondence is used for recording.
- the processor wherein the third correspondence is used to record the correspondence between the target physical processor, the first vCPU running on the target processor, and the virtual machine; and generate a virtual device interrupt.
- Step 104 includes: the intermediary device sends the virtual device interrupt to the sending device corresponding to the target physical processor.
- Step 105 includes: the sending means sends the virtual device interrupt to the first vCPU running on the target physical processor.
- control device the intermediate device and the sending device implemented by software can be understood by referring to the corresponding contents in the embodiments corresponding to FIG. 2 to FIG. 15 , which will not be repeated here.
- an embodiment of the control device 20 provided by the embodiment of the present application includes: the control device 20 is applied to a chip system, and the chip system further includes a source physical processor, an intermediate device, a sending device, and a target physical processor
- the source physical processor is used to run the host machine or the virtual machine
- the control device includes a register; the register is used to receive information for triggering a virtual interrupt, and the information for triggering a virtual interrupt comes from the host machine or the virtual machine, and the control device 20 includes:
- the reading unit 201 is configured to read the information for triggering the virtual interrupt from the register.
- the sending unit 202 is configured to send the information for triggering the virtual interrupt read by the reading unit 201 to the intermediate device, and the information used for triggering the virtual interrupt is used for the intermediate device to trigger the virtual interrupt, and the virtual interrupt is sent by the sending device to the target physical device. processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive information written by the virtual machine for triggering the virtual local interrupt; for triggering the virtual local interrupt
- the information is used to make the intermediate device trigger a virtual local interrupt, and the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information for triggering the virtual interrupt includes the identifier of the second vCPU written into the register by the first VCPU of the virtual machine, and the second vCPU is the ID of the virtual machine running on the target physical processor.
- the control device 20 further includes a processing unit 203 .
- the processing unit 203 is configured to acquire the identifier of the virtual machine.
- the sending unit 202 is used for sending the identifier of the virtual machine to the intermediate device, and the identifier of the virtual machine and the identifier of the second vCPU are used by the intermediate device to determine the target physical processor and trigger a virtual software interrupt, and the virtual software interrupt is sent to the target by the sending device The second vCPU of the physical processor.
- the virtual interrupt is a virtual device interrupt
- the information for triggering the virtual interrupt includes the target interrupt number that the host machine writes into the register and the identity of the virtual machine, and the target interrupt number is the identity of the interrupt triggered when the host machine simulates a hardware device.
- the identifier of the virtual machine and the target interrupt number are used by the intermediate device to determine the target physical processor and trigger the virtual device interrupt, and the virtual device interrupt is sent by the sending device to the first vCPU of the target physical processor.
- an embodiment of the intermediate device 30 provided by the embodiment of the present application includes: the intermediate device 30 is applied in a chip system, and the chip system further includes a source physical processor, a control device, a sending device, and a target physical processing device
- the source physical processor is used to run the host machine or the virtual machine
- the control device includes a register; the register is used to receive information for triggering a virtual interrupt, and the information for triggering a virtual interrupt comes from the host machine or the virtual machine
- the intermediate device 30 includes:
- the receiving unit 301 is configured to receive the information for triggering the virtual interrupt from the control device.
- the processing unit 302 is configured to trigger the virtual interrupt according to the information for triggering the virtual interrupt.
- the sending unit 303 is configured to send the virtual interrupt to the sending device, and the virtual interrupt is sent by the sending device to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the register is used to receive information written by the virtual machine for triggering the virtual local interrupt; for triggering the virtual local interrupt
- the information is used to trigger a virtual local interrupt
- the virtual local interrupt is sent by the sending device to the first virtual processor vCPU of the virtual machine, and the first vCPU runs on the source physical processor.
- the virtual interrupt is a virtual software interrupt
- the information for triggering the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is the ID of the virtual machine running on the target physical processor. vCPUs.
- the processing unit 302 is configured to determine, according to the identifier of the virtual machine and the identifier of the second vCPU, the target physical processor corresponding to the identifier of the virtual machine and the identifier of the second vCPU from the first correspondence; The corresponding relationship between the target physical processor, the second vCPU running on the target processor and the virtual machine is recorded; a virtual software interrupt is triggered, and the virtual software interrupt is sent by the sending device to the second vCPU of the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information for triggering the virtual interrupt includes the target interrupt number that the host machine writes into the register and the identity of the virtual machine, and the target interrupt number is the identity of the interrupt triggered when the host machine simulates a hardware device.
- the processing unit 302 is used to find, according to the identifier of the virtual machine and the target interrupt number, the identifier of the first vCPU of the virtual machine corresponding to the identifier of the virtual machine and the target interrupt number in the second correspondence, and the second correspondence is used to record The correspondence between the virtual machine, the target interrupt number and the first vCPU; according to the identifier of the virtual machine and the identifier of the first vCPU, determine the target physical object corresponding to the identifier of the virtual machine and the identifier of the first vCPU from the third correspondence processor; wherein, the third correspondence is used to record the correspondence between the target physical processor, the first vCPU running on the target processor, and the virtual machine; triggering a virtual device interrupt, the virtual device interrupt is sent by the sending device to the target physical processor The processor's first vCPU.
- the processing unit 302 is further configured to find the address register according to the identifier of the virtual machine, obtain the second correspondence from the memory according to the address in the address register, and the address register is used to store the second correspondence in the memory. address and the identity of the virtual machine.
- an embodiment of the sending device 40 provided by the embodiment of the present application includes: the sending device 40 is applied in a chip system, and the chip system further includes a source physical processor, an intermediate device, a control device, and a target physical processor
- the source physical processor is used to run the host machine or the virtual machine
- the control device includes a register; the register is used to receive the information used to trigger the virtual interrupt, and the information used to trigger the virtual interrupt comes from the host machine or the virtual machine
- the sending device 40 include:
- the receiving unit 401 is configured to receive a virtual interrupt from an intermediate device.
- the sending unit 402 is configured to send the virtual interrupt to the target physical processor.
- the virtual interrupt is a virtual local interrupt
- the target physical processor and the source physical processor are the same physical processor
- the sending unit 402 is configured to send the virtual local interrupt to the first virtual processor vCPU of the virtual machine, the first virtual processor vCPU.
- vCPUs run on the source physical processors.
- the virtual interrupt is a virtual software interrupt
- the information for triggering the virtual interrupt includes the identifier of the second vCPU written into the register by the first vCPU of the virtual machine, and the second vCPU is the ID of the virtual machine running on the target physical processor. vCPUs.
- the sending unit 402 is configured to send the virtual software interrupt to the second vCPU running on the target physical processor.
- the virtual interrupt is a virtual device interrupt
- the information for triggering the virtual interrupt includes the target interrupt number that the host machine writes into the register and the identity of the virtual machine, and the target interrupt number is the identity of the interrupt triggered when the host machine simulates a hardware device.
- the sending unit 402 is configured to send the virtual device interrupt to the first vCPU running on the target physical processor.
- the sending unit 402 is configured to write the virtual interrupt into a to-be-processed register of the target physical processor, and the to-be-processed register is used to receive a command of the process executed by the target physical processor.
- the computer device 50 may include the control device, the intermediate device or the sending device described in FIG. 17 to FIG. 19 .
- the computer device 50 includes a processor 501 , a communication interface 502 , a memory 503 and a bus 504 .
- the processor 501 , the communication interface 502 and the memory 503 are connected to each other through a bus 504 .
- the processor 501 is configured to control and manage the actions of the computer device 50, for example, the processor 501 is configured to execute step 101 or 103 in the method embodiment of FIG. 16 .
- the memory 503 is used for storing program codes and data of the computer device 50 .
- the communication interface 502 may be used to perform steps 102, 104 or 105 in the method embodiment of FIG. 16 .
- the processor 501 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
- the processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
- the bus 504 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- a computer-readable storage medium is also provided, where computer-executable instructions are stored in the computer-readable storage medium.
- the processor of the device executes the computer-executable instructions
- the device executes the above-mentioned FIG. 16 .
- a computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; when a processor of a device executes the computer-executable instructions , the device executes the method for processing virtual interrupts executed by the control device, the intermediate device, or the sending device in FIG. 16 .
- Another embodiment of the present application further provides a chip system, where the chip system includes a source physical processor, a control device, a sending device, and a target physical processor.
- the control device is the control device described in the foregoing embodiments of FIG. 2 to FIG. 15
- the transmission device is the transmission device described in the foregoing embodiments of FIG. 2 to FIG. 15 .
- system-on-a-chip may further include an intermediate device as described in the foregoing embodiments of FIG. 2 to FIG. 15 .
- the chip system is a processor
- the source physical processor and the target physical processor are physical cores in the processor
- the control device is located in the processor and is coupled to the source physical processor.
- the sending device is a component located in the processor and coupled to the target physical processor.
- the physical core may include both a control device and a transmission device.
- Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the functions, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium.
- the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art or the parts of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
中断号 | vCPU ID |
10 | 1 |
20 | 2 |
30 | 3 |
40 | 4 |
物理中断号 | 虚拟机的标识 | 虚拟中断号 |
100 | 1 | 10 |
200 | 2 | 20 |
300 | 3 | 30 |
400 | 4 | 40 |
Claims (37)
- 一种芯片系统,其特征在于,包括:源物理处理器、控制装置、中间装置、发送装置以及目标物理处理器,所述源物理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器,所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机;所述控制装置用于:将所述寄存器中的所述用于触发虚拟中断的信息发送给中间装置;所述中间装置用于:根据所述用于触发虚拟中断的信息触发所述虚拟中断,并将所述虚拟中断发送给所述发送装置;所述发送装置用于:接收来自于所述中间装置的所述虚拟中断,并将所述虚拟中断发送给所述目标物理处理器。
- 根据权利要求1所述的芯片系统,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器;所述寄存器用于:接收所述虚拟机写入的用于触发所述虚拟局部中断的信息;所述发送装置用于:将所述虚拟局部中断发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求1所述的芯片系统,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述控制装置用于:从所述寄存器读取所述第二虚拟处理器的标识,并获取所述虚拟机的标识;以及,将所述虚拟机的标识和所述第二虚拟处理器的标识发送给所述中间装置;所述中间装置用于:根据所述虚拟机的标识和所述第二虚拟处理器的标识,从第一对应关系中确定与所述虚拟机的标识和所述第二虚拟处理器的标识对应的所述目标物理处理器;其中,所述第一对应关系用于记录所述目标物理处理器、所述目标处理器上运行的第二虚拟处理器以及所述虚拟机之间的对应关系;将所述虚拟软件中断发送给与所述目标物理处理器对应的所述发送装置;所述发送装置用于:将所述虚拟软件中断发送给运行于所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求1所述的芯片系统,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述控制装置用于:从所述寄存器读取所述目标中断号和所述虚拟机的标识,并将所述虚拟机的标识和所述目标中断号发送给所述中间装置;所述中间装置用于:根据所述虚拟机的标识和所述目标中断号,在第二对应关系中查找与所述虚拟机的标识和所述目标中断号对应的所述虚拟机的第一虚拟处理器的标识,所述第二对应关系用于 记录所述虚拟机、所述目标中断号和所述第一虚拟处理器之间的对应关系;根据所述虚拟机的标识和所述第一虚拟处理器的标识,从第三对应关系中确定与所述虚拟机的标识和所述第一虚拟处理器的标识对应的所述目标物理处理器;其中,所述第三对应关系用于记录所述目标物理处理器、所述目标处理器上运行的所述第一虚拟处理器以及所述虚拟机之间的对应关系;将所述虚拟设备中断发送给与所述目标物理处理器对应的所述发送装置;所述发送装置用于:将所述虚拟设备中断发送给运行于所述目标物理处理器的所述第一虚拟处理器。
- 根据权利要求4所述的芯片系统,其特征在于,所述中间装置包括地址寄存器,所述地址寄存器用于存储所述第二对应关系在内存中的地址以及所述虚拟机的标识;所述中间装置还用于:根据所述虚拟机的标识查找到所述地址寄存器,根据所述地址寄存器中的地址从所述内存中获取所述第二对应关系。
- 一种控制装置,其特征在于,所述控制装置应用于芯片系统,所述芯片系统还包括源物理处理器、中间装置、发送装置以及目标物理处理器,所述源物理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器;所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机;所述控制装置用于:从所述寄存器中读取所述用于触发虚拟中断的信息,并将所述用于触发虚拟中断的信息发送给所述中间装置,所述用于触发虚拟中断的信息用于使得所述中间装置触发所述虚拟中断,所述虚拟中断由所述发送装置发送给所述目标物理处理器。
- 根据权利要求6所述的控制装置,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器,所述寄存器用于接收所述虚拟机写入的用于触发所述虚拟局部中断的信息;所述控制装置用于:将所述用于触发所述虚拟局部中断的信息发送给所述中间装置,所述用于触发所述虚拟局部中断的信息用于使得所述中间装置触发所述虚拟局部中断,所述虚拟局部中断由所述发送装置发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求6所述的控制装置,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述控制装置用于:从所述寄存器读取所述第二虚拟处理器的标识,并获取所述虚拟机的标识;以及,将所述虚拟机的标识和所述第二虚拟处理器的标识发送给所述中间装置,所述虚拟机的标识和所述第二虚拟处理器的标识用于所述中间装置确定目标物理处理器并触发所述虚拟软件中断,所述虚拟软件中断由所述发送装置发送给所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求6所述的控制装置,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标 识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述控制装置用于:从所述寄存器读取所述目标中断号和所述虚拟机的标识,并将所述虚拟机的标识和所述目标中断号发送给所述中间装置,所述虚拟机的标识和所述目标中断号用于所述中间装置确定目标物理处理器并触发所述虚拟设备中断,所述虚拟设备中断由所述发送装置发送给所述目标物理处理器的所述虚拟机的第一虚拟处理器。
- 一种中间装置,其特征在于,所述中间装置应用于芯片系统,所述芯片系统还包括源物理处理器、控制装置、发送装置以及目标物理处理器,所述源物理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器;所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机;所述中间装置用于:接收来自所述控制装置的所述用于触发虚拟中断的信息,根据所述用于触发虚拟中断的信息触发所述虚拟中断,并将所述虚拟中断发送给所述发送装置,所述虚拟中断由所述发送装置发送给所述目标物理处理器。
- 根据权利要求10所述的中间装置,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器,所述寄存器用于接收所述虚拟机写入的用于触发所述虚拟局部中断的信息;所述中间装置用于:根据所述用于触发所述虚拟局部中断的信息,触发所述虚拟局部中断,并将所述虚拟局部中断发送给所述发送装置,所述虚拟局部中断由所述发送装置发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求10所述的中间装置,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述中间装置用于:接收来自所述控制装置的所述虚拟机的标识和所述第二虚拟处理器的标识;根据所述虚拟机的标识和所述第二虚拟处理器的标识,从第一对应关系中确定与所述虚拟机的标识和所述第二虚拟处理器的标识对应的所述目标物理处理器;其中,所述第一对应关系用于记录所述目标物理处理器、所述目标处理器上运行的第二虚拟处理器以及所述虚拟机之间的对应关系;触发所述虚拟软件中断;将所述虚拟软件中断发送给与所述目标物理处理器对应的所述发送装置,所述虚拟软件中断由所述发送装置发送给所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求10所述的中间装置,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述中间装置用于:接收来自所述控制设备的虚拟机的标识和所述目标中断号;根据所述虚拟机的标识和所述目标中断号,在第二对应关系中查找与所述虚拟机的标 识和所述目标中断号对应的所述虚拟机的第一虚拟处理器的标识,所述第二对应关系用于记录所述虚拟机、所述目标中断号和所述第一虚拟处理器之间的对应关系;根据所述虚拟机的标识和所述第一虚拟处理器的标识,从第三对应关系中确定与所述虚拟机的标识和所述第一虚拟处理器的标识对应的所述目标物理处理器;其中,所述第三对应关系用于记录所述目标物理处理器、所述目标处理器上运行的所述第一虚拟处理器以及所述虚拟机之间的对应关系;触发所述虚拟设备中断;将所述虚拟设备中断发送给与所述目标物理处理器对应的所述发送装置,所述虚拟设备中断由所述发送装置发送给所述目标物理处理器的所述第一虚拟处理器。
- 根据权利要求13所述的中间装置,其特征在于,所述中间装置包括地址寄存器,所述地址寄存器用于存储所述第二对应关系在内存中的地址以及所述虚拟机的标识;所述中间装置还用于:根据所述虚拟机的标识查找到所述地址寄存器,根据所述地址寄存器中的地址从所述内存中获取所述第二对应关系。
- 一种发送装置,其特征在于,所述发送装置应用于芯片系统,所述芯片系统还包括源物理处理器、中间装置、控制装置以及目标物理处理器,所述源物理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器;所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机;所述发送装置用于:接收来自于所述中间装置的所述虚拟中断,并将所述虚拟中断发送给所述目标物理处理器。
- 根据权利要求15所述的发送装置,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器;所述发送装置用于:接收来自所述中间装置的所述虚拟局部中断,并将所述虚拟局部中断发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求15所述的发送装置,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述发送装置用于:接收来自所述中间装置的所述虚拟软件中断,并将所述虚拟软件中断发送给运行于所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求15所述的发送装置,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述发送装置用于:接收来自所述中间装置的所述虚拟设备中断,并将所述虚拟设备中断发送给运行于所述目标物理处理器的第一虚拟处理器。
- 根据权利要求15-18任一项所述的发送装置,其特征在于,所述发送装置用于:将所述虚拟中断写入所述目标物理处理器的待处理寄存器中,所 述待处理寄存器用于接收所述目标物理处理器所执行流程的命令。
- 一种处理虚拟中断的方法,其特征在于,所述方法应用于芯片系统中的控制装置,所述芯片系统还包括源物理处理器、中间装置、发送装置以及目标物理处理器,所述源物理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器;所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机,所述方法包括:从所述寄存器中读取所述用于触发虚拟中断的信息;将所述用于触发虚拟中断的信息发送给所述中间装置,所述用于触发虚拟中断的信息用于使得所述中间装置触发所述虚拟中断,所述虚拟中断由所述发送装置发送给所述目标物理处理器。
- 根据权利要求20所述的方法,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器,所述寄存器用于接收所述虚拟机写入的用于触发所述虚拟局部中断的信息;所述用于触发所述虚拟局部中断的信息用于所述中间装置触发所述虚拟局部中断,所述虚拟局部中断由所述发送装置发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求20所述的方法,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述方法还包括:获取所述虚拟机的标识;将所述虚拟机的标识发送给所述中间装置,所述虚拟机的标识和所述第二虚拟处理器的标识用于所述中间装置确定目标物理处理器并触发所述虚拟软件中断,所述虚拟软件中断由所述发送装置发送给所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求20所述的方法,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述虚拟机的标识和所述目标中断号用于所述中间装置确定目标物理处理器并触发所述虚拟设备中断,所述虚拟设备中断由所述发送装置发送给所述目标物理处理器的所述第一虚拟处理器。
- 一种处理虚拟中断的方法,其特征在于,所述方法应用于芯片系统中的中间装置,所述芯片系统还包括源物理处理器、控制装置、发送装置以及目标物理处理器,所述源物理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器;所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机,所述方法包括:接收来自所述控制装置的所述用于触发虚拟中断的信息;根据所述用于触发虚拟中断的信息触发所述虚拟中断;将所述虚拟中断发送给所述发送装置,所述虚拟中断由所述发送装置发送给所述目标 物理处理器。
- 根据权利要求24所述的方法,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器,所述寄存器用于接收所述虚拟机写入的用于触发所述虚拟局部中断的信息;所述用于触发所述虚拟局部中断的信息用于触发所述虚拟局部中断,所述虚拟局部中断由所述发送装置发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求24所述的方法,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述根据所述用于触发虚拟中断的信息触发所述虚拟中断,包括:根据所述虚拟机的标识和所述第二虚拟处理器的标识,从第一对应关系中确定与所述虚拟机的标识和所述第二虚拟处理器的标识对应的所述目标物理处理器;其中,所述第一对应关系用于记录所述目标物理处理器、所述目标处理器上运行的第二虚拟处理器以及所述虚拟机之间的对应关系;触发所述虚拟软件中断,所述虚拟软件中断由所述发送装置发送给所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求24所述的方法,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述根据所述用于触发虚拟中断的信息触发所述虚拟中断,包括:根据所述虚拟机的标识和所述目标中断号,在第二对应关系中查找与所述虚拟机的标识和所述目标中断号对应的所述虚拟机的第一虚拟处理器的标识,所述第二对应关系用于记录所述虚拟机、所述目标中断号和所述第一虚拟处理器之间的对应关系;根据所述虚拟机的标识和所述第一虚拟处理器的标识,从第三对应关系中确定与所述虚拟机的标识和所述第一虚拟处理器的标识对应的所述目标物理处理器;其中,所述第三对应关系用于记录所述目标物理处理器、所述目标处理器上运行的所述第一虚拟处理器以及所述虚拟机之间的对应关系;触发所述虚拟设备中断,所述虚拟设备中断由所述发送装置发送给所述目标物理处理器的所述第一虚拟处理器。
- 根据权利要求27所述的方法,其特征在于,所述方法还包括:根据所述虚拟机的标识查找到地址寄存器,根据所述地址寄存器中的地址从所述内存中获取所述第二对应关系,所述地址寄存器用于存储所述第二对应关系在内存中的地址以及所述虚拟机的标识。
- 一种处理虚拟中断的方法,其特征在于,所述方法应用于芯片系统中的发送装置,所述芯片系统还包括源物理处理器、中间装置、控制装置以及目标物理处理器,所述源物 理处理器用于运行宿主机或虚拟机,所述控制装置包括寄存器;所述寄存器用于接收用于触发虚拟中断的信息,所述用于触发虚拟中断的信息来自于所述宿主机或所述虚拟机,所述方法包括:接收来自于所述中间装置的所述虚拟中断;将所述虚拟中断发送给所述目标物理处理器。
- 根据权利要求29所述的方法,其特征在于,所述虚拟中断为虚拟局部中断,所述目标物理处理器和所述源物理处理器为同一物理处理器;所述将所述虚拟中断发送给目标物理处理器,包括:将所述虚拟局部中断发送给所述虚拟机的第一虚拟处理器,所述第一虚拟处理器运行在所述源物理处理器上。
- 根据权利要求29所述的方法,其特征在于,所述虚拟中断为虚拟软件中断,所述用于触发虚拟中断的信息包括所述虚拟机的第一虚拟处理器写入所述寄存器的第二虚拟处理器的标识,所述第二虚拟处理器为运行于所述目标物理处理器上的所述虚拟机的虚拟处理器;所述将所述虚拟中断发送给目标物理处理器,包括:将所述虚拟软件中断发送给运行于所述目标物理处理器的所述第二虚拟处理器。
- 根据权利要求29所述的方法,其特征在于,所述虚拟中断为虚拟设备中断,所述用于触发虚拟中断的信息包括所述宿主机写入所述寄存器的目标中断号和所述虚拟机的标识,所述目标中断号为所述宿主机模拟硬件设备时所触发的中断的标识;所述将所述虚拟中断发送给目标物理处理器,包括:将所述虚拟设备中断发送给运行于所述目标物理处理器的第一虚拟处理器。
- 根据权利要求29-32任一项所述的方法,其特征在于,所述方法还包括:将所述虚拟中断写入所述目标物理处理器的待处理寄存器中,所述待处理寄存器用于接收所述目标物理处理器所执行流程的命令。
- 一种芯片系统,其特征在于,包括源物理处理器、控制装置和发送装置以及目标物理处理器,所述控制装置为上述权利要求6-9任一项所述的控制装置,所述发送装置为上述权利要求15-19任一项所述的发送装置。
- 根据权利要求34所述的芯片系统,其特征在于,所述芯片系统还包括中间装置,所述中间装置为上述权利要求10-14任一项所述的中间装置。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求20-23任一项所述的方法,或者,执行时实现如权利要求24-28任一项所述的方法,或者,执行时实现如权利要求29-33任一项所述的方法。
- 一种计算机设备,其特征在于,所述计算机设备包括上述权利要求1-5任一项所述的芯片系统,或者包括上述权利要求34或35所述的芯片系统。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023522963A JP2023545818A (ja) | 2020-10-15 | 2021-10-13 | チップ・システム、仮想割り込み処理方法および対応する装置 |
KR1020237015942A KR20230084300A (ko) | 2020-10-15 | 2021-10-13 | 칩 시스템, 가상 인터럽트 처리 방법 및 대응하는 장치 |
EP21879418.8A EP4220394A4 (en) | 2020-10-15 | 2021-10-13 | CHIP SYSTEM, METHOD FOR PROCESSING A VIRTUAL INTERRUPTION AND ASSOCIATED DEVICE |
US18/300,515 US20230259380A1 (en) | 2020-10-15 | 2023-04-14 | Chip system, virtual interrupt processing method, and corresponding apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011108332.3 | 2020-10-15 | ||
CN202011108332.3A CN114371907A (zh) | 2020-10-15 | 2020-10-15 | 一种芯片系统、处理虚拟中断的方法及相应装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/300,515 Continuation US20230259380A1 (en) | 2020-10-15 | 2023-04-14 | Chip system, virtual interrupt processing method, and corresponding apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022078375A1 true WO2022078375A1 (zh) | 2022-04-21 |
Family
ID=81137817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/123497 WO2022078375A1 (zh) | 2020-10-15 | 2021-10-13 | 一种芯片系统、处理虚拟中断的方法及相应装置 |
Country Status (6)
Country | Link |
---|---|
US (1) | US20230259380A1 (zh) |
EP (1) | EP4220394A4 (zh) |
JP (1) | JP2023545818A (zh) |
KR (1) | KR20230084300A (zh) |
CN (1) | CN114371907A (zh) |
WO (1) | WO2022078375A1 (zh) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117632533A (zh) * | 2022-08-19 | 2024-03-01 | 华为技术有限公司 | 一种中断消息处理方法及装置 |
CN118152063A (zh) * | 2022-12-05 | 2024-06-07 | 中兴通讯股份有限公司 | 中断请求处理方法、系统、设备及计算机可读存储介质 |
CN116107697B (zh) * | 2023-01-04 | 2023-10-31 | 芯动微电子科技(武汉)有限公司 | 一种不同操作系统之间互相通信的方法及系统 |
CN116320469B (zh) * | 2023-05-16 | 2024-03-01 | 摩尔线程智能科技(北京)有限责任公司 | 一种虚拟化视频编解码系统及方法、电子设备和存储介质 |
CN116521324B (zh) * | 2023-06-30 | 2024-04-12 | 深圳中安辰鸿技术有限公司 | 中断虚拟化处理方法、装置及电子设备 |
CN117272412B (zh) * | 2023-11-21 | 2024-03-15 | 芯来智融半导体科技(上海)有限公司 | 中断控制寄存器保护方法、装置、计算机设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101135997A (zh) * | 2006-08-29 | 2008-03-05 | 联想(北京)有限公司 | 一种虚拟机系统及其硬件设备中断处理方法 |
CN103559087A (zh) * | 2013-10-31 | 2014-02-05 | 华为技术有限公司 | 一种虚拟处理器之间的中断的实现方法、相关装置和系统 |
CN106462451A (zh) * | 2014-06-20 | 2017-02-22 | 华为技术有限公司 | 虚拟化平台处理中断方法和相关设备 |
CN107038061A (zh) * | 2017-04-14 | 2017-08-11 | 上海交通大学 | 一种基于numa和硬件辅助技术的高效网络io处理方法 |
CN110609730A (zh) * | 2018-06-14 | 2019-12-24 | 阿里巴巴集团控股有限公司 | 一种实现虚拟处理器间中断透传的方法及设备 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2157511B1 (fr) * | 2008-08-19 | 2012-01-18 | STMicroelectronics Rousset SAS | Procédé d'acheminement d'un signal d'interruption directement vers une unité de traitement virtuelle dans un système à une ou plusieurs unités de traitement physiques |
US9436626B2 (en) * | 2012-08-09 | 2016-09-06 | Freescale Semiconductor, Inc. | Processor interrupt interface with interrupt partitioning and virtualization enhancements |
-
2020
- 2020-10-15 CN CN202011108332.3A patent/CN114371907A/zh active Pending
-
2021
- 2021-10-13 JP JP2023522963A patent/JP2023545818A/ja active Pending
- 2021-10-13 EP EP21879418.8A patent/EP4220394A4/en active Pending
- 2021-10-13 WO PCT/CN2021/123497 patent/WO2022078375A1/zh active Application Filing
- 2021-10-13 KR KR1020237015942A patent/KR20230084300A/ko active Search and Examination
-
2023
- 2023-04-14 US US18/300,515 patent/US20230259380A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101135997A (zh) * | 2006-08-29 | 2008-03-05 | 联想(北京)有限公司 | 一种虚拟机系统及其硬件设备中断处理方法 |
CN103559087A (zh) * | 2013-10-31 | 2014-02-05 | 华为技术有限公司 | 一种虚拟处理器之间的中断的实现方法、相关装置和系统 |
CN106462451A (zh) * | 2014-06-20 | 2017-02-22 | 华为技术有限公司 | 虚拟化平台处理中断方法和相关设备 |
CN107038061A (zh) * | 2017-04-14 | 2017-08-11 | 上海交通大学 | 一种基于numa和硬件辅助技术的高效网络io处理方法 |
CN110609730A (zh) * | 2018-06-14 | 2019-12-24 | 阿里巴巴集团控股有限公司 | 一种实现虚拟处理器间中断透传的方法及设备 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4220394A4 |
Also Published As
Publication number | Publication date |
---|---|
US20230259380A1 (en) | 2023-08-17 |
EP4220394A4 (en) | 2024-03-20 |
EP4220394A1 (en) | 2023-08-02 |
CN114371907A (zh) | 2022-04-19 |
KR20230084300A (ko) | 2023-06-12 |
JP2023545818A (ja) | 2023-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022078375A1 (zh) | 一种芯片系统、处理虚拟中断的方法及相应装置 | |
KR100879825B1 (ko) | 이질적 리소스와의 명령어 세트 아키텍처-기반 시퀀서간통신 | |
JP5969550B2 (ja) | パフォーマンスカウンタの仮想化 | |
RU2532708C2 (ru) | Способ и устройство для осуществления операции ввода/вывода в среде виртуализации | |
TWI516958B (zh) | 用於處理器加速器介面的虛擬化的處理器、系統及方法 | |
US7552426B2 (en) | Systems and methods for using synthetic instructions in a virtual machine | |
US7707341B1 (en) | Virtualizing an interrupt controller | |
WO2022037182A1 (zh) | 一种计算机设备、异常处理的方法以及中断处理的方法 | |
US20230124004A1 (en) | Method for handling exception or interrupt in heterogeneous instruction set architecture and apparatus | |
CN103984591A (zh) | 计算机虚拟化系统的PCI设备INTx中断投递方法 | |
Klingensmith et al. | Hermes: A real time hypervisor for mobile and iot systems | |
JP2004258840A (ja) | 仮想化されたi/oデバイスをもつ計算機システム | |
CN112783601A (zh) | 一种异构系统的中断处理方法、装置、设备及存储介质 | |
US9069741B2 (en) | Emulating level triggered interrupts of physical devices assigned to virtual machine | |
CN112559120B (zh) | 定制化pcie总线io虚拟化支撑方法 | |
US20160216983A1 (en) | Using hypervisor trapping for protection against interrupts in virtual machine functions | |
US8291415B2 (en) | Paging instruction for a virtualization engine to local storage | |
Meurer et al. | Virtualizing Mixed-Criticality Operating Systems | |
Oikawa et al. | Simultaneous virtual-machine logging and replay | |
Eßer | Handling Interrupts in the U Operating System | |
JP2005056019A (ja) | 情報処理装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21879418 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2023522963 Country of ref document: JP |
|
REG | Reference to national code |
Ref country code: BR Ref legal event code: B01A Ref document number: 112023007093 Country of ref document: BR |
|
ENP | Entry into the national phase |
Ref document number: 2021879418 Country of ref document: EP Effective date: 20230425 |
|
ENP | Entry into the national phase |
Ref document number: 20237015942 Country of ref document: KR Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 112023007093 Country of ref document: BR Kind code of ref document: A2 Effective date: 20230414 |