JP5468490B2 - Method and computer for accessing disk drive in computer with virtualized environment - Google Patents

Method and computer for accessing disk drive in computer with virtualized environment Download PDF

Info

Publication number
JP5468490B2
JP5468490B2 JP2010178219A JP2010178219A JP5468490B2 JP 5468490 B2 JP5468490 B2 JP 5468490B2 JP 2010178219 A JP2010178219 A JP 2010178219A JP 2010178219 A JP2010178219 A JP 2010178219A JP 5468490 B2 JP5468490 B2 JP 5468490B2
Authority
JP
Japan
Prior art keywords
access
area
virtualization
specific area
virtual
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.)
Active
Application number
JP2010178219A
Other languages
Japanese (ja)
Other versions
JP2012038117A (en
Inventor
誠一 河野
幹雄 萩原
景子 國分
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.)
Lenovo Singapore Pte Ltd
Original Assignee
Lenovo Singapore Pte 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 Lenovo Singapore Pte Ltd filed Critical Lenovo Singapore Pte Ltd
Priority to JP2010178219A priority Critical patent/JP5468490B2/en
Publication of JP2012038117A publication Critical patent/JP2012038117A/en
Application granted granted Critical
Publication of JP5468490B2 publication Critical patent/JP5468490B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、仮想マシンからディスク・ドライブにアクセスする際のオーバーヘッドを低減する技術に関し、さらに詳細にはディスク・ドライブに記録されたデータの安全性を確保しながらオーバーヘッドを低減する技術に関する。   The present invention relates to a technique for reducing overhead when accessing a disk drive from a virtual machine, and more particularly to a technique for reducing overhead while ensuring the safety of data recorded in a disk drive.

クライアントやサーバなどのコンピュータには、過去のオペレーティング・システム(OS)やアプリケーション・プログラム(アプリケーション)を、互換性のない新しいハードウエアの上で動作させたり、ハードウエア・リソースを有効に活用したり、あるいは複数のOSを同時に動作させたりすることを目的として仮想化技術を導入する場合がある。仮想化技術には、OSの上で仮想化プログラムが動作するホストOS型、あるいは仮想化プログラムがハードウエアの上で直接動作するハイパーバイザ型といわれるものがある。   For computers such as clients and servers, past operating systems (OS) and application programs (applications) can be operated on new incompatible hardware, and hardware resources can be used effectively. In some cases, virtualization technology is introduced for the purpose of operating a plurality of OSs simultaneously. The virtualization technology includes a host OS type in which a virtualization program operates on an OS, or a hypervisor type in which a virtualization program directly operates on hardware.

いずれの場合も、仮想化プログラムの上では複数の仮想マシンが動作することができる。アプリケーション、ゲストOS、デバイス・ドライバといったソフトウエアで構成された仮想マシンは、仮想化プログラムが提供する仮想ハードウエアに対してアクセスすることで実際のハードウエアから分離された状態で動作する。仮想マシンを構成するOSをゲストOSという。また、ハイパーバイザ型の中には、ゲストOSに対して完全なハードウエア仮想化環境を提供する完全仮想化と、ゲストOSに修正を加えて仮想化環境に適応させる準仮想化といった方法がある。   In either case, a plurality of virtual machines can operate on the virtualization program. A virtual machine configured by software such as an application, a guest OS, and a device driver operates in a state separated from actual hardware by accessing virtual hardware provided by a virtualization program. The OS constituting the virtual machine is called a guest OS. In addition, in the hypervisor type, there are methods such as full virtualization that provides a complete hardware virtualization environment for the guest OS, and paravirtualization that modifies the guest OS and adapts it to the virtualization environment. .

このように仮想化環境の実現モデルにはさまざまあるが、いずれの場合でも、ゲストOSがハードウエアにアクセスする際には、仮想化プログラムが介在する分だけ余分なオーバーヘッドが生ずる。オーバーヘッドの原因としては、中央演算装置(CPU)、メイン・メモリ、ディスク・ドライブ、またはネットワーク・カードなどのハードウエアをソフトウエアでエミュレーションする処理や、ゲストOSと仮想化プログラムの間で動作を切り換える際に発生するコンテキスト・スイッチングなどを挙げることができる。ハードディスク・ディスク・ドライブ(HDD)に対するI/Oリクエストの際には、仮想ドライブと実際のドライブのアドレスをマッピングするためにオーバーヘッドが発生する。   As described above, there are various virtual environment implementation models, but in any case, when the guest OS accesses the hardware, an extra overhead is generated by the intervention of the virtual program. Causes of overhead include processing to emulate hardware such as a central processing unit (CPU), main memory, disk drive, or network card with software, and switching operation between the guest OS and the virtualization program Context switching that occurs at the time. When an I / O request is made to a hard disk drive (HDD), overhead is generated to map the addresses of the virtual drive and the actual drive.

特許文献1は、VMM(Virtual Machine Monitor)によりI/Oデバイスの動作をエミュレーションにより実現するエミュレーション方式と、仮想マシン上で動作するOSへ実際のI/Oデバイスを割り当てて直接的にアクセスさせる直接I/O方式とを切り換える技術を開示する。直接I/O方式では、OSから直接的にI/Oデバイスへの入出力が行なえるので、高速で且つ信頼性の高い処理を行なうことができるが各OSによってI/Oデバイスが占有されるので、仮想化技術により1つのホストマシンで複数のOSが実行可能であっても、その数に応じてI/Oデバイスが必要となり非効率的であることが記載されている。   Patent Document 1 discloses an emulation method that implements operation of an I / O device by emulation using a VMM (Virtual Machine Monitor), and direct access to an OS operating on a virtual machine by directly assigning an actual I / O device. A technique for switching between I / O systems is disclosed. In the direct I / O method, input / output to / from the I / O device can be performed directly from the OS, so that high-speed and highly reliable processing can be performed, but each OS occupies the I / O device. Therefore, it is described that even if a plurality of OSs can be executed on one host machine by the virtualization technology, an I / O device is required depending on the number of OSs, which is inefficient.

特許文献2は、ハードディスク・ドライブと磁気テープ・ドライブからなる記憶装置において、ハードディスクの一部にキャッシュ領域を設けることで効率よくファイルを保存する技術を開示する。非特許文献1は、指定したゲストOSに対してデバイスの分離を実現し、分離されたデバイスを当該指定されたゲストOSだけが使用できるようにすることで仮想化環境のオーバーヘッドを低減するデバイス・パススルーという技術を開示する。デバイス・パススルーは、デバイスを複数のゲストOSおよび仮想化プログラムの間で共有する必要がない場合や、共有できないデバイスに適用することができる。   Patent Document 2 discloses a technique for efficiently storing files by providing a cache area in a part of a hard disk in a storage device including a hard disk drive and a magnetic tape drive. Non-Patent Document 1 discloses a device that reduces the overhead of a virtual environment by realizing device separation for a specified guest OS and allowing only the specified guest OS to use the separated device. A technique called pass-through is disclosed. Device pass-through can be applied to devices that do not need to be shared between a plurality of guest OSes and virtualization programs, or to devices that cannot be shared.

特開2009−223793号公報JP 2009-223793 A 特開2003−150413号公報JP 2003-150413 A

M. Tim Jones、”Linux(登録商標)の仮想化とPCIパススルー”、[online]、[平成22年7月13日検索]、インターネット〈URL:http://www.ibm.com/developerworks/jp/linux/library/l-pci-passthrough/?ca=drs-jp〉M. Tim Jones, “Linux (registered trademark) virtualization and PCI passthrough”, [online], [searched on July 13, 2010], Internet <URL: http://www.ibm.com/developerworks/ jp / linux / library / l-pci-passthrough /? ca = drs-jp>

仮想化環境においてゲストOSがHDDやフラッシュSSD(Flash Solid State Drive)にアクセスする際には上述のようにオーバーヘッドが生ずる。また、パーソナル・コンピュータで仮想化環境を実現する際には、1台のハードウエアを仮想化プログラムおよび複数のゲストOSで共有することが一般的である。仮想化環境では、ゲストOSが仮想化プログラムに対して、非仮想化環境におけるOS上のアプリケーションのように動作する。CPUには、リング・プロテクション機構により特権レベルを設定することができる。   When a guest OS accesses an HDD or a flash SSD (Flash Solid State Drive) in a virtual environment, overhead occurs as described above. When a virtual environment is realized by a personal computer, it is common to share one piece of hardware between a virtualization program and a plurality of guest OSs. In the virtual environment, the guest OS operates like an application on the OS in the non-virtualized environment with respect to the virtual program. A privilege level can be set for the CPU by a ring protection mechanism.

仮想化プログラムの上で複数のゲストOSが動作するような場合には、各ゲストOSは対等な関係になるので特定のゲストOSに自由にハードウエアを専有させることはできない。また、特定のゲストOSが直接HDDにアクセスできるようにした場合には、ゲストOS間の分離が行われなくなってしまうので安全上の問題が生ずる。したがって仮想化環境では、基本的に仮想化プログラムに最大の特権レベルを与えてハードウエアへのアクセスを許可し、ゲストOSは仮想化プログラムを介してハードウエアにアクセスするようにしている。したがって、複数の仮想マシンのプログラムを記録したHDDには、特許文献1の直接I/O方式や非特許文献1のデバイス・パススルーを適用してゲストOSが直接アクセスすることはできない。   When a plurality of guest OSs operate on the virtualization program, the guest OSs are in an equal relationship, and thus the specific guest OS cannot freely occupy hardware. Further, when a specific guest OS can directly access the HDD, there is a safety problem because the guest OSs are not separated. Therefore, in the virtual environment, the maximum privilege level is basically given to the virtualization program to permit access to the hardware, and the guest OS accesses the hardware via the virtualization program. Therefore, the guest OS cannot be directly accessed by applying the direct I / O method of Patent Document 1 or the device pass-through of Non-Patent Document 1 to an HDD in which programs of a plurality of virtual machines are recorded.

そこで、本発明の目的は、仮想化環境からディスク・ドライブにアクセス際のオーバーヘッドを低減することができるコンピュータを提供することにある。さらに本発明の目的は、仮想化プログラムとゲストOSを格納するディスク・ドライブに安全性を確保しながらアクセスすることができるコンピュータを提供することにある。さらに本発明の目的は、そのようなコンピュータを実現するコンピュータ・プログラムおよびディスク・ドライブへのアクセス方法を提供することにある。   Accordingly, an object of the present invention is to provide a computer capable of reducing overhead when accessing a disk drive from a virtual environment. It is another object of the present invention to provide a computer that can access a disk drive storing a virtualization program and a guest OS while ensuring safety. A further object of the present invention is to provide a computer program for realizing such a computer and a method for accessing a disk drive.

仮想化環境では、ディスク・ドライブに対するアクセスは、仮想化プログラムが仮想マシンに提供する仮想ディスク・ドライブに対して行われる。仮想化プログラムは、仮想ディスク・ドライブのアドレスを実際のディスク・ドライブのアドレスにマッピングする。よってディスク・ドライブへのアクセスには仮想プログラムの動作が伴うため、仮想マシンから仮想化プログラムへのコンテキスト・スイッチングおよびアドレス・マッピングのオーバーヘッドが発生する。   In the virtual environment, access to the disk drive is performed on the virtual disk drive provided to the virtual machine by the virtualization program. The virtualization program maps the virtual disk drive address to the actual disk drive address. Therefore, since access to the disk drive is accompanied by the operation of the virtual program, overhead of context switching and address mapping from the virtual machine to the virtualized program occurs.

本発明にかかるコンピュータは、仮想マシンがディスク・ドライブに直接アクセスすることができるようにして、仮想化環境のもとでディスク・ドライブに対してアクセスする際に固有に発生するオーバーヘッドを排除する。ディスク・ドライブは、コンピュータとネットワークを経由して接続されていてもよい。また、本発明におけるディスク・ドライブの形式は特に限定する必要はなく一例ではHDDまたはSSDとすることができる。   The computer according to the present invention allows a virtual machine to directly access a disk drive, eliminating the overhead inherent in accessing the disk drive under a virtualized environment. The disk drive may be connected to the computer via a network. Further, the format of the disk drive in the present invention is not particularly limited, and may be HDD or SSD in one example.

本発明では、ディスク・ドライブに仮想マシンがアクセスすることができる特定領域と仮想マシンがアクセスすることができない仮想化領域を設定する。特定領域は、CPUやメイン・メモリなどのようなハードウエアの動作速度の差を吸収するキャッシュとは異なり、ソフトウエアのレイヤにおけるオーバーヘッドを除去する目的で設定する。仮想化領域は、ディスク・ドライブが仮想化環境のために提供する記憶領域で仮想マシンや仮想化プログラムが記録される。アプリケーションまたはゲストOSのプロセスが仮想化領域に対するI/Oリクエストを開始する。ゲストOSはI/Oリクエストが仮想化領域にデータを書き込むライト・アクセスであると判断したときに書き込みデータを特定領域に書き込む。   In the present invention, a specific area that the virtual machine can access to the disk drive and a virtualization area that the virtual machine cannot access are set. The specific area is set for the purpose of removing overhead in the software layer, unlike a cache that absorbs the difference in operating speed of hardware such as a CPU and a main memory. The virtualization area is a storage area provided by the disk drive for the virtualization environment, and a virtual machine and a virtualization program are recorded therein. An application or guest OS process initiates an I / O request to the virtualized area. When the guest OS determines that the I / O request is a write access for writing data to the virtualization area, the guest OS writes the write data to the specific area.

よって、ディスク・ドライブに対するライト・アクセスの際に仮想化プログラムの動作により発生するオーバーヘッドを排除することができる。コンピュータはゲストOSがディスク・ドライブにI/Oリクエストをする際に、仮想マシンの動作と仮想化プログラムの動作の間で遷移する。仮想マシンが動作している間は仮想マシンが特定領域だけにアクセス可能になるように設定し、仮想化プログラムが動作している間は特定領域と仮想化領域にアクセスが可能になるようにダイナミックに設定することができる。   Therefore, it is possible to eliminate the overhead generated by the operation of the virtualization program at the time of write access to the disk drive. The computer transitions between the operation of the virtual machine and the operation of the virtualization program when the guest OS makes an I / O request to the disk drive. Set so that the virtual machine can access only a specific area while the virtual machine is running, and dynamically so that the specific area and the virtual area can be accessed while the virtualization program is running Can be set to

特定領域は、仮想化プログラムがATAのSet max addressコマンドを実行してディスク・コントローラのレジスタに設定することができる。Set max addressコマンドのパラメータはコンテキスト・スイッチングのタイミングでダイナミックに変更することができる。このように特定領域を設定することで、仮想マシンによるディスク・ドライブに対するI/Oリクエストを許容し、仮想マシンはアクセスの許可された特定領域にデータを書き込むことができるようになる。しかも、仮想マシンは仮想化領域にはアクセスすることができないので、仮想化領域に記録されたデータの安全性は保証される。   The specific area can be set in the register of the disk controller by the virtualization program executing the ATA Set max address command. The parameter of the Set max address command can be changed dynamically at the timing of context switching. By setting the specific area in this way, the virtual machine can accept an I / O request to the disk drive, and the virtual machine can write data to the specific area permitted to be accessed. In addition, since the virtual machine cannot access the virtualization area, the security of the data recorded in the virtualization area is guaranteed.

このとき、仮想化プログラムがみずからパスワードを生成してSet max addressコマンドの設定変更にパスワードを要求することも可能である。複数の仮想マシンが時分割で動作する場合には、特定領域を複数の論理ブロックに分割して複数の仮想マシンにそれぞれ専用に割り当てることもできる。特定領域を使用する仮想マシンを交換したり、特定領域の記憶容量が不足してきたりした場合には、ライト・アクセスと非同期で仮想化領域を特定領域に記録されたデータで更新し、特定領域に記憶容量を確保することができる。更新をアイドル時間やシャット・ダウンのタイミングで行えば、ユーザに更新のオーバーヘッドをほとんど感じさせないようにすることができる。更新を仮想化プログラムが実行すれば、更新処理に発生するコンテキスト・スイッチングによるオーバーヘッドを低減することができる。   At this time, it is also possible for the virtualization program to generate a password and request the password to change the setting of the Set max address command. When a plurality of virtual machines operate in a time-sharing manner, the specific area can be divided into a plurality of logical blocks and dedicated to a plurality of virtual machines. When a virtual machine that uses a specific area is replaced or when the storage capacity of the specific area is insufficient, the virtual area is updated with the data recorded in the specific area asynchronously with write access, and the specific area is updated. Storage capacity can be secured. If the update is performed at idle time or shut-down timing, it is possible to make the user hardly feel the update overhead. If the virtualization program executes the update, the overhead due to context switching that occurs in the update process can be reduced.

リード・アクセスの場合に、読み取りデータがすでに特定領域に記録されていると判断したときには仮想マシンは特定領域からデータを読み取ることができる。よって、リード・アクセス時も仮想化プログラムの動作によるオーバーヘッドを低減することができる。また読み取りデータが特定領域に記録されていないと判断したときには、仮想マシンは通常の手順で仮想化領域から読み取ることができる。   In the case of read access, when it is determined that the read data is already recorded in the specific area, the virtual machine can read the data from the specific area. Therefore, the overhead due to the operation of the virtualization program can be reduced even during read access. Further, when it is determined that the read data is not recorded in the specific area, the virtual machine can read from the virtual area by a normal procedure.

仮想化領域からの読み取りにはオーバーヘッドが発生する。しかも読み取ったデータは近い将来に再度読み取られる可能性が高い。一度読み取ったデータに対するリード・アクセスが再度行われたときのために、読み取りのアクセスとは非同期で読み取ったデータを特定領域に記録することができる。ディスク・ドライブの台数は1台に限定するものではなく、本発明はRAIDのような複数のディスク・ドライブで1台の仮想的なディスク・ドライブを構成するような場合にも適用することができる。   An overhead occurs when reading from the virtualization area. In addition, the read data is likely to be read again in the near future. Since the read access to the data once read is performed again, the read data can be recorded in the specific area asynchronously with the read access. The number of disk drives is not limited to one, and the present invention can also be applied to a case where a single virtual disk drive is configured by a plurality of disk drives such as RAID. .

本発明により、仮想化環境からディスク・ドライブにアクセス際のオーバーヘッドを低減することができるコンピュータを提供することができた。さらに本発明により、仮想化プログラムとゲストOSを格納するディスク・ドライブに安全性を確保しながらアクセスすることができるコンピュータを提供することができた。さらに本発明により、そのようなコンピュータを実現するコンピュータ・プログラムおよびディスク・ドライブへのアクセス方法を提供することができた。   According to the present invention, it is possible to provide a computer capable of reducing overhead in accessing a disk drive from a virtual environment. Further, according to the present invention, it is possible to provide a computer that can access a disk drive storing a virtualization program and a guest OS while ensuring safety. Further, according to the present invention, it is possible to provide a computer program for realizing such a computer and a method for accessing a disk drive.

仮想化環境が実現されたコンピュータのソフトウエアおよびハードウエアの構成を示す図である。It is a figure which shows the structure of the software and hardware of a computer by which the virtual environment was implement | achieved. HDDにアクセスする際のオーバーヘッドを低減する原理を説明する図である。It is a figure explaining the principle which reduces the overhead at the time of accessing HDD. 仮想化領域をゲストOSのアクセスから保護する方法を説明する図である。It is a figure explaining the method to protect a virtual area from access of a guest OS. ファイル転送方式でHDDにアクセスするディスク・アクセス制御システムを構成するソフトウエアおよびハードウエアの機能ブロック図である。FIG. 2 is a functional block diagram of software and hardware constituting a disk access control system for accessing an HDD by a file transfer method. アドレス・マッピング・テーブルのデータ構造を示す図である。It is a figure which shows the data structure of an address mapping table. ファイル転送方式で仮想マシンがHDDにファイルを記録するときの手順を示すフローチャートである。It is a flowchart which shows the procedure when a virtual machine records a file on HDD by a file transfer system. ファイル転送方式で仮想マシンがHDDからファイルを読み出すときの手順を示すフローチャートである。It is a flowchart which shows the procedure when a virtual machine reads a file from HDD by a file transfer system. ミラーリング方式でHDDにアクセスするディスク・アクセス制御システムを構成するソフトウエアおよびハードウエアの機能ブロック図である。FIG. 2 is a functional block diagram of software and hardware constituting a disk access control system for accessing an HDD by a mirroring method. ミラーリング方式における特定領域と仮想HDDのアドレス関係を示す図である。It is a figure which shows the address relationship of the specific area | region and virtual HDD in a mirroring system. ミラーリング方式で仮想マシンがHDDにファイルを記録するときの手順を示すフローチャートである。It is a flowchart which shows the procedure when a virtual machine records a file on HDD by a mirroring system.

[仮想化環境]
図1は、所定のプログラムが実行されて仮想化環境が実現されているコンピュータ10のソフトウエアおよびハードウエアの構成を示す図である。図1では、いわゆるタイプ1といわれるハイパーバイザ型の仮想化モデルを例示して説明するが、本発明は、ホストOS型の仮想化モデルに適用することもできる。コンピュータ10は、ハードウエア19として代表的にCPU21、メイン・メモリ23、HDD25およびシステムとHDD25の間のインターフェースとなるIDEコントローラ26を含んでいる。本発明におけるハードウエアの構成は周知である。ハードウエア19上では直接ハイパーバイザまたはVMMといわれる仮想化プログラム17が動作する。
[Virtualized environment]
FIG. 1 is a diagram illustrating a software and hardware configuration of a computer 10 in which a predetermined program is executed to realize a virtual environment. In FIG. 1, a hypervisor type virtualization model referred to as a so-called type 1 is described as an example, but the present invention can also be applied to a host OS type virtualization model. The computer 10 typically includes, as hardware 19, a CPU 21, a main memory 23, an HDD 25, and an IDE controller 26 that serves as an interface between the system and the HDD 25. The hardware configuration in the present invention is well known. On the hardware 19, a virtualization program 17 called a hypervisor or VMM directly operates.

仮想化プログラム17のレイヤの上では、複数の仮想マシン11、13、15が時分割で動作することができる。あるいは、選択したいずれか1つの仮想マシンだけが、動作することができる。各仮想マシン11、13、15は、アプリケーション73、75、77、ゲストOS67、69、71、および仮想ハードウエア61、63、65といったソフトウエアで構成されている。仮想化プログラム17は、CPU21、メイン・メモリ23、HDD25およびIDEコントローラ26などのハードウエアをエミュレートして、各仮想マシン11、13、15に各ハードウエアに対応した仮想ハードウエア61、63、65を提供する。   On the layer of the virtualization program 17, a plurality of virtual machines 11, 13, and 15 can operate in a time division manner. Alternatively, only one selected virtual machine can operate. Each virtual machine 11, 13, 15 is configured by software such as applications 73, 75, 77, guest OSs 67, 69, 71, and virtual hardware 61, 63, 65. The virtualization program 17 emulates hardware such as the CPU 21, the main memory 23, the HDD 25, and the IDE controller 26, and the virtual hardware 61, 63, 63, 63, 63, 63, 63, 65 is provided.

この例では仮想ハードウエア61、63、65はそれぞれハードウエア19の構成要素に対応して、仮想CPU、仮想メイン・メモリ、仮想HDD、および仮想IDEコントローラを含むことになる。ゲストOS67、69、71および仮想化プログラム17は、各仮想マシン11、13、15がHDD25にアクセスする際に、仮想化プログラム17が介在することにより発生するオーバーヘッドを低減するためのモジュールを含んでいる。なお、仮想マシン11、13、15を構成するプログラムおよび仮想化プログラム17はCPU21およびメイン・メモリ23などで実行されることにより、コンピュータ10に所定の機能を発揮させるハードウエアの要素として捕らえることもできる。   In this example, the virtual hardware 61, 63, 65 includes a virtual CPU, a virtual main memory, a virtual HDD, and a virtual IDE controller corresponding to the components of the hardware 19, respectively. The guest OSs 67, 69, 71 and the virtualization program 17 include modules for reducing overhead caused by the intervention of the virtualization program 17 when each virtual machine 11, 13, 15 accesses the HDD 25. Yes. The programs constituting the virtual machines 11, 13, and 15 and the virtualization program 17 are executed by the CPU 21, the main memory 23, and the like, and may be captured as hardware elements that cause the computer 10 to perform predetermined functions. it can.

[オーバーヘッド低減の基本原理]
図2は、本実施の形態により仮想マシン11、13、15がHDD25にアクセスする際のオーバーヘッドを低減する原理を説明する図である。ゲストOS67、69、71は、仮想HDD61、63、65が提供するファイル・パスを仮想インターフェースとしてHDD25にアクセスする。ハイパーバイザ方式には完全仮想化(Full-Virtualization)と準仮想化(Para-Virtualization)という2つの方式がある。完全仮想化方式では、仮想化プログラム17が完全な仮想化環境を構築するためゲストOS67、69、71は仮想化環境に対応するための修正をする必要がない。そして仮想プログラム17が最大の特権レベルで動作し各ゲストOSはそれよりも低い特権レベルで動作する。
[Basic principle of overhead reduction]
FIG. 2 is a diagram for explaining the principle of reducing overhead when the virtual machines 11, 13, and 15 access the HDD 25 according to this embodiment. The guest OSs 67, 69, 71 access the HDD 25 using the file path provided by the virtual HDDs 61, 63, 65 as a virtual interface. There are two types of hypervisor methods: full-virtualization and para-virtualization. In the complete virtualization method, since the virtualization program 17 constructs a complete virtualization environment, the guest OSs 67, 69, and 71 do not need to be modified to cope with the virtualization environment. The virtual program 17 operates at the maximum privilege level, and each guest OS operates at a privilege level lower than that.

しかし、各ゲストOSは、自らが仮想化環境で動作していることを認識しないので、仮想HDD61、63、65に対して、最大の特権レベルで動作するプログラムにしか許容されないHDD25へのアクセスをする。ゲストOSがHDD25にアクセスするとCPU21に特権命令違反の例外が発生し、それをトラップした仮想化プログラム17に制御が移ってHDD25へのアクセスを処理する。   However, since each guest OS does not recognize that it is operating in a virtual environment, access to the HDD 25 that is allowed only by a program operating at the maximum privilege level is allowed for the virtual HDDs 61, 63, 65. To do. When the guest OS accesses the HDD 25, a privilege violation violation occurs in the CPU 21, and control is transferred to the virtualization program 17 that traps the exception, and the access to the HDD 25 is processed.

準仮想化方式では、ゲストOS67、69、71がHDD25にアクセスする際にハイパーバイザ・コールを発行して仮想化プログラム17の内部関数を呼び出し、仮想マシン11、13、15に変更を加えたり仮想化プログラム17に処理を要求したりする。準仮想化方式は完全仮想化方式に比べて高速処理が可能であるがゲストOSに修正が必要になる。完全仮想化方式および準仮想化方式のいずれの場合にもゲストOS67、69、71がHDD25にアクセスする際には、仮想化プログラム17に制御が移る際のコンテキスト・スイッチングと、仮想HDD61、63、65とHDD25とのアドレスをマッピングするためにオーバーヘッドが発生する。   In the para-virtualization method, when the guest OS 67, 69, 71 accesses the HDD 25, a hypervisor call is issued to call an internal function of the virtualization program 17, and the virtual machines 11, 13, 15 are changed or virtualized. Requesting the processing program 17 to perform processing. The para-virtualization method can perform high-speed processing as compared with the full virtualization method, but the guest OS needs to be modified. When the guest OS 67, 69, 71 accesses the HDD 25 in both the full virtualization method and the para-virtualization method, context switching when the control is transferred to the virtualization program 17, and the virtual HDDs 61, 63, Overhead is generated to map the addresses of 65 and HDD 25.

本実施の形態においては、HDD25の記憶領域を仮想化プログラム17が特定領域51と仮想化領域53に論理的に分割する。特定領域51は、ゲストOS67、69、71の中から選択されたいずれかのゲストOS(ここでは、ゲストOS67とする。)が仮想化プログラム17を経由しないで直接アクセスできる記憶領域である。仮想化領域53は、仮想化プログラム17と仮想マシン11、13、15を構成するプログラムおよびファイルなどのデータを記録しており、ゲストOS67が仮想化プログラム17を経由してアクセスする記憶領域である。   In the present embodiment, the virtualization program 17 logically divides the storage area of the HDD 25 into a specific area 51 and a virtual area 53. The specific area 51 is a storage area that can be directly accessed by any of the guest OSs selected from the guest OSs 67, 69, and 71 (here, the guest OS 67) without going through the virtualization program 17. The virtualization area 53 is a storage area in which data such as the programs and files constituting the virtualization program 17 and the virtual machines 11, 13, and 15 are recorded and accessed by the guest OS 67 via the virtualization program 17. .

各仮想マシン11、13、15に対応するデータはデータ領域55、57、59に記録される。データ領域55、57、59にはそれぞれ、各仮想マシン11、13、15に関連するアプリケーション、OS、デバイス・ドライバ、およびユーザ・データなどが記録される。仮想化プログラム17はHDD25を仮想HDD61、63、65としてエミュレートするに当たり、仮想化領域53を仮想HDD61、63、65ごとに論理的に区分してデータ領域55、57、59を確保してもよいし、仮想化領域53の全体を使用して仮想HDD61、63、65のアドレスと仮想化領域53のアドレスをマッピングしてもよい。   Data corresponding to the virtual machines 11, 13, and 15 are recorded in the data areas 55, 57, and 59. In the data areas 55, 57, and 59, applications, OSs, device drivers, user data, and the like related to the respective virtual machines 11, 13, and 15 are recorded. When the virtualization program 17 emulates the HDD 25 as the virtual HDDs 61, 63, 65, the virtualization area 53 is logically divided into virtual HDDs 61, 63, 65 to secure the data areas 55, 57, 59. Alternatively, the entire virtual area 53 may be used to map the addresses of the virtual HDDs 61, 63, 65 and the address of the virtual area 53.

仮想マシン11、13、15は、アクセス対象のデータについてHDD25のアドレスを認識する必要はなく、仮想HDD61、63、65のアドレスだけを認識してHDD25の仮想化領域53にアクセスする。特定領域51を使用するゲストOS67は、所定のアドレスに当該特定領域51を自らが使用していたことを示すゲストOS識別子を記録する。そして、ゲストOS67はHDD25にファイルを書き込むライト・アクセスの際にはすべての書き込みデータを特定領域51に書き込む。仮想化領域53は仮想マシン11、13、15に対して本来のデータ格納場所としての役割を担う。また、特定領域51は他のゲストOS69、71が使用することもある。ゲストOS67は仮想化プログラム17に指示して、特定領域51にだけ記録されているデータをライト・アクセスとは非同期で仮想化領域53に書き込む。   The virtual machines 11, 13, and 15 do not need to recognize the address of the HDD 25 for the data to be accessed, and recognize only the addresses of the virtual HDDs 61, 63, and 65 and access the virtualization area 53 of the HDD 25. The guest OS 67 using the specific area 51 records a guest OS identifier indicating that the specific area 51 itself was used at a predetermined address. Then, the guest OS 67 writes all the write data to the specific area 51 at the time of write access for writing the file to the HDD 25. The virtualization area 53 plays a role as an original data storage location for the virtual machines 11, 13, and 15. In addition, the specific area 51 may be used by other guest OSs 69 and 71. The guest OS 67 instructs the virtualization program 17 to write the data recorded only in the specific area 51 to the virtualization area 53 asynchronously with the write access.

また、HDD25からファイルを読み取るリード・アクセスの際には、ゲストOS67は特定領域51に読み取りデータが記録されている場合は特定領域51から読み取り、読み取りデータが記録されていない場合は仮想化領域53から読み取る。特定領域51からの読み取りの機会を増大するために、一旦読み取られたファイルは、ゲストOS67がリード・アクセスとは非同期で特定領域51に書き込むことができる。このように仮想化されたHDD25にゲストOS67がアクセスするために、以下のようにしてゲストOS67によるHDD25へのアクセスを許可しながら仮想化領域53のデータを保護する。   When performing read access to read a file from the HDD 25, the guest OS 67 reads from the specific area 51 when read data is recorded in the specific area 51, and a virtual area 53 when read data is not recorded. Read from. In order to increase the chance of reading from the specific area 51, the guest OS 67 can write the file once read into the specific area 51 asynchronously with read access. In order for the guest OS 67 to access the HDD 25 thus virtualized, the data in the virtualized area 53 is protected while allowing the guest OS 67 to access the HDD 25 as follows.

仮想化プログラム17はリング0で動作し、ゲストOS67がリング1、2、3で動作すると、ゲストOS67のHDD25へのアクセスは特権命令違反になって仮想化プログラム17によりトラップされCPU21の制御が仮想化プログラム17に移行する。インテル社のVT(Virtualization Technology)という仮想化支援機構やX86仮想化では、I/O-bitmapというオブジェクトによりハードウエアへのアクセスをI/Oポートごとに制御して、ゲストOS67がHDD25にアクセスしても仮想化プログラム17に制御を移行させないようにする手法を提供する。   When the virtualization program 17 operates in the ring 0 and the guest OS 67 operates in the rings 1, 2, and 3, the access to the HDD 25 of the guest OS 67 becomes a privileged instruction violation and is trapped by the virtualization program 17 and the control of the CPU 21 is virtual. Shift to the computer program 17. In the virtualization support mechanism called Intel's VT (Virtualization Technology) and X86 virtualization, the guest OS 67 accesses the HDD 25 by controlling the access to the hardware for each I / O port by the object called I / O-bitmap. However, a technique for preventing the control from being transferred to the virtualization program 17 is provided.

仮想化プログラム17は、I/O-bitmap のオブジェクトにパラメータを記述して、ゲストOS67によるIDEコントローラ26のI/Oポートに対するI/Oリクエストを制御する。仮想化プログラム17はゲストOS67によるHDD25へのアクセスを、仮想化プログラム17が特定領域51を利用する場合はトラップせず、特定領域51を利用しない場合はトラップするようにI/O-bitmapに記述する。   The virtualization program 17 describes parameters in the I / O-bitmap object, and controls I / O requests to the I / O port of the IDE controller 26 by the guest OS 67. The virtualization program 17 is described in the I / O-bitmap so that the access to the HDD 25 by the guest OS 67 is not trapped when the virtualization program 17 uses the specific area 51 and is trapped when the specific area 51 is not used. To do.

このようにしてゲストOS67による特定領域51へのアクセスが可能になるが、I/O-bitmapによる制御はI/Oポートのアドレス単位であるため、I/Oポートが開放されるとゲストOS67は特定領域51だけでなく仮想化領域53にもアクセスできる。このため、本実施の形態ではI/O-bitmapによる制御方式を採用しながら、以下のようにしてゲストOS67が仮想化領域53にアクセスできないようにしている。なお、インテル社のVTやAMD社の Pacificaという仮想化支援機構では、リング・プロテクションによる特権レベルの制御とは異なってコンテキスト・ベースで特権を付与する方式を採用する。この場合は、仮想化プログラム17への動作の移行をI/O-bitmapで制御する必要はない。   In this way, the guest OS 67 can access the specific area 51. However, since control by the I / O-bitmap is in units of address of the I / O port, the guest OS 67 is released when the I / O port is released. Not only the specific area 51 but also the virtual area 53 can be accessed. Therefore, in the present embodiment, the guest OS 67 is prevented from accessing the virtualization area 53 as follows, while adopting a control method based on I / O-bitmap. Note that the virtualization support mechanism called Intel's VT or AMD's Pacifica employs a context-based privilege grant system, unlike the privilege level control by ring protection. In this case, it is not necessary to control the transition of the operation to the virtualization program 17 with the I / O-bitmap.

[仮想化領域の保護方法]
図3は、仮想化領域53をゲストOS67のアクセスから保護する方法を説明する図である。ATA(Advanced Technology Attachment)のインターフェース規格では、ディスクの記憶領域に特別なプログラム以外はアクセスすることができないHPA(Host Protected Area)を設定することができる。本実施の形態では、HPAの設定をゲストOS67の動作と仮想化プログラム17の動作の遷移にリンクさせてダイナミックに変更し、ゲストOS67が動作している間はゲストOS67が特定領域51にはアクセスできるが仮想化領域53にはアクセスできないようにしている。
[Virtual Area Protection Method]
FIG. 3 is a diagram for explaining a method of protecting the virtual area 53 from access by the guest OS 67. According to the ATA (Advanced Technology Attachment) interface standard, it is possible to set an HPA (Host Protected Area) in which only a special program can access the storage area of the disk. In the present embodiment, the HPA setting is dynamically changed by linking the transition of the operation of the guest OS 67 and the operation of the virtualization program 17, and the guest OS 67 accesses the specific area 51 while the guest OS 67 is operating. Although it is possible, the virtual area 53 cannot be accessed.

HDD25にHPAを設定するために、仮想化プログラム17がSet max addressコマンドを発行してIDEコントローラ26のレジスタにHDD25の有効なアドレス範囲を設定する。設定値がHDD25の最大記憶容量よりも小さい場合はゲストOS67または仮想化プログラム17が利用できる記憶容量が低減する。図3(A)は、Set max addressコマンドを最大記憶容量のX(%)に設定した様子を示している。この場合、HDD25の記憶容量のうち0%からX%までは特定領域51に対応し、X%を越えて100%まではHPAが設定されてアクセスが制限された仮想化領域53に対応する。 In order to set the HPA in the HDD 25, the virtualization program 17 issues a Set max address command to set a valid address range of the HDD 25 in the register of the IDE controller 26. When the set value is smaller than the maximum storage capacity of the HDD 25, the storage capacity that can be used by the guest OS 67 or the virtualization program 17 is reduced. FIG. 3A shows a state in which the Set max address command is set to X (%) of the maximum storage capacity. In this case, 0% to X% of the storage capacity of the HDD 25 corresponds to the specific area 51, and more than 100% to 100% corresponds to the virtual area 53 in which access is restricted by setting HPA .

HPAには、ゲストOS67も仮想化プログラム17もアクセスすることができない。したがって、CPU21の動作がゲストOS67の実行に遷移したときにHPAを設定すれば、ゲストOS67は特定領域51にはアクセスできるが仮想化領域53にアクセスすることができなくなる。図3(B)は、Set max addressコマンドで有効なアドレス範囲を100%に設定した様子を示している。この状態ではHPAは設定されていないことになるので、ゲストOS67および仮想化プログラム17は特定領域51にも仮想化領域53にもアクセスすることができる。   Neither the guest OS 67 nor the virtualization program 17 can access the HPA. Therefore, if the HPA is set when the operation of the CPU 21 transitions to the execution of the guest OS 67, the guest OS 67 can access the specific area 51 but cannot access the virtualization area 53. FIG. 3B shows a state where the effective address range is set to 100% with the Set max address command. Since HPA is not set in this state, the guest OS 67 and the virtualization program 17 can access both the specific area 51 and the virtual area 53.

ここで仮想化プログラム17は、CPU21の動作が仮想化プログラム17の実行に遷移したときだけ、パラメータが100%のSet max addressコマンドを発行することで、自らだけが特定領域51と仮想化領域53にアクセスできるようにしている。このように、I/O-bitmapによりゲストOS67に対してIDEコントローラ26のI/Oポートを開放しても、ゲストOS67と仮想化プログラム17との間でのCPU21の遷移に応じてダイナミックにHPAを設定することで、ゲストOS67の仮想化領域53に対するアクセスを制限し、かつ仮想化プログラム17にはアクセス制限を解除することができる。   Here, the virtualization program 17 issues a Set max address command with a parameter of 100% only when the operation of the CPU 21 transitions to the execution of the virtualization program 17, so that only the specific area 51 and the virtualization area 53 are themselves. To be able to access. As described above, even if the I / O port of the IDE controller 26 is opened to the guest OS 67 by the I / O-bitmap, the HPA is dynamically changed according to the transition of the CPU 21 between the guest OS 67 and the virtualization program 17. Is set, the access to the virtualization area 53 of the guest OS 67 can be restricted, and the access restriction on the virtualization program 17 can be released.

ゲストOS67がSet max addressコマンドを発行してHPAを変更できるとすれば、仮想化領域53に記録されたデータの安全を確保することができなくなる。データの安全を確保するためにSet max addressコマンドの発行に、パスワードを要求することができる。すなわち、仮想化プログラム17が一旦設定したHPAは、パスワードを取得しない限りゲストOS67が変更できないようにすることができる。パスワードはユーザが設定しないで、仮想化プログラム17が独自に乱数を発生して生成することができる。   If the guest OS 67 can change the HPA by issuing the Set max address command, the safety of the data recorded in the virtualization area 53 cannot be ensured. To ensure data security, you can require a password to issue the Set max address command. That is, the HPA once set by the virtualization program 17 can be prevented from being changed by the guest OS 67 unless a password is acquired. The password is not set by the user, and the virtualization program 17 can generate and generate a random number independently.

[ファイル転送方式]
図4は、ファイル転送方式でHDD25にアクセスするディスク・アクセス制御システム100を構成するソフトウエアおよびハードウエアの機能ブロック図である。ディスク・アクセス制御システム100はコンピュータ10に搭載される。仮想マシン11は、本実施の形態に関連する要素としてアプリケーション73、ゲストOS67、仮想HDD61、およびアドレス・マッピング・テーブル(AMP)93を含んでいる。ゲストOS67は、Windows(登録商標)を例示して説明するが、本発明には他のOSを適用することも可能である。アプリケーション73はユーザー・モードで動作する。アプリケーション73はサブシステムDLL(Dynamic Link Library)を経由してAPI関数を呼び出し、仮想HDD61に対してデータを書き込んだり読み取ったりすることができるプログラムである。
[File transfer method]
FIG. 4 is a functional block diagram of software and hardware constituting the disk access control system 100 that accesses the HDD 25 by the file transfer method. The disk access control system 100 is mounted on the computer 10. The virtual machine 11 includes an application 73, a guest OS 67, a virtual HDD 61, and an address mapping table (AMP) 93 as elements related to the present embodiment. The guest OS 67 is described using Windows (registered trademark) as an example, but other OS can be applied to the present invention. The application 73 operates in the user mode. The application 73 is a program that can call API functions via a subsystem DLL (Dynamic Link Library) and write / read data to / from the virtual HDD 61.

アプリケーション73は、プログラムを仮想HDD61にインストールするインストーラであってもよい。システム・サービス・ディスパッチャ(SSD)83は、ユーザー・モードとカーネル・モードの切り替えを担当する。SSD83はユーザー・モードで動作するアプリケーション73から呼び出されたシステム・コール・サービスの際に発生した割り込みのコール番号を確認して、API関数をカーネル・モードで動作する内部サポート関数に切り替える。   The application 73 may be an installer that installs a program in the virtual HDD 61. A system service dispatcher (SSD) 83 is responsible for switching between the user mode and the kernel mode. The SSD 83 confirms the call number of the interrupt generated during the system call service called from the application 73 operating in the user mode, and switches the API function to the internal support function operating in the kernel mode.

I/Oマネージャ85は、スタック構造の入出力に関連するデバイス・ドライバの階層間の通信を行うためにIRP(I/O Request Packet)を作成して所定のデバイス・ドライバにディスパッチする。IRPは、各デバイス・ドライバとI/Oマネージャ85との間の通信に使用される。HDD25へのアクセスに関連するデバイス・ドライバは、ファイル・システム・ドライバ87、アクセス・コントロール・ドライバ89、およびディスク・ドライバ91で構成されている。ファイル・システム・ドライバ87は、FAT(File Allocation Table)やNTFS(NT File System)といったファイル・システムを形成して仮想HDD61に関するファイルの記録、読み取り、削除、または移動などのI/Oリクエストを管理する。   The I / O manager 85 creates an IRP (I / O Request Packet) and dispatches it to a predetermined device driver in order to perform communication between device driver hierarchies related to the input / output of the stack structure. The IRP is used for communication between each device driver and the I / O manager 85. A device driver related to access to the HDD 25 includes a file system driver 87, an access control driver 89, and a disk driver 91. The file system driver 87 forms a file system such as FAT (File Allocation Table) or NTFS (NT File System) to manage I / O requests such as recording, reading, deleting, or moving files related to the virtual HDD 61. To do.

ファイル・システム・ドライバ87は、アプリケーション73に対して仮想HDD61に対するファイル・パスを提供する。ファイル・システム・ドライバ87は、I/Oマネージャ85から受け取ったAPI関数に指定されたファイル・パスを仮想HDD61のLBA(logical block address)に変換して、アクセス・コントロール・ドライバ89に送る。アクセス・コントロール・ドライバ89は、仮想HDD61に対するI/OリクエストをHDD25の特定領域51を利用して処理するプログラムである。アクセス・コントロール・ドライバ89は、AMP93を参照したり更新したりすることができる。アクセス・コントロール・ドライバ89はさらに特定領域51または仮想化領域53を更新するタイミングを決定する。   The file system driver 87 provides a file path for the virtual HDD 61 to the application 73. The file system driver 87 converts the file path specified in the API function received from the I / O manager 85 into an LBA (logical block address) of the virtual HDD 61 and sends it to the access control driver 89. The access control driver 89 is a program that processes an I / O request to the virtual HDD 61 using the specific area 51 of the HDD 25. The access control driver 89 can refer to and update the AMP 93. The access control driver 89 further determines the timing for updating the specific area 51 or the virtualization area 53.

ディスク・ドライバ91は階層構造になっており、アクセス・コントロール・ドライバ89から受け取った仮想HDD61の所定のLBAに対する読み取りまたは書き込みなどをするためのI/Oリクエストを、HDD25を制御するプロトコルに変換して仮想HDD61に送る。仮想HDD61は仮想化プログラム17により提供され、HDD25の仮想化領域53を抽象化して仮想マシン11に仮想化されたインターフェースを提供する。仮想HDD61はディスク・ドライバ91からのI/Oリクエストに対してファイル・パスのインターフェースを提供するだけで直接応答することはない。   The disk driver 91 has a hierarchical structure, and converts an I / O request received from the access control driver 89 for reading or writing a predetermined LBA of the virtual HDD 61 into a protocol for controlling the HDD 25. To the virtual HDD 61. The virtual HDD 61 is provided by the virtualization program 17 and provides a virtualized interface to the virtual machine 11 by abstracting the virtualization area 53 of the HDD 25. The virtual HDD 61 simply provides a file path interface to the I / O request from the disk driver 91 and does not respond directly.

仮想化プログラム17は、本実施の形態に関連する要素としてアクセス・マネージャ101、HPAマネージャ102、ファイル・システム・ドライバ103、およびディスク・ドライバ105を含んでいる。アクセス・マネージャ101は、アクセス・コントロール・ドライバ89から仮想化領域53を更新する要求があったときに、特定領域51のデータで仮想化領域53を更新するプログラムである。   The virtualization program 17 includes an access manager 101, an HPA manager 102, a file system driver 103, and a disk driver 105 as elements related to the present embodiment. The access manager 101 is a program for updating the virtualization area 53 with the data of the specific area 51 when a request to update the virtualization area 53 is received from the access control driver 89.

アクセス・マネージャ101は、ディスク・ドライバ91から受け取ったI/Oリクエストに対しては、なんら処理を加えないでファイル・システム・ドライバ103に渡す。HPAマネージャ102は、ゲストOS61のI/Oリクエストが発行されてゲストOS67から仮想化プログラム17に制御が移行するときにHPAを解除し、仮想化プログラム17からゲストOS67に制御が移行するときにHPAを設定するようにパラメータを設定してSet max addressコマンドを発行するプログラムである。


The access manager 101 passes the I / O request received from the disk driver 91 to the file system driver 103 without performing any processing. The HPA manager 102 releases the HPA when an I / O request of the guest OS 61 is issued and the control shifts from the guest OS 67 to the virtualization program 17, and when the control shifts from the virtualization program 17 to the guest OS 67. This is a program that sets a parameter to set an HPA and issues a Set max address command.


アクセス・マネージャ101は、ファイル・システム・ドライバ103から受け取った仮想化領域53からの読み取りデータに対しては何ら処理を加えないで、ディスク・ドライバ91に渡す。ファイル・システム・ドライバ103は、仮想化領域53のファイル・パスを管理する。ファイル・システム・ドライバ103は、所定のファイルが記録される仮想HDD61の仮想的なLBAを、実際に記録する仮想化領域53のLBAに変換する。ディスク・ドライバ105は、HDD25に対して受け取ったI/Oリクエストを所定のプロトコルに変換して実行する。   The access manager 101 passes the read data from the virtualization area 53 received from the file system driver 103 to the disk driver 91 without performing any processing. The file system driver 103 manages the file path of the virtualization area 53. The file system driver 103 converts the virtual LBA of the virtual HDD 61 in which a predetermined file is recorded into the LBA of the virtual area 53 that is actually recorded. The disk driver 105 converts the I / O request received to the HDD 25 into a predetermined protocol and executes it.

図5はAMP93のデータ構造を示す図である。図5(A)に示すAMP93は、特定の3つのファイルについて、仮想HDD61がゲストOS67に提供するLBAと実際にデータが記録されている特定領域51のLBAを関連付けている。ここでは説明を簡単にするために1つのファイルをLBA単位で対応付けているが、実際には、複数のLBAの集合であるクラスタの単位で関連付けることができる。   FIG. 5 shows the data structure of AMP93. The AMP 93 shown in FIG. 5A associates the LBA provided by the virtual HDD 61 to the guest OS 67 and the LBA in the specific area 51 where data is actually recorded for specific three files. Here, in order to simplify the description, one file is associated in units of LBA.

HDD25には、特定領域51から仮想化領域53に渡ってディスクのすべてのセクタにアドレスが順番にLBA001からLBAnnnまで割り当てられているものとする。LBA001からLBA100までは特定領域51に対応し、LBA101からLBAnnnまでは仮想化領域53に対応するものとする。また、仮想HDD61には、仮想化プログラム17によりアドレスがLBA001からLBAmmmまで割り当てられているものとする。   In the HDD 25, it is assumed that addresses from LBA001 to LBAnnn are sequentially assigned to all sectors of the disk from the specific area 51 to the virtualization area 53. LBA001 to LBA100 correspond to the specific area 51, and LBA101 to LBAnnn correspond to the virtual area 53. It is assumed that addresses from LBA001 to LBAmmm are assigned to the virtual HDD 61 by the virtualization program 17.

更新フラグは、仮想化領域53を特定領域51のデータで更新する必要があることを示す情報である。アクセス・コントロール・ドライバ89は、仮想HDD61と特定領域53の対応するLBAに記録されているデータが一致しない場合は更新フラグをリセット(0)し、一致する場合はセット(1)する。更新フラグがセットされている場合は仮想化領域53を更新しないでも特定領域51からデータを削除することができる。更新フラグの設定方法は後に説明する。登録日時は、特定領域51の記憶容量が少なくなったときに、仮想化領域53を更新してから消去するときの順番を決める情報である。アクセス・コントロール・ドライバ89は、登録日時の欄にAMP93にエントリを登録した日時を書き込む。   The update flag is information indicating that the virtualization area 53 needs to be updated with the data of the specific area 51. The access control driver 89 resets (0) the update flag when the data recorded in the corresponding LBAs of the virtual HDD 61 and the specific area 53 do not match, and sets (1) when they match. When the update flag is set, data can be deleted from the specific area 51 without updating the virtualization area 53. A method for setting the update flag will be described later. The registration date and time is information for determining the order in which the virtual area 53 is updated and then deleted when the storage capacity of the specific area 51 decreases. The access control driver 89 writes the date and time when the entry is registered in the AMP 93 in the registration date and time column.

つぎに、ディスク・アクセス制御システム100の動作を図6、図7のフローチャートに基づいて説明する。図6は、仮想マシン11がHDD25にファイルを記録するときの手順を示すフローチャートである。仮想マシン13、15は、仮想マシン11とともにコンピュータ10において時分割動作をしていてもよいが、ここでの手順では仮想マシン13、15は特定領域51を利用しないので説明から除外する。   Next, the operation of the disk access control system 100 will be described with reference to the flowcharts of FIGS. FIG. 6 is a flowchart showing a procedure when the virtual machine 11 records a file in the HDD 25. The virtual machines 13 and 15 may perform time-sharing operation in the computer 10 together with the virtual machine 11, but are excluded from the description because the virtual machines 13 and 15 do not use the specific area 51 in the procedure here.

ブロック201では、コンピュータ10が動作して図1の仮想化プログラム17および仮想マシン11が動作する仮想化環境が実現されている。コンピュータ10の起動ルーチンのなかで、または仮想プログラム17が動作したあとに仮想マシン11がロードされる際に、アクセス・コントロール・ドライバ89は、特定領域51の所定のアドレスからゲストOS識別子を読み取って、特定領域51を自らが使用していたか否かを判断する。   In block 201, a virtual environment in which the computer 10 operates and the virtualization program 17 and the virtual machine 11 of FIG. 1 operate is realized. In the startup routine of the computer 10 or when the virtual machine 11 is loaded after the virtual program 17 operates, the access control driver 89 reads the guest OS identifier from a predetermined address in the specific area 51. Then, it is determined whether or not the specific area 51 has been used by itself.

特定領域51を自らが使用していたと判断した場合は、アクセス・コントロール・ドライバ89は特定領域51に記録されたデータおよびAMP93のエントリを継続して使用する。特定領域51を他の仮想マシン13、15が使用していたと判断した場合は、アクセス・コントロール・ドライバ89は特定領域51およびAMP93を初期化する。仮想化プログラム17は、I/O-bitmapにパラメータを記述してゲストOS67がHDD25にアクセスしてもCPU21の動作が仮想化プログラム17に移行しないようにする。   If it is determined that the specific area 51 has been used by itself, the access control driver 89 continues to use the data recorded in the specific area 51 and the entry of the AMP 93. When it is determined that the specific area 51 is being used by another virtual machine 13 or 15, the access control driver 89 initializes the specific area 51 and the AMP 93. The virtualization program 17 describes parameters in the I / O-bitmap so that the operation of the CPU 21 does not shift to the virtualization program 17 even when the guest OS 67 accesses the HDD 25.

HPAマネージャ102は、仮想マシン11が動作するときはパラメータがX(%)のSet max addressコマンドを発行して図3(A)のように仮想化領域53をHPAに設定し、仮想化プログラム17が動作するときはパラメータが100%のSet max addressコマンドを発行して図3(B)のようにHPAを解除する。仮想化プログラム17は特定領域51に、仮想マシン11が新たなアプリケーションをインストールしたり、アプリケーション73がファイルを記録したり、あるいは仮想化領域53から読み取ったファイルを記録したりするのに十分な記憶容量を確保することが望ましい。ただし、それらのデータを一度に記録するだけの記憶容量を特定領域51に確保できない場合であっても、本実施の形態では特定領域51のデータを入れ替えることで対応できるようにしている。   When the virtual machine 11 operates, the HPA manager 102 issues a Set max address command with the parameter X (%), sets the virtualization area 53 to HPA as shown in FIG. When is operated, a Set max address command with a parameter of 100% is issued to cancel the HPA as shown in FIG. The virtualization program 17 has sufficient storage in the specific area 51 to install a new application by the virtual machine 11, record a file by the application 73, or record a file read from the virtualization area 53. It is desirable to secure capacity. However, even in the case where it is not possible to secure a storage capacity for recording these data at a time in the specific area 51, in the present embodiment, the data of the specific area 51 can be replaced.

ブロック203でアプリケーション73は、API関数を呼び出してゲストOS67に新しいファイルを記録するためのプロセスまたは仮想化領域51から読み取ったファイルを更新するプロセスを生成するように要求する。プロセスは、ファイル保存場所としての仮想HDD61のLBAを認識しておらず、ファイルの記録場所に関するパラメータとして、ファイル・システム・ドライバ87が提供する仮想HDD61におけるファイル・パスをAPI関数に設定する。SSD83はAPI関数を内部サポート関数に変換してI/Oマネージャ85に送る。   In block 203, the application 73 requests to create a process for recording a new file in the guest OS 67 by calling an API function or a process for updating the file read from the virtualization area 51. The process does not recognize the LBA of the virtual HDD 61 as the file storage location, and sets the file path in the virtual HDD 61 provided by the file system driver 87 in the API function as a parameter related to the file recording location. The SSD 83 converts the API function into an internal support function and sends it to the I / O manager 85.

I/Oマネージャ85は、IRPに内部サポート関数の要求を記述して各デバイス・ドライバと通信をする。各デバイス・ドライバもI/Oマネージャ85から受け取ったIRPに記述してI/Oマネージャ85に返送することにより、他のデバイス・ドライバと通信する。ファイル・システム・ドライバ87は、API関数で指定されたファイル・パスを仮想HDD61のLBAに変換してアクセス・コントロール・ドライバ89に送る。   The I / O manager 85 communicates with each device driver by describing a request for an internal support function in the IRP. Each device driver also communicates with other device drivers by writing in the IRP received from the I / O manager 85 and returning it to the I / O manager 85. The file system driver 87 converts the file path specified by the API function into the LBA of the virtual HDD 61 and sends it to the access control driver 89.

ここでは、ファイル・システム・ドライバ87はアプリケーション73が指定したファイル名およびファイル・パスに対して仮想HDD61のLBA007を割り当てるものとする。ブロック205でアクセス・コントロール・ドライバ89は、I/Oリクエストがライト・アクセスかリード・アクセスかを判断する。リード・アクセスの場合はブロック209に移行する。リード・アクセスの処理は、図7に基づいて説明する。なお、I/Oリクエストには、ファイルの削除やファイルの移動に関するものもあるが、本実施の形態にかかるライト・アクセスの処理とリード・アクセスの処理について説明すれば当業者にとってそれらの処理方法も明らかになるのでその説明は省略する。   Here, it is assumed that the file system driver 87 assigns the LBA007 of the virtual HDD 61 to the file name and file path specified by the application 73. In block 205, the access control driver 89 determines whether the I / O request is a write access or a read access. In the case of read access, the process moves to block 209. The read access process will be described with reference to FIG. Some I / O requests are related to file deletion and file movement. However, if the write access process and read access process according to the present embodiment are described, those processing methods will be understood by those skilled in the art. The explanation will be omitted.

HDD25に対する書き込みデータはこれまでの処理では、仮想HDD61がインターフェースになって仮想化領域53に書き込まれるが、本実施の形態ではすべての書き込みデータを一旦は特定領域51に書き込む。そのために、ブロック207でアクセス・コントロール・ドライバ89は、AMP93を参照して、特定領域51の空いているLBAを探して、ファイル・システム・ドライバ87が割り当てたLBA007に対して特定領域51のLBA001を割り当てる。   In the processing so far, the write data to the HDD 25 is written in the virtual area 53 with the virtual HDD 61 as an interface. In the present embodiment, all the write data is once written in the specific area 51. Therefore, in block 207, the access control driver 89 refers to the AMP 93 to search for an empty LBA in the specific area 51, and for the LBA 007 assigned by the file system driver 87, the LBA001 in the specific area 51. Assign.

ブロック211でアクセス・コントロール・ドライバ89は、特定領域51のLBA001にファイルを書き込むようにディスク・ドライバ91に要求する。ディスク・ドライバ91は特定領域51のLBA001にファイルを記録するようにHDD25に要求する。仮想化プログラム17は、ゲストOS67のHDD25に対するアクセスをトラップしないようにI/O-bitmapにパラメータを設定しているため、ディスク・ドライバ91は仮想化プログラム17を呼び出すことなくIDEコントローラ26を通じて直接特定領域51にファイルを書き込むことができる。よって、本実施の形態ではライト・アクセスの際のすべての書き込みデータに対して、仮想化プログラム17の処理により発生するオーバーヘッドを除去することができる。   In block 211, the access control driver 89 requests the disk driver 91 to write a file to the LBA 001 in the specific area 51. The disk driver 91 requests the HDD 25 to record the file in the LBA001 in the specific area 51. Since the virtualization program 17 sets a parameter in the I / O-bitmap so as not to trap the access to the HDD 25 of the guest OS 67, the disk driver 91 directly specifies it through the IDE controller 26 without calling the virtualization program 17. A file can be written in the area 51. Therefore, in this embodiment, it is possible to remove the overhead generated by the processing of the virtualization program 17 for all write data at the time of write access.

HDD25から書き込み完了の通知を受け取ったディスク・ドライバ91は、ブロック213でアクセス・コントロール・ドライバ89にその旨を通知する。通知を受け取ったアクセス・コントロール・ドライバ89は、ブロック215でAMP93を更新する。すなわち、アクセス・コントロール・ドライバ89は特定領域51に新規にファイルが記録されたので、対応する仮想HDD61のLBA007と特定領域51のLBA001をAMP93に登録しさらに登録日時を書き込む。この時点では、特定領域51のLBA007のファイルは仮想化領域53に記録されていないので更新フラグはリセットする。   The disk driver 91 that has received the write completion notification from the HDD 25 notifies the access control driver 89 to that effect in block 213. The access control driver 89 that has received the notification updates the AMP 93 at block 215. That is, since a new file is recorded in the specific area 51, the access control driver 89 registers the LBA007 of the corresponding virtual HDD 61 and the LBA001 of the specific area 51 in the AMP 93 and further writes the registration date and time. At this time, since the file of LBA007 in the specific area 51 is not recorded in the virtualization area 53, the update flag is reset.

特定領域51は、ライト・リクエストがあったときの書き込みデータを仮想化領域53に代わってすべて記録する領域であり、その記憶容量が小さい場合はゲストOS67に関連するアプリケーションやユーザ・データを書き込めない事態が生ずる。しかし、特定領域51は、CPUやメイン・メモリなどのようなキャッシュとは異なり、電源が喪失しても内容が消えることはないため、データを追加的に記録していく限り残りの記憶容量は少なくなる。   The specific area 51 is an area for recording all the write data at the time of a write request in place of the virtual area 53. When the storage capacity is small, the application and user data related to the guest OS 67 cannot be written. Things happen. However, unlike the cache such as the CPU or the main memory, the specific area 51 does not disappear even if the power is lost. Therefore, as long as data is additionally recorded, the remaining storage capacity is Less.

したがって、特定領域51の記憶容量が仮想HDD61に設定された記憶容量よりも小さい場合は、データを書き込めない事態が生ずる可能性がある。ブロック217では、アクセス・コントロール・ドライバ89がAMP93を参照して、特定領域51の残りの記憶容量が所定値以下か否かを判断する。残りの記憶容量が所定以下の場合は仮想化領域53の更新が必要であると判断してブロック219に移行する。残りの記憶容量が所定値を越える場合は、更新の必要がないのでブロック223に移行する。   Therefore, when the storage capacity of the specific area 51 is smaller than the storage capacity set in the virtual HDD 61, there is a possibility that data cannot be written. In block 217, the access control driver 89 refers to the AMP 93 to determine whether or not the remaining storage capacity of the specific area 51 is equal to or less than a predetermined value. If the remaining storage capacity is equal to or less than the predetermined value, it is determined that the virtualization area 53 needs to be updated, and the process proceeds to block 219. If the remaining storage capacity exceeds the predetermined value, there is no need to update, so the process proceeds to block 223.

ブロック219では、アクセス・コントロール・ドライバ89が、AMP93を参照して更新フラグがリセットされている仮想HDD61と特定領域51のLBAの対を取得する。図5(A)の例では、更新フラグがリセットされている特定領域のLBA001、002に記録されているデータが対象になる。さらにアクセス・コントロール・ドライバ89は、仮想化プログラム17に動作を移すためのシステム・コールを発行し、特定領域51のLBA001、002のデータで、仮想HDD61のLBA007、009に対応する仮想化領域53を更新するようにアクセス・マネージャ101に要求する。   In block 219, the access control driver 89 refers to the AMP 93 to acquire the pair of the virtual HDD 61 whose update flag is reset and the LBA of the specific area 51. In the example of FIG. 5A, data recorded in LBA001 and 002 in the specific area where the update flag is reset is targeted. Further, the access control driver 89 issues a system call for transferring the operation to the virtualization program 17, and the virtualization area 53 corresponding to the LBA 007 and 009 of the virtual HDD 61 with the data of the LBA 001 and 002 in the specific area 51. Is requested to update the access manager 101.

仮想化プログラム17がシステム・コールをトラップすることでCPU21の動作が仮想化プログラム17に移行する。HPAマネージャ102は、自らが動作するときはHPAを設定しないので、ディスク・ドライバ105はHDD25の全体にアクセスすることができる。更新の要求を受けたアクセス・マネージャ101は、ディスク・ドライバ105に特定領域51のLBA001、002からデータを読み取るように要求する。   The operation of the CPU 21 shifts to the virtualization program 17 when the virtualization program 17 traps the system call. Since the HPA manager 102 does not set the HPA when it operates, the disk driver 105 can access the entire HDD 25. Upon receiving the update request, the access manager 101 requests the disk driver 105 to read data from the LBAs 001 and 002 in the specific area 51.

さらにアクセス・マネージャ101は、ファイル・システム・ドライバ103に仮想HDD61のLBA007、009に読み取ったデータを書き込むように要求する。ファイル・システム・ドライバ103は、受け取った仮想HDD61のLBA007、009を仮想化領域53のたとえばLBA101、102といった所定のLBAにマッピングしてディスク・ドライバ105に書き込み要求をする。   Further, the access manager 101 requests the file system driver 103 to write the read data to the LBA007 and 009 of the virtual HDD 61. The file system driver 103 maps the received LBAs 007 and 009 of the virtual HDD 61 to predetermined LBAs such as LBAs 101 and 102 in the virtualization area 53 and issues a write request to the disk driver 105.

LBA101、102は、図2のデータ領域55の一部である。仮想化領域53の更新は、仮想化プログラム17だけで行うので、複数のLBAを更新してもコンテキスト・スイッチングに伴うオーバーヘッドが発生しない。特定領域51に記録されたデータは他の仮想マシンがそこを使用することにより消去されない限り、後にアプリケーション73が仮想HDD61のLBA007、009に対してリード・アクセスをする場合には、読み取りデータを仮想化領域53のLBA101、102から読み出すことができる。   LBAs 101 and 102 are part of the data area 55 in FIG. Since the virtualization area 53 is updated only by the virtualization program 17, no overhead associated with context switching occurs even if a plurality of LBAs are updated. Unless the data recorded in the specific area 51 is deleted when another virtual machine uses it, when the application 73 performs read access to the LBA007 and 009 of the virtual HDD 61 later, the read data is virtualized. The data can be read from the LBAs 101 and 102 in the conversion area 53.

ブロック221では、ディスク・ドライバ105から更新の終了通知を受け取ったアクセス・マネージャ101は、アクセス・コントロール・ドライバ89に更新が終わった仮想HDDのLBA007、009または特定領域51のLBA001、002を通知する。通知を受け取ったアクセス・コントロール・ドライバ89は、AMP93に更新が終わったLBAに対応する更新フラグをセットする。   In block 221, the access manager 101 that has received the update completion notification from the disk driver 105 notifies the access control driver 89 of the updated LBA007, 009 of the virtual HDD or the LBA001, 002 of the specific area 51. . The access control driver 89 that has received the notification sets an update flag corresponding to the LBA that has been updated in the AMP 93.

それ以後は、新たなデータを特定領域51に書き込む際に特定領域51の記憶容量が不足する場合は、更新フラグがセットされている特定領域51のLBAの中で最も過去に更新されたLBAに上書きして特定領域51を使用することができる。上記の手順ではブロック217で、仮想化領域53の更新の要否を特定領域51の残りの記憶容量に基づいて判断したが、前述のように特定領域51は、コンピュータ10の電源喪失に対して安全であるため更新フラグがリセットされた状態が長時間継続しても支障がない。したがって、ブロック217の手順は、特定領域51の残りの記憶容量が不足しない限り、ゲストOS67が発行するコンピュータ10のシャット・ダウン・イベント、CPU21のアイドル・イベント、またはゲストOS67の定期的なタイマー・イベントに基づいて実行してもよい。   Thereafter, when the storage capacity of the specific area 51 is insufficient when writing new data to the specific area 51, the LBA updated most recently among the LBAs of the specific area 51 in which the update flag is set. The specific area 51 can be used by overwriting. In the above procedure, at block 217, it is determined whether or not the virtualization area 53 needs to be updated based on the remaining storage capacity of the specific area 51. Since it is safe, there is no problem even if the state where the update flag is reset continues for a long time. Therefore, as long as the remaining storage capacity of the specific area 51 is not insufficient, the procedure of block 217 is performed as follows: a shutdown event of the computer 10 issued by the guest OS 67, an idle event of the CPU 21, or a periodic timer of the guest OS 67. You may perform based on an event.

ただし、特定領域51にデータを新規に書き込んだり特定領域51のデータを更新したりするタイミングで仮想化領域53を更新すると、仮想化プログラム17でのオーバーヘッドが大きくなるので好ましくない。仮想化領域53の更新は、特定領域51にある程度の量のデータが記録されてからライト・アクセスとは非同期で行うことが望ましい。データをまとめて更新することで、仮想マシン11と仮想化プログラム17との間のコンテキスト・スイッチングに伴うオーバーヘッドを軽減することができる。   However, it is not preferable to update the virtualization area 53 at the timing of newly writing data to the specific area 51 or updating the data in the specific area 51 because the overhead in the virtualization program 17 increases. The virtualization area 53 is preferably updated asynchronously with the write access after a certain amount of data is recorded in the specific area 51. By updating the data collectively, overhead associated with context switching between the virtual machine 11 and the virtualization program 17 can be reduced.

図7は、仮想マシン11がHDD25からファイルを読み出すときの手順を示すフローチャートである。AMP93には、図5(A)のような3つのエントリが登録されているものとする。ブロック301では図6のブロック209につづいて、ファイル・システム・ドライバ87は、プロセスが指定したファイル・パスを仮想HDD61のLBAに変換してアクセス・コントロール・ドライバ89に送る。アクセス・コントロール・ドライバ89は、リード・アクセスにおいて指定されている仮想HDD61のLBAがAMP93に登録されているか否かを判断する。   FIG. 7 is a flowchart illustrating a procedure when the virtual machine 11 reads a file from the HDD 25. Assume that three entries as shown in FIG. 5A are registered in the AMP 93. In block 301, following block 209 in FIG. 6, the file system driver 87 converts the file path specified by the process into the LBA of the virtual HDD 61 and sends it to the access control driver 89. The access control driver 89 determines whether or not the LBA of the virtual HDD 61 designated in the read access is registered in the AMP 93.

リード・リクエストにかかる仮想HDD61のLBAがたとえばLBA009であって、AMP93に登録されている場合は、ブロック303に移行する。ブロック303では、アクセス・コントロール・ドライバ89は、ファイル・システム・ドライバ87から受け取った仮想HDD61のLBA009に対応する特定領域のLBA002をAMP93から取得する。ブロック305でアクセス・コントロール・ドライバ89は、特定領域51のLBA002からファイルを読み取るようにディスク・ドライバ91に要求する。ゲストOS67は特定領域51に直接アクセスしてファイルを読み取り仮想化プログラム17に制御が移行しないためオーバーヘッドを除去することができる。   If the LBA of the virtual HDD 61 related to the read request is, for example, LBA009 and is registered in the AMP 93, the process proceeds to block 303. In block 303, the access control driver 89 acquires from the AMP 93 the LBA 002 in the specific area corresponding to the LBA 009 of the virtual HDD 61 received from the file system driver 87. In block 305, the access control driver 89 requests the disk driver 91 to read the file from the LBA 002 in the specific area 51. Since the guest OS 67 directly accesses the specific area 51 to read the file and the control does not transfer to the virtualization program 17, the overhead can be removed.

ブロック301でリード・リクエストにかかる仮想HDD61のLBAがたとえばLBA011でAMP93に登録されていない場合は、ブロック307に移行する。ブロック307では、アクセス・コントロール・ドライバ89は、ファイル・システム・ドライバ87から受け取ったI/Oリクエストに含まれているLBA011を変更しないでディスク・ドライバ91に送り、仮想化プログラム17に移行するためのシステム・コールを発行するとCPU21の動作が仮想化プログラム17に移行する。   If the LBA of the virtual HDD 61 related to the read request is not registered in the AMP 93 with the LBA 011 in block 301, for example, the process proceeds to block 307. In block 307, the access control driver 89 sends the LBA 011 included in the I / O request received from the file system driver 87 to the disk driver 91 without change, and shifts to the virtualization program 17. When the system call is issued, the operation of the CPU 21 shifts to the virtualization program 17.

リード・リクエストに含まれるLBA011は、ファイル・システム・ドライバ103によりたとえば仮想化領域53のLBA105にマッピングされているものとする。ファイル・システム・ドライバ103は、受け取ったリード・リクエストのLBA011をLBA105に変換してディスク・ドライバ105に送る。ディスク・ドライバ105は、仮想化領域53のLBA105から読み取ったファイルを、アクセス・マネージャ101およびディスク・ドライバ91を経由してアクセス・コントロール・ドライバ89に送る。   It is assumed that the LBA 011 included in the read request is mapped to, for example, the LBA 105 in the virtualization area 53 by the file system driver 103. The file system driver 103 converts the received read request LBA 011 into the LBA 105 and sends it to the disk driver 105. The disk driver 105 sends the file read from the LBA 105 in the virtualization area 53 to the access control driver 89 via the access manager 101 and the disk driver 91.

リード・リクエストにかかるファイルを受け取ったアクセス・コントロール・ドライバ89はブロック309で、AMP93に図5(B)に示すように仮想HDD61のLBA011を登録する。ただし、この時点では、特定領域51には、仮想化領域53のLBA105のファイルが記録されていないので、仮想HDD61のLBA011に対応する特定領域51のLBAのエントリは空白である。読み取ったファイルの仮想HDD61のエントリだけをAMP93に登録してから、アクセス・コントロール・ドライバ89は受け取ったファイルをアプリケーション73に渡す。   The access control driver 89 that has received the file related to the read request registers the LBA 011 of the virtual HDD 61 in the AMP 93 as shown in FIG. However, at this time, since the file of the LBA 105 of the virtual area 53 is not recorded in the specific area 51, the LBA entry of the specific area 51 corresponding to the LBA 011 of the virtual HDD 61 is blank. After registering only the entry of the read virtual HDD 61 in the AMP 93, the access control driver 89 passes the received file to the application 73.

ブロック309までの手順によれば、仮想化領域53から読み出されてかつ特定領域51に書き込まれていないデータが存在する。直近にアクセスをされたデータは近いうちに再度アクセスされる可能性が高い。よって、本実施の形態では、一旦仮想化領域53から読み取ったデータを特定領域51に記録して、次回以降のリード・アクセスに対しては、特定領域51からの読み取りを可能にする。ただし、読み取りのたびに特定領域51を更新したのではオーバーヘッドが大きくなるので、仮想化領域53からの読み取り処理と特定領域51への書き込み処理は非同期または異なるタイミングで行う。   According to the procedure up to block 309, there is data that has been read from the virtualization area 53 and not written to the specific area 51. The data accessed most recently is likely to be accessed again soon. Therefore, in the present embodiment, data once read from the virtualization area 53 is recorded in the specific area 51, and reading from the specific area 51 is enabled for the next and subsequent read accesses. However, if the specific area 51 is updated each time reading is performed, the overhead becomes large. Therefore, the reading process from the virtualization area 53 and the writing process to the specific area 51 are performed asynchronously or at different timings.

ブロック311では、アクセス・コントロール・ドライバ89が、特定領域51のデータを更新する必要があるか否かを判断する。判断は、ゲストOS67が発行する、一定の時間インターバルが経過したことを示すイベント、シャット・ダウンを示すイベント、またはCPU21のアイドル状態を示すイベントなどに基づいて行うことができる。ブロック313では、特定領域51の更新の必要性を示すイベントをゲストOS67の所定のモジュールから受け取ったアクセス・コントロール・ドライバ89は、AMP93を参照して特定領域51が空のエントリを検索し、仮想HDD61のLBA011を取得する。   In block 311, the access control driver 89 determines whether or not the data in the specific area 51 needs to be updated. The determination can be made based on an event issued by the guest OS 67 indicating that a certain time interval has passed, an event indicating shutdown, an event indicating the idle state of the CPU 21, or the like. In block 313, the access control driver 89 that has received an event indicating the necessity of updating the specific area 51 from a predetermined module of the guest OS 67 refers to the AMP 93 to search for an entry in which the specific area 51 is empty. The LBA 011 of the HDD 61 is acquired.

アクセス・コントロール・ドライバ89は、仮想HDD61のLBA011に特定領域51の空いているアドレスであるLBA004を割り当てる。アクセス・コントロール・ドライバ89は、HDD25にアクセスするための内部サポート関数を呼んで、仮想HDD61のLBA011を経由して仮想化領域のLBA105からファイルを読み取り、さらに読み取ったファイルを特定領域51のLBA004に記録するようにディスク・ドライバ91に要求する。ディスク・ドライバ91は、仮想化プログラム17を経由して仮想化領域53からファイルを読み取り、直接特定領域51に書き込む。その結果、特定領域51の前回の更新から今回の更新までの間に仮想化領域53から読み取られたLBA105のデータは、特定領域51のLBA004に書き込まれる。   The access control driver 89 assigns LBA004, which is a free address in the specific area 51, to the LBA011 of the virtual HDD 61. The access control driver 89 calls an internal support function for accessing the HDD 25, reads a file from the LBA 105 in the virtualization area via the LBA 011 of the virtual HDD 61, and further reads the read file to the LBA 004 in the specific area 51. Requests the disk driver 91 to record. The disk driver 91 reads a file from the virtualization area 53 via the virtualization program 17 and writes it directly to the specific area 51. As a result, the data of the LBA 105 read from the virtualization area 53 between the previous update of the specific area 51 and the current update is written to the LBA 004 of the specific area 51.

ブロック315では、ディスク・ドライバ91が特定領域51への書き込みが終了したことをアクセス・コントロール・ドライバ89に通知する。通知を受け取ったアクセス・コントロール・ドライバ89は、図5(C)に示すようにAMP93に仮想HDD61のLBA011に対応させて特定領域51のLBA004を登録し、かつ、更新フラグをセットする。アクセス・コントロール・ドライバ89は、同時にAMP93に登録日時を書き込む。   In block 315, the disk driver 91 notifies the access control driver 89 that the writing to the specific area 51 has been completed. The access control driver 89 that has received the notification registers the LBA 004 of the specific area 51 in association with the LBA 011 of the virtual HDD 61 in the AMP 93 as shown in FIG. 5C, and sets an update flag. The access control driver 89 simultaneously writes the registration date / time in the AMP 93.

[ミラーリング方式]
図8は、ミラーリング方式でHDD25にアクセスするディスク・アクセス制御システム300を構成するソフトウエアおよびハードウエアの機能ブロック図である。ディスク・アクセス制御システム300が図4のディスク・アクセス制御システム100と異なる点は、アクセス・コントロール・ドライバ301およびアクセス・マネージャ305の機能、AMP303のデータ構造、および特定領域307の容量である。以下、この相違点を中心に説明する。
[Mirroring method]
FIG. 8 is a functional block diagram of software and hardware constituting the disk access control system 300 that accesses the HDD 25 by the mirroring method. The disk access control system 300 is different from the disk access control system 100 of FIG. 4 in the functions of the access control driver 301 and the access manager 305, the data structure of the AMP 303, and the capacity of the specific area 307. Hereinafter, this difference will be mainly described.

図9(A)は、ミラーリング方式による特定領域307と仮想HDD61のアドレス関係を示す図である。ミラーリング方式では、特定領域307に仮想HDD61のディスク・イメージをコピーする。したがって仮想化プログラム17は、特定領域307の記憶容量が仮想化領域309のなかで仮想マシン11に割り当てられたデータ領域55の記憶容量以上になるようにパラメータを設定してSet max addressコマンドを発行する。ここでは、特定領域307がHDD25のLBA000〜LBAxxxに設定されるものとする。   FIG. 9A is a diagram showing the address relationship between the specific area 307 and the virtual HDD 61 by the mirroring method. In the mirroring method, the disk image of the virtual HDD 61 is copied to the specific area 307. Therefore, the virtualization program 17 sets the parameters so that the storage capacity of the specific area 307 is equal to or larger than the storage capacity of the data area 55 allocated to the virtual machine 11 in the virtualization area 309 and issues a Set max address command. To do. Here, it is assumed that the specific area 307 is set to LBA000 to LBAxxx of the HDD 25.

そして、仮想化プログラム17は、仮想HDD61を通じてファイル・システム・ドライバ87に特定領域307と同じアドレス範囲のLBA000〜LBAxxxのインターフェースを提供する。また図9(B)に示すように、AMP303には仮想HDD61のLBAと特定領域307のLBAが同じアドレスでマッピングされるので、共通のLBAだけが登録される。アクセス・コントロール・ドライバ301とアクセス・マネージャ305の機能については、図10、図11の手順に基づいて説明する。登録日時は、AMP303にエントリを登録したタイミングでアクセス・コントロール・ドライバ301が記録する。   Then, the virtualization program 17 provides the file system driver 87 through the virtual HDD 61 with an interface of LBA000 to LBAxxx having the same address range as the specific area 307. As shown in FIG. 9B, since the LBA of the virtual HDD 61 and the LBA of the specific area 307 are mapped with the same address in the AMP 303, only the common LBA is registered. The functions of the access control driver 301 and the access manager 305 will be described based on the procedures in FIGS. The registration date and time is recorded by the access control driver 301 at the timing when the entry is registered in the AMP 303.

図10は、アプリケーション73がHDD25にファイルを記録するときの手順を示すフローチャートである。ブロック401〜405およびブロック409は、図6のブロック201〜205およびブロック209の手順と同じである。ミラーリング方式では、所定のファイルの記録場所としてファイル・システム・ドライバ87が提供する仮想HDD61のLBAは、特定領域307のLBAに一致する。ブロック407では、アクセス・コントロール・ドライバ301は、ファイル・システム・ドライバ87から受け取ったLBA007を変更しないで、ディスク・ドライバ91に特定領域307のLBA007に記録するように要求する。このときアクセス・コントロール・ドライバ301は、仮想化ドライバ17に遷移するためのシステム・コールを発行しない。   FIG. 10 is a flowchart showing a procedure when the application 73 records a file in the HDD 25. Blocks 401 to 405 and 409 are the same as the procedures of blocks 201 to 205 and block 209 in FIG. In the mirroring method, the LBA of the virtual HDD 61 provided by the file system driver 87 as a predetermined file recording location matches the LBA of the specific area 307. In block 407, the access control driver 301 requests the disk driver 91 to record the LBA 007 in the specific area 307 without changing the LBA 007 received from the file system driver 87. At this time, the access control driver 301 does not issue a system call for making a transition to the virtualization driver 17.

ファイルを記録する特定領域307のLBAと仮想HDD61のLBAは一致しているので、アクセス・コントロール・ドライバ301はファイル転送方式のようにAMP93を参照して特定領域307の空いているLBAを探す必要はない。要求を受け取ったディスク・ドライバ91はHDD25に、特定領域307のLBA007にファイルを書き込む要求をする。仮想マシン11が動作する間は、HPAマネージャ102は仮想化領域309だけをHPAに設定するので、ディスク・ドライバ91は特定領域307にファイルを書き込むことができる。   Since the LBA of the specific area 307 in which the file is recorded and the LBA of the virtual HDD 61 match, the access control driver 301 needs to search for an empty LBA in the specific area 307 by referring to the AMP 93 as in the file transfer method. There is no. Receiving the request, the disk driver 91 requests the HDD 25 to write a file to the LBA 007 in the specific area 307. While the virtual machine 11 is operating, the HPA manager 102 sets only the virtualization area 309 to HPA, so that the disk driver 91 can write a file in the specific area 307.

ブロック407ではアクセス・コントロール・ドライバ301が、ディスク・ドライバ61から書き込み完了の通知を受け取り、ブロック411でAMP303にLBA007を登録する。さらにアクセス・コントロール・ドライバ301は仮想化領域309には仮想HDD61のLBA007に対応する場所にファイルが記録されていないので、LBA007の更新フラグをセットしないか、もしセットされていればリセットする。   In block 407, the access control driver 301 receives a write completion notification from the disk driver 61, and registers LBA007 in the AMP 303 in block 411. Further, since no file is recorded in the virtual area 61 corresponding to the LBA007 in the virtual HDD 61, the access control driver 301 does not set the update flag of the LBA007 or resets it if it is set.

ブロック413では、アクセス・コントロール・ドライバ301が仮想化領域309の更新が必要か否かを判断する。特定領域307には仮想マシン11に割り当てられた仮想化領域309のすべてのデータを記憶できる記憶容量が設定されているので、特定領域307を仮想マシン11が専有する限りは、仮想化領域309を更新する必要はない。しかし、特定領域307は他の仮想マシン13、15も使用することがあるので、アクセス・コントロール・ドライバ301はゲストOS67のモジュールからシャット・ダウンの通知または仮想マシン11を停止する通知を受け取ったときに更新が必要であると判断する。   In block 413, the access control driver 301 determines whether or not the virtualization area 309 needs to be updated. Since the specific area 307 is set with a storage capacity capable of storing all the data of the virtualization area 309 assigned to the virtual machine 11, the virtual area 11 is not limited as long as the virtual machine 11 occupies the specific area 307. There is no need to update. However, since the specific area 307 may also use other virtual machines 13 and 15, the access control driver 301 receives a shutdown notification or a notification of stopping the virtual machine 11 from the guest OS 67 module. It is determined that the update is necessary.

更新が必要な場合は、ブロック415に移行してアクセス・コントロール・ドライバ301は、AMP303から更新フラグがリセットされているLBAを取得して、特定領域307のデータで仮想化領域309を更新する要求をアクセス・マネージャ305に送る。アクセス・マネージャ305は、図6のブロック219と同じ手順で仮想化領域309を更新する。   If an update is necessary, the process proceeds to block 415, and the access control driver 301 obtains the LBA whose update flag is reset from the AMP 303 and requests to update the virtualization area 309 with the data in the specific area 307. To the access manager 305. The access manager 305 updates the virtualization area 309 in the same procedure as the block 219 in FIG.

ブロック417では、ディスク・ドライバ105から更新の終了通知を受け取ったアクセス・マネージャ305は、アクセス・コントロール・ドライバ89に更新が終わったLBAを通知する。通知を受け取ったアクセス・コントロール・ドライバ89は、更新が終わったデータに対応するLBAの更新フラグをセットする。ブロック409におけるリード・アクセスの処理手順は、図7に示したファイル転送方式におけるリード・アクセスの処理手順に準じて行うことができる。   In block 417, the access manager 305 that has received the update completion notification from the disk driver 105 notifies the access control driver 89 of the updated LBA. The access control driver 89 that has received the notification sets the update flag of the LBA corresponding to the data that has been updated. The read access processing procedure in block 409 can be performed in accordance with the read access processing procedure in the file transfer method shown in FIG.

[その他の特徴]
これまで、特定領域51、307はいずれか一つの仮想マシンだけが専有することを前提にして説明した。この場合、仮想化プログラム17上で仮想マシン11、13、15が時分割で動作する場合には、特定領域51、307を専有するいずれか1つの仮想マシンだけがHDD25に高速にアクセスすることができる。本発明では、特定領域51、307を複数の論理ブロックに分割して、それぞれを各仮想マシンに割り当てることにより時分割で動作している複数の仮想マシンが特定領域51を利用することができる。また、分割した特定領域51、307を各仮想マシン11、13、15に割り当てることで、特定領域51、307を初期化する必要をなくして、リード・アクセスに対するデータ・ヒット率を高めることができる。
[Other features]
So far, the specific areas 51 and 307 have been described on the assumption that only one of the virtual machines is occupied. In this case, when the virtual machines 11, 13, and 15 operate on the virtualization program 17 in a time-sharing manner, only one of the virtual machines that occupy the specific areas 51 and 307 can access the HDD 25 at high speed. it can. In the present invention, the specific areas 51 and 307 are divided into a plurality of logical blocks, and each is assigned to each virtual machine, so that a plurality of virtual machines operating in time division can use the specific area 51. Further, by assigning the divided specific areas 51 and 307 to the virtual machines 11, 13, and 15, it is not necessary to initialize the specific areas 51 and 307, and the data hit rate for read access can be increased. .

本発明では、HDD25が仮想化プログラムと複数の仮想マシンを構成するプログラムを格納する場合にも、HPAを設定することで仮想化領域53、309のデータの安全を確保することができる。このような特徴は、1台のHDDに設けられた仮想化領域53、309にデータを格納する場合に限定されない。たとえば、ファイル・サーバやワーク・ステーションなどにはRAID(Redundant Arrays of Independent Disks)というシステムが採用されている。   In the present invention, even when the HDD 25 stores a virtualization program and a program constituting a plurality of virtual machines, the data in the virtualization areas 53 and 309 can be secured by setting the HPA. Such a feature is not limited to the case where data is stored in the virtualization areas 53 and 309 provided in one HDD. For example, a system called RAID (Redundant Arrays of Independent Disks) is employed for file servers, work stations, and the like.

RAIDでは、複数のHDDを仮想化して一つの論理ディスクを構築し、仮想化プログラムはそれらを1台のHDDとして認識してアクセスすることができる。RAIDを実現する方法には、ハードウエアによる方法とソフトウエアによる方法がある。ハードウエアによる方法に採用する場合は仮想化プログラムが各HDDにHPAを設定するコマンドを送るように変更することで、本発明を適用することができる。また、ソフトウエアによる方法に採用する場合は、特定領域については冗長記録ができなくなる場合も生ずるが、非同期的に特定領域から冗長記録が行われる仮想化領域にデータを転送することにより、高速アクセスを優先する用途には有利である。   In RAID, a plurality of HDDs are virtualized to construct one logical disk, and the virtualization program can recognize and access them as one HDD. As a method for realizing RAID, there are a hardware method and a software method. When adopting the method by hardware, the present invention can be applied by changing the virtualization program so as to send a command for setting the HPA to each HDD. Also, when adopting the software method, redundant recording may not be possible for a specific area, but high-speed access can be achieved by transferring data asynchronously from a specific area to a virtual area where redundant recording is performed. It is advantageous for applications in which priority is given.

これまで本発明について図面に示した特定の実施の形態をもって説明してきたが、本発明は図面に示した実施の形態に限定されるものではなく、本発明の効果を奏する限り、これまで知られたいかなる構成であっても採用することができることはいうまでもないことである。   Although the present invention has been described with the specific embodiments shown in the drawings, the present invention is not limited to the embodiments shown in the drawings, and is known so far as long as the effects of the present invention are achieved. It goes without saying that any configuration can be adopted.

10…コンピュータ
11、13、15…仮想マシン
17…仮想化プログラム
19…ハードウエア
51、307…特定領域
53、309…仮想化領域
61、63、65…仮想HDD
67、69、71…ゲストOS
93、303…アドレス・マッピング・テーブル(AMP)
100、300…ディスク・アクセス制御システム
DESCRIPTION OF SYMBOLS 10 ... Computer 11, 13, 15 ... Virtual machine 17 ... Virtualization program 19 ... Hardware 51, 307 ... Specific area 53, 309 ... Virtualization area 61, 63, 65 ... Virtual HDD
67, 69, 71 ... Guest OS
93, 303 ... Address mapping table (AMP)
100, 300 ... disk access control system

Claims (19)

ディスク・ドライブを搭載し、仮想化プログラムと仮想マシンで仮想化環境が形成されているコンピュータに、
前記仮想マシンがアクセスすることができる特定領域と前記仮想マシンがアクセスすることができない仮想化領域を前記ディスク・ドライブに、前記コンピュータの動作が前記仮想マシンと前記仮想化プログラムの間で遷移する際に、前記仮想マシンが動作している間は前記仮想マシンが前記特定領域だけにアクセス可能になるように設定し、前記仮想化プログラムが動作している間は前記特定領域と前記仮想化領域にアクセスが可能になるように設定するステップ、
前記仮想化領域に対するI/Oリクエストを開始するステップと、
前記I/Oリクエストが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断するステップと、
前記ライト・アクセスであると判断したときに書き込みデータを前記特定領域に書き込むステップと
を有する処理を実行させるコンピュータ・プログラム。
On a computer that has a disk drive and a virtualization environment formed by a virtualization program and a virtual machine,
When a specific area that can be accessed by the virtual machine and a virtual area that cannot be accessed by the virtual machine are transferred to the disk drive, and the operation of the computer transits between the virtual machine and the virtualization program. In addition, the virtual machine is set to be accessible only to the specific area while the virtual machine is operating, and the specific area and the virtualization area are set while the virtualization program is operating. Steps to allow access ,
Initiating an I / O request for the virtualized area;
Determining whether the I / O request is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
A computer program for executing a process including a step of writing write data in the specific area when it is determined that the access is the write access.
前記設定するステップが、前記仮想化プログラムがATAのSet max addressコマンドを実行するステップを含む請求項1に記載のコンピュータ・プログラム。 The computer program product of claim 1 , wherein the setting step includes the step of the virtualization program executing an ATA Set max address command. ディスク・ドライブを搭載し、仮想化プログラムと仮想マシンで仮想化環境が形成されているコンピュータに、
複数の前記仮想マシンにそれぞれ専用に割り当てた複数の論理ブロックを含み前記仮想マシンがアクセスすることができる特定領域と、前記仮想マシンがアクセスすることができない仮想化領域を前記ディスク・ドライブに設定するステップと、
前記仮想化領域に対するI/Oリクエストを開始するステップと、
前記I/Oリクエストが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断するステップと、
前記ライト・アクセスであると判断したときに書き込みデータを前記特定領域に書き込むステップと
を有する処理を実行させるコンピュータ・プログラム。
On a computer that has a disk drive and a virtualization environment formed by a virtualization program and a virtual machine,
A specific area that includes a plurality of logical blocks allocated exclusively to a plurality of virtual machines and that can be accessed by the virtual machine, and a virtual area that cannot be accessed by the virtual machine are set in the disk drive. Steps,
Initiating an I / O request for the virtualized area;
Determining whether the I / O request is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
A computer program for executing a process including a step of writing write data in the specific area when it is determined that the access is the write access.
ディスク・ドライブを搭載し、仮想化プログラムと仮想マシンで仮想化環境が形成されているコンピュータに、
前記仮想マシンがアクセスすることができる特定領域と前記仮想マシンがアクセスすることができない仮想化領域を前記ディスク・ドライブに設定するステップと、
前記仮想化領域に対するI/Oリクエストを開始するステップと、
前記I/Oリクエストが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断するステップと、
前記ライト・アクセスであると判断したときに書き込みデータを前記特定領域に書き込むステップと、
前記ライト・アクセスと非同期で前記仮想化領域を前記特定領域に記録されたデータで更新するステップと
を有する処理を実行させるコンピュータ・プログラム。
On a computer that has a disk drive and a virtualization environment formed by a virtualization program and a virtual machine,
Setting a specific area that the virtual machine can access and a virtual area that the virtual machine cannot access to the disk drive;
Initiating an I / O request for the virtualized area;
Determining whether the I / O request is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
Writing write data to the specific area when it is determined that the write access; and
A computer program that executes a process including: updating the virtual area with data recorded in the specific area asynchronously with the write access .
前記更新するステップを前記仮想化プログラムが実行する請求項4に記載のコンピュータ・プログラム。 The computer program according to claim 4 , wherein the virtualization program executes the updating step. ディスク・ドライブを搭載し、仮想化プログラムと仮想マシンで仮想化環境が形成されているコンピュータに、
前記仮想マシンがアクセスすることができる特定領域と前記仮想マシンがアクセスすることができない仮想化領域を前記ディスク・ドライブに設定するステップと、
前記仮想化領域に対するI/Oリクエストを開始するステップと、
前記I/Oリクエストが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断するステップと、
前記ライト・アクセスであると判断したときに書き込みデータを前記特定領域に書き込むステップと、
前記リード・アクセスであると判断したときに読み取りデータが前記特定領域に記録されているか否かを判断するステップと、
前記特定領域に記録されていると判断したときに、前記仮想マシンが前記特定領域からデータを読み取るステップと
を有する処理を実行させるコンピュータ・プログラム。
On a computer that has a disk drive and a virtualization environment formed by a virtualization program and a virtual machine,
Setting a specific area that the virtual machine can access and a virtual area that the virtual machine cannot access to the disk drive;
Initiating an I / O request for the virtualized area;
Determining whether the I / O request is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
Writing write data to the specific area when it is determined that the write access; and
Determining whether read data is recorded in the specific area when it is determined to be the read access;
A computer program that executes a process including a step of reading data from the specific area when the virtual machine is determined to be recorded in the specific area .
特定領域に記録されていないと判断したときに、前記仮想マシンが前記仮想化領域からデータを読み取るステップを有する請求項6に記載のコンピュータ・プログラム。 The computer program according to claim 6 , further comprising: reading data from the virtualized area when the virtual machine determines that the data is not recorded in the specific area. 前記仮想化領域から読み取ったデータを前記リード・アクセスと非同期で前記特定領域に記録するステップを有する請求項6または請求項7に記載のコンピュータ・プログラム。 8. The computer program according to claim 6 , further comprising a step of recording data read from the virtual area in the specific area asynchronously with the read access. 仮想化レイヤの上で仮想マシンが動作する仮想化環境の実現が可能なコンピュータであって、
前記仮想マシンがアクセスすることができる特定領域と前記仮想マシンがアクセスすることができない仮想化領域が設定されたディスク・ドライブと、
前記ディスク・ドライブに対するインターフェースを構成するディスク・コントローラ
前記ディスク・コントローラに対するI/Oリクエストを発行するリクエスト部と、
前記I/Oリクエストがライト・アクセスかリード・アクセスかを判断し、前記ライト・アクセスであると判断したときに、書き込みデータを前記特定領域に書き込むアクセス制御部と、
前記仮想マシンが動作している間は前記特定領域だけがアクセス可能になるように前記ディスク・コントローラを制御し、前記仮想化プログラムが動作している間は前記ディスク・コントローラに対するアクセス制限を解除するように制御する記憶領域制御部と
を有するコンピュータ。
A computer capable of realizing a virtual environment in which a virtual machine operates on a virtualization layer,
A specific area that the virtual machine can access and a disk drive in which a virtual area that the virtual machine cannot access is set;
A disk controller which constitutes an interface to the disk drives,
A request unit for issuing an I / O request to the disk controller;
Determining whether the I / O request is a write access or a read access, and when determining that the I / O request is the write access, an access control unit that writes write data to the specific area;
The disk controller is controlled so that only the specific area can be accessed while the virtual machine is operating, and the access restriction on the disk controller is released while the virtualization program is operating. And a storage area control unit for controlling the computer.
仮想化レイヤの上で仮想マシンが動作する仮想化環境の実現が可能なコンピュータであって、
前記仮想マシンがアクセスすることができる特定領域と前記仮想マシンがアクセスすることができない仮想化領域が設定されたディスク・ドライブと、
前記ディスク・ドライブに対するインターフェースを構成するディスク・コントローラ
前記ディスク・コントローラに対するI/Oリクエストを発行するリクエスト部と、
前記I/Oリクエストがライト・アクセスかリード・アクセスかを判断し、前記ライト・アクセスであると判断したときに、書き込みデータを前記特定領域に書き込むアクセス制御部と、
前記ライト・アクセスのタイミングとは異なるタイミングで前記仮想化領域を前記特定領域に書き込まれたデータで更新する更新処理部と
を有するコンピュータ。
A computer capable of realizing a virtual environment in which a virtual machine operates on a virtualization layer,
A specific area that the virtual machine can access and a disk drive in which a virtual area that the virtual machine cannot access is set;
A disk controller which constitutes an interface to the disk drives,
A request unit for issuing an I / O request to the disk controller;
Determining whether the I / O request is a write access or a read access, and when determining that the I / O request is the write access, an access control unit that writes write data to the specific area;
A computer having an update processing unit that updates the virtualized area with data written in the specific area at a timing different from the timing of the write access .
仮想化レイヤの上で仮想マシンが動作する仮想化環境の実現が可能なコンピュータであって、
前記仮想マシンがアクセスすることができる特定領域と前記仮想マシンがアクセスすることができない仮想化領域が設定されたディスク・ドライブと、
前記ディスク・ドライブに対するインターフェースを構成するディスク・コントローラ
前記ディスク・コントローラに対するI/Oリクエストを発行するリクエスト部と、
前記I/Oリクエストがライト・アクセスかリード・アクセスかを判断し、前記ライト・アクセスであると判断したときに書き込みデータを前記特定領域に書き込み、前記リード・アクセスであると判断したときに前記特定領域に読み取りにかかるデータが存在するか否かを判断しデータが存在すると判断した場合は前記特定領域から読み取るアクセス制御部と
を有するコンピュータ。
A computer capable of realizing a virtual environment in which a virtual machine operates on a virtualization layer,
A specific area that the virtual machine can access and a disk drive in which a virtual area that the virtual machine cannot access is set;
A disk controller which constitutes an interface to the disk drives,
A request unit for issuing an I / O request to the disk controller;
It is determined whether the I / O request is a write access or a read access. When it is determined that the I / O request is the write access, write data is written in the specific area, and when it is determined that the I / O request is the read access, A computer having an access control unit that determines whether or not data to be read exists in a specific area and reads data from the specific area when it is determined that data exists .
前記アクセス制御部は、前記特定領域にデータが存在しないと判断した場合は前記仮想化領域からデータを読み取る請求項11に記載のコンピュータ。 The computer according to claim 11 , wherein the access control unit reads data from the virtualization area when it is determined that no data exists in the specific area. 前記アクセス制御部は、前記リード・アクセスのタイミングとは異なるタイミングで前記仮想化領域から読み取られたデータを前記特定領域に書き込む請求項11または請求項12に記載のコンピュータ。 The computer according to claim 11 or 12 , wherein the access control unit writes data read from the virtualized area to the specific area at a timing different from the timing of the read access. 仮想化レイヤの上で仮想マシンが動作する仮想化環境の実現が可能なコンピュータであって、
複数の前記仮想マシンにそれぞれ専用に割り当てた複数の論理ブロックを含み前記仮想マシンがアクセスすることができる特定領域と、前記仮想マシンがアクセスすることができない仮想化領域が設定されたディスク・ドライブと、
前記ディスク・ドライブに対するインターフェースを構成するディスク・コントローラ
前記ディスク・コントローラに対するI/Oリクエストを発行するリクエスト部と、
前記I/Oリクエストがライト・アクセスかリード・アクセスかを判断し、前記ライト・アクセスであると判断したときに、書き込みデータを前記特定領域に書き込むアクセス制御部と
を有するコンピュータ。
A computer capable of realizing a virtual environment in which a virtual machine operates on a virtualization layer,
A specific area that includes a plurality of logical blocks dedicated to each of the plurality of virtual machines and that can be accessed by the virtual machine, and a disk drive in which a virtual area that the virtual machine cannot access is set ,
A disk controller which constitutes an interface to the disk drives,
A request unit for issuing an I / O request to the disk controller;
A computer comprising: an access control unit that determines whether the I / O request is a write access or a read access, and writes write data to the specific area when the I / O request is determined to be the write access.
仮想化環境が実現されているコンピュータにおいてディスク・ドライブにアクセスする方法であって、
仮想化プログラムが前記コンピュータに、ゲストOSが前記ディスク・ドライブにアクセスすることができる特定領域と前記ゲストOSが前記ディスク・ドライブにアクセスすることができない仮想化領域を、前記ゲストOSが動作する間は前記ディスク・ドライブの一部の記憶領域へのアクセスを制限し前記仮想化プログラムが動作する間は前記アクセス制限を解除するように設定する機能を実現させるステップと、
アプリケーション・プログラムが前記コンピュータに前記仮想化領域に対するアクセスを開始する機能を実現させるステップと、
前記ゲストOSが前記コンピュータに前記アクセスが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断する機能を実現させるステップと、
前記ライト・アクセスであると判断したときに仮想化プログラムが前記コンピュータに書き込みデータを前記特定領域に書き込む機能を実現させるステップと
を有する方法。
A method of accessing a disk drive in a computer in which a virtualized environment is realized, comprising:
While the guest OS operates the virtualization program in the computer, a specific area where the guest OS can access the disk drive and a virtualization area where the guest OS cannot access the disk drive Realizing a function of restricting access to a part of the storage area of the disk drive and setting the access restriction to be released while the virtualization program is operating ;
An application program causing the computer to realize a function of starting access to the virtualization area;
The guest OS causing the computer to realize a function of determining whether the access is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
A method in which a virtualization program realizes a function of writing write data to the specific area in the computer when it is determined that the write access is made.
前記書き込む機能を実現させるステップが、ゲストOSが決定した仮想ディスク・ドライブのアドレスと同じアドレスの前記特定領域に書き込ませる請求項15に記載の方法。 The method according to claim 15 , wherein the step of realizing the writing function causes the writing to the specific area at the same address as the address of the virtual disk drive determined by the guest OS. 仮想化環境が実現されているコンピュータにおいてディスク・ドライブにアクセスする方法であって、
仮想化プログラムが前記コンピュータにゲストOSが前記ディスク・ドライブにアクセスすることができる特定領域と前記ゲストOSが前記ディスク・ドライブにアクセスすることができない仮想化領域を設定する機能を実現させるステップと、
アプリケーション・プログラムが前記コンピュータに前記仮想化領域に対するアクセスを開始する機能を実現させるステップと、
前記ゲストOSが前記コンピュータに前記アクセスが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断する機能を実現させるステップと、
前記ライト・アクセスであると判断したときに仮想化プログラムが前記コンピュータに書き込みデータを前記特定領域に書き込む機能を実現させるステップと、
前記ゲストOSが前記コンピュータに前記ライト・アクセスのタイミングとは異なるタイミングで前記特定領域に書き込まれたデータを前記仮想化領域に書き込む機能を実現させるステップと
を有する方法。
A method of accessing a disk drive in a computer in which a virtualized environment is realized, comprising:
A step of realizing a function of setting a specific area in which the guest OS can access the disk drive and a virtual area in which the guest OS cannot access the disk drive by the virtualization program;
An application program causing the computer to realize a function of starting access to the virtualization area;
The guest OS causing the computer to realize a function of determining whether the access is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
Realizing the function of the virtualization program writing the write data to the specific area in the computer when it is determined that the write access;
The guest OS causing the computer to realize a function of writing data written in the specific area to the virtual area at a timing different from the timing of the write access .
仮想化環境が実現されているコンピュータにおいてディスク・ドライブにアクセスする方法であって、A method of accessing a disk drive in a computer in which a virtualized environment is realized, comprising:
仮想化プログラムが前記コンピュータに、複数の前記仮想マシンにそれぞれ専用に割り当てた複数の論理ブロックを含みゲストOSが前記ディスク・ドライブにアクセスすることができる特定領域と前記ゲストOSが前記ディスク・ドライブにアクセスすることができない仮想化領域を設定する機能を実現させるステップと、  A specific area in which a virtualization program includes a plurality of logical blocks dedicated to each of the plurality of virtual machines and the guest OS can access the disk drive, and the guest OS is stored in the disk drive. Realizing a function of setting a virtual area that cannot be accessed;
アプリケーション・プログラムが前記コンピュータに前記仮想化領域に対するアクセスを開始する機能を実現させるステップと、  An application program causing the computer to realize a function of starting access to the virtualization area;
前記ゲストOSが前記コンピュータに前記アクセスが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断する機能を実現させるステップと、  The guest OS causing the computer to realize a function of determining whether the access is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
前記ライト・アクセスであると判断したときに仮想化プログラムが前記コンピュータに書き込みデータを前記特定領域に書き込む機能を実現させるステップと  Realizing a function of causing the computer to write write data to the specific area when the virtualization program determines that it is the write access;
を有する方法。Having a method.
仮想化環境が実現されているコンピュータにおいてディスク・ドライブにアクセスする方法であって、A method of accessing a disk drive in a computer in which a virtualized environment is realized, comprising:
仮想化プログラムが前記コンピュータにゲストOSが前記ディスク・ドライブにアクセスすることができる特定領域と前記ゲストOSが前記ディスク・ドライブにアクセスすることができない仮想化領域を設定する機能を実現させるステップと、  A step of realizing a function of setting a specific area in which the guest OS can access the disk drive and a virtual area in which the guest OS cannot access the disk drive by the virtualization program;
アプリケーション・プログラムが前記コンピュータに前記仮想化領域に対するアクセスを開始する機能を実現させるステップと、  An application program causing the computer to realize a function of starting access to the virtualization area;
前記ゲストOSが前記コンピュータに前記アクセスが前記仮想化領域にデータを書き込むライト・アクセスか前記仮想化領域からデータを読み取るリード・アクセスかを判断する機能を実現させるステップと、  The guest OS causing the computer to realize a function of determining whether the access is a write access for writing data to the virtualization area or a read access for reading data from the virtualization area;
前記ライト・アクセスであると判断したときに仮想化プログラムが前記コンピュータに書き込みデータを前記特定領域に書き込む機能を実現させるステップと、  Realizing the function of the virtualization program writing the write data to the specific area in the computer when it is determined that the write access;
前記リード・アクセスであると判断したときに前記仮想化プログラムが前記コンピュータに読み取りデータが前記特定領域に記録されているか否かを判断する機能を実現させるステップと、  Realizing the function of determining whether the virtualized program is recorded in the specific area or not when the virtualization program determines that the read access is performed;
前記特定領域に記録されていると判断したときに、前記仮想化プログラムが前記コンピュータに前記仮想マシンが前記特定領域からデータを読み取る機能を実現させるステップと  The virtual program causing the computer to realize a function of reading data from the specific area when it is determined that the virtual program is recorded in the specific area;
を有する方法。Having a method.
JP2010178219A 2010-08-07 2010-08-07 Method and computer for accessing disk drive in computer with virtualized environment Active JP5468490B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010178219A JP5468490B2 (en) 2010-08-07 2010-08-07 Method and computer for accessing disk drive in computer with virtualized environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010178219A JP5468490B2 (en) 2010-08-07 2010-08-07 Method and computer for accessing disk drive in computer with virtualized environment

Publications (2)

Publication Number Publication Date
JP2012038117A JP2012038117A (en) 2012-02-23
JP5468490B2 true JP5468490B2 (en) 2014-04-09

Family

ID=45850050

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010178219A Active JP5468490B2 (en) 2010-08-07 2010-08-07 Method and computer for accessing disk drive in computer with virtualized environment

Country Status (1)

Country Link
JP (1) JP5468490B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4289028B2 (en) * 2003-06-04 2009-07-01 パナソニック株式会社 Hard disk backup recovery system and information processing apparatus

Also Published As

Publication number Publication date
JP2012038117A (en) 2012-02-23

Similar Documents

Publication Publication Date Title
KR102047558B1 (en) Virtual disk storage techniques
US10365938B2 (en) Systems and methods for managing data input/output operations in a virtual computing environment
US8181176B2 (en) Uniform storage device access using partial virtual machine executing within a secure enclave session
US9448728B2 (en) Consistent unmapping of application data in presence of concurrent, unquiesced writers and readers
JP5038907B2 (en) Method and apparatus for supporting address translation in a virtual machine environment
US8510515B2 (en) Storage system comprising multiple storage apparatuses with both storage virtualization function and capacity virtualization function
JP5658197B2 (en) Computer system, virtualization mechanism, and computer system control method
US9454489B2 (en) Exporting guest spatial locality to hypervisors
US7886115B2 (en) Techniques for implementing virtual storage devices
US10592434B2 (en) Hypervisor-enforced self encrypting memory in computing fabric
US20140012940A1 (en) Systems, Methods and Apparatus for a Virtual Machine Cache
US20120030456A1 (en) Booting Devices Using Virtual Storage Arrays Over Wide-Area Networks
US10289564B2 (en) Computer and memory region management method
EP3673366B1 (en) Virtual application delivery using synthetic block devices
US9298375B2 (en) Method and apparatus for returning reads in the presence of partial data unavailability
US20140298326A1 (en) Asynchronous unmap of thinly provisioned storage for virtual machines
WO2013023090A2 (en) Systems and methods for a file-level cache
US9875184B2 (en) Multi-level snapshot caching
JP5468490B2 (en) Method and computer for accessing disk drive in computer with virtualized environment
JP2024512960A (en) System and method for providing page transitions
TW201610853A (en) Systems and methods for storage virtualization
TWI497294B (en) Computer-readable storage media, apparatuses, and computer-implemented methods for increasing virtual-memory efficiencies
表祐志 Computer Systems Management with a Para Pass-through Virtual Machine Monitor
JP2005056019A (en) Information processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130813

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130924

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: 20140128

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140129

R150 Certificate of patent or registration of utility model

Ref document number: 5468490

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250