JP2019139417A - Information processing apparatus, control method, and control program - Google Patents

Information processing apparatus, control method, and control program Download PDF

Info

Publication number
JP2019139417A
JP2019139417A JP2018020804A JP2018020804A JP2019139417A JP 2019139417 A JP2019139417 A JP 2019139417A JP 2018020804 A JP2018020804 A JP 2018020804A JP 2018020804 A JP2018020804 A JP 2018020804A JP 2019139417 A JP2019139417 A JP 2019139417A
Authority
JP
Japan
Prior art keywords
virtual
end device
processing apparatus
information processing
bridge
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.)
Pending
Application number
JP2018020804A
Other languages
Japanese (ja)
Inventor
識実 工藤
Satomi Kudo
識実 工藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PFU Ltd
Original Assignee
PFU Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PFU Ltd filed Critical PFU Ltd
Priority to JP2018020804A priority Critical patent/JP2019139417A/en
Publication of JP2019139417A publication Critical patent/JP2019139417A/en
Pending legal-status Critical Current

Links

Images

Abstract

To make it easier to assign an end device to each virtual machine set in an information processing apparatus.SOLUTION: An information processing apparatus 100 includes: a storage unit 120 for storing in advance a first table in which a physical address and a virtual machine are associated with each end device or bridge under a PCI bus and a second table in which a virtual address is associated with each end device or bridge; an end device detection unit 132 for detecting the end device or the end device under the bridge when the information processing apparatus is activated; a virtual address assignment unit 133 for assigning a virtual address to the detected end device and generating a third table in which a physical address of the detected end device is associated with the virtual address assigned to the detected end device; and a provision unit 134 for providing the third table to a hypervisor.SELECTED DRAWING: Figure 1

Description

本開示は、情報処理装置、制御方法及び制御プログラムに関し、特に、複数の仮想マシンが設定される情報処理装置、制御方法及び制御プログラムに関する。   The present disclosure relates to an information processing device, a control method, and a control program, and particularly relates to an information processing device, a control method, and a control program in which a plurality of virtual machines are set.

従来、一台の情報処理装置に、複数の仮想マシンを設定し、各仮想マシンにより情報処理装置の動作をエミュレートする技術が利用されている。仮想マシンが設定された仮想化環境では、情報処理装置に搭載されたPCI(Peripheral Component Interconnect)又はPCI Expressデバイスを各仮想マシンに1対1に割り当てるパススルー機能が利用されている。この機能により、各デバイスが仮想化されていなくても、各仮想マシンは、デバイスを直接制御することが可能となる。   Conventionally, a technique has been used in which a plurality of virtual machines are set in one information processing apparatus, and the operation of the information processing apparatus is emulated by each virtual machine. In a virtual environment in which a virtual machine is set, a pass-through function that assigns a PCI (Peripheral Component Interconnect) or a PCI Express device mounted on an information processing apparatus to each virtual machine on a one-to-one basis is used. With this function, even if each device is not virtualized, each virtual machine can directly control the device.

複数の物理PCIスロット等の物理資源を有し、物理資源を分割して複数の仮想計算機に割り当てる計算機が開示されている。この計算機は、物理IOインタフェースが交換された場合、交換前後の物理IOインタフェースの種類が同じであれば、各仮想計算機への物理IOインタフェースの割り当てを引き継がせる(特許文献1を参照)。   A computer having physical resources such as a plurality of physical PCI slots, and dividing the physical resources and allocating them to a plurality of virtual computers is disclosed. When a physical IO interface is exchanged, this computer takes over assignment of the physical IO interface to each virtual machine if the type of the physical IO interface before and after the exchange is the same (see Patent Document 1).

複数の論理区画(LPAR)が設定され、各論理区画にサーバの資源(CPU・メモリ・IO)の一部または全部が割り付けられる情報処理装置が開示されている。この情報処理装置は、IOバスからのアクセス対象が、そのアクセスが発生したデバイスが属する論理区画に割り付けられた資源以外の場合には、エラーとして報告すると共に、そのアクセスに関してIOバス上で完了させる(特許文献2を参照)。   An information processing apparatus is disclosed in which a plurality of logical partitions (LPAR) are set and a part or all of server resources (CPU, memory, IO) are allocated to each logical partition. When the access target from the IO bus is a resource other than the resource allocated to the logical partition to which the accessed device belongs, this information processing apparatus reports an error and completes the access on the IO bus. (See Patent Document 2).

複数の物理サーバと複数のIOデバイスとが、第一のIOブリッジ及び第二のIOブリッジを有する複数のスイッチに接続される計算機システムが開示されている。この計算機システムは、複数の第二のIOブリッジに互いに異なるPCIバス番号を固定的に割り当てる(特許文献3を参照)。   A computer system is disclosed in which a plurality of physical servers and a plurality of IO devices are connected to a plurality of switches having a first IO bridge and a second IO bridge. In this computer system, different PCI bus numbers are fixedly assigned to a plurality of second IO bridges (see Patent Document 3).

特開2014−10731号公報JP 2014-10731 A 特開2004−220218号公報Japanese Patent Laid-Open No. 2004-220218 特開2010−39760号公報JP 2010-39760 A

一般に、パススルー機能は、対応するエンドデバイスが情報処理装置に搭載された状態で、各仮想マシンに、搭載されたエンドデバイスを割り当てることにより設定される。一方、管理者が情報処理装置に仮想マシンを設定してから情報処理装置をユーザに提供し、ユーザが情報処理装置に拡張カードを搭載するような場合、管理者が情報処理装置に仮想マシンを設定するときには情報処理装置に拡張カードは搭載されていない。そのため、管理者は拡張カード内のエンドデバイスを各仮想マシンに割り当てておくことができず、十分な知識を有していないユーザが拡張カード内のエンドデバイスを各仮想マシンに割り当てなければならなくなる。複数の仮想マシンが設定される情報処理装置では、各仮想マシンへのエンドデバイスの割り当てをより簡易化できることが望まれている。   In general, the pass-through function is set by assigning each mounted end device to each virtual machine in a state where the corresponding end device is mounted on the information processing apparatus. On the other hand, when the administrator sets a virtual machine in the information processing apparatus and then provides the information processing apparatus to the user and the user installs an expansion card in the information processing apparatus, the administrator installs the virtual machine When setting, an expansion card is not mounted on the information processing apparatus. Therefore, the administrator cannot assign the end device in the expansion card to each virtual machine, and a user who does not have sufficient knowledge must assign the end device in the expansion card to each virtual machine. . In an information processing apparatus in which a plurality of virtual machines are set, it is desired that assignment of end devices to each virtual machine can be simplified.

情報処理装置、制御方法及び制御プログラムの目的は、情報処理装置に設定された各仮想マシンへのエンドデバイスの割り当てをより簡易化することを可能とすることにある。   An object of the information processing apparatus, the control method, and the control program is to make it easier to assign an end device to each virtual machine set in the information processing apparatus.

本発明の一側面に係る情報処理装置は、複数の仮想マシンが設定される情報処理装置であって、情報処理装置に設けられたPCIバス配下のエンドデバイス又はブリッジ毎に物理アドレス及び仮想マシンが対応付けられた第1テーブルと、エンドデバイス又はブリッジ毎に仮想アドレスが対応付けられた第2テーブルとを予め記憶する記憶部と、情報処理装置の起動時に、第1テーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出するエンドデバイス検出部と、複数の仮想マシン毎に、第1テーブルにおいてその仮想マシンに対応付けられ且つエンドデバイス検出部により検出されたエンドデバイスに、第2テーブルにおいてそのエンドデバイスに対応付けられた仮想アドレスを割り当て、そのエンドデバイスの物理アドレスとそのエンドデバイスに割り当てた仮想アドレスとを対応付けた第3テーブルを生成する仮想アドレス割り当て部と、第3テーブルをハイパーバイザに提供する提供部と、を有する。   An information processing apparatus according to an aspect of the present invention is an information processing apparatus in which a plurality of virtual machines are set, and a physical address and a virtual machine are set for each end device or bridge under a PCI bus provided in the information processing apparatus. A storage unit that stores in advance a first table associated with the second table in which a virtual address is associated with each end device or bridge, and each physical stored in the first table when the information processing apparatus is activated. An end device detecting unit that accesses an address and detects an end device associated with each physical address or an end device under a bridge; and for each of a plurality of virtual machines, is associated with the virtual machine in the first table and In the second table, the end device detected by the end device detection unit A virtual address allocation unit that allocates the associated virtual address, generates a third table that associates the physical address of the end device with the virtual address allocated to the end device, and provides the third table to the hypervisor. And a providing unit.

また、本発明の一側面に係る制御方法は、記憶部を有し、複数の仮想マシンが設定される情報処理装置の制御方法であって、情報処理装置に設けられたPCIバス配下のエンドデバイス又はブリッジ毎に物理アドレス及び仮想マシンが対応付けられた第1テーブルと、エンドデバイス又はブリッジ毎に仮想アドレスが対応付けられた第2テーブルとを予め記憶部に記憶し、情報処理装置の起動時に、第1テーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出し、複数の仮想マシン毎に、第1テーブルにおいてその仮想マシンに対応付けられ且つ検出されたエンドデバイスに、第2テーブルにおいてそのエンドデバイスに対応付けられた仮想アドレスを割り当て、そのエンドデバイスの物理アドレスとそのエンドデバイスに割り当てた仮想アドレスとを対応付けた第3テーブルを生成し、第3テーブルをハイパーバイザに提供することを含む。   A control method according to an aspect of the present invention is a control method for an information processing apparatus having a storage unit and in which a plurality of virtual machines are set, and is an end device under a PCI bus provided in the information processing apparatus Alternatively, a first table in which a physical address and a virtual machine are associated with each bridge and a second table in which a virtual address is associated with each end device or bridge are stored in advance in a storage unit, and the information processing apparatus is activated. , Accessing each physical address stored in the first table to detect an end device associated with each physical address or an end device under a bridge, and for each of a plurality of virtual machines, the virtual machine in the first table The virtual address associated with the end device associated with and detected in the second table in the second table Assignment, to generate a third table that associates a physical address of the end device and the virtual address assigned to the end device, includes providing a third table to the hypervisor.

また、本発明の一側面に係る制御プログラムは、記憶部を有し、複数の仮想マシンが設定される情報処理装置の制御プログラムであって、情報処理装置に設けられたPCIバス配下のエンドデバイス又はブリッジ毎に物理アドレス及び仮想マシンが対応付けられた第1テーブルと、エンドデバイス又はブリッジ毎に仮想アドレスが対応付けられた第2テーブルとを予め記憶部に記憶し、情報処理装置の起動時に、第1テーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出し、複数の仮想マシン毎に、第1テーブルにおいてその仮想マシンに対応付けられ且つ検出されたエンドデバイスに、第2テーブルにおいてそのエンドデバイスに対応付けられた仮想アドレスを割り当て、そのエンドデバイスの物理アドレスとそのエンドデバイスに割り当てた仮想アドレスとを対応付けた第3テーブルを生成し、第3テーブルをハイパーバイザに提供する、ことを情報処理装置に実行させる。   A control program according to an aspect of the present invention is a control program for an information processing apparatus having a storage unit and in which a plurality of virtual machines are set, and is an end device under a PCI bus provided in the information processing apparatus Alternatively, a first table in which a physical address and a virtual machine are associated with each bridge and a second table in which a virtual address is associated with each end device or bridge are stored in advance in a storage unit, and the information processing apparatus is activated. , Accessing each physical address stored in the first table to detect an end device associated with each physical address or an end device under a bridge, and for each of a plurality of virtual machines, the virtual machine in the first table Is associated with the detected end device in the second table. The information processing apparatus is caused to allocate a virtual address, generate a third table in which a physical address of the end device is associated with a virtual address allocated to the end device, and provide the third table to the hypervisor. .

本実施形態によれば、情報処理装置、制御方法及び制御プログラムは、情報処理装置に設定された各仮想マシンへのエンドデバイスの割り当てをより簡易化することが可能となる。   According to the present embodiment, the information processing apparatus, the control method, and the control program can further simplify the assignment of end devices to each virtual machine set in the information processing apparatus.

実施形態に従った情報処理装置100の概略構成の一例を示す図である。It is a figure which shows an example of schematic structure of the information processing apparatus 100 according to embodiment. デバイステーブルのデータ構造の一例を示す。An example of the data structure of a device table is shown. 確保仮想アドレステーブルのデータ構造の一例を示す。An example of the data structure of a reservation virtual address table is shown. 割り当て仮想アドレステーブルのデータ構造の一例を示す。An example of the data structure of an allocation virtual address table is shown. 割り当て仮想アドレステーブルのデータ構造の一例を示す。An example of the data structure of an allocation virtual address table is shown. 記憶装置120及びCPU130の概略構成を示す図である。FIG. 2 is a diagram illustrating a schematic configuration of a storage device 120 and a CPU 130. 検出処理の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a detection process. 割り当て処理の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of an allocation process. 仮想アドレスの割り当ての例について説明するための模式図である。It is a schematic diagram for demonstrating the example of allocation of a virtual address. 仮想アドレスの割り当ての例について説明するための模式図である。It is a schematic diagram for demonstrating the example of allocation of a virtual address. 仮想アドレスの割り当ての例について説明するための模式図である。It is a schematic diagram for demonstrating the example of allocation of a virtual address. 他の処理回路240の概略構成を示す図である。It is a figure which shows schematic structure of the other process circuit 240. FIG.

以下、本開示の一側面に係る情報処理装置について図を参照しつつ説明する。但し、本開示の技術的範囲はそれらの実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶ点に留意されたい。   Hereinafter, an information processing apparatus according to an aspect of the present disclosure will be described with reference to the drawings. However, it should be noted that the technical scope of the present disclosure is not limited to the embodiments, and extends to the invention described in the claims and equivalents thereof.

図1は、実施形態に従った情報処理装置100の概略構成の一例を示す図である。   FIG. 1 is a diagram illustrating an example of a schematic configuration of an information processing apparatus 100 according to the embodiment.

情報処理装置100は、パーソナルコンピュータ、サーバ等のコンピュータである。情報処理装置100には、管理者により複数の仮想マシンが設定され、仮想マシンが設定された情報処理装置100は、ユーザにより使用される。情報処理装置100は、通信装置101と、入力装置102と、表示装置103と、PCIバスコントローラ110と、記憶装置120と、CPU(Central Processing Unit)130と、処理回路140とを有する。さらに、情報処理装置100は、複数のエンドデバイス11、12、16と、複数のブリッジ13〜15と、複数の拡張スロット17、18と、拡張カード20とを有する。通信装置101、入力装置102、表示装置103、PCIバスコントローラ110、記憶装置120、CPU130及び処理回路140は、CPUバス1を介して相互に接続される。一方、各エンドデバイス11、12及び各ブリッジ13〜15は、PCIバス2を介してPCIバスコントローラ110に接続される。   The information processing apparatus 100 is a computer such as a personal computer or a server. In the information processing apparatus 100, a plurality of virtual machines are set by the administrator, and the information processing apparatus 100 in which the virtual machines are set is used by the user. The information processing apparatus 100 includes a communication device 101, an input device 102, a display device 103, a PCI bus controller 110, a storage device 120, a CPU (Central Processing Unit) 130, and a processing circuit 140. Further, the information processing apparatus 100 includes a plurality of end devices 11, 12 and 16, a plurality of bridges 13 to 15, a plurality of expansion slots 17 and 18, and an expansion card 20. The communication device 101, the input device 102, the display device 103, the PCI bus controller 110, the storage device 120, the CPU 130, and the processing circuit 140 are connected to each other via the CPU bus 1. On the other hand, the end devices 11 and 12 and the bridges 13 to 15 are connected to the PCI bus controller 110 via the PCI bus 2.

図1に示す例では、ブリッジ13にはエンドデバイス16が接続され、ブリッジ14、15にはそれぞれ拡張スロット17、18が接続され、拡張スロット17には拡張カード20が接続されている。拡張カード20は、拡張スロット17に接続されるブリッジ21と、ブリッジ21に接続されるエンドデバイス22、23とを有している。情報処理装置100の構成は、上記の構成に限定されず、例えばエンドデバイス又はブリッジの数は、一つでもよいし、二つ以上の任意の数でもよい。以下、情報処理装置100の各部について詳細に説明する。   In the example shown in FIG. 1, an end device 16 is connected to the bridge 13, expansion slots 17 and 18 are connected to the bridges 14 and 15, and an expansion card 20 is connected to the expansion slot 17. The expansion card 20 includes a bridge 21 connected to the expansion slot 17 and end devices 22 and 23 connected to the bridge 21. The configuration of the information processing apparatus 100 is not limited to the above configuration. For example, the number of end devices or bridges may be one, or an arbitrary number of two or more. Hereinafter, each part of the information processing apparatus 100 will be described in detail.

通信装置101は、例えばTCP/IP(Transmission Control Protocol/Internet Protocol)等に準拠した通信インタフェース回路を有し、インターネット等のネットワークに接続する。または、通信装置101は、例えばIEEE(The Institute of Electrical and Electronics Engineers, Inc.)802.11等に準拠した無線通信インタフェース回路を有する。その場合、通信装置101は、無線LAN(Local Area Network)等のネットワークに接続する。通信装置101は、接続するネットワークを介して他装置(不図示)とデータの送受信を行う。通信装置101は、他装置から受信したデータをCPU130に供給し、CPU130から供給されたデータを他装置に送信する。なお、通信装置101は、外部の装置と通信できるものであればどのようなものであってもよい。   The communication device 101 has a communication interface circuit compliant with, for example, TCP / IP (Transmission Control Protocol / Internet Protocol) or the like, and is connected to a network such as the Internet. Alternatively, the communication apparatus 101 includes a wireless communication interface circuit that conforms to, for example, IEEE (The Institute of Electrical and Electronics Engineers, Inc.) 802.11. In this case, the communication apparatus 101 is connected to a network such as a wireless LAN (Local Area Network). The communication device 101 transmits / receives data to / from another device (not shown) via a connected network. The communication device 101 supplies the data received from the other device to the CPU 130 and transmits the data supplied from the CPU 130 to the other device. The communication device 101 may be any device that can communicate with an external device.

入力装置102は、タッチパネル式の入力装置、キーボード、マウス等の入力デバイス及び入力デバイスから信号を取得するインタフェース回路を有する。入力装置102は、ユーザの入力を受け付け、ユーザの入力に応じた信号をCPU130に対して出力する。   The input device 102 includes a touch panel type input device, an input device such as a keyboard and a mouse, and an interface circuit that acquires signals from the input device. The input device 102 receives user input and outputs a signal corresponding to the user input to the CPU 130.

表示装置103は、液晶、有機EL(Electro-Luminescence)等から構成されるディスプレイ及びディスプレイに画像データ又は各種の情報を出力するインタフェース回路を有する。表示装置103は、CPU130と接続されて、CPU130から出力された画像データをディスプレイに表示する。なお、タッチパネルディスプレイを用いて、入力装置102と表示装置103を一体に構成してもよい。   The display device 103 includes a display composed of liquid crystal, organic EL (Electro-Luminescence), and the like, and an interface circuit that outputs image data or various information to the display. The display device 103 is connected to the CPU 130 and displays the image data output from the CPU 130 on a display. Note that the input device 102 and the display device 103 may be integrally configured using a touch panel display.

PCIバスコントローラ110は、PCI又はPCI Express規格に準拠して、PCIバス2を介した通信を制御し、CPU130とPCIバス2配下の各エンドデバイス又は各ブリッジとの間のデータの送受信を制御する。   The PCI bus controller 110 controls communication via the PCI bus 2 in accordance with the PCI or PCI Express standard, and controls transmission / reception of data between the CPU 130 and each end device or each bridge under the PCI bus 2. .

各エンドデバイス11、12、16、22、23は、通信デバイス、表示デバイス又は制御デバイス等の任意のデバイスである。図1に示す例では、エンドデバイス11、12、16は、マザーボードに設けられたオンボードデバイスであり、エンドデバイス22、23は、拡張カード20に設けられたデバイスである。   Each end device 11, 12, 16, 22, 23 is an arbitrary device such as a communication device, a display device, or a control device. In the example illustrated in FIG. 1, the end devices 11, 12, and 16 are on-board devices provided on the motherboard, and the end devices 22 and 23 are devices provided on the expansion card 20.

各ブリッジ13〜15、21は、PCIバスコントローラ110又は上位のブリッジと下位のブリッジ又はエンドデバイスとの間のデータの送受信を制御する。各ブリッジには、各ブリッジ配下のアドレスが設定されており、CPU130は、各ブリッジを介して各ブリッジ配下のエンドデバイスにアクセスすることができる。以下では、エンドデバイス及びブリッジを総じてデバイスと称する場合がある。   Each of the bridges 13 to 15 and 21 controls transmission / reception of data between the PCI bus controller 110 or an upper bridge and a lower bridge or an end device. An address under each bridge is set in each bridge, and the CPU 130 can access an end device under each bridge via each bridge. Hereinafter, the end device and the bridge may be collectively referred to as a device.

各拡張スロット17、18は、拡張カードを情報処理装置100に搭載するためのインタフェースである。各拡張スロット17、18はブリッジ14、15に接続されている。   Each expansion slot 17, 18 is an interface for mounting an expansion card in the information processing apparatus 100. Each expansion slot 17, 18 is connected to a bridge 14, 15.

拡張カード20は、通信カード、表示カード又は制御カード等の、拡張スロット17、18に挿抜可能な任意のカードである。   The expansion card 20 is an arbitrary card that can be inserted into and removed from the expansion slots 17 and 18 such as a communication card, a display card, or a control card.

記憶装置120は、記憶部の一例である。記憶装置120は、RAM(Random Access Memory)、ROM(Read Only Memory)等のメモリ装置、ハードディスク等の固定ディスク装置、又はフレキシブルディスク、光ディスク等の可搬用の記憶装置等を有する。また、記憶装置120には、情報処理装置100の各種処理に用いられるコンピュータプログラム、データベース、テーブル等が格納される。コンピュータプログラムは、例えばCD−ROM(compact disk read only memory)、DVD−ROM(digital versatile disk read only memory)等のコンピュータ読み取り可能な可搬型記録媒体からインストールされてもよい。コンピュータプログラムは、公知のセットアッププログラム等を用いて記憶装置120にインストールされる。また、記憶装置120には、デバイステーブル、確保仮想アドレステーブル及び割り当て仮想アドレステーブル等が格納される。各テーブルの詳細については後述する。   The storage device 120 is an example of a storage unit. The storage device 120 includes a memory device such as a RAM (Random Access Memory) and a ROM (Read Only Memory), a fixed disk device such as a hard disk, or a portable storage device such as a flexible disk and an optical disk. In addition, the storage device 120 stores computer programs, databases, tables, and the like used for various processes of the information processing apparatus 100. The computer program may be installed from a computer-readable portable recording medium such as a CD-ROM (compact disk read only memory) or a DVD-ROM (digital versatile disk read only memory). The computer program is installed in the storage device 120 using a known setup program or the like. The storage device 120 stores a device table, a reserved virtual address table, an allocated virtual address table, and the like. Details of each table will be described later.

CPU130は、予め記憶装置120に記憶されているプログラムに基づいて動作する。CPU130は、汎用プロセッサであってもよい。なお、CPU130に代えて、DSP(digital signal processor)、LSI(large scale integration)等が用いられてよい。また、CPU130に代えて、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)等が用いられてもよい。   CPU 130 operates based on a program stored in storage device 120 in advance. The CPU 130 may be a general purpose processor. Instead of the CPU 130, a digital signal processor (DSP), a large scale integration (LSI), or the like may be used. Further, in place of the CPU 130, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or the like may be used.

CPU130は、通信装置101、入力装置102、表示装置103、PCIバスコントローラ110、記憶装置120及び処理回路140と接続され、これらの各部を制御する。CPU130は、通信装置101を介した通信制御、入力装置102の入力制御、表示装置103の表示制御、PCIバスコントローラ110を介したデータ送受信制御、記憶装置120の制御等を行う。   The CPU 130 is connected to the communication device 101, the input device 102, the display device 103, the PCI bus controller 110, the storage device 120, and the processing circuit 140, and controls these units. The CPU 130 performs communication control via the communication device 101, input control of the input device 102, display control of the display device 103, data transmission / reception control via the PCI bus controller 110, control of the storage device 120, and the like.

処理回路140は、所定の処理を実行する回路である。なお、処理回路140として、LSI、DSP、ASIC又はFPGA等が用いられてもよい。   The processing circuit 140 is a circuit that executes predetermined processing. Note that an LSI, DSP, ASIC, FPGA, or the like may be used as the processing circuit 140.

図2Aは、デバイステーブルのデータ構造の一例を示す。   FIG. 2A shows an example of the data structure of the device table.

デバイステーブルは、第1テーブルの一例であり、PCIバス2配下の各デバイスを管理するテーブルであり、情報処理装置100がユーザに提供される前に管理者により事前に設定される。デバイステーブルには、情報処理装置100に設けられたPCIバス2配下のデバイス毎に、各デバイスの識別番号(デバイスID)、物理アドレス及び割り当て仮想マシン情報等の情報が対応付けられて記憶される。デバイステーブルにおいて、PCIバス2配下のブリッジの内、拡張スロットに接続されているブリッジ14、15は管理されるが、エンドデバイスに直接接続されているブリッジ13は管理されなくてもよい。   The device table is an example of a first table and is a table for managing each device under the PCI bus 2, and is set in advance by the administrator before the information processing apparatus 100 is provided to the user. In the device table, for each device under the PCI bus 2 provided in the information processing apparatus 100, information such as an identification number (device ID), a physical address, and assigned virtual machine information of each device is associated and stored. . In the device table, the bridges 14 and 15 connected to the expansion slot among the bridges under the PCI bus 2 are managed, but the bridge 13 directly connected to the end device may not be managed.

物理アドレスは、情報処理装置100において各デバイスに割り当てられたPCI空間上の物理的な(実際の)アドレス(PCIアドレス)である。デバイスがエンドデバイスである場合、物理アドレスとしてエンドデバイス自体のPCIアドレスが記憶され、デバイスがブリッジである場合、物理アドレスとしてブリッジのPCIアドレスが記憶される。割り当て仮想マシン情報は、各デバイスが割り当てられる仮想マシンを示す。なお、デバイステーブルには、デバイス毎に、各デバイスがエンドデバイスであるかブリッジであるかを示すデバイス種別がさらに関連付けて記憶されてもよい。   The physical address is a physical (actual) address (PCI address) on the PCI space assigned to each device in the information processing apparatus 100. When the device is an end device, the PCI address of the end device itself is stored as a physical address. When the device is a bridge, the PCI address of the bridge is stored as a physical address. The assigned virtual machine information indicates a virtual machine to which each device is assigned. The device table may further store a device type indicating whether each device is an end device or a bridge for each device.

図2Bは、確保仮想アドレステーブルのデータ構造の一例を示す。   FIG. 2B shows an example of the data structure of the reserved virtual address table.

確保仮想アドレステーブルは、第2テーブルの一例であり、情報処理装置100において事前に確保されたPCI空間上の仮想アドレスを管理するテーブルであり、情報処理装置100がユーザに提供される前に管理者により事前に設定される。確保仮想アドレステーブルには、情報処理装置100に設けられたPCIバス2配下のデバイス毎に、各デバイスのデバイスID及び確保仮想アドレス等の情報が対応付けられて記憶される。   The reserved virtual address table is an example of a second table, is a table for managing virtual addresses in the PCI space reserved in advance in the information processing apparatus 100, and is managed before the information processing apparatus 100 is provided to the user. Set in advance by the user. In the reserved virtual address table, information such as a device ID and a reserved virtual address of each device is stored in association with each device under the PCI bus 2 provided in the information processing apparatus 100.

確保仮想アドレスは、情報処理装置100において各デバイスのために事前に確保されたPCI空間上の仮想アドレスである。仮想アドレスは、情報処理装置100に設定された各仮想マシンがPCIバス2配下のデバイスにアクセスする際に使用する仮想的なアドレスである。なお、仮想アドレスの上位二桁は、PCIバス番号を示している。確保仮想アドレスは、情報処理装置100内で重複しないように一意に設定される。また、確保仮想アドレスは、各デバイスがエンドデバイスであるかブリッジであるかに関わらず、設定される。即ち、確保仮想アドレスは、各デバイスがブリッジであり、ブリッジ配下の拡張スロットに拡張カードが搭載されておらず、ブリッジにどのようなエンドデバイスが接続されるかが不明な状態であっても設定される。   The reserved virtual address is a virtual address on the PCI space reserved in advance for each device in the information processing apparatus 100. The virtual address is a virtual address used when each virtual machine set in the information processing apparatus 100 accesses a device under the PCI bus 2. The upper two digits of the virtual address indicate the PCI bus number. The reserved virtual address is uniquely set so as not to overlap within the information processing apparatus 100. The reserved virtual address is set regardless of whether each device is an end device or a bridge. In other words, the reserved virtual address is set even if each device is a bridge, no expansion card is installed in the expansion slot under the bridge, and what end device is connected to the bridge is unknown. Is done.

図2C及び図2Dは、割り当て仮想アドレステーブルのデータ構造の一例を示す。   2C and 2D show an example of the data structure of the assigned virtual address table.

割り当て仮想アドレステーブルは、第3テーブルの一例であり、情報処理装置100に設けられたPCIバス2配下の各デバイスに割り当てたPCI空間上の仮想アドレスを管理するテーブルであり、情報処理装置100の起動時に生成される。割り当て仮想アドレステーブルには、情報処理装置100に設けられたPCIバス2配下のデバイス毎に、各デバイスのデバイスID、割り当て種別、物理アドレス、割り当て仮想マシン情報、割り当て仮想アドレス及び仮想アドレス空間情報等の情報が対応付けられて記憶される。割り当て仮想アドレステーブルには、PCIバス2配下のデバイスの内、エンドデバイス又はPCI空間において割り当てられた仮想ブリッジについての各情報が記憶される。   The allocated virtual address table is an example of a third table, and is a table for managing virtual addresses on the PCI space allocated to each device under the PCI bus 2 provided in the information processing apparatus 100. Generated at startup. In the allocation virtual address table, for each device under the PCI bus 2 provided in the information processing apparatus 100, the device ID, allocation type, physical address, allocation virtual machine information, allocation virtual address, virtual address space information, and the like of each device Are stored in association with each other. The allocation virtual address table stores information on end devices or virtual bridges allocated in the PCI space among devices under the PCI bus 2.

割り当て種別は、各デバイスがエンドデバイス(物理デバイス)であるか仮想ブリッジ(仮想デバイス)であるかを示す。物理アドレスには、各デバイスがエンドデバイスである場合、そのエンドデバイスの物理アドレスが設定され、各デバイスが仮想ブリッジである場合、ブランクが設定される。割り当て仮想マシン情報は、各デバイスが割り当てられる仮想マシンを示す。割り当て仮想アドレスは、各デバイス(エンドデバイス及び仮想ブリッジ)に割り当てたPCI空間上の仮想アドレスである。仮想アドレス空間情報には、各デバイスがエンドデバイスである場合、ブランクが設定され、各デバイスが仮想ブリッジである場合、各仮想ブリッジ配下の仮想アドレス空間として設定されたアドレスの範囲が設定される。   The allocation type indicates whether each device is an end device (physical device) or a virtual bridge (virtual device). In the physical address, when each device is an end device, the physical address of the end device is set, and when each device is a virtual bridge, a blank is set. The assigned virtual machine information indicates a virtual machine to which each device is assigned. The assigned virtual address is a virtual address on the PCI space assigned to each device (end device and virtual bridge). In the virtual address space information, when each device is an end device, a blank is set. When each device is a virtual bridge, a range of addresses set as a virtual address space under each virtual bridge is set.

図3は、記憶装置120及びCPU130の概略構成を示す図である。   FIG. 3 is a diagram illustrating a schematic configuration of the storage device 120 and the CPU 130.

図3に示すように、記憶装置120には、設定プログラム121、エンドデバイス検出プログラム122、仮想アドレス割り当てプログラム123、提供プログラム124、ハイパーバイザプログラム125及び複数の仮想マシンプログラム126等の各プログラムが記憶される。これらの各プログラムは、プロセッサ上で動作するソフトウェアにより実装される機能モジュールである。CPU130は、記憶装置120に記憶された各プログラムを読み取り、読み取った各プログラムに従って動作する。これにより、CPU130は、設定部131、エンドデバイス検出部132、仮想アドレス割り当て部133、提供部134、ハイパーバイザ部135及び複数の仮想マシン部136として機能する。   As shown in FIG. 3, each program such as a setting program 121, an end device detection program 122, a virtual address assignment program 123, a provision program 124, a hypervisor program 125, and a plurality of virtual machine programs 126 is stored in the storage device 120. Is done. Each of these programs is a functional module implemented by software operating on the processor. The CPU 130 reads each program stored in the storage device 120 and operates according to each read program. Accordingly, the CPU 130 functions as the setting unit 131, the end device detection unit 132, the virtual address allocation unit 133, the providing unit 134, the hypervisor unit 135, and the plurality of virtual machine units 136.

図4は、情報処理装置100による検出処理の動作の例を示すフローチャートである。   FIG. 4 is a flowchart illustrating an example of the detection processing operation performed by the information processing apparatus 100.

以下、図4に示したフローチャートを参照しつつ、情報処理装置100による検出処理の動作の例を説明する。なお、以下に説明する動作のフローは、予め記憶装置120に記憶されているプログラムに基づき主にCPU130により情報処理装置100の各要素と協働して実行される。検出処理は、情報処理装置100の起動時に実行される。   Hereinafter, an example of the operation of the detection process performed by the information processing apparatus 100 will be described with reference to the flowchart illustrated in FIG. The operation flow described below is mainly executed by the CPU 130 in cooperation with each element of the information processing apparatus 100 based on a program stored in the storage device 120 in advance. The detection process is executed when the information processing apparatus 100 is activated.

なお、検出処理が実行される前に(情報処理装置100の直前の電源断より前に)、設定部131により、デバイステーブル及び確保仮想アドレステーブルが事前に生成されている。まず、設定部131は、管理者による入力装置102を用いた指示に従って、情報処理装置100に複数の仮想マシンを設定する。また、設定部131は、各仮想マシンに対して、各仮想マシンが各デバイスにアクセスするために用いられる一又は複数の仮想デバイスを設定する。   Note that before the detection process is executed (before the power is turned off immediately before the information processing apparatus 100), the setting unit 131 generates a device table and a reserved virtual address table in advance. First, the setting unit 131 sets a plurality of virtual machines in the information processing apparatus 100 in accordance with an instruction using the input device 102 by the administrator. The setting unit 131 sets one or a plurality of virtual devices used for each virtual machine to access each device for each virtual machine.

次に、設定部131は、管理者により、入力装置102を用いて、PCIバス2配下のデバイスの物理アドレスと、そのデバイスを割り当てる仮想マシンを示す仮想マシン情報とが入力されると、入力された各情報を受け付ける。設定部131は、デバイスIDを新たに生成し、受け付けた物理アドレス及び仮想マシン情報を、生成したデバイスIDと関連付けてデバイステーブルに記憶する。なお、設定部131は、管理者により、入力装置102を用いて、デバイス種別が入力された場合、入力されたデバイス種別も、生成したデバイスIDと関連付けてデバイステーブルに記憶する。   Next, the setting unit 131 is input when the administrator inputs the physical address of the device under the PCI bus 2 and the virtual machine information indicating the virtual machine to which the device is assigned using the input device 102. Accept each piece of information. The setting unit 131 newly generates a device ID, and stores the received physical address and virtual machine information in the device table in association with the generated device ID. When the administrator inputs a device type using the input device 102 by the administrator, the setting unit 131 stores the input device type in the device table in association with the generated device ID.

また、設定部131は、管理者により、入力装置102を用いて、PCIバス2配下のデバイスの物理アドレスと、そのデバイスのために確保するPCI空間上の仮想アドレスとが入力されると、入力された各情報を受け付ける。設定部131は、デバイステーブルから、受け付けた物理アドレスに対応するデバイスIDを抽出し、受け付けた仮想アドレスを確保仮想アドレスとして、抽出したデバイスIDと関連付けて確保仮想アドレステーブルに記憶する。   When the administrator inputs the physical address of the device under the PCI bus 2 and the virtual address on the PCI space reserved for the device, the setting unit 131 receives an input. Each piece of information received is accepted. The setting unit 131 extracts a device ID corresponding to the received physical address from the device table, and stores the received virtual address as a reserved virtual address in association with the extracted device ID in the reserved virtual address table.

ステップS101〜S106の処理は、デバイステーブルに記憶されたデバイス毎に実行される。最初に、エンドデバイス検出部132は、デバイステーブルを読み出し、デバイステーブルに記憶されたデバイスの中から特定のデバイスを抽出する(ステップS101)。   The processing in steps S101 to S106 is executed for each device stored in the device table. First, the end device detection unit 132 reads the device table, and extracts a specific device from the devices stored in the device table (step S101).

次に、エンドデバイス検出部132は、抽出したデバイスがエンドデバイスであるかブリッジであるかを判定する(ステップS102)。エンドデバイス検出部132は、デバイステーブルにおいてそのデバイスに対応付けられた物理アドレスにアクセスして、そのデバイスがエンドデバイスであるかブリッジであるかを示す情報を取得する。なお、デバイステーブルにデバイス種別が記憶されている場合、エンドデバイス検出部132は、デバイス種別から、抽出したデバイスがエンドデバイスであるかブリッジであるかを判定してもよい。   Next, the end device detection unit 132 determines whether the extracted device is an end device or a bridge (step S102). The end device detection unit 132 accesses a physical address associated with the device in the device table, and acquires information indicating whether the device is an end device or a bridge. When the device type is stored in the device table, the end device detection unit 132 may determine whether the extracted device is an end device or a bridge from the device type.

デバイスがエンドデバイスであった場合、エンドデバイス検出部132は、エンドデバイスの検出処理を実行する(ステップS103)。エンドデバイス検出部132は、そのデバイスに対応付けられた物理アドレスにアクセスして、そのデバイスに所定の要求信号を送信し、そのデバイスから所定の応答信号を受信した場合に、そのデバイスをエンドデバイスとして検出する。エンドデバイスが検出された場合、エンドデバイス検出部132は、そのエンドデバイスを、デバイステーブルにおいてそのエンドデバイスの物理アドレスに対応付けられた仮想マシンに割り当てる。   When the device is an end device, the end device detection unit 132 executes end device detection processing (step S103). When the end device detection unit 132 accesses a physical address associated with the device, transmits a predetermined request signal to the device, and receives a predetermined response signal from the device, the end device detection unit 132 determines that the device is an end device. Detect as. When an end device is detected, the end device detection unit 132 assigns the end device to a virtual machine associated with the physical address of the end device in the device table.

一方、デバイスがブリッジであった場合、エンドデバイス検出部132は、ブリッジ配下のエンドデバイスの検出処理を実行する(ステップS104)。エンドデバイス検出部132は、そのデバイスに対応付けられた物理アドレスにアクセスして、ブリッジの配下に割り当てられたアドレス空間を示す情報を読み出す。エンドデバイス検出部132は、読み出した情報に示されるアドレス空間内の各アドレスにアクセスして、各アドレスに割り当てられたデバイスがエンドデバイスであるかブリッジであるかを示す情報を取得する。デバイスがエンドデバイスであった場合、エンドデバイス検出部132は、そのデバイスに所定の要求信号を送信し、所定の応答信号を受信した場合に、そのデバイスをエンドデバイスとして検出する。一方、デバイスがブリッジであった場合、エンドデバイス検出部132は、さらに、そのブリッジ配下のエンドデバイスの検出処理を実行する。エンドデバイスが検出された場合、エンドデバイス検出部132は、そのエンドデバイスを、デバイステーブルにおいてそのエンドデバイスに対応するブリッジに対応付けられた仮想マシンに割り当てる。   On the other hand, if the device is a bridge, the end device detection unit 132 executes a process for detecting an end device under the bridge (step S104). The end device detection unit 132 accesses the physical address associated with the device, and reads information indicating the address space allocated under the bridge. The end device detection unit 132 accesses each address in the address space indicated by the read information, and acquires information indicating whether the device assigned to each address is an end device or a bridge. When the device is an end device, the end device detection unit 132 transmits a predetermined request signal to the device, and detects the device as an end device when a predetermined response signal is received. On the other hand, when the device is a bridge, the end device detection unit 132 further executes a process for detecting an end device under the bridge. When an end device is detected, the end device detection unit 132 assigns the end device to a virtual machine associated with a bridge corresponding to the end device in the device table.

次に、エンドデバイス検出部132は、デバイステーブルに記憶された全てのデバイスについて処理が完了したか否かを判定する(ステップS105)。まだ処理していないデバイスが存在する場合、エンドデバイス検出部132は、処理をステップS101へ戻し、まだデバイステーブルから抽出していないデバイスについて、ステップS101〜S104の処理を実行する。一方、全てのデバイスについて処理が完了した場合、エンドデバイス検出部132は、一連のステップを終了する。   Next, the end device detection unit 132 determines whether or not the processing has been completed for all devices stored in the device table (step S105). If there is a device that has not yet been processed, the end device detection unit 132 returns the process to step S101, and executes the processes of steps S101 to S104 for the device that has not been extracted from the device table. On the other hand, when the processing is completed for all devices, the end device detection unit 132 ends the series of steps.

このように、エンドデバイス検出部132は、デバイステーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出する。   As described above, the end device detection unit 132 accesses each physical address stored in the device table, and detects an end device associated with each physical address or an end device under a bridge.

図5は、情報処理装置100による割り当て処理の動作の例を示すフローチャートである。   FIG. 5 is a flowchart illustrating an example of operation of assignment processing by the information processing apparatus 100.

以下、図5に示したフローチャートを参照しつつ、情報処理装置100による割り当て処理の動作の例を説明する。なお、以下に説明する動作のフローは、予め記憶装置120に記憶されているプログラムに基づき主にCPU130により情報処理装置100の各要素と協働して実行される。割り当て処理は、検出処理が実行された後に実行される。   Hereinafter, an example of the operation of the allocation process performed by the information processing apparatus 100 will be described with reference to the flowchart illustrated in FIG. The operation flow described below is mainly executed by the CPU 130 in cooperation with each element of the information processing apparatus 100 based on a program stored in the storage device 120 in advance. The allocation process is executed after the detection process is executed.

ステップS201〜S212の処理は、情報処理装置100に設定された複数の仮想マシン毎に実行される。最初に、仮想アドレス割り当て部133は、検出処理においてエンドデバイスが割り当てられた仮想マシンの中から特定の仮想マシンを抽出する(ステップS201)。   The processes in steps S201 to S212 are executed for each of a plurality of virtual machines set in the information processing apparatus 100. First, the virtual address assignment unit 133 extracts a specific virtual machine from the virtual machines to which the end device is assigned in the detection process (step S201).

ステップS202〜S211の処理は、抽出した仮想マシンに割り当てられたデバイス毎に実行される。まず、仮想アドレス割り当て部133は、デバイステーブルを読み出し、デバイステーブルにおいて抽出した仮想マシンに対応付けられたデバイスの中から特定のデバイスを抽出する(ステップS202)。   The processes in steps S202 to S211 are executed for each device assigned to the extracted virtual machine. First, the virtual address assignment unit 133 reads the device table, and extracts a specific device from the devices associated with the virtual machine extracted in the device table (step S202).

次に、仮想アドレス割り当て部133は、検出処理において、エンドデバイス検出部132により、抽出したデバイスに対応して検出されたエンドデバイスを特定する(ステップS203)。仮想アドレス割り当て部133は、抽出したデバイスがエンドデバイスである場合は、検出処理においてそのエンドデバイスが検出されていた場合に限り、そのエンドデバイスを、抽出したデバイスに対応して検出されたエンドデバイスとして特定する。一方、仮想アドレス割り当て部133は、抽出したデバイスがブリッジである場合は、検出処理においてそのブリッジ配下に検出されたエンドデバイスを、抽出したデバイスに対応して検出されたエンドデバイスとして特定する。   Next, in the detection process, the virtual address assignment unit 133 specifies an end device detected by the end device detection unit 132 corresponding to the extracted device (step S203). When the extracted device is an end device, the virtual address allocation unit 133 detects the end device corresponding to the extracted device only when the end device is detected in the detection process. As specified. On the other hand, when the extracted device is a bridge, the virtual address assignment unit 133 identifies the end device detected under the bridge in the detection process as the end device detected corresponding to the extracted device.

次に、仮想アドレス割り当て部133は、抽出したデバイスに対応して検出されたエンドデバイスが複数であるか否かを判定する(ステップS204)。   Next, the virtual address assignment unit 133 determines whether there are a plurality of end devices detected corresponding to the extracted devices (step S204).

検出されたエンドデバイスが一つであった場合、仮想アドレス割り当て部133は、そのエンドデバイスに、確保仮想アドレステーブルにおいてそのデバイスのデバイスIDに対応付けられた確保仮想アドレスを割り当てる(ステップS205)。即ち、この確保仮想アドレスは、確保仮想アドレステーブルにおいてそのエンドデバイスに対応付けられていた仮想アドレスである。なお、仮想アドレス割り当て部133は、各エンドデバイスを、各エンドデバイスが割り当てられた仮想マシンに対して設定された仮想デバイスの内の特定の仮想デバイスの配下に設定する。   When the detected end device is one, the virtual address assignment unit 133 assigns the reserved virtual address associated with the device ID of the device in the reserved virtual address table to the end device (step S205). That is, the reserved virtual address is a virtual address associated with the end device in the reserved virtual address table. Note that the virtual address assignment unit 133 sets each end device under a specific virtual device among the virtual devices set for the virtual machine to which each end device is assigned.

次に、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルを生成又は更新する(ステップS206)。仮想アドレス割り当て部133は、デバイステーブルにおいてそのエンドデバイスに対応付けられたデバイスIDと、物理デバイスであることを示す割り当て種別と、そのエンドデバイスの物理アドレス及び割り当て仮想マシン情報とを対応付けて割り当て仮想アドレステーブルに記憶する。さらに、仮想アドレス割り当て部133は、エンドデバイスに割り当てた仮想アドレスをそのデバイスIDに対応付けて割り当て仮想アドレステーブルに記憶する。なお、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて、そのデバイスIDに対応する仮想アドレス空間情報にはブランクを設定する。   Next, the virtual address assignment unit 133 generates or updates the assignment virtual address table (step S206). The virtual address assignment unit 133 assigns a device ID associated with the end device in the device table, an assignment type indicating a physical device, a physical address of the end device, and assigned virtual machine information in association with each other. Store in the virtual address table. Furthermore, the virtual address assignment unit 133 stores the virtual address assigned to the end device in the assigned virtual address table in association with the device ID. Note that the virtual address allocation unit 133 sets blank in the virtual address space information corresponding to the device ID in the allocation virtual address table.

一方、検出されたエンドデバイスが複数であった場合、即ち抽出されたデバイスがブリッジであり且つそのブリッジ配下に複数のエンドデバイスが検出された場合、仮想アドレス割り当て部133は、仮想ブリッジを新たに設定する。その場合、仮想アドレス割り当て部133は、確保仮想アドレステーブルにおいてそのデバイスのデバイスIDに対応付けられた確保仮想アドレスを、設定した仮想ブリッジに割り当てる(ステップS207)。なお、仮想アドレス割り当て部133は、仮想ブリッジを、対応するブリッジが割り当てられた仮想マシンに対して設定された仮想デバイスの内の特定の仮想デバイスの配下に設定する。   On the other hand, when there are a plurality of detected end devices, that is, when the extracted device is a bridge and a plurality of end devices are detected under the bridge, the virtual address assignment unit 133 newly sets a virtual bridge. Set. In that case, the virtual address assignment unit 133 assigns the reserved virtual address associated with the device ID of the device in the reserved virtual address table to the set virtual bridge (step S207). The virtual address assignment unit 133 sets the virtual bridge under a specific virtual device among the virtual devices set for the virtual machine to which the corresponding bridge is assigned.

次に、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて使用されていない仮想アドレス、即ち過去に割り当て仮想アドレステーブルにおいて対応付けていない仮想アドレスを抽出する(ステップS208)。仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて使用されておらず且つ検出されたエンドデバイスの数だけ仮想アドレスを設定可能な仮想アドレス空間を、仮想ブリッジ配下の仮想アドレス空間として設定する。仮想アドレス割り当て部133は、設定した仮想アドレス空間内のアドレスから、検出されたエンドデバイスの数の仮想アドレスを抽出する。   Next, the virtual address assignment unit 133 extracts a virtual address that is not used in the assigned virtual address table, that is, a virtual address that has not been associated in the assigned virtual address table in the past (step S208). The virtual address assignment unit 133 sets a virtual address space that is not used in the assigned virtual address table and in which virtual addresses can be set as many as the number of detected end devices, as a virtual address space under the virtual bridge. The virtual address assignment unit 133 extracts virtual addresses corresponding to the number of detected end devices from the addresses in the set virtual address space.

次に、仮想アドレス割り当て部133は、抽出した各仮想アドレスを、仮想ブリッジ配下の仮想アドレスとして、検出された複数のエンドデバイスにそれぞれ割り当てる(ステップS209)。   Next, the virtual address assignment unit 133 assigns each extracted virtual address to each of the detected end devices as a virtual address under the virtual bridge (step S209).

次に、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルを生成又は更新する(ステップS210)。仮想アドレス割り当て部133は、新たに設定した仮想ブリッジのデバイスIDを新たに生成する。仮想アドレス割り当て部133は、生成したデバイスIDと、仮想デバイス(仮想ブリッジ)であることを示す割り当て種別とを対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS202において抽出したデバイスにデバイステーブルで対応付けられた割り当て仮想マシン情報を、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS207において仮想ブリッジに割り当てた確保仮想アドレスを割り当て仮想アドレスとして、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。さらに、仮想アドレス割り当て部133は、ステップS208において設定した仮想ブリッジ配下の仮想アドレス空間の範囲を仮想アドレス空間情報として、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。なお、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて、生成したデバイスIDに対応する物理アドレスにはブランクを設定する。   Next, the virtual address assignment unit 133 generates or updates the assignment virtual address table (step S210). The virtual address assignment unit 133 newly generates a device ID of the newly set virtual bridge. The virtual address assignment unit 133 associates the generated device ID with the assignment type indicating the virtual device (virtual bridge) and stores them in the assignment virtual address table. Further, the virtual address assignment unit 133 stores the assigned virtual machine information associated with the device extracted in step S202 in the device table in the assigned virtual address table in association with the generated device ID. Further, the virtual address assignment unit 133 stores the reserved virtual address assigned to the virtual bridge in step S207 as the assigned virtual address in the assigned virtual address table in association with the generated device ID. Further, the virtual address assignment unit 133 stores the range of the virtual address space under the virtual bridge set in step S208 as virtual address space information in association with the generated device ID in the assigned virtual address table. Note that the virtual address assignment unit 133 sets a blank for the physical address corresponding to the generated device ID in the assignment virtual address table.

また、仮想アドレス割り当て部133は、検出された複数のエンドデバイスのデバイスIDを新たに生成する。仮想アドレス割り当て部133は、生成したデバイスIDと、物理デバイスであることを示す割り当て種別とを対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、検出処理(ステップS104)において各エンドデバイスが検出されたアドレスを各エンドデバイスの物理アドレスとして、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS202において抽出したデバイスにデバイステーブルで対応付けられた割り当て仮想マシン情報を、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS209において各エンドデバイスに割り当てた仮想アドレスを割り当て仮想アドレスとして、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。なお、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて、生成したデバイスIDに対応する仮想アドレス空間情報にはブランクを設定する。   In addition, the virtual address assignment unit 133 newly generates device IDs of the detected plurality of end devices. The virtual address assignment unit 133 associates the generated device ID with the assignment type indicating the physical device and stores them in the assignment virtual address table. Further, the virtual address assignment unit 133 stores the address at which each end device is detected in the detection process (step S104) as a physical address of each end device in association with the generated device ID and stores it in the assigned virtual address table. Further, the virtual address assignment unit 133 stores the assigned virtual machine information associated with the device extracted in step S202 in the device table in the assigned virtual address table in association with the generated device ID. Further, the virtual address assignment unit 133 stores the virtual address assigned to each end device in step S209 as an assigned virtual address in association with the generated device ID in the assigned virtual address table. Note that the virtual address assignment unit 133 sets a blank in the virtual address space information corresponding to the generated device ID in the assignment virtual address table.

次に、仮想アドレス割り当て部133は、デバイステーブルにおいて、ステップS201で抽出した仮想マシンに対応付けられた全てのデバイスについて処理が完了したか否かを判定する(ステップS211)。まだ処理していないデバイスが存在する場合、エンドデバイス検出部132は、処理をステップS202へ戻し、まだデバイステーブルから抽出していないデバイスについて、ステップS202〜S210の処理を実行する。   Next, the virtual address assignment unit 133 determines whether or not the processing has been completed for all devices associated with the virtual machine extracted in step S201 in the device table (step S211). If there is a device that has not yet been processed, the end device detection unit 132 returns the process to step S202, and executes the processes of steps S202 to S210 for the device that has not been extracted from the device table.

一方、全てのデバイスについて処理が完了した場合、仮想アドレス割り当て部133は、検出処理においてエンドデバイスが割り当てられた全ての仮想マシンについて処理が完了したか否かを判定する(ステップS212)。まだ処理していない仮想マシンが存在する場合、仮想アドレス割り当て部133は、処理をステップS201へ戻し、まだ抽出していない仮想マシンについて、ステップS201〜S211の処理を実行する。このように、仮想アドレス割り当て部133は、複数の仮想マシン毎に、検出処理において検出された各エンドデバイスに仮想アドレスを割り当てて、割り当て仮想アドレステーブルを生成する。   On the other hand, when the processing has been completed for all devices, the virtual address assignment unit 133 determines whether the processing has been completed for all virtual machines to which end devices have been assigned in the detection processing (step S212). If there is a virtual machine that has not yet been processed, the virtual address assignment unit 133 returns the process to step S201, and executes the processes of steps S201 to S211 for the virtual machine that has not been extracted yet. In this way, the virtual address assignment unit 133 assigns a virtual address to each end device detected in the detection process for each of a plurality of virtual machines, and generates an assigned virtual address table.

一方、全ての仮想マシンについて処理が完了した場合、提供部134は、生成された割り当て仮想アドレステーブルをハイパーバイザ部135に提供し(ステップS213)、一連のステップを終了する。提供部134は、割り当て仮想アドレステーブルをデバイステーブルとともに、記憶装置120においてハイパーバイザ部135が読み取り可能な所定の記憶領域に書き込むことにより、ハイパーバイザ部135に提供する。なお、提供部134は、各テーブルをハイパーバイザ部135に送信することにより提供してもよい。   On the other hand, when the processing is completed for all the virtual machines, the providing unit 134 provides the generated allocation virtual address table to the hypervisor unit 135 (step S213), and the series of steps ends. The providing unit 134 provides the allocated virtual address table to the hypervisor unit 135 by writing the allocation virtual address table together with the device table in a predetermined storage area that can be read by the hypervisor unit 135 in the storage device 120. The providing unit 134 may provide each table by transmitting it to the hypervisor unit 135.

ハイパーバイザ部135は、提供部134により提供された各テーブルを使用して各仮想マシン部136の仮想PCIアドレス空間をエミュレートする。各仮想マシン部136は、各仮想マシン部136に割り当てられた仮想PCIアドレス空間に対してコンフィグレーションアクセスを実行し、仮想PCIアドレス空間を探索して、仮想PCIアドレス空間に割り当てられたデバイスを認識する。   The hypervisor unit 135 emulates the virtual PCI address space of each virtual machine unit 136 using each table provided by the providing unit 134. Each virtual machine unit 136 performs configuration access to the virtual PCI address space assigned to each virtual machine unit 136, searches the virtual PCI address space, and recognizes the device assigned to the virtual PCI address space. To do.

各仮想マシン部136は、PCIバス2配下の各エンドデバイスにアクセスする際、仮想デバイスの配下に設定された各エンドデバイスに割り当てられた仮想アドレスを指定して、ハイパーバイザ部135に各エンドデバイスへのアクセスを要求する。ハイパーバイザ部135は、各仮想マシン部136からアクセスが要求されると、提供部134により提供された割り当て仮想アドレステーブルから、指定された仮想アドレスに対応する物理アドレスを特定し、特定した物理アドレスに対してアクセスする。ハイパーバイザ部135は、アクセス結果を各仮想マシン部136に送る。   When accessing each end device under the PCI bus 2, each virtual machine unit 136 specifies a virtual address assigned to each end device set under the virtual device, and sends each end device to the hypervisor unit 135. Request access to. When access is requested from each virtual machine unit 136, the hypervisor unit 135 identifies a physical address corresponding to the designated virtual address from the assigned virtual address table provided by the providing unit 134, and identifies the identified physical address Access to. The hypervisor unit 135 sends the access result to each virtual machine unit 136.

図6〜図8は、情報処理装置100のPCIバス2配下の各デバイスへの仮想アドレスの割り当ての例について説明するための模式図である。   6 to 8 are schematic diagrams for explaining an example of virtual address assignment to each device under the PCI bus 2 of the information processing apparatus 100. FIG.

図6の構成601は、情報処理装置100のPCIバス2配下の物理的な構成を示している。構成601において、かっこ内の数字は各デバイスの物理アドレスを示している。図6は、情報処理装置100がユーザに提供される前の状態を示しており、情報処理装置100の拡張スロット17、18には、拡張カードがまだ挿入されていない。この情報処理装置100に対して、管理者によりPCIバス2配下のデバイスの物理アドレスと、そのデバイスを割り当てる仮想マシンの仮想マシン情報とが入力されると、設定部131は、入力された情報に基づいて図2Aに示したデバイステーブルを設定する。   A configuration 601 in FIG. 6 illustrates a physical configuration under the PCI bus 2 of the information processing apparatus 100. In the configuration 601, the number in parentheses indicates the physical address of each device. FIG. 6 shows a state before the information processing apparatus 100 is provided to the user, and an expansion card has not yet been inserted into the expansion slots 17 and 18 of the information processing apparatus 100. When the administrator inputs the physical address of the device under the PCI bus 2 and the virtual machine information of the virtual machine to which the device is assigned to the information processing apparatus 100, the setting unit 131 displays the input information. Based on this, the device table shown in FIG. 2A is set.

図2Aでは、デバイスID=01としてエンドデバイス12(物理アドレス=00:01.0)が設定されて仮想マシンAに割り当てられ、デバイスID=02としてブリッジ14(物理アドレス=00:03.0)が設定されて仮想マシンBに割り当てられている。また、デバイスID=03としてブリッジ15(物理アドレス=00:04.0)が設定されて仮想マシンAに割り当てられ、デバイスID=04としてエンドデバイス16(物理アドレス=01:00.0)が設定されて仮想マシンBに割り当てられている。   In FIG. 2A, the end device 12 (physical address = 00: 01.0) is set as the device ID = 01 and assigned to the virtual machine A, and the bridge 14 (physical address = 00: 03.0) is set as the device ID = 02. Is set and assigned to the virtual machine B. In addition, the bridge 15 (physical address = 00: 04.0) is set as the device ID = 03 and assigned to the virtual machine A, and the end device 16 (physical address = 01: 00.0) is set as the device ID = 04. And assigned to the virtual machine B.

さらに、管理者により、PCIバス2配下のデバイスの物理アドレスと、そのデバイスのための仮想アドレスとが入力されると、設定部131は、入力された情報に基づいて図2Bに示した確保仮想アドレステーブルを設定する。   Furthermore, when the administrator inputs the physical address of the device under the PCI bus 2 and the virtual address for the device, the setting unit 131 displays the reserved virtual shown in FIG. 2B based on the input information. Set the address table.

図2Bでは、デバイスID=01のエンドデバイス12に確保仮想アドレス=01:00.00が設定され、デバイスID=02のブリッジ14に確保仮想アドレス=01:01.00が設定されている。また、デバイスID=03のブリッジ15に確保仮想アドレス=01:02.00が設定され、デバイスID=04のエンドデバイス16に確保仮想アドレス=01:03.00が設定されている。   In FIG. 2B, the reserved virtual address = 01: 00.00 is set to the end device 12 with the device ID = 01, and the reserved virtual address = 01: 01.00 is set to the bridge 14 with the device ID = 02. Further, the reserved virtual address = 01: 02.00 is set in the bridge 15 having the device ID = 03, and the reserved virtual address = 01: 03.000 is set in the end device 16 having the device ID = 04.

図7の構成701は、情報処理装置100のPCIバス2配下の物理的な構成を示し、構成702及び構成703は、情報処理装置100のPCIバス2配下の仮想的な構成を示している。なお、構成702及び構成703は、それぞれ仮想マシンA及び仮想マシンBに属する構成である。構成701において、かっこ内の数字は各デバイスの物理アドレスを示し、構成702及び構成703において、かっこ内の数字は各デバイスの仮想アドレスを示している。図7は、情報処理装置100がユーザに提供された後の状態を示しており、情報処理装置100の拡張スロット17には、一つのエンドデバイス22を有する拡張カード20が挿入されている。この例では、情報処理装置100は、起動時に、検出処理及び割り当て処理を実行し、図2Cに示した割り当て仮想アドレステーブルを設定する。   A configuration 701 in FIG. 7 shows a physical configuration under the PCI bus 2 of the information processing apparatus 100, and configurations 702 and 703 show a virtual configuration under the PCI bus 2 of the information processing apparatus 100. Note that the configurations 702 and 703 belong to the virtual machine A and the virtual machine B, respectively. In the configuration 701, the number in parentheses indicates the physical address of each device, and in the configuration 702 and the configuration 703, the number in parentheses indicates the virtual address of each device. FIG. 7 shows a state after the information processing apparatus 100 is provided to the user. An expansion card 20 having one end device 22 is inserted into the expansion slot 17 of the information processing apparatus 100. In this example, the information processing apparatus 100 executes detection processing and allocation processing at the time of activation, and sets the allocation virtual address table illustrated in FIG. 2C.

この場合、検出処理のステップS103では、仮想マシンAに割り当てられるデバイスID=01のエンドデバイス12と、仮想マシンBに割り当てられるデバイスID=04のエンドデバイス16とが検出される。また、ステップS104では、仮想マシンBに割り当てられるデバイスID=02のブリッジ14配下のエンドデバイスとしてエンドデバイス22が検出される。   In this case, in step S103 of the detection process, the end device 12 with the device ID = 01 assigned to the virtual machine A and the end device 16 with the device ID = 04 assigned to the virtual machine B are detected. In step S104, the end device 22 is detected as an end device under the bridge 14 with the device ID = 02 assigned to the virtual machine B.

一方、割り当て処理のステップS205では、仮想マシンAに対して設定された仮想デバイス31〜33の内の仮想デバイス33の配下に、仮想マシンAに割り当てられるデバイスID=01のエンドデバイス12が設定される。デバイスID=01のエンドデバイス12には、確保仮想アドレステーブルで予め割り当てられていた仮想アドレス(01:00.0)が割り当てられる。   On the other hand, in step S205 of the assignment process, the end device 12 with device ID = 01 assigned to the virtual machine A is set under the virtual device 33 among the virtual devices 31 to 33 set for the virtual machine A. The A virtual address (01: 00.0) previously assigned in the reserved virtual address table is assigned to the end device 12 having the device ID = 01.

また、仮想マシンBに対して設定された仮想デバイス41〜43の内の仮想デバイス43の配下に、仮想マシンBに割り当てられるデバイスID=04のエンドデバイス16と、デバイスID=02のブリッジ14配下のエンドデバイス22とが設定される。デバイスID=04のエンドデバイス16には、確保仮想アドレステーブルで予め割り当てられていた仮想アドレス(01:03.0)が割り当てられる。さらに、仮想マシンBに割り当てられるデバイスID=02のブリッジ14配下のエンドデバイス22には、確保仮想アドレステーブルでデバイスID=02のブリッジ14に予め割り当てられていた仮想アドレス(01:01.0)が割り当てられる。   Also, under the virtual device 43 among the virtual devices 41 to 43 set for the virtual machine B, the end device 16 with device ID = 04 and the bridge 14 with device ID = 02 are assigned to the virtual machine B. End device 22 is set. A virtual address (01: 03.0) assigned in advance in the reserved virtual address table is assigned to the end device 16 with device ID = 04. Furthermore, for the end device 22 under the bridge 14 with the device ID = 02 assigned to the virtual machine B, the virtual address (01: 01.0) previously assigned to the bridge 14 with the device ID = 02 in the reserved virtual address table. Is assigned.

なお、各ブリッジ13、14及び15には、仮想アドレスは割り当てられない。また、ブリッジ15に接続される拡張スロット18には拡張カードが挿入されていないため、デバイスID=03のブリッジ15に対応付けられていた確保仮想アドレス(01:02.0)は、何れのデバイスにも割り当てられない。   A virtual address is not assigned to each of the bridges 13, 14 and 15. In addition, since no expansion card is inserted in the expansion slot 18 connected to the bridge 15, the reserved virtual address (01: 02.0) associated with the bridge 15 with the device ID = 03 is any device. Also not assigned to.

このように、情報処理装置100は、PCIバス2配下のエンドデバイスだけでなく、ブリッジにも仮想アドレスを予め割り当てておく。これにより、情報処理装置100は、拡張カードが後から挿入された場合でも、拡張カード内のエンドデバイスに対して、ブリッジに割り当てておいた仮想アドレスを割り当てることが可能となり、各仮想マシンへのエンドデバイスの割り当てをより簡易化できる。   As described above, the information processing apparatus 100 assigns virtual addresses not only to end devices under the PCI bus 2 but also to bridges in advance. Thereby, even when the expansion card is inserted later, the information processing apparatus 100 can assign the virtual address assigned to the bridge to the end device in the expansion card. End device assignment can be simplified.

図8の構成801は、情報処理装置100のPCIバス2配下の物理的な構成を示し、構成802及び構成803は、情報処理装置100のPCIバス2配下の仮想的な構成を示している。なお、構成802及び構成803は、それぞれ仮想マシンA及び仮想マシンBに属する構成である。構成801において、かっこ内の数字は各デバイスの物理アドレスを示し、構成802及び構成803において、かっこ内の数字は各デバイスの仮想アドレスを示している。図8は、情報処理装置100がユーザに提供された後の状態を示しており、情報処理装置100の拡張スロット17には、ブリッジ21と、ブリッジ21配下に設けられた二つのエンドデバイス22とを有する拡張カード20が挿入されている。この例では、情報処理装置100は、起動時に、検出処理及び割り当て処理を実行し、図2Dに示した割り当て仮想アドレステーブルを設定する。   A configuration 801 in FIG. 8 shows a physical configuration under the PCI bus 2 of the information processing apparatus 100, and configurations 802 and 803 show a virtual configuration under the PCI bus 2 of the information processing apparatus 100. Note that the configurations 802 and 803 belong to the virtual machine A and the virtual machine B, respectively. In the configuration 801, the number in parentheses indicates the physical address of each device, and in the configuration 802 and configuration 803, the number in parentheses indicates the virtual address of each device. FIG. 8 shows a state after the information processing apparatus 100 is provided to the user. The expansion slot 17 of the information processing apparatus 100 includes a bridge 21 and two end devices 22 provided under the bridge 21. Is inserted. In this example, the information processing apparatus 100 executes detection processing and allocation processing at the time of activation, and sets the allocation virtual address table illustrated in FIG. 2D.

この場合、図7の例と同様に、検出処理のステップS103では、仮想マシンAに割り当てられるデバイスID=01のエンドデバイス12と、仮想マシンBに割り当てられるデバイスID=04のエンドデバイス16とが検出される。また、ステップS104では、仮想マシンBに割り当てられるデバイスID=02のブリッジ14配下のエンドデバイスとしてエンドデバイス22及びエンドデバイス23が検出される。   In this case, as in the example of FIG. 7, in step S103 of the detection process, the end device 12 with device ID = 01 assigned to the virtual machine A and the end device 16 with device ID = 04 assigned to the virtual machine B are included. Detected. In step S104, the end device 22 and the end device 23 are detected as end devices under the bridge 14 having the device ID = 02 assigned to the virtual machine B.

一方、図7の例と同様に、割り当て処理のステップS205では、仮想マシンAに対して設定された仮想デバイス33の配下に、仮想マシンAに割り当てられるデバイスID=01のエンドデバイス12が設定される。デバイスID=01のエンドデバイス12には、確保仮想アドレステーブルで予め割り当てられていた仮想アドレス(01:00.0)が割り当てられる。   On the other hand, as in the example of FIG. 7, in step S205 of the assignment process, the end device 12 with the device ID = 01 assigned to the virtual machine A is set under the virtual device 33 set for the virtual machine A. The A virtual address (01: 00.0) previously assigned in the reserved virtual address table is assigned to the end device 12 having the device ID = 01.

また、仮想マシンBに対して設定された仮想デバイス43の配下に、仮想マシンBに割り当てられるデバイスID=04のエンドデバイス16が設定される。デバイスID=04のエンドデバイス16には、確保仮想アドレステーブルで予め割り当てられていた仮想アドレス(01:03.0)が割り当てられる。さらに、ステップS207では、仮想デバイス43の配下に仮想ブリッジ44が新たに設定され、確保仮想アドレステーブルでデバイスID=02のブリッジ14に予め割り当てられていた仮想アドレス(01:01.0)が割り当てられる。なお、図2Dでは、仮想ブリッジ44に新たなデバイスID=10が割り当てられている。また、ステップS208では、割り当て仮想アドレステーブルにおいて使用されていない仮想アドレス(02:00.0、02:01.0)が抽出され、それぞれエンドデバイス22及び23に割り当てられる。なお、図2Dでは、エンドデバイス22及び23にそれぞれ新たなデバイスID=11及び12が割り当てられている。   Further, the end device 16 with device ID = 04 assigned to the virtual machine B is set under the virtual device 43 set for the virtual machine B. A virtual address (01: 03.0) assigned in advance in the reserved virtual address table is assigned to the end device 16 with device ID = 04. In step S207, the virtual bridge 44 is newly set under the virtual device 43, and the virtual address (01: 01.0) previously assigned to the bridge 14 with the device ID = 02 in the reserved virtual address table is assigned. It is done. In FIG. 2D, a new device ID = 10 is assigned to the virtual bridge 44. In step S208, virtual addresses (02: 00.0, 02: 01.0) that are not used in the assigned virtual address table are extracted and assigned to the end devices 22 and 23, respectively. In FIG. 2D, new device IDs = 11 and 12 are assigned to the end devices 22 and 23, respectively.

このように、情報処理装置100は、ブリッジ配下に複数のエンドデバイスが検出された場合、仮想ブリッジを設定し、ブリッジに割り当てておいた仮想アドレスを仮想ブリッジに割り当て、仮想ブリッジ配下の仮想アドレスを複数のエンドデバイスに割り当てる。これにより、情報処理装置100は、複数のエンドデバイスを有する拡張カードが後から挿入された場合でも、各エンドデバイスに対して仮想アドレスを適切に割り当てることが可能となり、各仮想マシンへのエンドデバイスの割り当てをより簡易化できる。   As described above, when a plurality of end devices are detected under the bridge, the information processing apparatus 100 sets a virtual bridge, assigns the virtual address assigned to the bridge to the virtual bridge, and sets the virtual address under the virtual bridge. Assign to multiple end devices. Thus, the information processing apparatus 100 can appropriately assign a virtual address to each end device even when an expansion card having a plurality of end devices is inserted later, and the end device to each virtual machine can be assigned. Assignment can be simplified.

また、確保仮想アドレステーブルにおいて、確保仮想アドレスは重複しないように一意に設定され、ブリッジ配下に複数のエンドデバイスが検出された場合、各エンドデバイスには、まだ使用されていない仮想アドレスが設定される。これにより、情報処理装置100内で、各デバイスに割り当てられる仮想アドレスは重複しないように設定されるため、各デバイスにアクセスする際に、仮想アドレスが重複することによる誤動作が発生することが防止される。   In the reserved virtual address table, the reserved virtual address is uniquely set so as not to overlap. When multiple end devices are detected under the bridge, a virtual address that is not yet used is set for each end device. The As a result, the virtual address assigned to each device is set so as not to overlap in the information processing apparatus 100, so that it is possible to prevent a malfunction caused by overlapping virtual addresses when accessing each device. The

以上詳述したように、情報処理装置100は、PCIバス2配下のエンドデバイスだけでなく、ブリッジにも仮想アドレスを予め割り当てておくことにより、各仮想マシンへのエンドデバイスの割り当てをより簡易化することが可能となった。   As described above in detail, the information processing apparatus 100 simplifies assignment of end devices to each virtual machine by pre-assigning virtual addresses not only to the end devices under the PCI bus 2 but also to bridges. It became possible to do.

特に、情報処理装置100では、管理者が情報処理装置100に仮想マシンを設定してから情報処理装置100をユーザに提供し、ユーザが情報処理装置100に拡張カードを搭載するような場合でも、管理者が事前に各デバイスに仮想アドレスを割り当てておく。これにより、十分な知識を有していないユーザが仮想アドレスの割り当てを行う必要がなくなり、ユーザの利便性を向上させることが可能となった。   In particular, in the information processing apparatus 100, even when an administrator sets a virtual machine in the information processing apparatus 100 and then provides the information processing apparatus 100 to the user, and the user installs an expansion card in the information processing apparatus 100, The administrator assigns a virtual address to each device in advance. This eliminates the need for a user who does not have sufficient knowledge to assign a virtual address, thereby improving the user's convenience.

また、情報処理装置100では、PCIバス2配下のエンドデバイスに仮想アドレスが予め割り当てられている。そのため、情報処理装置100に挿入されていた拡張カード20が抜かれた場合も、オンボードデバイス等のエンドデバイスに割り当てられていた仮想アドレスは変化しない。したがって、情報処理装置100では、OS(Operating System)等によりオンボードデバイスが、過去に認識されたデバイスとは異なるデバイスであると誤って認識され、誤動作が発生することが抑制される。   Further, in the information processing apparatus 100, virtual addresses are assigned in advance to end devices under the PCI bus 2. Therefore, even when the expansion card 20 inserted into the information processing apparatus 100 is removed, the virtual address assigned to the end device such as the onboard device does not change. Therefore, in the information processing apparatus 100, an onboard device is erroneously recognized as a device different from a device recognized in the past by an OS (Operating System) or the like, and occurrence of malfunction is suppressed.

一方、情報処理装置100において、複数のエンドデバイスを有する拡張カードが挿抜された場合、そのエンドデバイスに割り当てられていた仮想アドレスは変化する可能性がある。しかしながら、一般に、情報処理装置100のOSは、拡張カードが有するエンドデバイスのアドレスの変化には対応するように設計されているため、拡張カードが有するエンドデバイスのアドレスの変化による誤動作は発生しない。   On the other hand, in the information processing apparatus 100, when an expansion card having a plurality of end devices is inserted / removed, the virtual address assigned to the end device may change. However, in general, the OS of the information processing apparatus 100 is designed to cope with a change in the address of the end device included in the expansion card. Therefore, no malfunction occurs due to a change in the address of the end device included in the expansion card.

以上、本発明の好適な実施形態について説明してきたが、本発明はこれらの実施形態に限定されるものではない。例えば、設定部131、エンドデバイス検出部132、仮想アドレス割り当て部133及び提供部134により実行される各処理は、ハイパーバイザ部135又は特定の仮想マシン部136により実行されてもよい。   The preferred embodiments of the present invention have been described above, but the present invention is not limited to these embodiments. For example, each process executed by the setting unit 131, the end device detection unit 132, the virtual address assignment unit 133, and the providing unit 134 may be executed by the hypervisor unit 135 or a specific virtual machine unit 136.

図9は、他の実施形態に係る情報処理装置における処理回路240の概略構成を示すブロック図である。   FIG. 9 is a block diagram showing a schematic configuration of the processing circuit 240 in the information processing apparatus according to another embodiment.

処理回路240は、情報処理装置100の処理回路140の代わりに用いられ、CPU130の代わりに、検出処理及び割り当て処理を実行する。処理回路240は、設定回路241、エンドデバイス検出回路242、仮想アドレス割り当て回路243及び提供回路244等を有する。   The processing circuit 240 is used in place of the processing circuit 140 of the information processing apparatus 100 and executes detection processing and assignment processing instead of the CPU 130. The processing circuit 240 includes a setting circuit 241, an end device detection circuit 242, a virtual address assignment circuit 243, a provision circuit 244, and the like.

設定回路241は、設定部の一例であり、設定部131と同様の機能を有する。設定回路241は、入力装置102から管理者により入力された各情報を受信し、受信した各情報に基づいてデバイステーブル及び確保仮想アドレステーブルを生成し、記憶装置120に記憶する。   The setting circuit 241 is an example of a setting unit and has the same function as the setting unit 131. The setting circuit 241 receives each piece of information input from the input device 102 by the administrator, generates a device table and a reserved virtual address table based on the received information, and stores them in the storage device 120.

エンドデバイス検出回路242は、エンドデバイス検出部の一例であり、エンドデバイス検出部132と同様の機能を有する。エンドデバイス検出回路242は、記憶装置120からデバイステーブルを読み出し、デバイステーブルに記憶された各デバイスに対応するエンドデバイスを検出し、検出結果を仮想アドレス割り当て回路243に出力する。   The end device detection circuit 242 is an example of an end device detection unit, and has the same function as the end device detection unit 132. The end device detection circuit 242 reads the device table from the storage device 120, detects an end device corresponding to each device stored in the device table, and outputs the detection result to the virtual address assignment circuit 243.

仮想アドレス割り当て回路243は、仮想アドレス割り当て部の一例であり、仮想アドレス割り当て部133と同様の機能を有する。仮想アドレス割り当て回路243は、エンドデバイス検出回路242から検出結果を受信するとともに、記憶装置120からデバイステーブル及び確保仮想アドレステーブルを読み出す。仮想アドレス割り当て回路243は、エンドデバイス検出回路242により検出された各エンドデバイスに仮想アドレスを割り当てて、割り当て仮想アドレステーブルを生成し、提供回路244に出力する。   The virtual address assignment circuit 243 is an example of a virtual address assignment unit, and has the same function as the virtual address assignment unit 133. The virtual address assignment circuit 243 receives the detection result from the end device detection circuit 242 and reads the device table and the reserved virtual address table from the storage device 120. The virtual address assignment circuit 243 assigns a virtual address to each end device detected by the end device detection circuit 242, generates an assignment virtual address table, and outputs it to the provision circuit 244.

提供回路244は、提供部の一例であり、提供部134と同様の機能を有する。提供回路244は、仮想アドレス割り当て回路243から割り当て仮想アドレステーブルを受信し、CPU130(ハイパーバイザ部135)に出力する。   The providing circuit 244 is an example of a providing unit and has the same function as the providing unit 134. The providing circuit 244 receives the allocation virtual address table from the virtual address allocation circuit 243 and outputs it to the CPU 130 (hypervisor unit 135).

以上詳述したように、情報処理装置100は、処理回路240を用いる場合においても、各仮想マシンへのエンドデバイスの割り当てをより簡易化することが可能となった。   As described above in detail, the information processing apparatus 100 can further simplify the assignment of end devices to each virtual machine even when the processing circuit 240 is used.

100 情報処理装置
120 記憶装置
132 エンドデバイス検出部
133 仮想アドレス割り当て部
134 提供部
DESCRIPTION OF SYMBOLS 100 Information processing apparatus 120 Storage apparatus 132 End device detection part 133 Virtual address allocation part 134 Provision part

Claims (5)

複数の仮想マシンが設定される情報処理装置であって、
前記情報処理装置に設けられたPCIバス配下のエンドデバイス又はブリッジ毎に物理アドレス及び仮想マシンが対応付けられた第1テーブルと、前記エンドデバイス又はブリッジ毎に仮想アドレスが対応付けられた第2テーブルとを予め記憶する記憶部と、
前記情報処理装置の起動時に、前記第1テーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出するエンドデバイス検出部と、
前記複数の仮想マシン毎に、前記第1テーブルにおいて当該仮想マシンに対応付けられ且つ前記エンドデバイス検出部により検出されたエンドデバイスに、前記第2テーブルにおいて当該エンドデバイスに対応付けられた仮想アドレスを割り当て、当該エンドデバイスの物理アドレスと当該エンドデバイスに割り当てた仮想アドレスとを対応付けた第3テーブルを生成する仮想アドレス割り当て部と、
前記第3テーブルをハイパーバイザに提供する提供部と、
を有することを特徴とする情報処理装置。
An information processing apparatus configured with a plurality of virtual machines,
A first table in which a physical address and a virtual machine are associated with each end device or bridge under a PCI bus provided in the information processing apparatus, and a second table in which a virtual address is associated with each end device or bridge And a storage unit for storing in advance,
An end device detector that accesses each physical address stored in the first table and detects an end device associated with each physical address or an end device under a bridge when the information processing apparatus is activated;
For each of the plurality of virtual machines, the virtual address associated with the end device in the second table is associated with the end device associated with the virtual machine in the first table and detected by the end device detection unit. A virtual address allocating unit that generates a third table that associates the physical address of the end device with the virtual address assigned to the end device;
A providing unit for providing the third table to the hypervisor;
An information processing apparatus comprising:
前記仮想アドレス割り当て部は、前記エンドデバイス検出部により、前記第1テーブルに記憶された各物理アドレスに対応付けられたブリッジ配下に複数のエンドデバイスが検出された場合、前記第2テーブルにおいて当該ブリッジに対応付けられた仮想アドレスを仮想ブリッジに割り当てて、当該仮想ブリッジ配下の仮想アドレスを前記検出された複数のエンドデバイスに割り当てる、請求項1に記載の情報処理装置。   The virtual address allocating unit, when the end device detecting unit detects a plurality of end devices under a bridge associated with each physical address stored in the first table, the bridge in the second table The information processing apparatus according to claim 1, wherein a virtual address associated with the virtual bridge is assigned to a virtual bridge, and a virtual address under the virtual bridge is assigned to the plurality of detected end devices. 前記仮想アドレス割り当て部は、前記検出された複数のエンドデバイスに、過去に前記第3テーブルにおいて対応付けていない仮想アドレスを前記仮想ブリッジ配下の仮想アドレスとして割り当てる、請求項2に記載の情報処理装置。   3. The information processing apparatus according to claim 2, wherein the virtual address assignment unit assigns a virtual address that has not been previously associated in the third table to the plurality of detected end devices as a virtual address under the virtual bridge. . 記憶部を有し、複数の仮想マシンが設定される情報処理装置の制御方法であって、
前記情報処理装置に設けられたPCIバス配下のエンドデバイス又はブリッジ毎に物理アドレス及び仮想マシンが対応付けられた第1テーブルと、前記エンドデバイス又はブリッジ毎に仮想アドレスが対応付けられた第2テーブルとを予め前記記憶部に記憶し、
前記情報処理装置の起動時に、前記第1テーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出し、
前記複数の仮想マシン毎に、前記第1テーブルにおいて当該仮想マシンに対応付けられ且つ前記検出されたエンドデバイスに、前記第2テーブルにおいて当該エンドデバイスに対応付けられた仮想アドレスを割り当て、当該エンドデバイスの物理アドレスと当該エンドデバイスに割り当てた仮想アドレスとを対応付けた第3テーブルを生成し、
前記第3テーブルをハイパーバイザに提供する、
ことを含むことを特徴とする制御方法。
A method for controlling an information processing apparatus having a storage unit and in which a plurality of virtual machines are set,
A first table in which a physical address and a virtual machine are associated with each end device or bridge under a PCI bus provided in the information processing apparatus, and a second table in which a virtual address is associated with each end device or bridge Are stored in the storage unit in advance,
When starting up the information processing apparatus, each physical address stored in the first table is accessed to detect an end device associated with each physical address or an end device under a bridge,
For each of the plurality of virtual machines, a virtual address associated with the virtual machine in the first table and associated with the end device in the second table is assigned to the detected end device, and the end device A third table in which the physical address of the virtual device is associated with the virtual address assigned to the end device,
Providing the third table to the hypervisor;
A control method comprising:
記憶部を有し、複数の仮想マシンが設定される情報処理装置の制御プログラムであって、
前記情報処理装置に設けられたPCIバス配下のエンドデバイス又はブリッジ毎に物理アドレス及び仮想マシンが対応付けられた第1テーブルと、前記エンドデバイス又はブリッジ毎に仮想アドレスが対応付けられた第2テーブルとを予め前記記憶部に記憶し、
前記情報処理装置の起動時に、前記第1テーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出し、
前記複数の仮想マシン毎に、前記第1テーブルにおいて当該仮想マシンに対応付けられ且つ前記検出されたエンドデバイスに、前記第2テーブルにおいて当該エンドデバイスに対応付けられた仮想アドレスを割り当て、当該エンドデバイスの物理アドレスと当該エンドデバイスに割り当てた仮想アドレスとを対応付けた第3テーブルを生成し、
前記第3テーブルをハイパーバイザに提供する、
ことを前記情報処理装置に実行させることを特徴とする制御プログラム。
A control program for an information processing apparatus having a storage unit and set with a plurality of virtual machines,
A first table in which a physical address and a virtual machine are associated with each end device or bridge under a PCI bus provided in the information processing apparatus, and a second table in which a virtual address is associated with each end device or bridge Are stored in the storage unit in advance,
When starting up the information processing apparatus, each physical address stored in the first table is accessed to detect an end device associated with each physical address or an end device under a bridge,
For each of the plurality of virtual machines, a virtual address associated with the virtual machine in the first table and associated with the end device in the second table is assigned to the detected end device, and the end device A third table that associates the physical address of the virtual machine with the virtual address assigned to the end device,
Providing the third table to the hypervisor;
A control program that causes the information processing apparatus to execute
JP2018020804A 2018-02-08 2018-02-08 Information processing apparatus, control method, and control program Pending JP2019139417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018020804A JP2019139417A (en) 2018-02-08 2018-02-08 Information processing apparatus, control method, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018020804A JP2019139417A (en) 2018-02-08 2018-02-08 Information processing apparatus, control method, and control program

Publications (1)

Publication Number Publication Date
JP2019139417A true JP2019139417A (en) 2019-08-22

Family

ID=67694093

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018020804A Pending JP2019139417A (en) 2018-02-08 2018-02-08 Information processing apparatus, control method, and control program

Country Status (1)

Country Link
JP (1) JP2019139417A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021181614A1 (en) * 2020-03-12 2021-09-16 富士通株式会社 Information processing device, operation control method, and operation control program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021181614A1 (en) * 2020-03-12 2021-09-16 富士通株式会社 Information processing device, operation control method, and operation control program
JP7318799B2 (en) 2020-03-12 2023-08-01 富士通株式会社 Information processing device, operation control method and operation control program

Similar Documents

Publication Publication Date Title
US9922045B2 (en) Data management in a multi-tenant distributive environment
US11640363B2 (en) Managing a smart network interface controller (NIC) of an information handling system
US8484654B2 (en) Determining suitable network interface for partition deployment/re-deployment in a cloud environment
CN101980490B (en) Link establishment method for virtual switch and physical switch and device thereof
US10686755B2 (en) Assigning IP addresses and configuration parameters in hyper-converged infrastructure
US9531668B2 (en) Micro server, method of allocating MAC address, and computer readable recording medium
CN112995272A (en) Method, device and system for accessing physical server by virtual machine in cloud computing system
US20120198076A1 (en) Migrating Logical Partitions
US9423958B2 (en) System and method for managing expansion read-only memory and management host thereof
US9323620B2 (en) Implementing shared adapter configuration updates concurrent with maintenance actions in a virtualized system
US9940275B2 (en) System and method to avoid SMBus address conflicts via a baseboard management controller
JP5754440B2 (en) Configuration information management server, configuration information management method, and configuration information management program
JP4692912B2 (en) Resource allocation system and resource allocation method
US20170277632A1 (en) Virtual computer system control method and virtual computer system
CN107329798B (en) Data replication method and device and virtualization system
US8225068B2 (en) Virtual real memory exportation for logical partitions
JP2019139417A (en) Information processing apparatus, control method, and control program
KR20190046470A (en) Slave device for performing address resolution protocol and operation method thereof
US9608930B1 (en) Allocating identifiers with minimal fragmentation
JP2011221634A (en) Computer system, logic section management method and logic division processing program
US11748116B2 (en) Managing virtual services in an information handling system
US20060075196A1 (en) Utilization of storage device from external terminal in network system
TW201328246A (en) Method and system for managing cloud server system
JP5750169B2 (en) Computer system, program linkage method, and program
JP2011204077A (en) Information processing apparatus, resource allocation method and resource allocation program