JP2012145993A - Computer system, interruption control method and program - Google Patents
Computer system, interruption control method and program Download PDFInfo
- Publication number
- JP2012145993A JP2012145993A JP2011001644A JP2011001644A JP2012145993A JP 2012145993 A JP2012145993 A JP 2012145993A JP 2011001644 A JP2011001644 A JP 2011001644A JP 2011001644 A JP2011001644 A JP 2011001644A JP 2012145993 A JP2012145993 A JP 2012145993A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- shared
- interrupt number
- information
- processor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
- Bus Control (AREA)
Abstract
Description
本発明は、複数のOS(Operating System)が動作する環境における割込み制御技術に関する。 The present invention relates to an interrupt control technique in an environment where a plurality of OSs (Operating Systems) operate.
本明細書では、複数のOSが動作する環境として、仮想計算機システムを例にして説明を行う。
従来の仮想計算機システムは、複数個の周辺デバイスからの割込みを同一の割込み番号で割込み制御装置に通知する割込み管理装置が、割込み発生デバイスを特定するためにデバイス識別レジスタを有しており、OS間制御部(仮想計算機モニタに相当)が該レジスタを参照することで、共通の割込み番号による割込みをどのデバイスが発生したかを判定する。
または、OS間制御部が、割込み番号を共用している全てのデバイスを直接アクセスして割込み発生デバイスを特定する(例えば、特許文献1)。
In this specification, a virtual machine system will be described as an example of an environment in which a plurality of OSs operate.
In a conventional virtual machine system, an interrupt management device that notifies an interrupt control device of interrupts from a plurality of peripheral devices with the same interrupt number has a device identification register for specifying an interrupt generation device. The intermediate control unit (corresponding to the virtual machine monitor) refers to the register to determine which device has generated an interrupt with a common interrupt number.
Alternatively, the inter-OS control unit directly accesses all devices sharing the interrupt number and identifies the interrupt generation device (for example, Patent Document 1).
従来の仮想計算機システムでは、共通の割込み番号の割込みを発行できるのは、割込み管理装置がサポートするI/O(Input/Output)デバイスのみであり、割込み管理装置が対応していない新たなI/Oデバイスは共通の割込み番号の割込みを発行できないという課題がある。
また、割込み番号を共用する全てのI/Oデバイスを直接アクセスする方法では、仮想計算機モニタのリリース後にユーザが新たな未サポートのI/Oデバイスを装着する場合は仮想計算機モニタの修正及び再リリースによる追従が必要であるという課題がある。
In a conventional virtual machine system, an interrupt with a common interrupt number can be issued only by an I / O (Input / Output) device supported by the interrupt management device, and a new I / O that is not supported by the interrupt management device. The O device has a problem that it cannot issue an interrupt with a common interrupt number.
In the method of directly accessing all the I / O devices sharing the interrupt number, when the user installs a new unsupported I / O device after the release of the virtual machine monitor, the virtual machine monitor is corrected and re-released. There is a problem that tracking is necessary.
この発明は、かかる課題に鑑みたものであり、複数のOSが動作する計算機システムにおいて、各OSが任意のタイミングで新たなデバイスに対して新たな割込み番号の使用を開始することができ、当該割込み番号が既に他のOSにより使用されている場合であっても2以上のOSの間で割込み番号を共用することができる仕組みを実現することを主な目的とする。 The present invention has been made in view of such a problem. In a computer system in which a plurality of OSs operate, each OS can start using a new interrupt number for a new device at an arbitrary timing. The main object is to realize a mechanism in which an interrupt number can be shared between two or more OSs even when the interrupt number is already used by another OS.
本発明に係る計算機システムは、
複数のOS(Operating System)が動作する計算機システムであって、
割込み番号が含まれる割込みを受付ける割込みコントローラと、
2以上のOSに共用されている共用割込み番号が含まれている割込みがあった場合に当該割込みを処理するOSを割込み処理OSとして特定する共用割込み応答処理部と、
いずれかのOSより出力された、当該OSが使用を開始する割込み番号が示される使用開始割込み番号情報を入力し、前記使用開始割込み番号情報に示される割込み番号が他のOSに使用されているか否かを判断し、当該割込み番号が他のOSに使用されている場合に、当該割込み番号を共用割込み番号に指定し、当該共用割込み番号と前記共用割込み応答処理部とを対応付ける共用割込み制御情報を前記割込みコントローラに設定する割込み番号管理部とを有し、
前記割込みコントローラは、
前記共用割込み制御情報に基づき、受付けた割込みに含まれる割込み番号が共用割込み番号に該当するかを判断し、受付けた割込みに含まれる割込み番号が共用割込み番号に該当する場合に前記共用割込み応答処理部に当該割込みの割込み処理OSを特定させることを特徴とする。
The computer system according to the present invention is:
A computer system in which a plurality of OSs (Operating Systems) operate,
An interrupt controller that accepts an interrupt containing an interrupt number;
A shared interrupt response processing unit that identifies an OS that processes the interrupt as an interrupt processing OS when there is an interrupt including a shared interrupt number shared by two or more OSs;
The use start interrupt number information indicating the interrupt number that the OS starts using is input from any OS, and the interrupt number indicated in the use start interrupt number information is used by another OS. If the interrupt number is used by another OS, the interrupt number is designated as a shared interrupt number, and the shared interrupt control information that associates the shared interrupt number with the shared interrupt response processing unit An interrupt number management unit that sets the interrupt controller in the interrupt controller,
The interrupt controller is
Based on the shared interrupt control information, it is determined whether the interrupt number included in the received interrupt corresponds to the shared interrupt number, and when the interrupt number included in the received interrupt corresponds to the shared interrupt number, the shared interrupt response processing The interrupt processing OS of the interrupt is specified in the section.
本発明によれば、OSが使用を開始する割込み番号が他のOSに使用されているか否かを判断し、他のOSに使用されている場合には、当該割込み番号を共用割込み番号として指定するとともに当該共用割込み番号と共用割込み応答処理部との対応付けを割込みコントローラに設定する。
そして、割込みコントローラが受付けた割込みに含まれる割込み番号が共用割込み番号に該当する場合に、共用割込み応答処理部に当該割込みの割込み処理OSを特定させる。
このため、各OSは任意のタイミングで新たなデバイスに対して新たな割込み番号の使用を開始することができ、当該割込み番号が既に他のOSにより使用されている場合であっても、適切な割込み処理OSに割込みを処理させることができ、2以上のOSの間で割込み番号を共用することができる。
According to the present invention, it is determined whether or not the interrupt number that the OS starts to use is used by another OS, and when the OS is used by another OS, the interrupt number is designated as a shared interrupt number. In addition, the association between the shared interrupt number and the shared interrupt response processing unit is set in the interrupt controller.
When the interrupt number included in the interrupt received by the interrupt controller corresponds to the shared interrupt number, the shared interrupt response processing unit is caused to specify the interrupt processing OS of the interrupt.
For this reason, each OS can start using a new interrupt number for a new device at an arbitrary timing, and even if the interrupt number is already used by another OS, it is appropriate. An interrupt processing OS can process an interrupt, and an interrupt number can be shared between two or more OSs.
実施の形態1.
実施の形態1〜4では、マルチコア構成の仮想計算機システムにおいて、共用割込み番号の割込みを使用する新たなI/Oデバイスへの追従を、仮想計算機モニタを変更せずに行うこと、及び、割込み処理のオーバヘッドを抑える構成を説明する。
なお、共用割込み番号とは、2以上のOSに共用されている割り込み番号である。
また、共用割込み番号を共用するOSを番号共用OSともいう。
Embodiment 1 FIG.
In the first to fourth embodiments, in a multi-core virtual machine system, tracking a new I / O device that uses an interrupt with a shared interrupt number is performed without changing the virtual machine monitor, and interrupt processing A configuration for suppressing the overhead will be described.
The shared interrupt number is an interrupt number shared by two or more OSs.
An OS sharing a shared interrupt number is also referred to as a number sharing OS.
図1は、本実施の形態における仮想計算機システム500の構成を示す図である。
実施の形態1〜4では、複数のOSが動作するマルチコア構成の計算機システムの例として、仮想計算機システム500を説明する。
FIG. 1 is a diagram showing a configuration of a
In the first to fourth embodiments, a
物理計算機100は、プロセッサ110−0、110−1、110−2、110−3、割込みコントローラ120、I/Oデバイス(例えばPCI(Peripheral Components Interconnect)デバイス)130−0、130−1、メモリ140、ディスク装置150(以下、単にディスクとも表記する)を有する。
なお、ディスク装置150もI/Oデバイス130として動作する場合もあるが、ディスク装置150は後述する共用割込み管理テーブル250を記憶する役割を有するため、I/Oデバイス130とは別に示している。
The
Although the
プロセッサ110−0、110−1、110−2、110−3は、それぞれプロセッサ間割込み制御部111−0、111−1、111−2、111−3を有する。
割込みコントローラ120は、外部割込みを割込みベクタに変換してプロセッサに出力する装置であり、割込み番号に対する割込みベクタ及び出力先プロセッサの設定はプログラム可能である。
より具体的には、割込みコントローラ120は、割込みを受付け、受付けた割込みに含まれる割込み番号が共用割込み番号か否かを判断し、受付けた割込みに含まれる割込み番号が共用割込み番号である場合に、当該割込みを処理するゲストOS(割込み処理OS)を仮想計算機モニタ200に特定させる。
一方、受付けた割込みに含まれる割込み番号が共用割込み番号でない場合に、当該割込み番号に対応するゲストOSに当該割込みを処理させる。
なお、割込みコントローラ120により実施される処理は、割込み受付け処理に対応する。
The processors 110-0, 110-1, 110-2, and 110-3 include inter-processor interrupt control units 111-0, 111-1, 111-2, and 111-3, respectively.
The
More specifically, the
On the other hand, if the interrupt number included in the accepted interrupt is not a shared interrupt number, the guest OS corresponding to the interrupt number is caused to process the interrupt.
The process executed by the
仮想計算機モニタ(VMM:Virtual Machine Monitor)200は、プロセッサ110−0〜110−3及びI/Oデバイス130−0〜130−1を論理的に分割して、仮想計算機(VM:Virtual Machine)300−0、300−1を構築する。
プロセッサ110−0、110−1とI/Oデバイス130−0は、仮想計算機300−0に割り当てられる。
プロセッサ110−2、110−3とI/Oデバイス130−1は、仮想計算機300−1に割り当てられる。
また、仮想計算機モニタ200は、プロセッサ110−0〜110−3の全てで実行されるものとする。
また、以下ではプロセッサ110−0が仮想計算機モニタ200のブートプロセッサであるとして説明を行う。
I/Oデバイス130−0及びI/Oデバイス130−1は、ゲストOSから直接アクセス可能、かつ、ゲストOS間で共用されないI/Oデバイスであり、仮想計算機モニタ200によるエミュレートは行わない。
A virtual machine monitor (VMM: Virtual Machine Monitor) 200 logically divides the processors 110-0 to 110-3 and the I / O devices 130-0 to 130-1 into a virtual machine (VM: Virtual Machine) 300. -0, 300-1 are constructed.
The processors 110-0 and 110-1 and the I / O device 130-0 are allocated to the virtual machine 300-0.
The processors 110-2 and 110-3 and the I / O device 130-1 are assigned to the virtual machine 300-1.
The
In the following description, it is assumed that the processor 110-0 is a boot processor for the
The I / O device 130-0 and the I / O device 130-1 are I / O devices that can be directly accessed from the guest OS and are not shared between the guest OSes, and are not emulated by the
仮想計算機モニタ200は、外部割込みハンドラ210、プロセッサ間通信制御部220、割込み注入部230、共用割込み注入先決定部240、共用割込み管理テーブル250及びコントローラ登録部280を有する。
The
外部割込みハンドラ210は、外部割込み発生時に起動され、ゲストOS400への割込みを横取りする。
プロセッサ間通信制御部220は、プロセッサ間でメッセージ通信を行う。
割込み注入部230は、横取りした割込みを、ゲストOS400に注入する処理を行う。
共用割込み注入先決定部240は、外部割込みハンドラ210が横取りした、共用割込み番号による割込み(以下、共用割込みと表記する)について、どのゲストOS400のどのプロセッサ110に注入するかを決定するものである。
なお、外部割込みハンドラ210、割込み注入部230及び共用割込み注入先決定部240により行われる処理は共用割込み応答処理に相当する。
このため、仮想計算機モニタ200を実行するプロセッサ110−0〜110−3、すなわち、共用割込み応答処理を実行するプロセッサ110−0〜110−3は、共用割込み応答処理部の例に相当する。
なお、図1では作図上の理由からプロセッサ110−0を共用割込み番号処理部と表記しているが、プロセッサ110−1〜110−3も同様に共用割込み応答処理部として機能する。
共用割込み応答処理は、より具体的には、割込みコントローラ120から共用割込み番号が含まれる割込みを処理するゲストOS(割込み処理OS)を特定するよう指示され、当該共用割込み番号と後述の共用割込み管理テーブル250とに基づき、当該共用割込み番号を共用する番号共用OSを特定し、特定した各番号共用OSを用いて各番号共用OSに指定されているI/Oデバイス130からの割込み有無を判定し、指定されているI/Oデバイス130からの割込みがあった番号共用OSを割込み処理OSとして特定し、共用割込み管理テーブル250において割込み処理OSに対応付けられているプロセッサに割込み処理OSの割込みハンドラ411を実行させる処理である。
The external interrupt
The inter-processor
The interrupt
The shared interrupt injection
The processing performed by the external interrupt
Therefore, the processors 110-0 to 110-3 that execute the
In FIG. 1, the processor 110-0 is described as a shared interrupt number processing unit for the reason of drawing, but the processors 110-1 to 110-3 also function as a shared interrupt response processing unit.
More specifically, the shared interrupt response processing is instructed by the interrupt
共用割込み管理テーブル250は、共用割込みの割込み処理OSを特定し、共用割込みの注入先を決定するのに必要な情報を、割込み番号ごとに管理するテーブルである。
共用割込み管理テーブル250の詳細は後述する。
The shared interrupt management table 250 is a table that manages information necessary for identifying the interrupt processing OS of the shared interrupt and determining the injection destination of the shared interrupt for each interrupt number.
Details of the shared interrupt management table 250 will be described later.
コントローラ登録部280は、各ゲストOS400が割込みコントローラ120に送信した使用開始割込み番号情報を入力する。
使用開始割込み番号情報は、各ゲストOS400が使用を開始しようとする割込み番号と、各ゲストOS400の割込みハンドラ411の割込みベクタと、各ゲストOS400を実行するプロセッサ110が示される情報である。
更に、コントローラ登録部280は、入力した使用開始割込み番号情報に示される割込み番号が他のゲストOS400に使用されているか否かを判断し、当該割込み番号が他のゲストOS400に使用されている場合に、入力した使用開始割込み番号情報に示される割込み番号を共用割込み番号と指定し、仮想計算機モニタ200(共用割込み応答処理)を実行するプロセッサ110(例えば、プロセッサ110−0)と当該共用割込み番号とを対応付ける情報(共用割込み制御情報の例)を割込みコントローラ120に登録する。
一方、割込み番号が他のゲストOS400に使用されていない場合は、コントローラ登録部280は、使用開始割込み番号情報を割込みコントローラ120に転送する。
なお、コントローラ登録部280により実施される処理は、割込み番号管理処理に相当する。
このため、コントローラ登録部280、すなわち、仮想計算機モニタ200を実行するプロセッサ110−0〜110−3は、割込み番号管理部の例でもある。
なお、図1では作図上の理由からプロセッサ110−0を割込み番号管理部と表記しているが、プロセッサ110−1〜110−3も同様に割込み番号管理部として機能する。
The
The use start interrupt number information is information indicating the interrupt number that each guest OS 400 is about to start using, the interrupt vector of the interrupt
Further, the
On the other hand, if the interrupt number is not used by another guest OS 400, the
The process performed by the
Therefore, the
In FIG. 1, the processor 110-0 is described as an interrupt number management unit for reasons of drawing, but the processors 110-1 to 110-3 also function as an interrupt number management unit.
ここで、本実施の形態における、共用割込み管理テーブル250のデータ構成の例を図2に示す。
図2において、「共用割込み用割込みベクタ」は、仮想計算機モニタ200が共用割込みを横取りするのに使用する割込みベクタ(以下、共用割込み用割込みベクタと表記)を保持する。
共用割込み用割込みベクタには、仮想計算機モニタ200が、共用割込み専用にあらかじめ確保している割込みベクタが使用される。
「登録元OS」は、共用割込みを使用するゲストOSの識別子を保持し、「注入先プロセッサ」、「割込みベクタ」は、該ゲストOSが該共用割込みに対して設定した、割込みベクタ出力先プロセッサ及び割込みベクタの情報を保持する。
「割込み元判定手段」は、ゲストOSから与えられた割込み元判定手段を保持する。
Here, FIG. 2 shows an example of the data configuration of the shared interrupt management table 250 in the present embodiment.
In FIG. 2, a “shared interrupt interrupt vector” holds an interrupt vector (hereinafter referred to as a shared interrupt interrupt vector) used by the virtual machine monitor 200 to intercept the shared interrupt.
As the shared interrupt vector, an interrupt vector reserved in advance by the virtual machine monitor 200 exclusively for the shared interrupt is used.
The “registration source OS” holds the identifier of the guest OS that uses the shared interrupt, and the “injection destination processor” and “interrupt vector” are the interrupt vector output destination processors set by the guest OS for the shared interrupt. And holds the interrupt vector information.
The “interrupt source determination unit” holds the interrupt source determination unit given from the guest OS.
図2の設定例では、割込み番号17番の割込みについて、ゲストOS400−0は、注入先プロセッサをプロセッサ110−0、注入する割込みベクタを49番として設定し、ゲストOS400−1は、注入先プロセッサをプロセッサ110−1、注入する割込みベクタを65番として設定している。
割込み番号17番の割込みは、ゲストOS400−0とゲストOS400−1が共用しており、該割込みは、仮想計算機モニタ200が、241番の割込みベクタで横取りする。
また、割込み番号16番は、ゲストOS400−0のみが使用している。
更に、割込み番号18番は、いずれのゲストOSでも未使用である。
なお、割込み番号18番の行にあるように、割込み番号が未使用であっても、共用割込み用割込みベクタはあらかじめ設定されている。
また、割込み番号17番の行に明らかなように、共用割込み管理テーブル250は、2以上のOSに共用されている共用割込み番号(割込み番号17番)と、共用割込み番号を共用する番号共用OS(ゲストOS400−0とゲストOS400−1)と、各番号共用OSを実行するプロセッサ(プロセッサ110−0とプロセッサ110−1)とを対応付ける情報であり、共用割込み番号情報の例である。
In the setting example of FIG. 2, for the interrupt of interrupt
The interrupt with the interrupt
The interrupt
Furthermore, the interrupt
As shown in the line of the interrupt
Further, as apparent from the line of the interrupt
なお、図1では、仮想計算機モニタ200が共用割込み管理テーブル250を参照することを明示する意味で、仮想計算機モニタ200内に共用割込み管理テーブル250を示しているが、物理計算機100レベルでは、共用割込み管理テーブル250はディスク150に格納されており、仮想計算機モニタ200実行時に、例えば、仮想計算機モニタ200のブートプロセッサが、ディスク150からメモリ140にロードし、プロセッサ110−0〜110−3がメモリ140から読み出して共用割込み管理テーブル250を参照する。
In FIG. 1, the shared interrupt management table 250 is shown in the virtual machine monitor 200 in order to clearly indicate that the
仮想計算機300−0上ではゲストOS400−0が動作し、仮想計算機300−1上ではゲストOS400−1が動作する。 The guest OS 400-0 operates on the virtual computer 300-0, and the guest OS 400-1 operates on the virtual computer 300-1.
ゲストOS400−0は、シングルプロセッサまたはマルチプロセッサ上で動作するOSである。
一例として、本実施の形態では、ゲストOS400−0は、プロセッサ110−0をブートプロセッサとして利用するマルチプロセッサ型OSである。
ゲストOS400−0のデバイスドライバ410−0は、I/Oデバイス130−0のドライバである。
デバイスドライバ410−0は、I/Oデバイス130−0からの割込み処理を行う割込みハンドラ411−0と、割込み元判定手段412−0を有している。
割込み元判定手段412−0は、I/Oデバイス130−0が有する割込み状態レジスタを参照してI/Oデバイス130−0からの割込み有無を確認し、割込みが発生していた場合は真、発生していなかった場合は偽を返す、仮想計算機モニタ200のコンテキストで実行可能な関数である。
上述のように、ゲストOS400−0には、割込みの発行元のデバイスとしてI/Oデバイス130−0が指定されている。
I/Oデバイス130−0は、ゲストOS400−0の割込みの発行元のデバイスとして指定されたデバイスであり、指定デバイスの例である。
また、指定デバイスにアクセスし、指定デバイスからの割込み有無を確認する関数である割込み元判定手段412−0は、割込み有無確認関数の例である。
The guest OS 400-0 is an OS that operates on a single processor or a multiprocessor.
As an example, in the present embodiment, the guest OS 400-0 is a multiprocessor OS that uses the processor 110-0 as a boot processor.
The device driver 410-0 of the guest OS 400-0 is a driver of the I / O device 130-0.
The device driver 410-0 includes an interrupt handler 411-0 that performs interrupt processing from the I / O device 130-0 and an interrupt source determination unit 412-0.
The interrupt source determination unit 412-0 refers to the interrupt status register of the I / O device 130-0 to check whether there is an interrupt from the I / O device 130-0, and is true if an interrupt has occurred. The function that can be executed in the context of the virtual machine monitor 200 returns false if it has not occurred.
As described above, in the guest OS 400-0, the I / O device 130-0 is designated as the interrupt source device.
The I / O device 130-0 is a device designated as an interrupt issuer device of the guest OS 400-0, and is an example of a designated device.
The interrupt source determination unit 412-0, which is a function for accessing the designated device and confirming whether or not there is an interrupt from the designated device, is an example of an interrupt presence / absence confirmation function.
また、ゲストOS400−1は、シングルプロセッサまたはマルチプロセッサ上で動作するOSである。
一例として、本実施の形態では、ゲストOS400−1は、プロセッサ110−2をブートプロセッサとして利用するマルチプロセッサ型OSである。
ゲストOS400−1は、I/Oデバイス130−1のドライバであるデバイスドライバ410−1を有しており、デバイスドライバ410−1は、I/Oデバイス130−1からの割込み処理を行う割込みハンドラ411−1と、割込み元判定手段412−1を有している。
割込み元判定手段412−1は、I/Oデバイス130−1が有する割込み状態レジスタを参照してI/Oデバイス130−1からの割込み有無を確認し、割込みが発生していた場合は真、発生していなかった場合は偽を返す、仮想計算機モニタ200のコンテキストで実行可能な関数である。
上述のように、ゲストOS400−1には、割込みの発行元のデバイスとしてI/Oデバイス130−1が指定されている。
I/Oデバイス130−1は、ゲストOS400−1の割込みの発行元のデバイスとして指定されたデバイスであり、指定デバイスの例である。
また、指定デバイスにアクセスし、指定デバイスからの割込み有無を確認する関数である割込み元判定手段412−1は、割込み有無確認関数の例である。
The guest OS 400-1 is an OS that operates on a single processor or a multiprocessor.
As an example, in the present embodiment, the guest OS 400-1 is a multiprocessor OS that uses the processor 110-2 as a boot processor.
The guest OS 400-1 has a device driver 410-1 that is a driver of the I / O device 130-1, and the device driver 410-1 performs an interrupt handler that performs interrupt processing from the I / O device 130-1. 411-1 and interrupt source determination means 412-1.
The interrupt source determination unit 412-1 checks the presence / absence of an interrupt from the I / O device 130-1 with reference to the interrupt status register of the I / O device 130-1, and is true if an interrupt has occurred. The function that can be executed in the context of the virtual machine monitor 200 returns false if it has not occurred.
As described above, in the guest OS 400-1, the I / O device 130-1 is designated as the interrupt source device.
The I / O device 130-1 is a device designated as a device that issued an interrupt of the guest OS 400-1, and is an example of a designated device.
The interrupt source determination unit 412-1 which is a function for accessing the designated device and confirming the presence / absence of an interrupt from the designated device is an example of an interrupt presence / absence confirmation function.
なお、本実施の形態では、一例として、プロセッサが4個、I/Oデバイスが2個、仮想計算機及びゲストOSが2個の構成を示しているが、仮想計算機内のゲストOSが一つであり、プロセッサ及びI/Oデバイスが、ゲストOSに対して占有割り当てされる構成ならば、これらの構成要素の数は限定しない。 In this embodiment, as an example, a configuration is shown in which there are four processors, two I / O devices, two virtual machines and two guest OSes, but there is only one guest OS in the virtual machine. If the configuration is such that the processor and the I / O device are exclusively allocated to the guest OS, the number of these components is not limited.
次に、本実施の形態における各構成要素の動作について説明する。 Next, the operation of each component in the present embodiment will be described.
図3は、本実施の形態において、ゲストOS400による割込みコントローラ120の設定処理を、仮想計算機モニタ200が捕捉して、共用割込み管理テーブル250の設定を行う処理のフローチャートである。
なお、以下では、コントローラ登録部280や共用割込み注入先決定部240等の仮想計算機モニタ200内の要素が所定の動作を行うといった表現で説明を行う場合があるが、これは、仮想計算機モニタ200が実行されているプロセッサ(例えば、ゲストOS400の場合は、ゲストOS400のブートプロセッサであるプロセッサ110−0)が、コントローラ登録部280や共用割込み注入先決定部240等として所定の動作(割込み番号管理処理や共用割込み応答処理)を行うという意味である。
FIG. 3 is a flowchart of a process in which the
In the following description, there may be a case where the elements in the virtual machine monitor 200 such as the
まず、ステップS101において、ゲストOS400が、割込みコントローラ120に対して、割込み番号に出力先プロセッサと割込みベクタを設定する操作を行う。
つまり、ゲストOS400は、これから使用を開始する割込み番号と、当該ゲストOS400の割込みハンドラ411の割込みベクタと、当該ゲストOS400を実行するプロセッサ110が示される使用開始割込み番号情報を割込みコントローラ120に対して出力する。
次に、ステップS102で、仮想計算機モニタ200が、ゲストOS400による割込みコントローラ120へのアクセスを捕捉する。
つまり、コントローラ登録部280が、割込みコントローラ120への入力に先立ち、使用開始割込み番号情報を入力する。
次に、ステップS103で、コントローラ登録部280が、使用開始割込み番号情報に含まれる割込み番号を他のゲストOSが使用中であるかどうかチェックする。
具体的には、共用割込み管理テーブル250の、該割込み番号の行の、登録元OSの項をチェックし、他のゲストOSの登録の有無をチェックする。
ステップS103において、該割込み番号を使用する他のゲストOSが存在しない場合、ステップS104で、コントローラ登録部280は、ゲストOS400による割込みコントローラ120の操作をそのままエミュレーションする。
すなわち、コントローラ登録部280は、使用開始割込み番号情報をそのまま割込みコントローラ120に転送する。
割込みコントローラ120では、使用開始割込み番号情報に含まれる内容をそのまま登録する。
一方、ステップS103において、使用開始割込み番号情報に含まれる割込み番号を他のゲストOSが使用中の場合、ステップS105で、コントローラ登録部280は、当該割込み番号を共用割込み番号と指定し、割込みコントローラ120を操作し、該共用割込み番号に対し、出力先プロセッサとして仮想計算機モニタ200が使用するプロセッサの一つ、例えば、仮想計算機モニタ200のブートプロセッサを設定し、割込みベクタとして共用割込み用割込みベクタを設定する。
つまり、コントローラ登録部280は、共用割込み番号と共用割込み用割込みベクタと仮想計算機モニタ200のブートプロセッサとを対応付ける情報(共用割込み制御情報の例)を割込みコントローラ120に設定する。
最後に、ステップS106で、コントローラ登録部280は、共用割込み管理テーブル250に対し、登録元OS、注入先プロセッサ、割込みベクタの登録を行い、終了する。
なお、本実施の形態では、割込みコントローラ120への情報の設定、共用割込み管理テーブル250の設定を、割込みコントローラ120へのアクセスを捕捉することにより行っているが、代わりに、ゲストOSからハイパーコールを呼び出すことにより行ってもよい。
First, in step S101, the guest OS 400 performs an operation for setting an output destination processor and an interrupt vector as an interrupt number for the interrupt
In other words, the guest OS 400 gives the interrupt
Next, in step S <b> 102, the
That is, the
Next, in step S103, the
Specifically, the entry of the registration source OS in the line of the interrupt number in the shared interrupt management table 250 is checked, and the presence / absence of registration of another guest OS is checked.
If there is no other guest OS using the interrupt number in step S103, the
That is, the
The interrupt
On the other hand, in step S103, if another guest OS is using the interrupt number included in the use start interrupt number information, in step S105, the
That is, the
Finally, in step S106, the
In this embodiment, information is set to the interrupt
図16は、割込みコントローラ120に登録される割込みコントローラ登録情報の例を示す。
図16(a)は、割込み番号17番がゲストOS400−0にのみ使用される場合に、割込みコントローラ120に登録される割込みコントローラ登録情報を示している。
つまり、図16(a)の割込みコントローラ登録情報では、ゲストOS400−0から出力された使用開始割込み番号情報そのままに、出力先プロセッサの欄にはゲストOS400−0を実行するプロセッサ110−0が示され、また、割込みベクタの欄には、ゲストOS400−0の割込みベクタ:49番が示される。
図16(a)の割込みコントローラ登録情報が割込みコントローラ120に登録されているときには、図2の共用割込み管理テーブル250の割込み番号17番の行には、登録元OS:400−0の行のみが登録されている。
図16(b)は、図16(a)の割込みコントローラ登録情報が割込みコントローラ120に登録されている状態で、コントローラ登録部280が割込み番号17番についての、ゲストOS400−1からの使用開始割込み番号情報を捕捉し、割込みコントローラ120に新たに共用割込みに関する情報を設定した場合の割込みコントローラ登録情報を示している。
この場合は、コントローラ登録部280は、共用割込み管理テーブル250を参照し、割込み番号17番は既に他のゲストOS(OS400−0)により使用されていると判断する。
2つのゲストOS400により共用されるので、図16(b)の割込みコントローラ登録情報の出力先プロセッサの欄には仮想計算機モニタ200を実行するプロセッサ110−0が示され、また、割込みベクタの欄には、共用割込み用割込みベクタ:241番が示される。
なお、図16(b)の割込み番号17番の行の情報が共用割込み制御情報の例である。
図16(b)の割込みコントローラ登録情報が割込みコントローラ120に設定されると、コントローラ登録部280は、共用割込み管理テーブル250の割込み番号17番の行を変更し、図2に示すように、割込み番号17番の行に、登録元OS:400−0の行と登録元OS:400−1の行が設定されることになる。
FIG. 16 shows an example of interrupt controller registration information registered in the interrupt
FIG. 16A shows interrupt controller registration information registered in the interrupt
That is, in the interrupt controller registration information in FIG. 16A, the use start interrupt number information output from the guest OS 400-0 is left as it is, and the processor 110-0 executing the guest OS 400-0 is displayed in the output destination processor column. In addition, the interrupt
When the interrupt controller registration information in FIG. 16A is registered in the interrupt
FIG. 16B shows a state where the interrupt registration information of FIG. 16A is registered in the interrupt
In this case, the
Since it is shared by the two guest OSs 400, the processor 110-0 executing the
Note that the information on the line of the interrupt
When the interrupt controller registration information in FIG. 16B is set in the interrupt
図4は、本実施の形態において、ゲストOS400が、仮想計算機モニタ200に対して、割込み元判定手段の登録を行う処理のフローチャートである。 FIG. 4 is a flowchart of processing in which the guest OS 400 registers the interrupt source determination unit in the virtual machine monitor 200 in the present embodiment.
まず、ステップS111において、ゲストOS400は、通常のデバイスドライバ初期化処理、例えば、割込みベクタに対する割込みハンドラの接続などの処理を実行する。
次に、ステップS112で、ゲストOS400は、仮想計算機モニタ200に対して、デバイスドライバ410が有する割込み元判定手段412の登録を依頼する。
そして、ステップS113で、仮想計算機モニタ200は、割込み番号と登録元OSをキーとして、共用割込み管理テーブル250に対して、割込み元判定手段412を登録する。
First, in step S111, the guest OS 400 executes normal device driver initialization processing, for example, processing such as connection of an interrupt handler to an interrupt vector.
In step S112, the guest OS 400 requests the virtual machine monitor 200 to register the interrupt
In step S113, the virtual machine monitor 200 registers the interrupt
図5は、本実施の形態において、共用割込みが発生した場合の割込み処理の手順を示すフローチャートである。 FIG. 5 is a flowchart showing the procedure of interrupt processing when a shared interrupt occurs in the present embodiment.
まず、ステップS121において、I/Oデバイス130が割込みを発行する。
次に、ステップS122では、割込みコントローラ120が、図16に例示した割込みコントローラ登録情報を参照し、当該割込みに含まれる割込み番号が共用割込み番号であると判断し、仮想計算機モニタ200のブートプロセッサ(例えば、プロセッサ110−0)に対して、共用割込み用割込みベクタを出力する。
次に、ステップS123において、仮想計算機モニタ200のブートプロセッサが共用割込み用割込みベクタに基づき、仮想計算機モニタ200の外部割込みハンドラ210を起動し、共用割込み注入先決定部240が呼び出される。
次に、ステップS124では、仮想計算機モニタ200のブートプロセッサが共用割込み注入先決定部240を実行する。
つまり、仮想計算機モニタ200のブートプロセッサが、共用割込み注入先決定部240として、共用割込み管理テーブル250に登録されている割込み元判定手段412を用いて、注入先プロセッサと注入する割込みベクタを特定する。
具体的には、共用割込み管理テーブル250の、発生した割込み番号の行に登録されている全ての割込み元判定手段412を順に実行し(関数である割込み元判定手段412を実行し)、真を返した割込み元判定手段412の行の、注入先プロセッサと割込みベクタの項の内容を取得する。
つまり、真を返した割込み元判定手段412の行の登録元OSの欄に示されているゲストOSが共用割込みを処理させる割込み処理OSであり、注入先プロセッサの欄に示されているプロセッサが割込み処理OSを実行するプロセッサであり、割込みベクタの欄に示されている割込みベクタが割込み処理OSの割込みハンドラの割込みベクタである。
First, in step S121, the I / O device 130 issues an interrupt.
Next, in step S122, the interrupt
Next, in step S123, the boot processor of the
In step S124, the boot processor of the
That is, the boot processor of the virtual machine monitor 200 uses the interrupt
Specifically, all interrupt source determination means 412 registered in the line of the generated interrupt number in the shared interrupt management table 250 are executed in order (execution of the interrupt source determination means 412 as a function is executed), and true is set. The contents of the injection destination processor and interrupt vector terms in the returned line of the interrupt source determination means 412 are acquired.
That is, the guest OS shown in the registration source OS column of the line of the interrupt
ステップS125では、仮想計算機モニタ200のブートプロセッサが、共用割込み注入先決定部240として、割込みを横取りしたプロセッサ即ち仮想計算機モニタ200のブートプロセッサが、ステップS124で特定した注入先プロセッサと等しいかどうかチェックする。
ステップS125において、割込み注入先プロセッサが仮想計算機モニタ200のブートプロセッサと等しくない場合、ステップS126で、仮想計算機モニタ200のブートプロセッサは、プロセッサ間通信制御部220を用いて、割込み注入先プロセッサに対して、ステップS124で特定した割込みベクタを転送する。
次に、ステップS127では、割込み注入先プロセッサが、割込み注入部230として、ゲストOS(割込み処理OS)に対して、ステップS124で特定した割込みベクタを注入し、最後に、ステップS128で、ゲストOS(割込み処理OS)の割込みハンドラが起動する。
In step S125, the boot processor of the
If the interrupt injection destination processor is not equal to the boot processor of the virtual machine monitor 200 in step S125, the boot processor of the virtual machine monitor 200 uses the inter-processor
Next, in step S127, the interrupt injection destination processor injects the interrupt vector specified in step S124 to the guest OS (interrupt processing OS) as the interrupt
具体例として、共用割込み管理テーブル250が図2の通りに設定され、割込みコントローラ登録情報が図16(b)の通りに設定されている場合において、I/Oデバイス130−1が割込み番号17番の割込みを発行した場合の例を以下に示す。 As a specific example, when the shared interrupt management table 250 is set as shown in FIG. 2 and the interrupt controller registration information is set as shown in FIG. 16B, the I / O device 130-1 has an interrupt number of No. 17. An example of issuing an interrupt is shown below.
I/Oデバイス130−1が、共用割込みである割込み番号17番の割込みを発行すると、ステップS122で、仮想計算機モニタ200のブートプロセッサ(例えば、プロセッサ110−0)に対して、割込みコントローラ120から割込みベクタ241番が出力される。
次に、ステップS123において、仮想計算機モニタ200の外部割込みハンドラ210が起動し、共用割込み注入先決定部240が呼び出される。
次に、ステップS704で、共用割込み注入先決定部240が、共用割込み管理テーブル250の、割込み番号17番の行に登録されている割込み元判定手段412−0及び412−1を順に実行し、割込み判定手段412−1が真を返すので、注入先プロセッサはプロセッサ110−1、注入する割込みベクタは65番と決定される。
ステップS125では、割込みを横取りしたプロセッサが、ステップS124で特定した注入先プロセッサと等しくないと判定され、ステップS126で、プロセッサ間通信制御部220により、注入先プロセッサであるプロセッサ110−1に対して、割込みベクタ65番が転送される。
次に、ステップS127では、割込み注入部230が、ゲストOS400−1に対して、割込みベクタ65番を注入し、最後に、ステップS128で、ゲストOS400−1の割込みハンドラが起動する。
When the I / O device 130-1 issues an interrupt of interrupt
Next, in step S123, the external interrupt
Next, in step S704, the shared interrupt injection
In step S125, it is determined that the processor that intercepted the interrupt is not equal to the injection destination processor specified in step S124. In step S126, the inter-processor
Next, in step S127, the interrupt
以上に示すように、本実施の形態では、I/Oデバイスの割込み状態レジスタを参照して割込みの有無の判定を行う割込み元判定手段を、ゲストOSが仮想計算機モニタに登録し、共用割込みの発生時には、仮想計算機モニタが割込み元判定手段を実行することにより、割込み元デバイス即ち割込み注入先プロセッサの特定を行う。
これにより、仮想計算機モニタの変更を行わずに、新たなI/Oデバイスへの追従を効率的に行うことができる。
また、本実施の形態では、ゲストOSが使用を開始する割込み番号が他のゲストOSに使用されているか否かを判断し、他のゲストOSに使用されている場合には、当該割込み番号を共用割込み番号として指定するとともに当該共用割込み番号を仮想計算機モニタと対応付ける情報を割込みコントローラに設定する。
そして、割込みコントローラは、受付けた割込みに含まれる割込み番号が共用割込み番号に該当する場合に仮想計算機モニタに割込み処理OSを特定させる。
このため、当該割込み番号が既に他のOSにより使用されている場合であっても、適切な割込み処理OSに割込みを処理させることができ、2以上のOSの間で割込み番号を共用することができる。
As described above, in this embodiment, the guest OS registers the interrupt source determination unit that determines whether or not there is an interrupt with reference to the interrupt status register of the I / O device, and the shared interrupt At the time of occurrence, the virtual machine monitor executes the interrupt source determination means to identify the interrupt source device, that is, the interrupt injection destination processor.
Thereby, it is possible to efficiently follow a new I / O device without changing the virtual machine monitor.
Further, in this embodiment, it is determined whether or not the interrupt number that the guest OS starts to use is used by another guest OS. If the guest OS is used by another guest OS, the interrupt number is set. Designate as a shared interrupt number, and set information for associating the shared interrupt number with the virtual machine monitor in the interrupt controller.
Then, the interrupt controller causes the virtual machine monitor to specify the interrupt processing OS when the interrupt number included in the received interrupt corresponds to the shared interrupt number.
For this reason, even when the interrupt number is already used by another OS, it is possible to cause an appropriate interrupt processing OS to process the interrupt and to share the interrupt number between two or more OSs. it can.
以上、本実施の形態では、
物理計算機上で仮想計算機モニタが動作し、仮想計算機モニタによって構築される仮想計算機上でゲストOSが動作する仮想計算機システムであって、
制御対象I/Oデバイスからの割込みの有無を検査する「割込み元判定手段」を有するデバイスドライバを備えるゲストOSと、
ゲストOSによる割込み番号の使用状況やゲストOS間で共用される割込み番号の割込みの注入先ゲストOSを判定するための情報などを保持する「共用割込み管理テーブル」と、ゲストOSによる割込みコントローラの操作を横取りするか、または、ゲストOSから依頼されて、共用される割込み番号の割込みの注入先ゲストOSを決定するための情報を前記共用割込み管理テーブルに対して登録する手段と、ゲストOSからの前記割込み元判定手段の登録を受け付ける手段と、共用される割込み番号の割込みの発生時に、該割込みを横取りし、該割込み番号に関連付けられた前記割込み元判定手段を実行して、割込み発生元のI/Oデバイスを特定し、前記共用割込み管理テーブルから該割込みの注入先ゲストOSのプロセッサ及び割込みベクタを特定する「共用割込み注入先決定部」を備える仮想計算機モニタ
を備える仮想計算機システムを説明した。
As described above, in the present embodiment,
A virtual machine system in which a virtual machine monitor runs on a physical machine and a guest OS runs on a virtual machine constructed by the virtual machine monitor,
A guest OS including a device driver having an “interrupt source determination unit” that checks whether or not there is an interrupt from the control target I / O device;
A "shared interrupt management table" that holds information such as the usage status of interrupt numbers by guest OSs and the determination of the guest OS to which interrupts with interrupt numbers that are shared among guest OSs are injected, and interrupt controller operations by guest OSs Or a means for registering information for determining a guest OS to which an interrupt with a shared interrupt number is requested and registered in the shared interrupt management table upon request from the guest OS, and from the guest OS. The means for accepting the registration of the interrupt source determination means, and when an interrupt with a shared interrupt number occurs, the interrupt is intercepted, the interrupt source determination means associated with the interrupt number is executed, and the interrupt source The I / O device is specified, and the processor and interrupt of the guest OS into which the interrupt is injected from the shared interrupt management table It described a virtual computer system comprising a virtual machine monitor with the "shared interrupt injection determination section" for specifying a vector.
また、本実施の形態では、
前記割込み元判定手段が、該割込み元判定手段を有するデバイスドライバの制御対象I/Oデバイスにアクセスして割込みの有無を判定する、前記仮想計算機モニタのコンテキストで実行可能な関数であることを説明した。
In the present embodiment,
Explaining that the interrupt source determination unit is a function that can be executed in the context of the virtual machine monitor that accesses the control target I / O device of the device driver having the interrupt source determination unit to determine the presence or absence of an interrupt. did.
また、本実施の形態で説明した仮想計算機システムを、以下のステップを備える割込み制御方法としても把握することができる。
仮想計算機モニタが、ゲストOSによる割込みコントローラの操作を横取りするか、または、ゲストOSから依頼されて、共用される割込み番号の割込みの注入先ゲストOSを決定するための情報を前記共用割込み管理テーブルに対して登録するステップと、
ゲストOSが、仮想計算機モニタに対して、前記割込み元判定手段を登録するステップと、
共用される割込み番号の割込みの発生時に、仮想計算機モニタが、該割込みを横取りし、該割込み番号に関連付けられた前記割込み元判定手段を実行して、割込み発生元のI/Oデバイスを特定し、前記共用割込み管理テーブルから該割込みの注入先ゲストOSのプロセッサ及び割込みベクタを特定するステップ。
Further, the virtual machine system described in the present embodiment can be grasped as an interrupt control method including the following steps.
The virtual interrupt monitor intercepts the operation of the interrupt controller by the guest OS, or is requested by the guest OS, and information for determining the guest OS to which the interrupt with the interrupt number to be shared is injected is the shared interrupt management table. Registering with
A step in which the guest OS registers the interrupt source determination means with respect to the virtual machine monitor;
When an interrupt with a shared interrupt number occurs, the virtual machine monitor intercepts the interrupt and executes the interrupt source determination means associated with the interrupt number to identify the I / O device that generated the interrupt. Identifying a processor and an interrupt vector of the guest OS into which the interrupt is injected from the shared interrupt management table.
また、本実施の形態で説明した仮想計算機システムを、以下のステップを計算機に実行させるためのプログラムとしても把握することができる。
仮想計算機モニタが、ゲストOSによる割込みコントローラの操作を横取りするか、または、ゲストOSから依頼されて、共用される割込み番号の割込みの注入先ゲストOSを決定するための情報を前記共用割込み管理テーブルに対して登録するステップと、
ゲストOSが、仮想計算機モニタに対して、前記割込み元判定手段を登録するステップと、
共用される割込み番号の割込みの発生時に、仮想計算機モニタが、該割込みを横取りし、該割込み番号に関連付けられた前記割込み元判定手段を実行して、割込み発生元のI/Oデバイスを特定し、前記共用割込み管理テーブルから該割込みの注入先ゲストOSのプロセッサ及び割込みベクタを特定するステップ。
In addition, the virtual computer system described in the present embodiment can be grasped as a program for causing a computer to execute the following steps.
The virtual interrupt monitor intercepts the operation of the interrupt controller by the guest OS, or is requested by the guest OS, and information for determining the guest OS to which the interrupt with the interrupt number to be shared is injected is the shared interrupt management table. Registering with
A step in which the guest OS registers the interrupt source determination means with respect to the virtual machine monitor;
When an interrupt with a shared interrupt number occurs, the virtual machine monitor intercepts the interrupt and executes the interrupt source determination means associated with the interrupt number to identify the I / O device that generated the interrupt. Identifying a processor and an interrupt vector of the guest OS into which the interrupt is injected from the shared interrupt management table.
実施の形態2.
実施の形態1では、仮想計算機モニタ200が割込み注入先プロセッサを決定する際と、割込みを注入されたゲストOSのデバイスドライバが割込み処理を行う際に、それぞれI/Oデバイスの割込み状態レジスタを参照していたが、本実施の形態では、割込み状態レジスタの参照回数を一回にまとめる構成と動作を説明する。
Embodiment 2. FIG.
In the first embodiment, the
図6は、実施の形態2における、仮想計算機モニタ200の構成を示す図である。
本実施の形態において、仮想計算機モニタ200は、新たに、割込み状態レジスタ保存領域260を有する。
仮想計算機モニタ200が有するその他の構成要素ないし仮想計算機モニタ200以外の構成要素は、実施の形態1と同一であり、説明を省略する。
割込み状態レジスタ保存領域260は、割込み元判定手段412にて読み出した、I/Oデバイスの割込み状態レジスタの内容(以下、レジスタ情報という)を退避する領域である。
このように、割込み状態レジスタ保存領域260はレジスタ情報の蓄積領域であり、レジスタ情報蓄積部の例である。
なお、割込み状態レジスタ保存領域260は、例えば、メモリ140に構成されることが考えられる。
FIG. 6 is a diagram illustrating a configuration of the virtual machine monitor 200 according to the second embodiment.
In the present embodiment, the virtual machine monitor 200 newly has an interrupt state
The other constituent elements of the virtual machine monitor 200 or the constituent elements other than the virtual machine monitor 200 are the same as those in the first embodiment, and a description thereof will be omitted.
The interrupt status
Thus, the interrupt status
Note that the interrupt status
本実施の形態における、共用割込み注入先決定部240が実行する、割込み判定手段412の処理手順のフローチャートを、図7に示す。
FIG. 7 shows a flowchart of the processing procedure of the interrupt
共用割込み注入先決定部240は、ステップS201でI/Oデバイス130の割込み状態レジスタを参照し、その内容を所定のメモリ領域に保持する。
次に、ステップS202で、共用割込み注入先決定部240は、メモリ140内の所定領域に保持している割込み状態レジスタの内容をチェックし、該I/Oデバイス130が割込み発生元であるかどうか調べる。
ステップS202において、該I/Oデバイス130が割込み発生元であると判定した場合、ステップS203で、メモリ140上に保持している割込み状態レジスタの内容を、メモリ内の他の領域である割込み状態レジスタ保存領域260に退避する。
そして、ステップS204で返り値を真として、終了する。
また、ステップS202において、該I/Oデバイス130が割込み発生元でないと判定した場合、ステップS205で、返り値を偽として、終了する。
In step S201, the shared interrupt injection
Next, in step S202, the shared interrupt injection
If it is determined in step S202 that the I / O device 130 is an interrupt source, in step S203, the contents of the interrupt status register held in the
In step S204, the return value is set to true, and the process ends.
If it is determined in step S202 that the I / O device 130 is not an interrupt generation source, the return value is set to false in step S205, and the process ends.
本実施の形態における、割込みハンドラ411の処理手順のフローチャートを、図8に示す。
割込みハンドラ411は、ステップS211において、I/Oデバイス130内の割込み状態レジスタを直接参照する代わりに、割込み状態レジスタ保存領域260を参照し、その値を使用して、通常の割込みハンドラの処理をステップS212で実行する。
FIG. 8 shows a flowchart of the processing procedure of the interrupt
In step S211, the interrupt
以上に示すように、本実施の形態では、I/Oデバイスの割込み状態レジスタへのアクセスは、仮想計算機モニタ200による一回のみであり、ゲストOSのデバイスドライバは、メモリ上に退避された割込み状態レジスタの内容を参照する。
これにより、I/Oデバイスへの合計アクセス回数が減り、オーバヘッドを削減することができる。
また、割込み状態レジスタが、読み取り時に自動クリアされるI/Oデバイスに対応可能となる。
As described above, in the present embodiment, the virtual machine monitor 200 accesses the interrupt status register of the I / O device only once, and the guest OS device driver saves the interrupt saved in the memory. Refers to the contents of the status register.
As a result, the total number of accesses to the I / O device is reduced, and overhead can be reduced.
In addition, the interrupt status register can correspond to an I / O device that is automatically cleared at the time of reading.
本実施の形態では、
前記仮想計算機モニタは、さらに、I/Oデバイスの割込み状態レジスタの内容を保存するための「割込み状態レジスタ保存領域」を備え、
共用される割込み番号の割込みの発生時に、前記仮想計算機モニタが、共用割込み注入先決定部の実行時にI/Oデバイスの割込み状態レジスタの内容を読み出した際に、該レジスタの内容を前記割込み状態レジスタ保存領域に退避し、
該割込みを処理するデバイスドライバの割込みハンドラでは、前記割込み状態レジスタ保存領域から、割込み状態レジスタの内容を取得することを説明した。
In this embodiment,
The virtual machine monitor further includes an “interrupt status register storage area” for storing the contents of the interrupt status register of the I / O device,
When an interrupt with a shared interrupt number occurs, when the virtual machine monitor reads the contents of the interrupt status register of the I / O device during execution of the shared interrupt injection destination determination unit, the contents of the register are changed to the interrupt status. Save to the register save area,
It has been described that the interrupt handler of the device driver that processes the interrupt acquires the contents of the interrupt status register from the interrupt status register storage area.
実施の形態3.
本実施の形態においては、I/Oデバイス間で優先度(以下、デバイス優先度と表記)を定めておき、デバイス優先度の高いI/Oデバイスの割込み処理のオーバヘッドを削減する構成と動作を説明する。
Embodiment 3 FIG.
In the present embodiment, a configuration and operation for reducing the overhead of interrupt processing of an I / O device having a high device priority by setting a priority (hereinafter referred to as a device priority) between I / O devices. explain.
実施の形態3における、共用割込み管理テーブル250のデータ構成の例を図9に示す。 FIG. 9 shows an example of the data configuration of the shared interrupt management table 250 in the third embodiment.
本実施の形態において、共用割込み管理テーブル250は、新たに、「デバイス番号」と「デバイス優先度」の項を有する。
仮想計算機モニタ200が有するその他の構成要素ないし仮想計算機モニタ200以外の構成要素は、実施の形態2と同一であり、説明を省略する。
共用割込み管理テーブル250において、「デバイス番号」は、デバイスの識別子を保持する。
例えば、PCIデバイスの場合、BDF番号(バス番号、デバイス番号、ファンクション番号)が格納される。「デバイス優先度」は、デバイス優先度を保持する。
図9の設定例では、ゲストOS400−0が利用するI/Oデバイス130−0は、デバイス優先度が30であり、ゲストOS400−1が利用するI/Oデバイス130−1は、デバイス優先度が60である。
なお、本実施の形態では、デバイス優先度は、値が大きいほど高いものとする。
デバイス優先度の設定は、一例として、ゲストOSのデバイスドライバから設定してもよいし、仮想計算機モニタ200が決定してもよい。
In the present embodiment, the shared interrupt management table 250 newly has items of “device number” and “device priority”.
The other constituent elements of the virtual machine monitor 200 or the constituent elements other than the virtual machine monitor 200 are the same as those in the second embodiment, and a description thereof will be omitted.
In the shared interrupt management table 250, “device number” holds an identifier of a device.
For example, in the case of a PCI device, a BDF number (bus number, device number, function number) is stored. “Device priority” holds the device priority.
In the setting example of FIG. 9, the I / O device 130-0 used by the guest OS 400-0 has a device priority of 30, and the I / O device 130-1 used by the guest OS 400-1 has a device priority. Is 60.
In the present embodiment, the device priority is higher as the value is larger.
As an example, the setting of the device priority may be set from the device driver of the guest OS, or may be determined by the
図10は、本実施の形態において、ゲストOS400が、仮想計算機モニタ200の共用割込み管理テーブル250に対して、デバイス番号及びデバイス優先度の登録を行う処理のフローチャートである。 FIG. 10 is a flowchart of processing in which the guest OS 400 registers the device number and the device priority with respect to the shared interrupt management table 250 of the virtual machine monitor 200 in this embodiment.
ステップS111は、実施の形態1のフローチャートS110のステップS111と同一であり、説明を省略する。
次に、ステップS301で、ゲストOS400は、仮想計算機モニタ200に対して、割込み番号と登録元OSをキーとして、共用割込み管理テーブル250に対して、割込み元判定手段、デバイス番号、デバイス優先度の登録を依頼する。
そして、ステップS302で、仮想計算機モニタ200は、ゲストOS400から与えられた割込み番号と登録元OSをキーとして、共用割込み管理テーブル250に対して、割込み元判定手段412、デバイス番号、デバイス優先度を登録する。
この際、共用割込み管理テーブル250の、同一の割込み番号に属する各行は、デバイス優先度の値で整列して登録される。
整列順序は昇順でもよいし、降順でもよい。
図9の設定例では、一例として、共用割込み管理テーブル250の、割込み番号17番に属する各行を、デバイス優先度の昇順で整列している。
Step S111 is the same as step S111 of flowchart S110 of the first embodiment, and a description thereof is omitted.
Next, in step S301, the guest OS 400 sends an interrupt source determination unit, a device number, and a device priority to the virtual interrupt
In step S302, the virtual machine monitor 200 sets the interrupt
At this time, each row belonging to the same interrupt number in the shared interrupt management table 250 is registered in alignment with the device priority value.
The order of arrangement may be ascending or descending.
In the setting example of FIG. 9, as an example, the rows belonging to the interrupt
図11は、本実施の形態において、共用割込みが発生した場合の割込み処理の手順を示すフローチャートである。 FIG. 11 is a flowchart showing a procedure of interrupt processing when a shared interrupt occurs in the present embodiment.
ステップS311以外のステップは、実施の形態1のフローチャートS120の各ステップと同一であり、説明を省略する。
ステップS311では、共用割込み注入先決定部240が、共用割込み管理テーブル250に登録されている割込み元判定手段412を用いて、注入先プロセッサと注入する割込みベクタを特定する。
具体的には、共用割込み管理テーブル250の、発生した割込み番号の行に登録されている全ての割込み元判定手段を、デバイス優先度が高いものから順に実行し、真を返した割込み元判定手段の行の、注入先プロセッサと割込みベクタの項の内容を取得する。
Steps other than step S311 are the same as those in flowchart S120 of the first embodiment, and a description thereof is omitted.
In step S311, the shared interrupt injection
Specifically, all the interrupt source determination means registered in the line of the generated interrupt number in the shared interrupt management table 250 are executed in descending order of device priority, and the interrupt source determination means that returns true Get the contents of the injection destination processor and interrupt vector terms in the row.
以上に示すように、本実施の形態では、共用割込みの発生時には、優先度の高いI/Oデバイスから順に割込み元判定手段が実行されるので、優先度の高いI/Oデバイスほど、共用割込み発生時の割込み処理のオーバヘッドを削減することができる。 As described above, in this embodiment, when a shared interrupt occurs, the interrupt source determination unit is executed in order from the I / O device with the highest priority. It is possible to reduce the overhead of interrupt processing at the time of occurrence.
以上、本実施の形態では、
前記共用割込み管理テーブルは、さらに、I/Oデバイスの識別子である「デバイス番号」と、I/Oデバイス間での割込み処理の優先順位を定める「デバイス優先度」を保持する項を有し、
前記デバイス番号の値は、該デバイスを使用するゲストOSによって前記仮想計算機モニタに対して登録され、
前記デバイス優先度の値は、該デバイスを使用するゲストOSによって前記仮想計算機モニタに対して登録されるか、または、前記仮想計算機モニタによって決定され、
前記共用割込み管理テーブルの割込み元判定手段は、前記仮想計算機モニタによって、割込み番号ごとに、前記デバイス優先度の順で整列して登録され、
共用される割込み番号の割込みの発生時には、前記仮想計算機モニタが、該割込み番号に関連付けられた前記割込み元判定手段を、前記デバイス優先度が高い順に実行することを説明した。
As described above, in the present embodiment,
The shared interrupt management table further includes a section that holds a “device number” that is an identifier of an I / O device and a “device priority” that defines a priority of interrupt processing between I / O devices,
The value of the device number is registered with the virtual machine monitor by the guest OS that uses the device,
The device priority value is registered with the virtual machine monitor by a guest OS that uses the device, or is determined by the virtual machine monitor,
The interrupt source determination unit of the shared interrupt management table is registered by the virtual machine monitor in order of the device priority for each interrupt number,
It has been explained that when an interrupt with a shared interrupt number occurs, the virtual machine monitor executes the interrupt source determination means associated with the interrupt number in descending order of the device priority.
実施の形態4.
本実施の形態においては、デバイス優先度が最も高いI/Oデバイスの割込み処理のオーバヘッドを削減する構成と動作を説明する。
Embodiment 4 FIG.
In the present embodiment, a configuration and operation for reducing the overhead of interrupt processing of an I / O device having the highest device priority will be described.
図12は、実施の形態4における、仮想計算機モニタ200の構成を示す図である。
本実施の形態において、仮想計算機モニタ200は、新たに、外部割込み受付プロセッサ管理部270を有する。
さらに、共用割込み管理テーブル250は、新たに、「共用割込み受付プロセッサ」の項を有する。
仮想計算機モニタ200が有するその他の構成要素ないし仮想計算機モニタ200以外の構成要素は、実施の形態3と同一であり、説明を省略する。
外部割込み受付プロセッサ管理部270は、仮想計算機モニタ200が、共用割込みをどのプロセッサで受け付けるかを設定するものである。
FIG. 12 is a diagram illustrating a configuration of the virtual machine monitor 200 according to the fourth embodiment.
In the present embodiment, the virtual machine monitor 200 newly includes an external interrupt reception
Furthermore, the shared interrupt management table 250 has a new item “shared interrupt acceptance processor”.
The other constituent elements of the virtual machine monitor 200 or the constituent elements other than the virtual machine monitor 200 are the same as those in the third embodiment, and a description thereof will be omitted.
The external interrupt acceptance
実施の形態4における、共用割込み管理テーブル250のデータ構成の例を図13に示す。
「共用割込み受付プロセッサ」の項は、共用割込みを受け付けるプロセッサの識別子を保持する。
図13の設定例では、ゲストOS400−0が有する、デバイス優先度30のI/Oデバイス130−0と、ゲストOS400−1が有する、デバイス優先度60のI/Oデバイス130−1が、割込み番号17番の割込みを共用しており、該割込みは、仮想計算機モニタ200が、プロセッサ110−2にて、241番の割込みベクタで横取りする。
FIG. 13 shows an example of the data configuration of the shared interrupt management table 250 in the fourth embodiment.
The “shared interrupt acceptance processor” section holds an identifier of a processor that accepts a shared interrupt.
In the setting example of FIG. 13, the guest OS 400-0 has an I / O device 130-0 with a
図14は、本実施の形態において、ゲストOS400が、仮想計算機モニタ200の共用割込み管理テーブル250に対して、デバイス番号及びデバイス優先度の登録を行う処理のフローチャートである。
ステップS111からステップS302までは、実施の形態3のフローチャートS300の各ステップと同一であり、説明を省略する。
FIG. 14 is a flowchart of processing in which the guest OS 400 registers the device number and the device priority with respect to the shared interrupt management table 250 of the virtual machine monitor 200 in the present embodiment.
Steps S111 to S302 are the same as those in the flowchart S300 of the third embodiment, and a description thereof will be omitted.
ステップS401では、共用割込み管理テーブル250の、ステップS301より取得した割込み番号の行を参照し、デバイス優先度が最も高いI/Oデバイスを有するゲストOSが、出力先プロセッサとして指定するプロセッサを、共用割込み受付先プロセッサとして登録する。
また、ステップS402では、仮想計算機モニタ200が、割込みコントローラ120を操作し、該割込み番号に対して、出力先プロセッサとして「共用割込み受付プロセッサ」の内容を設定し、割込みベクタとして「共用割込み用割込みベクタ」の内容を設定する。
例えば、図13の共用割込み管理テーブル250の設定例では、割込み番号17番の割込みについて、デバイス優先度が最も高いI/OデバイスはI/Oデバイス130−1であり、そのI/Oデバイスを使用するゲストOS400−1は、プロセッサ110−2を注入先プロセッサとして設定している。
よって、ステップS401では、プロセッサ110−2が共用割込み受付プロセッサの項に設定される。
そして、ステップS402で、仮想計算機モニタ200は、割込みコントローラ120を操作し、割込み番号17番に対して、出力先プロセッサとしてプロセッサ110−2を設定し、割込みベクタとして241番を設定する。
In step S401, referring to the line of the interrupt number acquired from step S301 in the shared interrupt management table 250, the guest OS having the I / O device with the highest device priority shares the processor specified as the output destination processor. Register as an interrupt receiving processor.
In step S402, the
For example, in the setting example of the shared interrupt management table 250 in FIG. 13, for the interrupt with interrupt
Therefore, in step S401, the processor 110-2 is set as a shared interrupt receiving processor item.
In step S402, the
図15は、本実施の形態において、共用割込みが発生した場合の割込み処理の手順を示すフローチャートである。
ステップS411及びS412以外のステップは、実施の形態3のフローチャートS310の各ステップと同一であり、説明を省略する。
FIG. 15 is a flowchart showing the procedure of interrupt processing when a shared interrupt occurs in the present embodiment.
Steps other than steps S411 and S412 are the same as those in flowchart S310 of the third embodiment, and a description thereof will be omitted.
共用割込みが発生すると、ステップS411で、割込みコントローラ120は、仮想計算機モニタ200による設定に従い、共用割込み受付プロセッサに対して、共用割込み用割込みベクタを出力する。
その後、ステップS412では、仮想計算機モニタ200は、ステップS311で特定した注入先プロセッサと、共有割込み受付先プロセッサが等しいかどうかチェックする。
例えば、図13の共用割込み管理テーブル250の設定例における、動作例について説明する。
I/Oデバイス130−1が割込み番号17番の割込みを発生した場合、ステップS411にて、共用割込み受付プロセッサであるプロセッサ110−2に対して、割込みベクタ241番が出力される。
そして、注入先プロセッサと共用割込み受付プロセッサが等しいため、ステップS126における割込みベクタの転送は行わずに、ステップS127で、割込みベクタをゲストOS400−1に注入する。
また、I/Oデバイス130−0が割込み番号17番の割込みを発生した場合、ステップS411にて、共用割込み受付プロセッサであるプロセッサ110−2に対して、割込みベクタ241番が出力さる。
そして、注入先プロセッサが110−0であり、共用割込み受付プロセッサと異なるため、ステップS126で、割込みベクタを注入先プロセッサに転送し、ステップS127で、割込みベクタをゲストOS400−0に注入する。
When a shared interrupt occurs, in step S411, the interrupt
Thereafter, in step S412, the virtual machine monitor 200 checks whether the injection destination processor specified in step S311 is equal to the shared interrupt reception destination processor.
For example, an operation example in the setting example of the shared interrupt management table 250 in FIG. 13 will be described.
When the I / O device 130-1 generates an interrupt with an interrupt number of 17, the interrupt
Since the injection destination processor and the shared interrupt receiving processor are equal, the interrupt vector is not transferred in step S126, and the interrupt vector is injected into the guest OS 400-1 in step S127.
When the I / O device 130-0 generates an interrupt with the interrupt
Since the injection destination processor is 110-0, which is different from the shared interrupt receiving processor, the interrupt vector is transferred to the injection destination processor in step S126, and the interrupt vector is injected into the guest OS 400-0 in step S127.
以上に示すように、本実施の形態では、共用割込みの発生時には、その割込み番号を使用するI/Oデバイスの中で、デバイス優先度が最も高いI/Oデバイスを有するゲストOSのプロセッサが、割込みを受け付けるので、割込みの転送が不要であり、デバイス優先度が最も高いI/Oデバイスの割込み処理のオーバヘッドを削減することができる。 As described above, in the present embodiment, when a shared interrupt occurs, the guest OS processor having the I / O device with the highest device priority among the I / O devices using the interrupt number is Since the interrupt is accepted, the transfer of the interrupt is unnecessary, and the overhead of the interrupt processing of the I / O device having the highest device priority can be reduced.
以上、本実施の形態では、
前記仮想計算機モニタは、さらに、共用される割込み番号の割込みを、前記仮想計算機モニタがどのプロセッサで受け付けるかを決定する「外部割込み受付プロセッサ管理部」を備え、
前記共用割込み管理テーブルは、さらに、共用される割込み番号の割込みを受け付けるプロセッサを保持する「共用割込み受付プロセッサ」の項を有し、
前記仮想計算機モニタは、割込み番号ごとに、デバイス優先度が最も高いI/Oデバイスを使用するゲストOSによって指定されるプロセッサを、前記共用割込み管理テーブルの前記共用割込み受付プロセッサの項に登録し、
前記仮想計算機モニタは、割込みコントローラを操作して、割込み番号ごとに、前記共用割込み管理テーブルの前記共用割込み受付プロセッサの項の内容を、割込みを受け付けるプロセッサとして設定することを説明した。
As described above, in the present embodiment,
The virtual machine monitor further includes an “external interrupt reception processor management unit” that determines which processor the virtual machine monitor accepts an interrupt with a shared interrupt number,
The shared interrupt management table further includes a “shared interrupt receiving processor” section that holds a processor that receives an interrupt of a shared interrupt number.
The virtual machine monitor registers, for each interrupt number, a processor specified by the guest OS using the I / O device having the highest device priority in the shared interrupt reception processor section of the shared interrupt management table,
It has been described that the virtual machine monitor operates the interrupt controller to set the contents of the shared interrupt reception processor section of the shared interrupt management table as a processor that receives an interrupt for each interrupt number.
最後に、実施の形態1〜4に示した仮想計算機システム500のハードウェア構成例、つまり、図1に示した物理計算機100の構成例をより詳細に説明する。
なお、図17の構成は、あくまでも物理計算機100の構成の一例を示すものであり、物理計算機100の構成は図17に記載の構成に限らず、他の構成であってもよい。
Finally, a hardware configuration example of the
Note that the configuration of FIG. 17 is merely an example of the configuration of the
図17において、物理計算機100は、プロセッサ110たるCPU911(Central Processing Unit、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータともいう)を備えている。
CPU911は、バス912を介して、例えば、ROM(Read Only Memory)913、RAM(Random Access Memory)914、通信ボード915、表示装置901、キーボード902、マウス903、磁気ディスク装置920、割込みコントローラ907と接続され、これらのハードウェアデバイスを制御する。
通信ボード915、表示装置901、キーボード902、マウス903、磁気ディスク装置920は、図1に示すI/Oデバイス130として割込みを発生させる場合がある。
磁気ディスク装置902は、図1に示すディスク装置150の例である。
更に、CPU911は、FDD904(Flexible Disk Drive)、コンパクトディスク装置905(CDD)、プリンタ装置906と接続していてもよい。
また、磁気ディスク装置920の代わりに、光ディスク装置、メモリカード(登録商標)読み書き装置などの記憶装置でもよい。
RAM914は、揮発性メモリの一例であり、図1に示すメモリ140に対応する。
ROM913、FDD904、CDD905、磁気ディスク装置920の記憶媒体は、不揮発性メモリの一例である。これらは、記憶装置の一例である。
通信ボード915、キーボード902、マウス903、FDD904などは、入力装置の一例である。
また、通信ボード915、表示装置901、プリンタ装置906などは、出力装置の一例である。
In FIG. 17, the
The
The
The
Further, the
Further, instead of the
The
The storage media of the
The
The
通信ボード915は、ネットワークに接続される。
例えば、通信ボード915は、LAN(ローカルエリアネットワーク)、インターネット、WAN(ワイドエリアネットワーク)などに接続される。
The
For example, the
磁気ディスク装置920には、仮想計算機モニタ921、ゲストOS922、プログラム群923、ファイル群924が記憶されている。
プログラム群923のプログラムは、CPU911、仮想計算機モニタ921、ゲストOS922により実行される。
The
The programs in the
ROM913には、BIOS(Basic Input Output System)プログラムが格納され、磁気ディスク装置920にはブートプログラムが格納されている。
物理計算機100の起動時には、ROM913のBIOSプログラム及び磁気ディスク装置920のブートプログラムが実行され、BIOSプログラム及びブートプログラムにより物理計算機100が起動され、その後、仮想計算機モニタ921、ゲストOS922が起動される。
The
When the
仮想計算機モニタ921には、実施の形態1〜4で説明した外部割込みハンドラ210、プロセッサ間通信制御部220、割込み注入部230、共用割込み注入先決定部240、コントローラ登録部280等のソフトウェアモジュールが含まれる。
また、ゲストOS922には、実施の形態1〜4で説明したデバイスドライバ410等が含まれる。
プログラム群923には、実施の形態1〜4に示されゲストOSにより実施されるアプリケーションプログラム等が含まれる。
The
The
The
更に、ファイル群924には、実施の形態1〜4の説明において、「〜の判断」、「〜の判定」、「〜の実行」、「〜の比較」、「〜の登録」、「〜の更新」、「〜の設定」、「〜の選択」、「〜の特定」、「〜の指定」、「〜の入力」、「〜の出力」、「〜の転送」等として説明している処理の結果を示す情報やデータや信号値や変数値やパラメータが、「〜ファイル」や「〜データベース」の各項目として記憶されている。
「〜ファイル」や「〜データベース」は、ディスクやメモリなどの記録媒体に記憶される。ディスクやメモリなどの記憶媒体に記憶された情報やデータや信号値や変数値やパラメータは、読み書き回路を介してCPU911によりメインメモリやキャッシュメモリに読み出され、抽出・検索・参照・比較・演算・計算・処理・編集・出力・印刷・表示などのCPUの動作に用いられる。
抽出・検索・参照・比較・演算・計算・処理・編集・出力・印刷・表示のCPUの動作の間、情報やデータや信号値や変数値やパラメータは、メインメモリ、レジスタ、キャッシュメモリ、バッファメモリ等に一時的に記憶される。
また、実施の形態1〜4で説明しているフローチャートの矢印の部分は主としてデータや信号の入出力を示し、データや信号値は、RAM914のメモリ、FDD904のフレキシブルディスク、CDD905のコンパクトディスク、磁気ディスク装置920の磁気ディスク、その他光ディスク、ミニディスク、DVD等の記録媒体に記録される。また、データや信号は、バス912や信号線やケーブルその他の伝送媒体によりオンライン伝送される。
Further, in the description of the first to fourth embodiments, the
The “˜file” and “˜database” are stored in a recording medium such as a disk or a memory. Information, data, signal values, variable values, and parameters stored in a storage medium such as a disk or memory are read out to the main memory or cache memory by the
Information, data, signal values, variable values, and parameters are stored in the main memory, registers, cache memory, and buffers during the CPU operations of extraction, search, reference, comparison, calculation, processing, editing, output, printing, and display. It is temporarily stored in a memory or the like.
In addition, arrows in the flowcharts described in the first to fourth embodiments mainly indicate input / output of data and signals, and the data and signal values are the
また、実施の形態1〜4の説明において「〜処理」として説明しているものは「〜ステップ」、「〜手順」であってもよい。
また、「〜処理」として説明しているものは、ROM913に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、ソフトウェアとファームウェアとの組み合わせで実施されても構わない。
ファームウェアとソフトウェアは、プログラムとして、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD等の記録媒体に記憶される。プログラムはCPU911により読み出され、CPU911により実行される。
In addition, what is described as “to process” in the description of the first to fourth embodiments may be “to step” and “to procedure”.
In addition, what is described as “to process” may be realized by firmware stored in the
Firmware and software are stored as programs in a recording medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, and a DVD. The program is read by the
110 プロセッサ、111 プロセッサ間割込み制御部、120 割込みコントローラ、130 I/Oデバイス、140 メモリ、150 ディスク装置、200 仮想計算機モニタ、210 外部割込みハンドラ、220 プロセッサ間通信制御部、230 割込み注入部、240 共用割込み注入先決定部、250 共用割込み管理テーブル、260 割込み状態レジスタ保存領域、270 外部割込み受付プロセッサ管理部、280 コントローラ登録部、400 ゲストOS、410 デバイスドライバ、411 割込みハンドラ、412 割込み元判定手段、500 仮想計算機システム。 110 processor, 111 interprocessor interrupt control unit, 120 interrupt controller, 130 I / O device, 140 memory, 150 disk device, 200 virtual machine monitor, 210 external interrupt handler, 220 interprocessor communication control unit, 230 interrupt injection unit, 240 Shared interrupt injection destination determination unit, 250 shared interrupt management table, 260 interrupt status register storage area, 270 external interrupt reception processor management unit, 280 controller registration unit, 400 guest OS, 410 device driver, 411 interrupt handler, 412 interrupt source determination means 500 virtual machine system.
Claims (11)
割込み番号が含まれる割込みを受付ける割込みコントローラと、
2以上のOSに共用されている共用割込み番号が含まれている割込みがあった場合に当該割込みを処理するOSを割込み処理OSとして特定する共用割込み応答処理部と、
いずれかのOSより出力された、当該OSが使用を開始する割込み番号が示される使用開始割込み番号情報を入力し、前記使用開始割込み番号情報に示される割込み番号が他のOSに使用されているか否かを判断し、当該割込み番号が他のOSに使用されている場合に、当該割込み番号を共用割込み番号に指定し、当該共用割込み番号と前記共用割込み応答処理部とを対応付ける共用割込み制御情報を前記割込みコントローラに設定する割込み番号管理部とを有し、
前記割込みコントローラは、
前記共用割込み制御情報に基づき、受付けた割込みに含まれる割込み番号が共用割込み番号に該当するかを判断し、受付けた割込みに含まれる割込み番号が共用割込み番号に該当する場合に前記共用割込み応答処理部に当該割込みの割込み処理OSを特定させることを特徴とする計算機システム。 A computer system in which a plurality of OSs (Operating Systems) operate,
An interrupt controller that accepts an interrupt containing an interrupt number;
A shared interrupt response processing unit that identifies an OS that processes the interrupt as an interrupt processing OS when there is an interrupt including a shared interrupt number shared by two or more OSs;
The use start interrupt number information indicating the interrupt number that the OS starts using is input from any OS, and the interrupt number indicated in the use start interrupt number information is used by another OS. If the interrupt number is used by another OS, the interrupt number is designated as a shared interrupt number, and the shared interrupt control information that associates the shared interrupt number with the shared interrupt response processing unit An interrupt number management unit that sets the interrupt controller in the interrupt controller,
The interrupt controller is
Based on the shared interrupt control information, it is determined whether the interrupt number included in the received interrupt corresponds to the shared interrupt number, and when the interrupt number included in the received interrupt corresponds to the shared interrupt number, the shared interrupt response processing A computer system characterized by causing a section to specify an interrupt processing OS for the interrupt.
前記使用開始割込み番号情報に示される割込み番号が他のOSに使用されていない場合に、前記使用開始割込み番号情報を前記割込みコントローラに転送し、
前記割込みコントローラは、
前記割込み番号管理部により転送された前記使用開始割込み番号情報に示されている割込み番号と、前記使用開始割込み番号情報の出力元のOSとを対応付けて記憶し、
受付けた割込みに含まれる割込み番号が共用割込み番号に該当しない場合に、受付けた割込みに含まれる割込み番号に対応付けられているOSに当該割込みを処理させることを特徴とする請求項1に記載の計算機システム。 The interrupt number management unit
If the interrupt number indicated in the use start interrupt number information is not used by another OS, the use start interrupt number information is transferred to the interrupt controller;
The interrupt controller is
Storing the interrupt number shown in the use start interrupt number information transferred by the interrupt number management unit in association with the OS from which the use start interrupt number information is output;
The OS according to claim 1, wherein when the interrupt number included in the accepted interrupt does not correspond to the shared interrupt number, the OS associated with the interrupt number included in the accepted interrupt is processed. Computer system.
各々に割込みの発行元のデバイスが指定デバイスとして指定され、指定デバイスからの割込みを処理する割込みハンドラが含まれ、指定デバイスからの割込み有無を確認する機能を有する複数のOSが、複数個のプロセッサにより動作しており、
前記割込み番号管理部は、
前記共用割込み制御情報を前記割込みコントローラに設定した場合に、前記共用割込み制御情報に示されている共用割込み番号と、当該共用割込み番号を共用する2以上のOSである番号共用OSと、各番号共用OSを実行するプロセッサとを対応付ける共用割込み番号情報を生成し、
前記共用割込み応答処理部は、
前記割込みコントローラから割込み処理OSの特定を指示された場合に、割込み処理OSの特定を指示された割込みに含まれている共用割込み番号と前記共用割込み番号情報とに基づき、当該共用割込み番号を共用する番号共用OSを特定し、特定した各番号共用OSを用いて各番号共用OSの指定デバイスからの割込み有無を判定し、指定デバイスからの割込みがあった番号共用OSを割込み処理OSとして特定し、前記共用割込み番号情報において前記割込み処理OSに対応付けられているプロセッサに前記割込み処理OSの割込みハンドラを実行させることを特徴とする請求項1又は2に記載の計算機システム。 In the computer system,
A device that issues an interrupt is designated as a designated device for each, an interrupt handler that processes an interrupt from the designated device is included, and a plurality of OSs that have a function of confirming the presence or absence of an interrupt from the designated device include a plurality of processors Is working
The interrupt number management unit
When the shared interrupt control information is set in the interrupt controller, the shared interrupt number indicated in the shared interrupt control information, a number shared OS that is two or more OSs sharing the shared interrupt number, and each number Generate shared interrupt number information that associates the processor that executes the shared OS,
The shared interrupt response processing unit
When the interrupt controller is instructed to specify the interrupt processing OS, the shared interrupt number is shared based on the shared interrupt number included in the interrupt instructed to specify the interrupt processing OS and the shared interrupt number information. The number sharing OS to be identified is identified, the number sharing OS identified is used to determine whether there is an interrupt from the designated device of each number sharing OS, and the number sharing OS that has been interrupted by the designated device is identified as the interrupt processing OS. 3. The computer system according to claim 1, wherein a processor associated with the interrupt processing OS in the shared interrupt number information is caused to execute an interrupt handler of the interrupt processing OS.
特定した各番号共用OSに含まれる関数であって、指定デバイスにアクセスして指定デバイスからの割込み有無を確認する割込み有無確認関数を実行して、各番号共用OSの指定デバイスからの割込み有無を判定することを特徴とする請求項3に記載の計算機システム。 The shared interrupt response processing unit
A function included in each identified number-shared OS that executes an interrupt presence / absence confirmation function that accesses the designated device and confirms the presence / absence of an interrupt from the designated device. The computer system according to claim 3, wherein the determination is performed.
特定した各番号共用OSに含まれる関数であって、指定デバイス内のレジスタのレジスタ情報にアクセスして指定デバイスからの割込み有無を確認する割込み有無確認関数を実行して、各番号共用OSの指定デバイスからの割込み有無を判定し、
前記計算機システムは、更に、
各割込み有無確認関数がアクセスしたレジスタ情報を蓄積するレジスタ情報蓄積部を有し、
各プロセッサは、
前記レジスタ情報蓄積部に蓄積されていているレジスタ情報を用いて、前記割込み処理OSの割込みハンドラを実行することを特徴とする請求項4に記載の計算機システム。 The shared interrupt response processing unit
A function included in each identified number-shared OS that executes the interrupt presence / absence confirmation function that accesses the register information of the register in the designated device and confirms the presence / absence of an interrupt from the designated device. Judge whether there is an interrupt from the device,
The computer system further includes:
It has a register information storage unit that stores register information accessed by each interrupt existence confirmation function,
Each processor
5. The computer system according to claim 4, wherein an interrupt handler of the interrupt processing OS is executed using the register information stored in the register information storage unit.
共用割込み番号と、各番号共用OSと、各番号共用OSを実行するプロセッサと、各番号共用OSの指定デバイスの優先度とを対応付ける共用割込み番号情報を生成し、
前記共用割込み応答処理部は、
前記共用割込み番号情報において指定デバイスの優先度の高い番号共用OSから順に、指定デバイスからの割込み有無を判定することを特徴とする請求項3〜5のいずれかに記載の計算機システム。 The interrupt number management unit
Generating shared interrupt number information that associates a shared interrupt number, each number shared OS, a processor that executes each number shared OS, and the priority of a designated device of each number shared OS;
The shared interrupt response processing unit
6. The computer system according to claim 3, wherein the presence / absence of an interrupt from a designated device is determined in order from a number sharing OS having a higher priority of the designated device in the shared interrupt number information.
共用割込み番号と、各番号共用OSと、各番号共用OSを実行するプロセッサと、各番号共用OSの指定デバイスの優先度とを対応付ける共用割込み番号情報を生成し、
前記共用割込み番号情報において指定デバイスの優先度が最も高い番号共用OSを実行するプロセッサが、前記共用割込み応答処理部であることを特徴とする請求項3〜7のいずれかに記載の計算機システム。 The interrupt number management unit
Generating shared interrupt number information that associates a shared interrupt number, each number shared OS, a processor that executes each number shared OS, and the priority of a designated device of each number shared OS;
8. The computer system according to claim 3, wherein a processor that executes a number sharing OS having the highest priority of the designated device in the shared interrupt number information is the shared interrupt response processing unit.
前記複数のOSの制御を行う仮想計算機モニタを有する仮想計算機システムであり、
前記共用割込み応答処理部と前記割込み番号管理部は、前記仮想計算機モニタを実行するプロセッサであることを特徴とする請求項3〜8のいずれかに記載の計算機システム。 The computer system is
A virtual machine system having a virtual machine monitor that controls the plurality of OSs;
The computer system according to claim 3, wherein the shared interrupt response processing unit and the interrupt number management unit are processors that execute the virtual computer monitor.
2以上のOSに共用されている共用割込み番号が含まれている割込みがあった場合に当該割込みを処理するOSを割込み処理OSとして特定する共用割込み応答処理と、
いずれかのOSより出力された、当該OSが使用を開始する割込み番号が示される使用開始割込み番号情報を入力し、前記使用開始割込み番号情報に示される割込み番号が他のOSに使用されているか否かを判断し、当該割込み番号が他のOSに使用されている場合に、当該割込み番号を共用割込み番号に指定し、当該共用割込み番号と前記共用割込み応答処理とを対応付ける共用割込み制御情報を生成する割込み番号管理処理と、
いずれかの割込み番号が含まれる割込みを受付け、前記共用割込み制御情報に基づき、受付けた割込みに含まれる割込み番号が共用割込み番号に該当するかを判断し、受付けた割込みに含まれる割込み番号が共用割込み番号に該当する場合に前記共用割込み応答処理に当該割込みの割込み処理OSを特定させる割り込み受付け処理とを有することを特徴とすることを特徴とする割込み制御方法。 An interrupt control method performed by a computer system in which a plurality of OSs (Operating Systems) operate,
A shared interrupt response process that identifies an OS that processes the interrupt as an interrupt processing OS when there is an interrupt that includes a shared interrupt number shared by two or more OSs;
The use start interrupt number information indicating the interrupt number that the OS starts using is input from any OS, and the interrupt number indicated in the use start interrupt number information is used by another OS. If the interrupt number is used by another OS, the interrupt number is designated as a shared interrupt number, and the shared interrupt control information for associating the shared interrupt number with the shared interrupt response process is obtained. The interrupt number management process to be generated,
Accepts an interrupt that includes one of the interrupt numbers, determines whether the interrupt number included in the received interrupt corresponds to the shared interrupt number based on the shared interrupt control information, and shares the interrupt number included in the received interrupt An interrupt control method comprising: an interrupt acceptance process for identifying the interrupt process OS of the interrupt in the shared interrupt response process when the interrupt number corresponds to the interrupt number.
2以上のOSに共用されている共用割込み番号が含まれている割込みがあった場合に当該割込みを処理するOSを割込み処理OSとして特定する共用割込み応答処理と、
いずれかのOSより出力された、当該OSが使用を開始する割込み番号が示される使用開始割込み番号情報を入力し、前記使用開始割込み番号情報に示される割込み番号が他のOSに使用されているか否かを判断し、当該割込み番号が他のOSに使用されている場合に、当該割込み番号を共用割込み番号に指定し、当該共用割込み番号と前記共用割込み応答処理とを対応付ける共用割込み制御情報を生成する割込み番号管理処理と、
いずれかの割込み番号が含まれる割込みを受付け、前記共用割込み制御情報に基づき、受付けた割込みに含まれる割込み番号が共用割込み番号に該当するかを判断し、受付けた割込みに含まれる割込み番号が共用割込み番号に該当する場合に前記共用割込み応答処理に当該割込みの割込み処理OSを特定させる割り込み受付け処理とを実行させることを特徴とするプログラム。 In a computer system in which multiple OSs (Operating Systems) operate,
A shared interrupt response process that identifies an OS that processes the interrupt as an interrupt processing OS when there is an interrupt that includes a shared interrupt number shared by two or more OSs;
The use start interrupt number information indicating the interrupt number that the OS starts using is input from any OS, and the interrupt number indicated in the use start interrupt number information is used by another OS. If the interrupt number is used by another OS, the interrupt number is designated as a shared interrupt number, and the shared interrupt control information for associating the shared interrupt number with the shared interrupt response process is obtained. The interrupt number management process to be generated,
Accepts an interrupt that includes one of the interrupt numbers, determines whether the interrupt number included in the received interrupt corresponds to the shared interrupt number based on the shared interrupt control information, and shares the interrupt number included in the received interrupt A program that causes the shared interrupt response process to execute an interrupt acceptance process that identifies an interrupt process OS of the interrupt when the interrupt number corresponds to the interrupt number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011001644A JP5611060B2 (en) | 2011-01-07 | 2011-01-07 | Computer system, interrupt control method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011001644A JP5611060B2 (en) | 2011-01-07 | 2011-01-07 | Computer system, interrupt control method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012145993A true JP2012145993A (en) | 2012-08-02 |
JP5611060B2 JP5611060B2 (en) | 2014-10-22 |
Family
ID=46789515
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011001644A Expired - Fee Related JP5611060B2 (en) | 2011-01-07 | 2011-01-07 | Computer system, interrupt control method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5611060B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160097363A (en) * | 2013-12-17 | 2016-08-17 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Resource processing method, operating system, and device |
WO2019239778A1 (en) * | 2018-06-14 | 2019-12-19 | 日立オートモティブシステムズ株式会社 | Vehicle control device, interruption information management method, and interruption management program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0916406A (en) * | 1995-06-27 | 1997-01-17 | Toshiba Corp | Computer system |
JP2001022598A (en) * | 1999-07-07 | 2001-01-26 | Hitachi Ltd | Computer system |
WO2001093032A1 (en) * | 2000-05-31 | 2001-12-06 | Hitachi, Ltd. | Computer system, method of controlling computer, and medium storing control program |
JP2007018258A (en) * | 2005-07-07 | 2007-01-25 | Fuji Xerox Co Ltd | Information processor |
-
2011
- 2011-01-07 JP JP2011001644A patent/JP5611060B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0916406A (en) * | 1995-06-27 | 1997-01-17 | Toshiba Corp | Computer system |
JP2001022598A (en) * | 1999-07-07 | 2001-01-26 | Hitachi Ltd | Computer system |
WO2001093032A1 (en) * | 2000-05-31 | 2001-12-06 | Hitachi, Ltd. | Computer system, method of controlling computer, and medium storing control program |
JP2007018258A (en) * | 2005-07-07 | 2007-01-25 | Fuji Xerox Co Ltd | Information processor |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160097363A (en) * | 2013-12-17 | 2016-08-17 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Resource processing method, operating system, and device |
JP2016541072A (en) * | 2013-12-17 | 2016-12-28 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Resource processing method, operating system, and device |
US10180843B2 (en) | 2013-12-17 | 2019-01-15 | Huawei Technologies Co., Ltd. | Resource processing method and device for a multi-core operating system |
KR101952795B1 (en) * | 2013-12-17 | 2019-05-17 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Resource processing method, operating system, and device |
WO2019239778A1 (en) * | 2018-06-14 | 2019-12-19 | 日立オートモティブシステムズ株式会社 | Vehicle control device, interruption information management method, and interruption management program |
Also Published As
Publication number | Publication date |
---|---|
JP5611060B2 (en) | 2014-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10691363B2 (en) | Virtual machine trigger | |
US8380907B2 (en) | Method, system and computer program product for providing filtering of GUEST2 quiesce requests | |
US9946870B2 (en) | Apparatus and method thereof for efficient execution of a guest in a virtualized enviroment | |
US8140834B2 (en) | System, method and computer program product for providing a programmable quiesce filtering register | |
US10409633B2 (en) | Hypervisor-visible guest thread management | |
TWI612439B (en) | Computing device, method and machine readable storage media for detecting unauthorized memory access | |
CN107924325B (en) | Apparatus and method for multi-level virtualization | |
US20160085568A1 (en) | Hybrid virtualization method for interrupt controller in nested virtualization environment | |
US10346330B2 (en) | Updating virtual machine memory by interrupt handler | |
US11055186B2 (en) | Managing related devices for virtual machines using robust passthrough device enumeration | |
EP2881860B1 (en) | Method for implementing an interrupt between virtual processors, related device, and system | |
JP2013516021A (en) | Hypervisor separation of processor core | |
US9201823B2 (en) | Pessimistic interrupt affinity for devices | |
US10049064B2 (en) | Transmitting inter-processor interrupt messages by privileged virtual machine functions | |
EP2704050A1 (en) | Capacity on Demand processing apparatus and control method | |
US9158562B2 (en) | Method and apparatus for supporting virtualization of loadable module | |
US20160274931A1 (en) | Coordinating joint operation of multiple hypervisors in a computer system | |
US8458438B2 (en) | System, method and computer program product for providing quiesce filtering for shared memory | |
US20190205259A1 (en) | Exitless extended page table switching for nested hypervisors | |
US9354923B2 (en) | Information processing apparatus, information processing method, and computer program product | |
JP5611060B2 (en) | Computer system, interrupt control method and program | |
US11194606B2 (en) | Managing related devices for virtual machines utilizing shared device data | |
US20240086219A1 (en) | Transmitting interrupts from a virtual machine (vm) to a destination processing unit without triggering a vm exit | |
EP4300307A1 (en) | Systems and method for processing privileged instructions using user space memory | |
JP2008123015A (en) | Switching method for virtual processor, program, and virtual computer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20131009 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140507 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140520 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140716 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140805 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140902 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5611060 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |