JP2009282651A - Virtual machine system - Google Patents

Virtual machine system Download PDF

Info

Publication number
JP2009282651A
JP2009282651A JP2008132627A JP2008132627A JP2009282651A JP 2009282651 A JP2009282651 A JP 2009282651A JP 2008132627 A JP2008132627 A JP 2008132627A JP 2008132627 A JP2008132627 A JP 2008132627A JP 2009282651 A JP2009282651 A JP 2009282651A
Authority
JP
Japan
Prior art keywords
address
bus
ecrc
bit
lpar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008132627A
Other languages
Japanese (ja)
Other versions
JP5142819B2 (en
Inventor
Takatsugu Tamura
卓嗣 田村
Hitoshi Ueno
仁 上野
Haruji Koike
晴二 小池
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.)
Hitachi Ltd
Hitachi Information and Telecommunication Engineering Ltd
Original Assignee
Hitachi Ltd
Hitachi Information and Communication Engineering 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 Hitachi Ltd, Hitachi Information and Communication Engineering Ltd filed Critical Hitachi Ltd
Priority to JP2008132627A priority Critical patent/JP5142819B2/en
Publication of JP2009282651A publication Critical patent/JP2009282651A/en
Application granted granted Critical
Publication of JP5142819B2 publication Critical patent/JP5142819B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Detection And Correction Of Errors (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an LPAR environment capable of performing the I/O access of a 32 bit address mode in a server having a general-purpose IO bus represented by a PCI-Express bus. <P>SOLUTION: (1) When an IO transaction issued by an OS on an LPAR is a 32 bit format, and a converted absolute address exceeds a 32 bit space, the packet format of an IO transaction is converted. (2) When an ECRC is applied to the IO transaction issued by the OS on the LPAR, the ECRC is recalculated so as to be normally received by the final reception destination. (3) When the ECRC is already an error, an ECRC pattern with which the same error is reproduced is generated, and applied to a packet. (4) Concerning ECRC generation, a 32 bit CRC arithmetic unit and a 64 bit CRC arithmetic unit are loaded, and the ECRCs are simultaneously calculated, and a correct CRC arithmetic result is selected based on data length on the bus in generating a packet. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、単一の計算機で複数のOSを稼動させることが可能で、かつOS間での不正アクセスによる誤動作の防止・エラー発生時の処理機能を持つ仮想計算機システムに関し、特にCPUとIOデバイスの間のIOバス上で、メモリアドレスのフォーマット変換方法と、エラーのチェック方法並びに、それらを用いた仮想計算機システムに関する。   The present invention relates to a virtual computer system capable of operating a plurality of OSs with a single computer and having a function of preventing malfunction due to unauthorized access between OSs and processing when an error occurs, in particular, a CPU and an IO device. The present invention relates to a memory address format conversion method, an error check method, and a virtual machine system using them.

論理分割 (Logical Partition) は、単一のサーバ上で複数のオペレーティングシステム (Operating System、以下OS) を同時に動作させる技術である。 論理分割では、ハイパバイザと呼ばれる管理プログラムがサーバ管理者からの指示に従って、サーバの計算機資源 (メモリ領域、及びIOデバイスなどを含む) を複数の論理区画 (LPAR) に分割して、各LPAR上で1つずつのOSを動作させる。   Logical partition is a technology that allows multiple operating systems (OSs) to operate simultaneously on a single server. In logical partitioning, a management program called a hypervisor divides server computer resources (including memory areas and IO devices) into multiple logical partitions (LPARs) according to instructions from the server administrator. Run one OS at a time.

論理分割では、LPAR上のOSや、LPAR上のOSに割り付けられたIOデバイスのメモリアクセスをアドレス変換し、該LPARに割り付けられたメモリ領域内のアドレス (絶対アドレス) にアクセスさせる必要がある。このアドレスは、LPAR上のOSがアドレス変換して得た物理アドレス (以下、実アドレス) とは一般に異なる。   In the logical partitioning, it is necessary to convert the address of the memory access of the OS on the LPAR and the IO device assigned to the OS on the LPAR and to access the address (absolute address) in the memory area assigned to the LPAR. This address is generally different from the physical address (hereinafter, real address) obtained by address conversion by the OS on the LPAR.

また、あるOSの動作によって他のLPAR上のOSが停止、もしくは誤動作してはならない。そのためには、あるOSの動作によって他のLPAR上のOSが停止、もしくは誤動作してはならない。そのためには、あるOSが他のLPARの資源へアクセスできないこと (以下、アイソレーション) を保証する必要がある。   Also, the OS on another LPAR must not stop or malfunction due to the operation of one OS. For this purpose, the OS on another LPAR must not stop or malfunction due to the operation of one OS. For that purpose, it is necessary to guarantee that an OS cannot access other LPAR resources (hereinafter referred to as isolation).

ところで、Intel社のIA-32アーキテクチャに代表されるPCサーバでは近年、IOバスとしてPCI-Expressバスが広く用いられるようになってきている。PCI-Expressは、PCIバスと同様、論理分割を意識した設計を為されていないため、IOデバイス発のアクセスによってアイソレーションが保たれない (以下、アイソレーション障害) 恐れがある。具体的にはOSやIOドライバに不良がある場合や、IOカードの故障時でハードウェアによってエラーを検出できなかった場合に、アイソレーションが保証できない。そのため、PCサーバで論理分割を実現するには、IOデバイス発のアクセスに対してアイソレーションを保証することが従来から課題となっていた。   By the way, in the PC server represented by Intel's IA-32 architecture, in recent years, the PCI-Express bus has been widely used as an IO bus. PCI-Express, like the PCI bus, is not designed with logical partitioning in mind, so there is a risk that isolation will not be maintained by access from the IO device (hereinafter referred to as isolation failure). Specifically, isolation cannot be guaranteed if the OS or IO driver is defective, or if an error cannot be detected by the hardware when the IO card fails. Therefore, in order to achieve logical partitioning on a PC server, it has been a challenge to guarantee isolation for access from IO devices.

上記の課題に対し、従来では特にPCIバスを念頭に置いて、特開2004-220218 (特許文献1) が提案されている。特許文献1では、チップセット内のI/O Ctrl Unit内にアドレス修飾機能を埋め込んだ例と、IOバス上にアクセス監視カードを装備し、その中でアドレス修飾機能を埋め込んだ例によって、実現するとしている。   Conventionally, Japanese Patent Application Laid-Open No. 2004-220218 (Patent Document 1) has been proposed with the PCI bus in mind in particular. In Patent Document 1, this is realized by an example in which an address modification function is embedded in an I / O Ctrl Unit in a chipset and an example in which an access monitoring card is provided on an IO bus and an address modification function is embedded therein. It is said.

特開2004-220218JP2004-220218

しかし、特許文献1では、特にアクセス監視カードの方式をPCI-Expressバス上で採用した場合に、以下に示すような課題が解決されない。   However, in Patent Document 1, the following problems are not solved particularly when the access monitoring card method is adopted on the PCI-Express bus.

第1の課題は、LPAR上のOSが小さいアドレスフォーマット (32bitアドレスフォーマット) で動作している場合、32bit未満の実アドレスに対応する絶対アドレスが32bitを超え、大きいアドレスフォーマット (64bitアドレスフォーマット) とする必要がある。PCI-Expressのパケットでは、32bitと64bitのアドレスフォーマットが許されるが、32bitアドレスは3ダブルワード長のパケットであり、64bitアドレスは4ダブルワード長のパケットとなっており、単純に絶対アドレスで置き換えることが出来ない。   The first issue is that when the OS on the LPAR is operating in a small address format (32-bit address format), the absolute address corresponding to a real address less than 32 bits exceeds 32 bits, and a large address format (64-bit address format) There is a need to. PCI-Express packets allow 32 bit and 64 bit address formats, but 32 bit addresses are 3 double word long packets and 64 bit addresses are 4 double word long packets, simply replace them with absolute addresses. I can't.

第2の課題は、PCI-Expressのパケット内には、パケットを最初に生成した生成元と、最後に受領した最終受領先で、パケット内のデータにエラーが無いかを保証するためのECRC (End-to-End CRC) を埋め込むことが出来る。 このECRCは、アドレス変換やアドレスフォーマット変換を実施すると、そのままではエラーとなってしまう。   The second problem is that in the PCI-Express packet, there is an ECRC (in order to ensure that there is no error in the data in the packet at the source that first generated the packet and the final destination that was received last. End-to-End CRC) can be embedded. This ECRC results in an error if address conversion or address format conversion is performed.

第3の課題は、何らかの方式により第2の課題を解決してパケットの最終受領先でECRCを一致させた場合に、もしアドレス変換やアドレスフォーマット変換時に既にECRCがエラーであった場合に、本来検知する必要があるエラーが検知不能となってしまう。   The third problem is that when the second problem is solved by some method and ECRC is matched at the final recipient of the packet, if ECRC is already an error at the time of address conversion or address format conversion, Errors that need to be detected become undetectable.

第4に、データバス上に流れるパケットのCRCを計算する場合に、上記のフォーマット変換によるパケットサイズの変更や、転送時のデータのバイト長によって、64bitブロックがまとめて来る場合と、32bitブロックしかバス上に無い場合がある。どちらの場合もスループットを最大化するために1サイクルで処理する必要があるが、データブロックのサイズを判定してからCRC演算するのでは処理が間に合わず、2サイクル処理となってしまう。   Fourth, when calculating the CRC of a packet that flows on the data bus, depending on the packet size change due to the format conversion described above and the byte length of the data at the time of transfer, a 64-bit block may be combined, or a 32-bit block only May not be on the bus. In either case, it is necessary to perform processing in one cycle in order to maximize the throughput. However, if the CRC calculation is performed after determining the size of the data block, the processing is not in time and the processing is two cycles.

本発明は、上記の課題を解決することを目的とする。   An object of the present invention is to solve the above problems.

本発明は、LPAR上で発行されたIOトランザクションが32bitフォーマットであった場合で、かつ変換後の絶対アドレスが32bit空間を超えている場合に、IOトランザクションのパケットフォーマットを変換する。   The present invention converts the IO transaction packet format when the IO transaction issued on the LPAR is in the 32-bit format and the converted absolute address exceeds the 32-bit space.

次に、LPAR上で発行されたIOトランザクションにECRCが付与されていた場合に、ECRCを再計算して最終受領先で正常に受信できるようにする。   Next, when ECRC is given to the IO transaction issued on the LPAR, the ECRC is recalculated so that it can be normally received by the final recipient.

この時、ECRCが既にエラーになっていた場合には、同じエラーを再現するようなECRCパターンを生成してパケットに付与する。   At this time, if the ECRC already has an error, an ECRC pattern that reproduces the same error is generated and attached to the packet.

前記のECRCについて、32bitと64bitのCRC演算器を搭載して同時に計算し、パケット生成時にバス上のデータ長を元に正しいCRC演算結果を選択することで、CRCの毎サイクル生成を可能とし、スループットを最大化する。   For the above ECRC, 32bit and 64bit CRC calculators are installed and calculated simultaneously, and by selecting the correct CRC calculation result based on the data length on the bus at the time of packet generation, it is possible to generate each cycle of CRC, Maximize throughput.

PCI-Expressを採用するサーバにおいて、IOバス上に本発明を適用したアクセス監視カードを実装することにより、下記の利点が得られる。   In a server adopting PCI-Express, the following advantages can be obtained by mounting an access monitoring card to which the present invention is applied on an IO bus.

LPAR上で、32bitアドレッシングモードで動作するOSの動作を可能にする。   Enables operation of an OS that operates in 32-bit addressing mode on an LPAR.

ECRCを付与して信頼性を高めたIOトランザクションを、LPAR上のOSで、スループットを最大に保ったまま使用する手段を提供する。   Provides a means to use IO transactions with ECRC to improve reliability while maintaining the maximum throughput on the OS on the LPAR.

以下に図面を用いて、本発明の実施の形態例を示す。   Embodiments of the present invention will be described below with reference to the drawings.

図1に本発明が想定するサーバの概略を示す。本実施例では、複数のCPUを接続可能な110 CPUバスに、4つのCPU (100〜103) が接続されている例を示す。本実施例では、CPU数を4としているが、4以外でも構わない。   FIG. 1 shows an outline of a server assumed by the present invention. In the present embodiment, an example is shown in which four CPUs (100 to 103) are connected to a 110 CPU bus to which a plurality of CPUs can be connected. In this embodiment, the number of CPUs is four, but may be other than four.

このCPUバスを制御する120 チップセットがあり、チップセットはCPUバスのほかに、130 IOバス#0及び131 IOバス#1、160 メモリインタフェースの制御を行っている。このIOバスは、現在一般に使われているPCI-Expressバスなどを想定している。   There are 120 chip sets for controlling the CPU bus, and the chip set controls the 130 IO bus # 0 and the 131 IO bus # 1, 160 memory interface in addition to the CPU bus. The IO bus is assumed to be a PCI-Express bus that is generally used at present.

なお本実施例ではIOバスを130及び131のように2バス接続する構成例を示しているが、2本以外の構成でも構わない。   In the present embodiment, a configuration example is shown in which two IO buses are connected like 130 and 131, but configurations other than two may be used.

120 チップセットは、CPUバスを制御する121 CPU Bus Ctrl Unitと、メモリインタフェースを制御する122 Memory Ctrl Unit、IOバスを制御する123 IO Ctrl Unitから成る。   The 120 chip set includes a 121 CPU Bus Ctrl Unit that controls the CPU bus, a 122 Memory Ctrl Unit that controls the memory interface, and a 123 IO Ctrl Unit that controls the IO bus.

130 IOバス#0と170〜172 IOバス#00〜02の間には138 アクセス監視カード#0が組み込まれ、131 IOバス#1と173〜175 IOバス#10〜12の間には139 アクセス監視カードが組み込まれる。   130 IO bus # 0 and 170-172 The 138 access monitoring card # 0 is incorporated between the IO buses # 00-02, and the 139 access between the 131 IO bus # 1 and 173-175 IO buses # 10-12. A monitoring card is incorporated.

本発明では、このCPUとチップセット、150 メモリと、IOバス間のアクセス監視カード、IOバスに接続されるIOデバイス (図面では示していない) をまとめて計算機と想定している。   In the present invention, the CPU, chipset, 150 memory, access monitoring card between the IO buses, and IO devices (not shown in the drawing) connected to the IO bus are assumed to be a computer.

このサーバで提供される仮想計算機システムは、ハイパバイザと呼ばれるソフトウェアによって実現される。   The virtual machine system provided by this server is realized by software called a hypervisor.

図2に仮想計算機システムで使用されるアドレスマップの相関図を示す。   FIG. 2 shows a correlation diagram of address maps used in the virtual machine system.

図1のサーバにより提供されるアドレスマップを絶対アドレス空間と呼ぶ。図2の実アドレス空間はOSが使用するアドレスを示し、図2の仮想アドレス空間とはアプリケーションプログラムが使用するアドレスを示している。   The address map provided by the server of FIG. 1 is called an absolute address space. The real address space in FIG. 2 indicates addresses used by the OS, and the virtual address space in FIG. 2 indicates addresses used by the application program.

図2は2つのOSが各LPAR上で動作している例を示しており、それぞれOS A、及びOS Bであるものとしている。OS A及びOS Bの上で動作する、異なるアプリケーションプログラムが使用する仮想アドレスVAとVBが、それぞれ非論理分割時にはRAとRBで示されるアドレスに変換されるものとする。論理分割運用時でハイパバイザによるアドレス変換が無い場合、RAとRBが同じ値であると、同じ絶対アドレスをOS AとOS Bがそれぞれアクセスするため、正常に動作できない。ハイパバイザはこれを防ぐために、RA及びRBに対応する、PA及びPB (≠PA) に対するアクセスを行わせている。   FIG. 2 shows an example in which two OSs are operating on each LPAR, which are OS A and OS B, respectively. It is assumed that virtual addresses VA and VB used by different application programs operating on OS A and OS B are converted into addresses indicated by RA and RB, respectively, at the time of non-logical division. When there is no address conversion by the hypervisor during logical partitioning operation, if RA and RB have the same value, the same absolute address is accessed by OS A and OS B, respectively. In order to prevent this, the hypervisor makes access to PA and PB (≠ PA) corresponding to RA and RB.

仮想計算機における、CPU及びIOデバイスからのアクセスを以下に説明する。   The access from the CPU and IO device in the virtual machine will be described below.

CPUからのアクセスの場合、OS AがVAをRAに変換するTLBエントリをCPUに登録しようとするのをハイパバイザが検知し、ハイパバイザがOSに代わってVAをPAに変換するTLBエントリの登録を行う。ハイパバイザは、各LPARへのメモリの割り付け状況とRAから、PAを算出可能である。実際にアプリケーションプログラムがVAにアクセスする際には、VAをPAに変換するTLBエントリがハイパバイザによって登録されているため、該アクセスはRAではなくPAをアクセスすることになり、図2で示すLPARごとのアドレス変換が実現されている。   In the case of access from the CPU, the hypervisor detects that the OS A intends to register the TLB entry for converting the VA into the RA, and the hypervisor registers the TLB entry for converting the VA into the PA on behalf of the OS. . The hypervisor can calculate PA from the memory allocation status and RA to each LPAR. When the application program actually accesses the VA, since the TLB entry for converting the VA to the PA is registered by the hypervisor, the access accesses the PA instead of the RA. For each LPAR shown in FIG. Address translation is realized.

一方、IOデバイスからのアクセスの場合、CPUからのアクセスと異なりTLBに相当するアドレス変換機能が無いため、ハイパバイザによるアドレス変換は出来ない。そこで本発明では、図1における138 アクセス監視カード#0を図3のように構成することによって、IOからのトランザクションパケットに応じて該パケットを発生させたLPARを識別して、LPAR毎に異なるアドレスにアクセスするようにアドレス変換を行う。以下このアドレス変換の仕組みを、図を用いて説明する。なお、139 アクセス監視カード#1についても全く同じ回路を使用するため、本実施例では138のみの説明を行う。   On the other hand, in the case of access from an IO device, unlike the access from the CPU, since there is no address conversion function corresponding to TLB, address conversion by the hypervisor cannot be performed. Therefore, in the present invention, by configuring the 138 access monitoring card # 0 in FIG. 1 as shown in FIG. 3, the LPAR that generated the packet is identified according to the transaction packet from the IO, and a different address for each LPAR. Address translation to access The mechanism of this address conversion will be described below with reference to the drawings. Since the same circuit is used for the 139 access monitoring card # 1, only 138 will be described in this embodiment.

図3は138 アクセス監視カードの構成例を示す。138 アクセス監視カードは、130 IOバス#0に接続されており、200 I/O Bus Ctrl UnitによりIOバスの制御を行っている。本実施例のI/Oデバイス側では、Slot#0からSlot#2がある構成を示している。I/Oバスへのアクセス要求は、204 Bus Arb (バス調停回路) によって調停され、制御される。   FIG. 3 shows a configuration example of the 138 access monitoring card. The 138 access monitoring card is connected to the 130 IO bus # 0, and the IO bus is controlled by the 200 I / O Bus Ctrl Unit. On the I / O device side of the present embodiment, a configuration with Slot # 0 to Slot # 2 is shown. An access request to the I / O bus is arbitrated and controlled by a 204 Bus Arb (bus arbitration circuit).

170〜172 IOバスのいずれかのスロットから、他のIOバスまたはCPU、メモリに対するトランザクションパケットが発行された場合、IOバスを介して該パケットが138 アクセス監視カード#0に伝達される。アクセス監視カードでは、204 Bus Arbが、IOバス170〜172に同時にトランザクションパケットの処理要求が来た時、どのバスの情報を受け付けるかを判定すると同時に、一連のパケット変換の間、選択したパケットが発行されたスロット番号を記憶して、どのパケットをどのLPARと対応付けするかを判断する指標を、210 発行元Slot番号として出力する。   170-172 When a transaction packet for another IO bus, CPU, or memory is issued from any slot of the IO bus, the packet is transmitted to the 138 access monitoring card # 0 via the IO bus. In the access monitoring card, when 204 Bus Arb simultaneously receives a transaction packet processing request on the IO buses 170 to 172, it determines which bus information is accepted, and at the same time, during a series of packet conversions, the selected packet is The issued slot number is stored, and an index for determining which packet is associated with which LPAR is output as the 210 issuing slot number.

処理選択したパケットがECRCを持つ場合、206 ECRCチェックによってECRCをチェックする。チェック完了時に、エラーの有無と、エラーだった場合にはそのCRCパターンが209 ECRCチェック結果として205 プロトコル変換部に出力される。   If the packet selected for processing has ECRC, ECRC is checked by 206 ECRC check. When the check is completed, the presence / absence of an error and, if there is an error, the CRC pattern is output to the 205 protocol conversion unit as the 209 ECRC check result.

それと同時に、IOバスから入力されたパケット内のアドレスフィールドを切り出し、207 アドレスに宛先アドレスとして載せる。 同じく、パケットのデータフィールドを切り出し、208 データに載せる。   At the same time, the address field in the packet input from the IO bus is cut out and placed at the 207 address as the destination address. Similarly, the data field of the packet is cut out and placed in 208 data.

この宛先アドレスを203のAdr修飾部で、そのアドレスの値と、210 発行元Slot番号に基づいて、201 Adr変換情報に記憶されているLPAR情報に基づいて修飾する。   The destination address is modified by the Adr modification unit 203 based on the LPAR information stored in the 201 Adr conversion information based on the value of the address and the 210 issuer slot number.

この修飾の内容は、前述のLPARごとに異なるアドレスにアクセスするよう、アドレス変換することを指している。続いて202 Adr Decでアクセス先とアクセス可否の判定を行う。最後に、205 プロトコル変換部で送出パケットのフォーマットを整える。 この時、もし209 ECRCチェック結果がエラーであった場合は、同時に送られているエラーのCRCデータとなるよう、プロトコル変換する。 この結果を、220 パケットバスを経由して200 I/O Bus Ctrl Unitに送り、そこから130 I/Oバス#0にパケットを送出する。   The contents of this modification indicate that address conversion is performed so that a different address is accessed for each LPAR described above. Subsequently, 202 Adr Dec is used to determine the access destination and whether access is possible. Finally, the 205 protocol conversion unit arranges the format of the outgoing packet. At this time, if the result of the 209 ECRC check is an error, the protocol conversion is performed so that the CRC data of the error transmitted at the same time is obtained. This result is sent to the 200 I / O Bus Ctrl Unit via the 220 packet bus, and then the packet is sent to the 130 I / O bus # 0.

図4にこのアドレス修飾部203の構成例を示す。図4に示す回路例では、201 Adr変換情報に格納されたアドレス変換に関する情報を使用する。この情報には次のものが含まれる。(1) インタリーブ及びアドレス領域情報、(2) スロット単位での所属LPAR情報、(3) 実アドレス範囲に応じたLPARごとのアドレス加算値。図6にこれらの情報を格納するレジスタのフォーマットを示す。   FIG. 4 shows a configuration example of the address modification unit 203. In the circuit example shown in FIG. 4, information related to address conversion stored in 201 Adr conversion information is used. This information includes: (1) Interleave and address area information, (2) LPAR information for each slot, and (3) Address addition value for each LPAR according to the real address range. FIG. 6 shows a format of a register for storing such information.

(1) インターリーブおよびアドレス領域情報については、図2で説明したアドレスマップのうちの絶対アドレスで指定された範囲に対して、アドレス種別、インターリーブ有無・範囲指定、宛先バス・スロット番号の各情報が含まれる。アドレス種別は該アドレス範囲がメモリデバイス、もしくはMemory Mapped IO (以下MMIO) によってIOデバイスに割り付けられているかの区別が格納される。 該アドレス範囲がメモリデバイスに割り当てられている場合、特定のノードのメモリデバイスに割り付けられているか、もしくは複数のノードのメモリデバイス間でインターリーブされているかの情報が、インターリーブ有無・範囲指定のフィールドに格納される。 該アドレス範囲がIOデバイスに割り付けられている (以下、MMIO) 場合、アクセス対照となるIOデバイスのバス番号、およびスロット番号が、宛先バス・スロット番号のフィールドに格納される。
インターリーブ及びアドレス領域情報はサーバの初期化シーケンス中にBIOS (Basic IO System)、もしくはファームウェアによって設定され、特に論理分割をサポートしないサーバにおいても、これに類する情報を所持している。
(1) For interleaving and address area information, information on the address type, interleaving presence / absence / range designation, and destination bus / slot number for the range designated by the absolute address in the address map described in FIG. included. The address type stores a distinction as to whether the address range is allocated to an IO device by a memory device or Memory Mapped IO (hereinafter referred to as MMIO). When the address range is assigned to a memory device, information indicating whether the address range is assigned to a memory device of a specific node or is interleaved between memory devices of a plurality of nodes is displayed in the interleave presence / absence / range specification field. Stored. When the address range is allocated to an IO device (hereinafter referred to as MMIO), the bus number and slot number of the IO device to be accessed are stored in the destination bus slot number field.
The interleave and address area information is set by a BIOS (Basic IO System) or firmware during the server initialization sequence, and particularly in servers that do not support logical partitioning, similar information is possessed.

(2) スロット単位での所属LPAR情報は、発行元PCI−Expressスロットごとにアクセス可能な (=同一のLPARに属している) スロットを識別するための情報である。 本情報中の許可ビットが1にセットされているスロットに対してのみアクセスが許可される。 本情報は各LPARの生成時にハイパバイザによって設定される。 また本レジスタフォーマットのバリエーションとして、許可ビットが0になっているスロットに対してのみアクセスを許可する、としても構わない。
本情報は、発行元IOスロットと発行先IOスロットの組み合わせ1つに対して1ビットの容量で済むため、少ない記憶容量で制御を実装できる。
(2) The assigned LPAR information in slot units is information for identifying an accessible slot (= belonging to the same LPAR) for each issuer PCI-Express slot. Access is permitted only to slots whose permission bit in this information is set to 1. This information is set by the hypervisor when each LPAR is generated. Further, as a variation of this register format, access may be permitted only to a slot whose permission bit is 0.
Since this information only requires a 1-bit capacity for one combination of the issue source IO slot and the issue destination IO slot, control can be implemented with a small storage capacity.

(3) 実アドレス範囲に応じたLPARごとの加算値は、LPARごとに固有の、実アドレスから絶対アドレスへのアドレス変換を行うための情報である。 本情報は各LPARの生成時にハイパバイザによって設定される。   (3) The added value for each LPAR corresponding to the real address range is information for performing address conversion from a real address to an absolute address that is unique to each LPAR. This information is set by the hypervisor when each LPAR is generated.

なお、図6で示した制御情報フォーマットでは、個々の IOバス#00〜02が、それぞれ最大2スロットまで制御できるが、制御情報を増やすことで、より多くのスロットを制御することも可能である。   In the control information format shown in FIG. 6, each IO bus # 00-02 can control up to 2 slots at maximum, but more slots can be controlled by increasing the control information. .

図4に示す203 Adr修飾部は、304a、304bアドレス加算値と、アドレス領域情報、204 Bus Arbから入力される210 発行元スロット番号、及びIOバストランザクション(207アドレス)を入力として受信する。本実施例では、アドレス加算値が210 発行元スロット番号ごとに2つある例を示しているが、2つ以外でも構わない。   The 203 Adr modifier shown in FIG. 4 receives as input the 304a and 304b address addition values, the address area information, the 210 issuer slot number input from 204 Bus Arb, and the IO bus transaction (207 addresses). In this embodiment, an example is shown in which there are two address addition values for each 210 issuer slot number, but there may be other than two.

IOバストランザクションは、301 Tx復号回路により、リード・ライトなどのトランザクションの種別と、トランザクションが32bitアドレスだったか、64bitアドレスだったかを記録するTx情報、及びアクセス先を示す307 実アドレスに分離される。Tx情報については、Adr修飾部では何も操作せずに、そのまま出力される。   The IO bus transaction is separated by the 301 Tx decoding circuit into Tx information that records the type of transaction such as read / write, whether the transaction was a 32-bit address or a 64-bit address, and 307 real address indicating the access destination. . The Tx information is output as it is without any operation in the Adr modifier.

304a,304b アドレス加算値は、210 発行元スロット番号によって選択された後、305a Base及びSize部と、306a、306b Offset部に分離される。   The address addition values 304a and 304b are selected according to the 210 issuer slot number and then separated into a 305a Base and Size part and 306a and 306b Offset parts.

307 実アドレスは、303a、303b 加算器に入力され、306a、306b Offsetと加算される。   307 The real address is input to the adders 303a and 303b and added to 306a and 306b Offset.

310 64bit変換では、307 実アドレスが32bitフォーマットである場合に、Offset加算時に64bitとなる場合に備え、あらかじめ64bit形式に拡張する。   310 In 64-bit conversion, 307, when the real address is in 32-bit format, it is expanded in advance to 64-bit format in preparation for the case where it becomes 64 bits when Offset is added.

302 Adr変換判定回路は、309a、309bの加算結果と、307実アドレスの内の1つを選択し、312 絶対アドレスとして出力する。   The 302 Adr conversion determination circuit selects one of the addition result of 309a and 309b and the actual address of 307, and outputs it as a 312 absolute address.

図5は、202 Adr Decの構成例を示す。202 Adr Decは、図4の203 Adr修飾部から出力される308 Tx情報、及び312 絶対アドレス、311 アドレス変換有無を受信し、さらに201 Adr変換情報からインタリーブ及びアドレス領域情報、Slot単位での所属LPAR情報と、204 Bus Arbからは210 発行元Slot番号を受信して、図3の200 I/O Bus Ctrl Unitに対し、トランザクション (以下 Inbound Tx) を発行する。   FIG. 5 shows a configuration example of 202 Adr Dec. 202 Adr Dec receives the 308 Tx information output from the 203 Adr modifier in FIG. 4, 312 absolute address, 311 address conversion presence / absence, and further interleave and address area information from 201 Adr conversion information, belonging in slot units The LPAR information and the 210 issuer slot number are received from 204 Bus Arb, and a transaction (hereinafter referred to as Inbound Tx) is issued to 200 I / O Bus Ctrl Unit of FIG.

図7に205 プロトコル変換部の構成例を示す。308 Tx情報により、I/Oデバイスが発行したトランザクションパケットが32bitアドレスモードであったことが通知されると、64bitアドレス形式である211 絶対アドレスの値が、32bit未満の領域であった場合に限り、アドレス形式を32bit形式のTLPパケットに再変換して、220 パケットバス上に送出する。   FIG. 7 shows a configuration example of the 205 protocol conversion unit. When it is notified by 308 Tx information that the transaction packet issued by the I / O device is in the 32-bit address mode, only when the value of 211 absolute address in the 64-bit address format is an area less than 32 bits. The address format is reconverted into a 32-bit TLP packet and sent onto the 220 packet bus.

また、前記32bit/64bit判定後、確定したトランザクションパケットについて、32bit CRCと64bit CRCを同時に演算する。これは、データ長によっては64bitバス上に32bitしかデータが載っていない場合があるため、64bit幅のデータでも32bit幅のデータでもスループットを最大化するためには2種類のCRC演算器を準備し、常にCRC演算を行った上で、正しいデータ幅の計算結果を採用するという実装方式が必要な為である。   In addition, after the 32-bit / 64-bit determination, a 32-bit CRC and a 64-bit CRC are simultaneously calculated for the confirmed transaction packet. This is because depending on the data length, there may be only 32 bits of data on the 64 bit bus, so two types of CRC calculators are prepared to maximize the throughput of both 64 bit data and 32 bit data. This is because an implementation method is required in which the CRC calculation is always performed and the calculation result of the correct data width is adopted.

209 ECRCチェック結果からECRCエラーが報告されていた場合、計算したCRCの値510 ECRCパターンと、チェック結果のCRCエラーパターンを使用し、アドレス変換後のデータでも同じエラーパターンが発生するECRCを作成して、トランザクションパケットに付与する。   209 If an ECRC error is reported from the ECRC check result, the calculated CRC value 510 ECRC pattern and the CRC error pattern of the check result are used to create an ECRC in which the same error pattern occurs in the address-converted data. To the transaction packet.

実施例2は実施例1におけるスロットが、138 アクセス監視カード#0の下に必ず1つしか無いことが保証される場合の例である。   The second embodiment is an example in which it is guaranteed that there is always only one slot in the first embodiment under the 138 access monitoring card # 0.

この時、Bus Arbは必要なくなり、Slot番号に関わる制御も不要となるため、図8に示すとおり、制御が大幅に簡素になる。   At this time, the bus arb is not necessary, and the control relating to the slot number is also unnecessary, so that the control is greatly simplified as shown in FIG.

この方式は、例えばI/Oカードに、少ないゲート数で188 アクセス監視カード#0相当の機能を有する付加論理を実装することが出来るため、LPAR上のOSからの制御を前提としないPCI-Expressカードの部品をそのまま使って、LPAR環境で利用可能なI/Oカードを製造することが可能である。   In this method, for example, additional logic having a function equivalent to 188 access monitoring card # 0 can be mounted on an I / O card with a small number of gates, so PCI-Express that does not assume control from the OS on the LPAR. It is possible to manufacture an I / O card that can be used in an LPAR environment by using the card components as they are.

以上の様に本発明は、仮想計算機システムにおいて、PCI-Expressにより接続されたI/Oデバイスについて、トランザクションパケットのアイソレーション障害を防止しながらアドレス変換とアドレスフォーマット変換を行い、論理分割機能を実現する。また、既存のPCI-Express I/Oカードの部品を使用して論理分割に対応したI/Oカードを製造する手段を提供する。   As described above, the present invention realizes a logical partition function by performing address conversion and address format conversion on an I / O device connected by PCI-Express while preventing transaction packet isolation failure in a virtual machine system. To do. In addition, a means for manufacturing an I / O card corresponding to logical partitioning using parts of an existing PCI-Express I / O card is provided.

本発明が想定するサーバの構成例のブロック図。The block diagram of the structural example of the server which this invention assumes. 本発明が想定するアドレスマップ図。The address map figure which this invention assumes. 本発明におけるアクセス監視カードの構成例1のブロック図。The block diagram of the structural example 1 of the access monitoring card | curd in this invention. 本発明におけるAdr修飾部の構成ブロック図。The block diagram of the configuration of the Adr modifier in the present invention. 本発明におけるAdr Decの構成ブロック図。The block diagram of the configuration of Adr Dec in the present invention. 本発明におけるAdr変換情報のフォーマット図。The format figure of Adr conversion information in the present invention. 本発明におけるプロトコル変換部のブロック図。The block diagram of the protocol conversion part in this invention. 本発明におけるアクセス監視カードの構成例2のブロック図The block diagram of the structural example 2 of the access monitoring card | curd in this invention

符号の説明Explanation of symbols

100〜103 CPU#0〜CPU#3
110 CPUバス
120 チップセット
121 CPU Bus Ctrl Unit
122 Memory Ctrl Unit
123 I/O Ctrl Unit
130、131 IOバス#0、IOバス#1
138、139 アクセス監視カード#0、アクセス監視カード#1
150 メモリ
160 メモリインタフェース
170〜175 IOバス#00〜IOバス#12
188 アクセス監視カード#0
190 計算機
200 I/O Bus Ctrl Unit
201 Adr変換情報
202 Adr Dec
203 Adr 修飾部
204 Bus Arb
205 プロトコル変換部
206 ECRCチェック
207 アドレス
208 データ
209 ECRCチェック結果
210 発行元Slot番号
211 絶対アドレス
220 パケットバス
250 I/O Bus Ctrl Unit
251 Adr変換情報
252 Adr Dec
253 Adr 修飾部
255 プロトコル変換部
256 ECRCチェック
257 アドレス
258 データ
259 ECRCチェック結果
270 パケットバス
301 Tx復号回路
302 Adr変換判定回路
303a、303b 加算器
304a、304b アドレス加算値
305a、305b Base,Size
306a、306b Offset
307 実アドレス
308 Tx情報
309a、309b 加算結果
310 64bit変換
311 アドレス変換有無
312 絶対アドレス
401 アクセス先判定回路
402 アクセス可否判定
403 宛先Reg
404 INT生成
405 アイソレーション障害レジスタ
411 アドレス種別
412 宛先スロット番号
413 Inbound Tx
500 32bit整形
501 32bit CRC生成
502 64bit CRC生成
503 CRCレジスタ
510 ECRCパターン
511 アドレス・データ
100 to 103 CPU # 0 to CPU # 3
110 CPU Bus 120 Chipset 121 CPU Bus Ctrl Unit
122 Memory Ctrl Unit
123 I / O Ctrl Unit
130, 131 IO bus # 0, IO bus # 1
138, 139 Access monitoring card # 0, Access monitoring card # 1
150 Memory 160 Memory interface 170 to 175 IO bus # 00 to IO bus # 12
188 Access monitoring card # 0
190 Computer 200 I / O Bus Ctrl Unit
201 Adr conversion information 202 Adr Dec
203 Adr modifier 204 Bus Arb
205 Protocol conversion unit 206 ECRC check 207 Address 208 Data 209 ECRC check result 210 Issuer slot number 211 Absolute address 220 Packet bus 250 I / O Bus Ctrl Unit
251 Adr conversion information 252 Adr Dec
253 Adr modification unit 255 protocol conversion unit 256 ECRC check 257 address 258 data 259 ECRC check result 270 packet bus 301 Tx decoding circuit 302 Adr conversion determination circuit 303a, 303b adder 304a, 304b address addition value 305a, 305b Base, Size
306a, 306b Offset
307 Real address 308 Tx information 309a, 309b Addition result 310 64-bit conversion 311 Address conversion presence / absence 312 Absolute address 401 Access destination determination circuit 402 Access availability determination 403 Destination Reg
404 INT generation 405 Isolation failure register 411 Address type 412 Destination slot number 413 Inbound Tx
500 32-bit shaping 501 32-bit CRC generation 502 64-bit CRC generation 503 CRC register 510 ECRC pattern 511 Address data

Claims (4)

複数のCPUとメモリと複数のIOデバイスを、それぞれ制御部とCPUバス、メモリインタフェース、IOバスにより接続し、前記IOバス上のメモリとIOデバイスの間のアクセスを監視するアクセス監視装置を備えた物理計算機上にハイパバイザの制御下で複数のLPARを生成する仮想計算機システムにおいて、
前記IOデバイスからメモリへのアクセス時に、該アクセスを発生させたデバイスが属するLPARで確保しているアドレス空間にアドレス変換する手段と、前記アドレス変換の結果、変換前のアドレスフォーマットではビット数が足りず、指定出来ない場合に、アドレス領域を拡張したフォーマットに変換する手段を有することを特徴とする仮想計算機システム。
A CPU, a memory, and a plurality of IO devices are connected to each other by a control unit, a CPU bus, a memory interface, and an IO bus, and an access monitoring device that monitors accesses between the memory and the IO devices on the IO bus is provided. In a virtual computer system that generates a plurality of LPARs under the control of a hypervisor on a physical computer,
When accessing the memory from the IO device, means for converting the address to the address space reserved in the LPAR to which the device that generated the access belongs, and the address format before conversion as a result of the address conversion, the number of bits is sufficient. A virtual computer system characterized by having means for converting the address area into an extended format when it cannot be specified.
前記アドレス変換時や、アドレスフォーマット変換時に、トランザクションパケットに埋め込まれたECRCを再計算し、トランザクションパケット内のECRCを置き換える手段を有することを特徴とする請求項1記載の仮想計算機システム。   2. The virtual computer system according to claim 1, further comprising means for recalculating an ECRC embedded in a transaction packet and replacing the ECRC in the transaction packet at the time of address conversion or address format conversion. 前記ECRC再計算時に、変換前のトランザクションパケットに埋め込まれていたECRCをチェックし、エラーがあった場合には同じエラーパターンを再計算したECRCに埋め込む手段を有することを特徴とする請求項2記載の仮想計算機システム。   The ECRC embedded in the transaction packet before conversion is checked at the time of the ECRC recalculation, and if there is an error, the same error pattern is embedded in the recalculated ECRC. Virtual computer system. 前記ECRC再計算時に、IOバスに流れるビットパターンを32bit CRC演算器と64bit CRC演算器で同時に演算し、IOバス上に実際に存在していたデータやアドレスが、32bit幅であったか、64bit幅であったかを前記演算後に判定してCRC演算データを収めるレジスタにセットすることを特徴とする請求項2の仮想計算機システム。   At the time of ECRC recalculation, the bit pattern that flows on the IO bus is calculated simultaneously by the 32-bit CRC calculator and the 64-bit CRC calculator, and the data and addresses that were actually present on the IO bus were 32 bits wide or 64 bits wide. 3. The virtual computer system according to claim 2, wherein the virtual computer system is determined after the calculation and set in a register for storing CRC calculation data.
JP2008132627A 2008-05-21 2008-05-21 Virtual computer system Expired - Fee Related JP5142819B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008132627A JP5142819B2 (en) 2008-05-21 2008-05-21 Virtual computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008132627A JP5142819B2 (en) 2008-05-21 2008-05-21 Virtual computer system

Publications (2)

Publication Number Publication Date
JP2009282651A true JP2009282651A (en) 2009-12-03
JP5142819B2 JP5142819B2 (en) 2013-02-13

Family

ID=41453067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008132627A Expired - Fee Related JP5142819B2 (en) 2008-05-21 2008-05-21 Virtual computer system

Country Status (1)

Country Link
JP (1) JP5142819B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014182675A (en) * 2013-03-21 2014-09-29 Nec Corp Input-output processing apparatus, address validity verification method and address validity verification program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05210570A (en) * 1991-09-04 1993-08-20 Internatl Business Mach Corp <Ibm> Method and means extending address
JPH06202945A (en) * 1992-11-10 1994-07-22 Internatl Business Mach Corp <Ibm> Small address- based memory access method and computer system
JP2002318701A (en) * 2001-01-23 2002-10-31 Internatl Business Mach Corp <Ibm> Dma window for lpar environment for enabling a plurality of ioa for one terminal bridge by using device arbitration level
JP2004220218A (en) * 2003-01-14 2004-08-05 Hitachi Ltd Information processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05210570A (en) * 1991-09-04 1993-08-20 Internatl Business Mach Corp <Ibm> Method and means extending address
JPH06202945A (en) * 1992-11-10 1994-07-22 Internatl Business Mach Corp <Ibm> Small address- based memory access method and computer system
JP2002318701A (en) * 2001-01-23 2002-10-31 Internatl Business Mach Corp <Ibm> Dma window for lpar environment for enabling a plurality of ioa for one terminal bridge by using device arbitration level
JP2004220218A (en) * 2003-01-14 2004-08-05 Hitachi Ltd Information processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014182675A (en) * 2013-03-21 2014-09-29 Nec Corp Input-output processing apparatus, address validity verification method and address validity verification program

Also Published As

Publication number Publication date
JP5142819B2 (en) 2013-02-13

Similar Documents

Publication Publication Date Title
US9734096B2 (en) Method and system for single root input/output virtualization virtual functions sharing on multi-hosts
US10275348B2 (en) Memory controller for requesting memory spaces and resources
US7398337B2 (en) Association of host translations that are associated to an access control level on a PCI bridge that supports virtualization
US6907510B2 (en) Mapping of interconnect configuration space
US8645811B2 (en) System and method for selective error checking
US9753880B1 (en) Method and switch for transferring transactions between switch domains
US7571273B2 (en) Bus/device/function translation within and routing of communications packets in a PCI switched-fabric in a multi-host environment utilizing multiple root switches
US9727359B2 (en) Virtual machine function based sub-page base address register access for peripheral component interconnect device assignment
US9652182B2 (en) Shareable virtual non-volatile storage device for a server
US20060195642A1 (en) Method, system and program product for differentiating between virtual hosts on bus transactions and associating allowable memory access for an input/output adapter that supports virtualization
JP5365847B2 (en) Configuration processing method and computer system of physical device in virtualization apparatus
US20060245264A1 (en) Computing with both lock-step and free-step processor modes
US20090276605A1 (en) Retaining an Association Between a Virtual Address Based Buffer and a User Space Application that Owns the Buffer
TW201732620A (en) Flattening portal bridge
US9875132B2 (en) Input output memory management unit based zero copy virtual machine to virtual machine communication
US10013199B2 (en) Translation bypass by host IOMMU for systems with virtual IOMMU
JP2004054949A (en) Multiple hardware partitions under one input/output hub
CN115203095A (en) PCIe device and operating method thereof
JP5477168B2 (en) Multi-host system
US7941568B2 (en) Mapping a virtual address to PCI bus address
US20060085573A1 (en) Multi-context selection with PCI express to support hardware partitioning
US11150928B2 (en) Hypervisor translation bypass
US20090037609A1 (en) Middle management of input/output in server systems
US10185679B2 (en) Multi-queue device assignment to virtual machine groups
JP5142819B2 (en) Virtual computer system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120821

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120928

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121023

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121120

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151130

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees