Patent ID: 11972285
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A virtualized device, comprising:
a hardware layer;
a host layer implementing a host; and
a virtual machine layer including a virtual computer, the virtual computer comprising one or more virtual processors serving the virtual computer;
wherein the host is configured to configure the one or more virtual processors of the virtual computer to receive an interrupt request from the hardware layer;
wherein the virtual computer is configured to:
receive an interrupt request from the hardware layer;
determine a processing entity of the interrupt request based on information; and
based on determining that the processing entity of the interrupt request comprises a current virtual processor of the virtual computer, invoke, based on the information, an interrupt service routine corresponding to the received interrupt request to process the interrupt request, the information further comprising a correspondence between the interrupt request, the processing entity, and the interrupt service routine;

wherein the host is further configured to configure the one or more virtual processors of the virtual computer to operate a physical interrupt controller; and
wherein based on determining that the processing entity of the interrupt request is another virtual processor and the another virtual processor is in service, the virtual computer is further configured to operate the physical interrupt controller to send an inter-processor interrupt (IPI) request to the another virtual processor, the IPI request carrying an identifier of the interrupt request, and the another virtual processor does not comprise the current virtual processor of the virtual computer;
wherein the virtual computer is further configured to:
based on no other virtual processors being in service, record the interrupt request in a storage area that can be shared by all the other virtual processors, wherein in response to a priority of the interrupt request being lower than or equal to priorities of all in-service virtual processors, only the identifier of the interrupt request is recorded without targeting a specific virtual processor;
determine a transit virtual processor from the other virtual processors; and
send an IPI request to the transit virtual processor, whereby the transit virtual processor traps out; and

wherein the host is further configured to swap in one of the other virtual processors corresponding to the interrupt request for processing the interrupt request.