JP2019139417A - Information processing apparatus, control method, and control program - Google Patents
Information processing apparatus, control method, and control program Download PDFInfo
- 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
Links
Images
Abstract
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).
一般に、パススルー機能は、対応するエンドデバイスが情報処理装置に搭載された状態で、各仮想マシンに、搭載されたエンドデバイスを割り当てることにより設定される。一方、管理者が情報処理装置に仮想マシンを設定してから情報処理装置をユーザに提供し、ユーザが情報処理装置に拡張カードを搭載するような場合、管理者が情報処理装置に仮想マシンを設定するときには情報処理装置に拡張カードは搭載されていない。そのため、管理者は拡張カード内のエンドデバイスを各仮想マシンに割り当てておくことができず、十分な知識を有していないユーザが拡張カード内のエンドデバイスを各仮想マシンに割り当てなければならなくなる。複数の仮想マシンが設定される情報処理装置では、各仮想マシンへのエンドデバイスの割り当てをより簡易化できることが望まれている。 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.
以下、本開示の一側面に係る情報処理装置について図を参照しつつ説明する。但し、本開示の技術的範囲はそれらの実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶ点に留意されたい。 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
図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
通信装置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
入力装置102は、タッチパネル式の入力装置、キーボード、マウス等の入力デバイス及び入力デバイスから信号を取得するインタフェース回路を有する。入力装置102は、ユーザの入力を受け付け、ユーザの入力に応じた信号をCPU130に対して出力する。
The
表示装置103は、液晶、有機EL(Electro-Luminescence)等から構成されるディスプレイ及びディスプレイに画像データ又は各種の情報を出力するインタフェース回路を有する。表示装置103は、CPU130と接続されて、CPU130から出力された画像データをディスプレイに表示する。なお、タッチパネルディスプレイを用いて、入力装置102と表示装置103を一体に構成してもよい。
The
PCIバスコントローラ110は、PCI又はPCI Express規格に準拠して、PCIバス2を介した通信を制御し、CPU130とPCIバス2配下の各エンドデバイス又は各ブリッジとの間のデータの送受信を制御する。
The
各エンドデバイス11、12、16、22、23は、通信デバイス、表示デバイス又は制御デバイス等の任意のデバイスである。図1に示す例では、エンドデバイス11、12、16は、マザーボードに設けられたオンボードデバイスであり、エンドデバイス22、23は、拡張カード20に設けられたデバイスである。
Each
各ブリッジ13〜15、21は、PCIバスコントローラ110又は上位のブリッジと下位のブリッジ又はエンドデバイスとの間のデータの送受信を制御する。各ブリッジには、各ブリッジ配下のアドレスが設定されており、CPU130は、各ブリッジを介して各ブリッジ配下のエンドデバイスにアクセスすることができる。以下では、エンドデバイス及びブリッジを総じてデバイスと称する場合がある。
Each of the
各拡張スロット17、18は、拡張カードを情報処理装置100に搭載するためのインタフェースである。各拡張スロット17、18はブリッジ14、15に接続されている。
Each
拡張カード20は、通信カード、表示カード又は制御カード等の、拡張スロット17、18に挿抜可能な任意のカードである。
The
記憶装置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
CPU130は、予め記憶装置120に記憶されているプログラムに基づいて動作する。CPU130は、汎用プロセッサであってもよい。なお、CPU130に代えて、DSP(digital signal processor)、LSI(large scale integration)等が用いられてよい。また、CPU130に代えて、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)等が用いられてもよい。
CPU130は、通信装置101、入力装置102、表示装置103、PCIバスコントローラ110、記憶装置120及び処理回路140と接続され、これらの各部を制御する。CPU130は、通信装置101を介した通信制御、入力装置102の入力制御、表示装置103の表示制御、PCIバスコントローラ110を介したデータ送受信制御、記憶装置120の制御等を行う。
The
処理回路140は、所定の処理を実行する回路である。なお、処理回路140として、LSI、DSP、ASIC又はFPGA等が用いられてもよい。
The
図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
物理アドレスは、情報処理装置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
確保仮想アドレスは、情報処理装置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
図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空間上の仮想アドレスである。仮想アドレス空間情報には、各デバイスがエンドデバイスである場合、ブランクが設定され、各デバイスが仮想ブリッジである場合、各仮想ブリッジ配下の仮想アドレス空間として設定されたアドレスの範囲が設定される。 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
図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
図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
なお、検出処理が実行される前に(情報処理装置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
次に、設定部131は、管理者により、入力装置102を用いて、PCIバス2配下のデバイスの物理アドレスと、そのデバイスを割り当てる仮想マシンを示す仮想マシン情報とが入力されると、入力された各情報を受け付ける。設定部131は、デバイスIDを新たに生成し、受け付けた物理アドレス及び仮想マシン情報を、生成したデバイスIDと関連付けてデバイステーブルに記憶する。なお、設定部131は、管理者により、入力装置102を用いて、デバイス種別が入力された場合、入力されたデバイス種別も、生成したデバイスIDと関連付けてデバイステーブルに記憶する。
Next, the
また、設定部131は、管理者により、入力装置102を用いて、PCIバス2配下のデバイスの物理アドレスと、そのデバイスのために確保するPCI空間上の仮想アドレスとが入力されると、入力された各情報を受け付ける。設定部131は、デバイステーブルから、受け付けた物理アドレスに対応するデバイスIDを抽出し、受け付けた仮想アドレスを確保仮想アドレスとして、抽出したデバイスIDと関連付けて確保仮想アドレステーブルに記憶する。
When the administrator inputs the physical address of the device under the
ステップS101〜S106の処理は、デバイステーブルに記憶されたデバイス毎に実行される。最初に、エンドデバイス検出部132は、デバイステーブルを読み出し、デバイステーブルに記憶されたデバイスの中から特定のデバイスを抽出する(ステップS101)。
The processing in steps S101 to S106 is executed for each device stored in the device table. First, the end
次に、エンドデバイス検出部132は、抽出したデバイスがエンドデバイスであるかブリッジであるかを判定する(ステップS102)。エンドデバイス検出部132は、デバイステーブルにおいてそのデバイスに対応付けられた物理アドレスにアクセスして、そのデバイスがエンドデバイスであるかブリッジであるかを示す情報を取得する。なお、デバイステーブルにデバイス種別が記憶されている場合、エンドデバイス検出部132は、デバイス種別から、抽出したデバイスがエンドデバイスであるかブリッジであるかを判定してもよい。
Next, the end
デバイスがエンドデバイスであった場合、エンドデバイス検出部132は、エンドデバイスの検出処理を実行する(ステップS103)。エンドデバイス検出部132は、そのデバイスに対応付けられた物理アドレスにアクセスして、そのデバイスに所定の要求信号を送信し、そのデバイスから所定の応答信号を受信した場合に、そのデバイスをエンドデバイスとして検出する。エンドデバイスが検出された場合、エンドデバイス検出部132は、そのエンドデバイスを、デバイステーブルにおいてそのエンドデバイスの物理アドレスに対応付けられた仮想マシンに割り当てる。
When the device is an end device, the end
一方、デバイスがブリッジであった場合、エンドデバイス検出部132は、ブリッジ配下のエンドデバイスの検出処理を実行する(ステップS104)。エンドデバイス検出部132は、そのデバイスに対応付けられた物理アドレスにアクセスして、ブリッジの配下に割り当てられたアドレス空間を示す情報を読み出す。エンドデバイス検出部132は、読み出した情報に示されるアドレス空間内の各アドレスにアクセスして、各アドレスに割り当てられたデバイスがエンドデバイスであるかブリッジであるかを示す情報を取得する。デバイスがエンドデバイスであった場合、エンドデバイス検出部132は、そのデバイスに所定の要求信号を送信し、所定の応答信号を受信した場合に、そのデバイスをエンドデバイスとして検出する。一方、デバイスがブリッジであった場合、エンドデバイス検出部132は、さらに、そのブリッジ配下のエンドデバイスの検出処理を実行する。エンドデバイスが検出された場合、エンドデバイス検出部132は、そのエンドデバイスを、デバイステーブルにおいてそのエンドデバイスに対応するブリッジに対応付けられた仮想マシンに割り当てる。
On the other hand, if the device is a bridge, the end
次に、エンドデバイス検出部132は、デバイステーブルに記憶された全てのデバイスについて処理が完了したか否かを判定する(ステップS105)。まだ処理していないデバイスが存在する場合、エンドデバイス検出部132は、処理をステップS101へ戻し、まだデバイステーブルから抽出していないデバイスについて、ステップS101〜S104の処理を実行する。一方、全てのデバイスについて処理が完了した場合、エンドデバイス検出部132は、一連のステップを終了する。
Next, the end
このように、エンドデバイス検出部132は、デバイステーブルに記憶された各物理アドレスにアクセスして、各物理アドレスに対応付けられたエンドデバイス又はブリッジ配下のエンドデバイスを検出する。
As described above, the end
図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
ステップ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
ステップ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
次に、仮想アドレス割り当て部133は、検出処理において、エンドデバイス検出部132により、抽出したデバイスに対応して検出されたエンドデバイスを特定する(ステップS203)。仮想アドレス割り当て部133は、抽出したデバイスがエンドデバイスである場合は、検出処理においてそのエンドデバイスが検出されていた場合に限り、そのエンドデバイスを、抽出したデバイスに対応して検出されたエンドデバイスとして特定する。一方、仮想アドレス割り当て部133は、抽出したデバイスがブリッジである場合は、検出処理においてそのブリッジ配下に検出されたエンドデバイスを、抽出したデバイスに対応して検出されたエンドデバイスとして特定する。
Next, in the detection process, the virtual
次に、仮想アドレス割り当て部133は、抽出したデバイスに対応して検出されたエンドデバイスが複数であるか否かを判定する(ステップS204)。
Next, the virtual
検出されたエンドデバイスが一つであった場合、仮想アドレス割り当て部133は、そのエンドデバイスに、確保仮想アドレステーブルにおいてそのデバイスのデバイスIDに対応付けられた確保仮想アドレスを割り当てる(ステップS205)。即ち、この確保仮想アドレスは、確保仮想アドレステーブルにおいてそのエンドデバイスに対応付けられていた仮想アドレスである。なお、仮想アドレス割り当て部133は、各エンドデバイスを、各エンドデバイスが割り当てられた仮想マシンに対して設定された仮想デバイスの内の特定の仮想デバイスの配下に設定する。
When the detected end device is one, the virtual
次に、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルを生成又は更新する(ステップS206)。仮想アドレス割り当て部133は、デバイステーブルにおいてそのエンドデバイスに対応付けられたデバイスIDと、物理デバイスであることを示す割り当て種別と、そのエンドデバイスの物理アドレス及び割り当て仮想マシン情報とを対応付けて割り当て仮想アドレステーブルに記憶する。さらに、仮想アドレス割り当て部133は、エンドデバイスに割り当てた仮想アドレスをそのデバイスIDに対応付けて割り当て仮想アドレステーブルに記憶する。なお、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて、そのデバイスIDに対応する仮想アドレス空間情報にはブランクを設定する。
Next, the virtual
一方、検出されたエンドデバイスが複数であった場合、即ち抽出されたデバイスがブリッジであり且つそのブリッジ配下に複数のエンドデバイスが検出された場合、仮想アドレス割り当て部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
次に、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて使用されていない仮想アドレス、即ち過去に割り当て仮想アドレステーブルにおいて対応付けていない仮想アドレスを抽出する(ステップS208)。仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて使用されておらず且つ検出されたエンドデバイスの数だけ仮想アドレスを設定可能な仮想アドレス空間を、仮想ブリッジ配下の仮想アドレス空間として設定する。仮想アドレス割り当て部133は、設定した仮想アドレス空間内のアドレスから、検出されたエンドデバイスの数の仮想アドレスを抽出する。
Next, the virtual
次に、仮想アドレス割り当て部133は、抽出した各仮想アドレスを、仮想ブリッジ配下の仮想アドレスとして、検出された複数のエンドデバイスにそれぞれ割り当てる(ステップS209)。
Next, the virtual
次に、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルを生成又は更新する(ステップS210)。仮想アドレス割り当て部133は、新たに設定した仮想ブリッジのデバイスIDを新たに生成する。仮想アドレス割り当て部133は、生成したデバイスIDと、仮想デバイス(仮想ブリッジ)であることを示す割り当て種別とを対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS202において抽出したデバイスにデバイステーブルで対応付けられた割り当て仮想マシン情報を、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS207において仮想ブリッジに割り当てた確保仮想アドレスを割り当て仮想アドレスとして、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。さらに、仮想アドレス割り当て部133は、ステップS208において設定した仮想ブリッジ配下の仮想アドレス空間の範囲を仮想アドレス空間情報として、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。なお、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて、生成したデバイスIDに対応する物理アドレスにはブランクを設定する。
Next, the virtual
また、仮想アドレス割り当て部133は、検出された複数のエンドデバイスのデバイスIDを新たに生成する。仮想アドレス割り当て部133は、生成したデバイスIDと、物理デバイスであることを示す割り当て種別とを対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、検出処理(ステップS104)において各エンドデバイスが検出されたアドレスを各エンドデバイスの物理アドレスとして、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS202において抽出したデバイスにデバイステーブルで対応付けられた割り当て仮想マシン情報を、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。また、仮想アドレス割り当て部133は、ステップS209において各エンドデバイスに割り当てた仮想アドレスを割り当て仮想アドレスとして、生成したデバイスIDと対応付けて割り当て仮想アドレステーブルに記憶する。なお、仮想アドレス割り当て部133は、割り当て仮想アドレステーブルにおいて、生成したデバイスIDに対応する仮想アドレス空間情報にはブランクを設定する。
In addition, the virtual
次に、仮想アドレス割り当て部133は、デバイステーブルにおいて、ステップS201で抽出した仮想マシンに対応付けられた全てのデバイスについて処理が完了したか否かを判定する(ステップS211)。まだ処理していないデバイスが存在する場合、エンドデバイス検出部132は、処理をステップS202へ戻し、まだデバイステーブルから抽出していないデバイスについて、ステップS202〜S210の処理を実行する。
Next, the virtual
一方、全てのデバイスについて処理が完了した場合、仮想アドレス割り当て部133は、検出処理においてエンドデバイスが割り当てられた全ての仮想マシンについて処理が完了したか否かを判定する(ステップS212)。まだ処理していない仮想マシンが存在する場合、仮想アドレス割り当て部133は、処理をステップS201へ戻し、まだ抽出していない仮想マシンについて、ステップS201〜S211の処理を実行する。このように、仮想アドレス割り当て部133は、複数の仮想マシン毎に、検出処理において検出された各エンドデバイスに仮想アドレスを割り当てて、割り当て仮想アドレステーブルを生成する。
On the other hand, when the processing has been completed for all devices, the virtual
一方、全ての仮想マシンについて処理が完了した場合、提供部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
ハイパーバイザ部135は、提供部134により提供された各テーブルを使用して各仮想マシン部136の仮想PCIアドレス空間をエミュレートする。各仮想マシン部136は、各仮想マシン部136に割り当てられた仮想PCIアドレス空間に対してコンフィグレーションアクセスを実行し、仮想PCIアドレス空間を探索して、仮想PCIアドレス空間に割り当てられたデバイスを認識する。
The
各仮想マシン部136は、PCIバス2配下の各エンドデバイスにアクセスする際、仮想デバイスの配下に設定された各エンドデバイスに割り当てられた仮想アドレスを指定して、ハイパーバイザ部135に各エンドデバイスへのアクセスを要求する。ハイパーバイザ部135は、各仮想マシン部136からアクセスが要求されると、提供部134により提供された割り当て仮想アドレステーブルから、指定された仮想アドレスに対応する物理アドレスを特定し、特定した物理アドレスに対してアクセスする。ハイパーバイザ部135は、アクセス結果を各仮想マシン部136に送る。
When accessing each end device under the
図6〜図8は、情報処理装置100のPCIバス2配下の各デバイスへの仮想アドレスの割り当ての例について説明するための模式図である。
6 to 8 are schematic diagrams for explaining an example of virtual address assignment to each device under the
図6の構成601は、情報処理装置100のPCIバス2配下の物理的な構成を示している。構成601において、かっこ内の数字は各デバイスの物理アドレスを示している。図6は、情報処理装置100がユーザに提供される前の状態を示しており、情報処理装置100の拡張スロット17、18には、拡張カードがまだ挿入されていない。この情報処理装置100に対して、管理者によりPCIバス2配下のデバイスの物理アドレスと、そのデバイスを割り当てる仮想マシンの仮想マシン情報とが入力されると、設定部131は、入力された情報に基づいて図2Aに示したデバイステーブルを設定する。
A
図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
図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
図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
この場合、検出処理のステップ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
一方、割り当て処理のステップ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
また、仮想マシン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
なお、各ブリッジ13、14及び15には、仮想アドレスは割り当てられない。また、ブリッジ15に接続される拡張スロット18には拡張カードが挿入されていないため、デバイスID=03のブリッジ15に対応付けられていた確保仮想アドレス(01:02.0)は、何れのデバイスにも割り当てられない。
A virtual address is not assigned to each of the
このように、情報処理装置100は、PCIバス2配下のエンドデバイスだけでなく、ブリッジにも仮想アドレスを予め割り当てておく。これにより、情報処理装置100は、拡張カードが後から挿入された場合でも、拡張カード内のエンドデバイスに対して、ブリッジに割り当てておいた仮想アドレスを割り当てることが可能となり、各仮想マシンへのエンドデバイスの割り当てをより簡易化できる。
As described above, the information processing apparatus 100 assigns virtual addresses not only to end devices under the
図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
この場合、図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
一方、図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
また、仮想マシン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
このように、情報処理装置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
特に、情報処理装置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
一方、情報処理装置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
図9は、他の実施形態に係る情報処理装置における処理回路240の概略構成を示すブロック図である。
FIG. 9 is a block diagram showing a schematic configuration of the
処理回路240は、情報処理装置100の処理回路140の代わりに用いられ、CPU130の代わりに、検出処理及び割り当て処理を実行する。処理回路240は、設定回路241、エンドデバイス検出回路242、仮想アドレス割り当て回路243及び提供回路244等を有する。
The
設定回路241は、設定部の一例であり、設定部131と同様の機能を有する。設定回路241は、入力装置102から管理者により入力された各情報を受信し、受信した各情報に基づいてデバイステーブル及び確保仮想アドレステーブルを生成し、記憶装置120に記憶する。
The
エンドデバイス検出回路242は、エンドデバイス検出部の一例であり、エンドデバイス検出部132と同様の機能を有する。エンドデバイス検出回路242は、記憶装置120からデバイステーブルを読み出し、デバイステーブルに記憶された各デバイスに対応するエンドデバイスを検出し、検出結果を仮想アドレス割り当て回路243に出力する。
The end
仮想アドレス割り当て回路243は、仮想アドレス割り当て部の一例であり、仮想アドレス割り当て部133と同様の機能を有する。仮想アドレス割り当て回路243は、エンドデバイス検出回路242から検出結果を受信するとともに、記憶装置120からデバイステーブル及び確保仮想アドレステーブルを読み出す。仮想アドレス割り当て回路243は、エンドデバイス検出回路242により検出された各エンドデバイスに仮想アドレスを割り当てて、割り当て仮想アドレステーブルを生成し、提供回路244に出力する。
The virtual
提供回路244は、提供部の一例であり、提供部134と同様の機能を有する。提供回路244は、仮想アドレス割り当て回路243から割り当て仮想アドレステーブルを受信し、CPU130(ハイパーバイザ部135)に出力する。
The providing
以上詳述したように、情報処理装置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
100 情報処理装置
120 記憶装置
132 エンドデバイス検出部
133 仮想アドレス割り当て部
134 提供部
DESCRIPTION OF SYMBOLS 100
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:
前記情報処理装置に設けられた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
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)
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 |
-
2018
- 2018-02-08 JP JP2018020804A patent/JP2019139417A/en active Pending
Cited By (2)
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 |