IP Library › Granted Patent US 12,511,152
Granted Patent B2
US 12,511,152 · App. 18/146,943 · Granted Dec 30, 2025

System and interrupt handling method

Inventors: Haibin Wang (Hangzhou, CN); Zenghui Yu (Hangzhou, CN); Jian Ma (Shenzhen, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F9/4831G06F9/45558G06F2009/45575
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,511,152
App. No.
18/146,943
Granted
Dec 30, 2025
Kind
B2
Abstract

Embodiments of the present disclosure disclose a computing device, and are applied to the field of computing devices. In the present disclosure, a virtual interrupt obtained by a host machine is mapped to a physical interrupt of a physical layer, and a virtual interrupt identifier corresponding to the physical interrupt is transferred to a virtual processor by using the physical layer. When a hardware layer transparently transmits the virtual interrupt identifier to the virtual processor, the virtual processor does not need to exit. This decreases a delay caused by exit of the virtual processor when software implements virtual interrupt routing.

Claims (60)

1 . A computing device, comprising:

a hardware layer; and

a host machine executing on the hardware layer, wherein the host machine is configured to:

obtain a virtual interrupt;

obtain a physical interrupt identifier corresponding to the virtual interrupt; and

transfer the physical interrupt identifier to the hardware layer; and

wherein the hardware layer is configured to:

obtain a virtual interrupt identifier based on the physical interrupt identifier and a preconfigured second mapping relationship;

obtain a virtual processor identifier based on the physical interrupt identifier and a preconfigured third mapping relationship, wherein the virtual processor identifier corresponds to a target virtual processor to which the virtual interrupt, obtained by the host machine, is configured to interrupt; and

transfer the virtual interrupt identifier, which is based on the physical interrupt identifier and the preconfigured second mapping relationship, to the target virtual processor.

2 . The computing device according to claim 1 , wherein the virtual interrupt uniquely corresponds to the virtual interrupt identifier.

3 . The computing device according to claim 1 , wherein:

the computing device comprises a physical interrupt translation service (ITS) and a physical generic interrupt controller (GIC) that are implemented based on the hardware layer;

the physical ITS is configured to obtain the virtual interrupt identifier and the virtual processor identifier corresponding to the physical interrupt identifier; and

the physical GIC is configured to transfer the virtual interrupt identifier to the target virtual processor.

4 . The computing device according to claim 1 , wherein:

the host machine is further configured to obtain, based on the virtual interrupt and a preconfigured first mapping relationship, the physical interrupt identifier corresponding to the virtual interrupt, wherein the preconfigured first mapping relationship indicates a plurality of virtual interrupts and a correspondence between each one of the plurality of virtual interrupts and one of a plurality of physical interrupt identifiers; and

wherein the preconfigured second mapping relationship indicates a plurality of physical interrupt identifiers and a correspondence between each one of the plurality of physical interrupt identifiers and one of a plurality of virtual interrupt identifiers.

5 . The computing device according to claim 1 , wherein the preconfigured third mapping relationship indicates a plurality of physical interrupt identifiers and a correspondence between each one of the plurality of physical interrupt identifiers and one of a plurality of virtual processor identifiers.

6 . The computing device according to claim 1 , wherein the hardware layer is further configured to:

generate a physical interrupt based on the physical interrupt identifier; and

obtain the virtual interrupt identifier and the virtual processor identifier based on the physical interrupt.

7 . The computing device according to claim 1 , wherein:

the virtual interrupt comprises a virtual device identifier and a virtual interrupt vector identifier; and

the host machine is further configured to obtain, based on the virtual interrupt, a physical device identifier corresponding to the virtual device identifier and a physical interrupt vector identifier corresponding to the virtual interrupt vector identifier, wherein the physical interrupt identifier comprises the physical device identifier and the physical interrupt vector identifier.

8 . The computing device according to claim 1 , wherein the hardware layer is further configured to:

obtain interrupt state information corresponding to the physical interrupt identifier, wherein the interrupt state information indicates whether the virtual interrupt identifier corresponding to the physical interrupt identifier can be transferred to the target virtual processor; and

determine, based on the interrupt state information, that the virtual interrupt identifier can be transferred to the target virtual processor.

9 . The computing device according to claim 1 , wherein the host machine is further configured to:

obtain interrupt state information corresponding to the physical interrupt identifier from the hardware layer in a virtual machine live migration process, wherein the interrupt state information indicates whether the virtual interrupt identifier corresponding to the physical interrupt identifier can be transferred to the target virtual processor; and

write the interrupt state information into a hardware layer of another computing device other than the computing device.

10 . An interrupt handling method, comprising:

obtaining, by a host machine running on a hardware layer, a virtual interrupt;

obtaining, by the host machine, a physical interrupt identifier corresponding to the virtual interrupt;

transferring the physical interrupt identifier to the hardware layer, so that the hardware layer obtains a virtual interrupt identifier based on the physical interrupt identifier and a preconfigured second mapping relationship, and obtains a virtual processor identifier based on the physical interrupt identifier and a preconfigured third mapping relationship, wherein the virtual processor identifier corresponds to a target virtual processor to which the virtual interrupt, obtained by the host machine, is configured to interrupt; and

transferring the virtual interrupt identifier, which is based on the physical interrupt identifier and the preconfigured second mapping relationship, to the target virtual processor.

11 . The method according to claim 10 , wherein the virtual interrupt uniquely corresponds to the virtual interrupt identifier.

12 . The method according to claim 10 , wherein the obtaining a corresponding physical interrupt identifier based on the virtual interrupt comprises:

obtaining, based on the virtual interrupt and a preconfigured first mapping relationship, the physical interrupt identifier corresponding to the virtual interrupt, wherein the preconfigured first mapping relationship indicates a plurality of virtual interrupts and a correspondence between each one of the plurality of virtual interrupts and one of a plurality of physical interrupt identifiers.

13 . The method according to claim 10 , wherein the virtual interrupt comprises a virtual device identifier and a virtual interrupt vector identifier, and wherein the obtaining the physical interrupt identifier based on the virtual interrupt comprises:

obtaining, based on the virtual interrupt, a physical device identifier corresponding to the virtual device identifier and a physical interrupt vector identifier corresponding to the virtual interrupt vector identifier, wherein the physical interrupt identifier comprises the physical device identifier and the physical interrupt vector identifier.

14 . The method according to claim 10 , wherein the method further comprises:

obtaining interrupt state information corresponding to the physical interrupt identifier from the hardware layer in a virtual machine live migration process, wherein the interrupt state information indicates whether the virtual interrupt identifier corresponding to the physical interrupt identifier can be transferred to the target virtual processor; and

writing the interrupt state information into a hardware layer of a computing device other than the computing device.

15 . An interrupt handling method, comprising:

obtaining, by a hardware layer, a virtual interrupt identifier based on a physical interrupt identifier and a preconfigured second mapping relationship, and obtaining a virtual processor identifier based on the physical interrupt identifier and a preconfigured third mapping relationship, wherein the virtual processor identifier corresponds to a target virtual processor to which the virtual interrupt is configured to interrupt; and

transferring the virtual interrupt identifier, which is based on the physical interrupt identifier and the preconfigured second mapping relationship, to the target virtual processor.

16 . The method according to claim 15 , wherein the virtual interrupt uniquely corresponds to the virtual interrupt identifier.

17 . The method according to claim 15 , wherein the method is applied to a computing device, and wherein:

the computing device comprises a physical interrupt translation service (ITS) and a physical generic interrupt controller (GIC) that are implemented based on the hardware layer;

the obtaining of the virtual interrupt identifier and the virtual processor identifier further comprises:

obtaining, by the physical ITS based on the physical interrupt identifier, the virtual interrupt identifier and the virtual processor identifier; and

the transferring the virtual interrupt identifier to the target virtual processor comprises:

transferring, by the physical GIC, the virtual interrupt identifier to the target virtual processor.

18 . The method according to claim 15 , wherein

the preconfigured second mapping relationship indicates a plurality of physical interrupt identifiers and a correspondence between each one of the plurality of physical interrupt identifiers and one of a plurality of virtual interrupt identifiers.

19 . The method according to claim 15 , wherein the preconfigured third mapping relationship indicates a plurality of physical interrupt identifiers and a correspondence between each one of the plurality of physical interrupt identifiers and one of a plurality of virtual processor identifiers.

20 . The method according to claim 15 , wherein the obtaining of the virtual interrupt identifier and the virtual processor identifier comprises:

generating, by the hardware layer, a physical interrupt based on the physical interrupt identifier; and

obtaining the virtual interrupt identifier and the virtual processor identifier based on the physical interrupt.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 20, 2024
From: WANG, HAIBIN; YU, ZENGHUI; MA, JIAN
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 067464/0253 →
Priority Claims (1)
CN 202010604993.9 · Jun 29, 2020 · national
Continuity (2)
Continuation PCTCN2021102011 · Jun 24, 2021
Related Publication 20230133273A1 · May 4, 2023
References Cited (18)
US 7209994B1 · Klaiber · 2007 [cited by examiner]
US 10642498B2 · Benisty · 2020 [cited by examiner]
US 11042494B1 · Saidi · 2021 [cited by examiner]
US 20070157197A1 · Neiger · 2007 [cited by examiner]
US 20140351471A1 · Jebson · 2014 [cited by examiner]
US 20150127866A1 · Zeng · 2015 [cited by examiner]
US 20160085568A1 · Dupre · 2016 [cited by examiner]
US 20170102963A1 · Zhang · 2017 [cited by examiner]
US 20200167176A1 · Arroyo · 2020 [cited by examiner]
CN 103744716A · 2014 [cited by applicant]
CN 106462451B · 2019 [cited by applicant]
JP S61240333A · 1986 [cited by applicant]
JP S6394629A · 1988 [cited by applicant]
JP 2013519169A · 2013 [cited by applicant]
JP 2017518589A · 2017 [cited by applicant]
WO 2016092667A1 · 2016 [cited by applicant]
Bugnion Edouard et al:“Virtualization Support in ARM Processors”, In:“Hardware and Software Support for Virtualization”, Jan. 1, 2017, total 24 pages, XP093097806,URL:https://link.springer.com/content/pdf/10.1007/978-3-… [cited by applicant]
Anonymous:“GICv3 and GICv4 Software Overview”, Jan. 1, 2016,total 50 pages,XP093097395,URL:https://documentation-service.arm.com/static/5f1068720daa596235e7f6ef?token=[retrieved on Nov. 2, 2023]. [cited by applicant]