JP2007272576A - Server device, and control program for virtual computer - Google Patents

Server device, and control program for virtual computer Download PDF

Info

Publication number
JP2007272576A
JP2007272576A JP2006097594A JP2006097594A JP2007272576A JP 2007272576 A JP2007272576 A JP 2007272576A JP 2006097594 A JP2006097594 A JP 2006097594A JP 2006097594 A JP2006097594 A JP 2006097594A JP 2007272576 A JP2007272576 A JP 2007272576A
Authority
JP
Japan
Prior art keywords
code
hardware
procedure
executing
server device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006097594A
Other languages
Japanese (ja)
Other versions
JP5010164B2 (en
JP2007272576A5 (en
Inventor
Naoya Hattori
直也 服部
Toshiomi Morimoto
俊臣 森本
Yuji Tsushima
雄次 對馬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2006097594A priority Critical patent/JP5010164B2/en
Priority to US11/703,662 priority patent/US8104035B2/en
Publication of JP2007272576A publication Critical patent/JP2007272576A/en
Publication of JP2007272576A5 publication Critical patent/JP2007272576A5/ja
Application granted granted Critical
Publication of JP5010164B2 publication Critical patent/JP5010164B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45516Runtime code conversion or optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a virtual computer system capable of making a high performance compatible with a memory saving in an emulation system. <P>SOLUTION: The virtual computer system is provided with: an emulation module for emulating an operation on the basis of an operation code for executing an operation to hardware of a server device; an exception event handler module for accessing the emulation module with an exception event generated by a CPU as a turning point; a code management module for managing a promotion code for emulating the operation to the hardware of the server device; a frequency determination module for determining whether the frequency of an operation to the hardware of the server device is a high frequency; and a switching module for determining whether to access the emulation module by the exception event handler module or to access the emulation module by executing the promotion code on the basis of the determined frequency. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明はサーバ装置において実現される仮想計算機システムに関して、ハードウェアエミュレーションの効率化に関する。   The present invention relates to the efficiency of hardware emulation related to a virtual machine system realized in a server apparatus.

ITシステムに含まれるサーバ台数が増加するにつれて、運用に関する複雑さが増加するため、その運用コストが問題化する。運用コストを低減するために、複数サーバを1台のサーバに統合するサーバ統合が知られている。サーバ統合を実現する技術として、一つのコンピュータを任意の割合で論理的に分割する仮想計算機技術が知られている。   As the number of servers included in the IT system increases, the operational complexity increases, and the operation cost becomes a problem. In order to reduce operational costs, server integration is known in which a plurality of servers are integrated into one server. As a technique for realizing server integration, a virtual computer technique for logically dividing one computer at an arbitrary ratio is known.

仮想計算機技術は、例えば、ハイパバイザなどのファームウェア又はミドルウェアが、物理計算機を複数の論理区画(LPAR:Logical PARtition)に分割し、分割された各LPARに計算機資源(CPU、主記憶及びI/O)を割り当てる。この各LPAR上でオペレーティングシステム(OS)が動作する。また、一つのサーバ上で一つのホストOS(物理計算機を直接使用するOS)を実行し、このホストOS上で稼動するハイパバイザが同様に物理計算機をLPARに分割する。この各LPAR上でゲストOS(LPAR上で稼動するOS)が稼動してもよい。   In the virtual computer technology, for example, firmware or middleware such as a hypervisor divides a physical computer into a plurality of logical partitions (LPAR), and computer resources (CPU, main memory, and I / O) are divided into each divided LPAR. Assign. An operating system (OS) operates on each LPAR. Further, one host OS (an OS that directly uses a physical computer) is executed on one server, and a hypervisor operating on the host OS similarly divides the physical computer into LPARs. A guest OS (an OS running on the LPAR) may run on each LPAR.

このように、仮想計算機技術は、従来複数のサーバで稼動していたOS及びOS上で稼動するソフトウェアを、1台のサーバで稼動させることを可能にする。これによって、サーバ統合が実現される。   As described above, the virtual machine technology makes it possible to operate an OS that has been operated on a plurality of servers and software that is operated on the OS on a single server. As a result, server integration is realized.

この仮想計算機技術は、従来は汎用機(MainFrame)等の大型計算機で用いられてきた技術であるが、近年のマイクロプロセッサの性能向上によって、ローエンドサーバやパーソナルコンピュータにも適用可能である。   This virtual computer technology has been used in large computers such as general-purpose computers (MainFrame) in the past, but can also be applied to low-end servers and personal computers due to recent improvements in microprocessor performance.

この仮想計算機技術を適用することによって、物理計算機は、ゲスト(ゲストOS及びゲストOS上で稼動するアプリーケーションソフトウェアの総称)を稼動させる複数の仮想計算機(Virtual Machine)と、仮想計算機の制御を行う仮想計算機モニタ(Virtual Machine Monitor、以下VMMとする)とを有する仮想計算機システムが構成される(特許文献1参照)。   By applying this virtual machine technology, the physical machine controls a virtual machine and a plurality of virtual machines (general names of guest OS and application software running on the guest OS) and a virtual machine. A virtual machine system having a virtual machine monitor (hereinafter referred to as VMM) is configured (see Patent Document 1).

なお、OSは、本来、サーバのハードウェアを全て独占して使用することを前提に作られている。しかし、仮想計算機システムでは、複数のゲストOSが稼動する。しかしながら、ゲストOSはサーバのハードウェアを独占することはできない。そこで、VMMが、ゲストOSによるハードウェア操作に対応して、ゲストOSがサーバのハードウェアを独占している状態と同じ振る舞いをエミュレーションする。   The OS is originally created on the premise that all server hardware is used exclusively. However, in the virtual machine system, a plurality of guest OSs operate. However, the guest OS cannot monopolize the server hardware. Therefore, the VMM emulates the same behavior as when the guest OS monopolizes the server hardware in response to the hardware operation by the guest OS.

VMMは、このエミュレーションの処理のために時間とメモリを使用する。そのため、ゲストOSによってVMMによるエミュレーションの回数が増加すると、処理時間とメモリが増加することによって、ゲストの性能が低下し、ゲストの利用可能なメモリ量が減少する問題がある。この問題を軽減するために、エミュレーションの高速化(高性能化)技術や省メモリ化技術が考案されている。   The VMM uses time and memory for this emulation process. Therefore, when the number of times of emulation by the VMM is increased by the guest OS, there is a problem that the processing time and the memory are increased, thereby reducing the guest performance and reducing the amount of memory available to the guest. In order to alleviate this problem, high-speed (high-performance) emulation technology and memory-saving technology have been devised.

エミュレーションの高速化技術の一つにコード変換方式がある。コード変換方式は、VMMが、ゲストOSによる操作コード(OSコードとも呼ぶ)に対応する変換コードをメモリ上に作成する。この変換コードの作成処理をコード変換と呼ぶ。変換コードを作成するときに、対応するOSコードに含まれるハードウェア操作は、エミュレーションコードに置き換えられる。このコード変換方式では、OSコードの代わりに変換コードを実行することで、必要最小限の処理のみでハードウェア操作のエミュレーションを可能とする。コード変換方式は、実行に必要な全てのOSコードに対してコード変換を実施する。コード変換は処理時間を要するため速度低下の原因になり得る。そこで本方式では、作成した変換コードをメモリ上に保持し続け、2度目以降はメモリ上の変換コードを再利用し、速度低下を防止する。ただし、変換コードを保持するメモリが不足した場合は、全ての変換コードを保持できないので実行頻度の低い変換コードを破棄する。   One of the techniques for speeding up emulation is a code conversion method. In the code conversion method, the VMM creates a conversion code corresponding to an operation code (also referred to as an OS code) by the guest OS on the memory. This conversion code creation process is called code conversion. When creating the conversion code, the hardware operation included in the corresponding OS code is replaced with the emulation code. In this code conversion method, by executing the conversion code instead of the OS code, it is possible to emulate the hardware operation with only the minimum necessary processing. In the code conversion method, code conversion is performed on all OS codes necessary for execution. Since code conversion requires processing time, it can cause a reduction in speed. Therefore, in this method, the created conversion code is kept in the memory, and the conversion code on the memory is reused for the second time and later to prevent the speed reduction. However, when there is a shortage of memory for holding conversion codes, conversion codes with low execution frequency are discarded because all conversion codes cannot be held.

エミュレーションの省メモリ化技術であるVT方式は、Intel社製CPUに搭載されたVT(Virtualization Technology)機能を利用する。VT機能を用いるとCPUの動作モードとして、HW操作コードを一切実行できないHW操作完全禁止モードが選択可能になる。CPUがHW操作完全禁止モードのときにHW操作コードの実行を試みると、CPUが例外イベントを発生してコード実行を強制中断する。このとき、CPUはHW操作が可能なHW操作許可モードに遷移した上で、事前に登録されたコードを実行する。逆に、HW操作許可モードで例外イベントからの再開処理を実行すると、CPUはHW操作完全禁止モードに遷移し、指定アドレスから実行を再開する(非特許文献1、非特許文献2参照)。   The VT method, which is a memory saving technology for emulation, uses a VT (Virtualization Technology) function mounted on an Intel CPU. When the VT function is used, an HW operation complete prohibition mode in which no HW operation code can be executed can be selected as an operation mode of the CPU. If the CPU attempts to execute the HW operation code when the CPU is in the HW operation complete prohibition mode, the CPU generates an exception event and forcibly interrupts the code execution. At this time, the CPU changes to the HW operation permission mode in which the HW operation is possible, and then executes a pre-registered code. On the contrary, when the restart process from the exception event is executed in the HW operation permission mode, the CPU transits to the HW operation complete prohibition mode and restarts the execution from the designated address (see Non-Patent Document 1 and Non-Patent Document 2).

この方式では、エミュレーション処理を実施するエミュレーションモジュールをCPUに事前登録し、ゲストをHW操作禁止モードで実行させることで、HW操作をエミュレーションする。本方式は、VMMのメモリにエミュレーションモジュール及びエミュレーションに使用するデータのみを保持するため、VMMのメモリ使用量が少ない。
米国特許6,397,242号明細書 Intel Virtualization Technology Specification for the Intel Itanium Architecture Intel Virtualization Technology Specification for the IA-32 Intel Architecture
In this method, an emulation module that performs emulation processing is pre-registered in the CPU, and the guest is executed in the HW operation inhibition mode to emulate the HW operation. Since this method holds only the emulation module and data used for emulation in the VMM memory, the VMM memory usage is small.
US Pat. No. 6,397,242 Intel Virtualization Technology Specification for the Intel Itanium Architecture Intel Virtualization Technology Specification for the IA-32 Intel Architecture

先行技術であるコード変換方式と、VT方式はそれぞれ問題を有している。   The prior art code conversion method and the VT method each have problems.

コード変換方式は高性能だが、実行に必要な全てのOSコードを変換するため、変換コードの保持に使用するメモリ量が多く、省メモリは望めない。省メモリ化のためにメモリ量を無理に減らした場合は、変換コードの再利用が十分に機能しなくなり、コード変換の回数が増加して性能低下を招くため、高性能が望めない。   Although the code conversion method is high-performance, since all OS codes necessary for execution are converted, a large amount of memory is used to hold the conversion code, and memory saving cannot be expected. If the amount of memory is forcibly reduced to save memory, the reuse of conversion codes will not function sufficiently, and the number of code conversions will increase, leading to performance degradation, so high performance cannot be expected.

VT方式はエミュレーションの開始時に必ず例外イベントを起こすが、昨今のCPUは例外イベントが発生しないことを仮定して高度な並列実行を行っているため、例外イベントが発生するとCPUは内部状態の有効性判断、破棄、再実行等の複雑な処理を行う必要がある。したがって例外イベントの発生には遅延を要する。そのためVT方式は、省メモリではあるが、高性能は望めない。   The VT method always causes an exception event at the start of emulation, but recent CPUs perform highly parallel execution on the assumption that no exception event occurs. Therefore, when an exception event occurs, the CPU is effective in the internal state. It is necessary to perform complicated processing such as determination, destruction, and re-execution. Therefore, a delay is required to generate an exception event. Therefore, although the VT method is memory saving, high performance cannot be expected.

以上のように先行技術は、高性能と省メモリの何れか一方のみを解決しており、高性能と省メモリがトレードオフの関係にあって、両立できていない問題がある。   As described above, the prior art solves only one of the high performance and the memory saving, and there is a problem that the high performance and the memory saving are in a trade-off relationship and are not compatible.

本発明は、前記のような問題点を鑑みてなされたものであり、エミュレーション方式における高性能と省メモリを両立できる仮想計算機システムを提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a virtual computer system capable of achieving both high performance and memory saving in an emulation method.

課題を解決するために、本発明ではゲストのプログラムコードを、HW操作の実行頻度に応じて二つの部分に分類し、実行頻度の高い部分にコード変換方式を、実行頻度の低い部分にVT方式を適用する。   In order to solve the problem, in the present invention, the guest program code is classified into two parts according to the execution frequency of the HW operation, the code conversion method is used for the part with high execution frequency, and the VT method is used for the part with low execution frequency. Apply.

本発明ではゲストコードを、高頻度のHW操作コードを含む部分と、その他、すなわち低頻度の部分に分類し、高頻度のHW操作コードのエミュレーションにコード変換方式を適用し、低頻度に含まれるHW操作のエミュレーションにVT方式を適用する。このようにすることによって、高性能と省メモリを両立させる仮想計算機システムが実現できる。   In the present invention, the guest code is classified into a part including a high-frequency HW operation code and another part, that is, a low-frequency part, and a code conversion method is applied to emulation of a high-frequency HW operation code, so that the guest code is included in a low frequency. The VT method is applied to emulation of HW operation. By doing so, a virtual machine system that achieves both high performance and memory saving can be realized.

以下に、本発明の実施の形態を添付の図面に基づいて説明する。   Embodiments of the present invention will be described below with reference to the accompanying drawings.

<実施形態1>
図1は、本発明の第1の実施の形態の物理計算機のブロック図である。
<Embodiment 1>
FIG. 1 is a block diagram of a physical computer according to the first embodiment of this invention.

この図は、仮想計算機システムが動作する物理計算機90の構成を示す。   This figure shows the configuration of a physical computer 90 on which the virtual computer system operates.

物理計算機90は、1つ以上のCPU400(400−1〜400−n)を含む。これらのCPU400は、フロントサイドバス425を介してノースブリッジ420と接続する。   The physical computer 90 includes one or more CPUs 400 (400-1 to 400-n). These CPUs 400 are connected to the north bridge 420 via the front side bus 425.

ノースブリッジ420は、メモリバス435を介して物理メモリ415と接続する。また、バス445を介してI/Oインターフェース440と接続する。また、コンソール430と直接接続する。   The north bridge 420 is connected to the physical memory 415 via the memory bus 435. Further, the I / O interface 440 is connected via the bus 445. Further, the console 430 is directly connected.

I/Oインターフェース440は、物理計算機90の外部にあるI/Oデバイスと接続し、これらとデータを送受信する。図1の例では、I/Oインターフェース440は、LAN450に接続されているネットワークアダプタ451、ディスク装置460に接続されているSCSIアダプタ461、SAN(Storage Area Network)470に接続されるファイバーチャネルアダプタ471に接続する。   The I / O interface 440 is connected to an I / O device outside the physical computer 90 and transmits / receives data to / from these devices. In the example of FIG. 1, the I / O interface 440 includes a network adapter 451 connected to the LAN 450, a SCSI adapter 461 connected to the disk device 460, and a fiber channel adapter 471 connected to a SAN (Storage Area Network) 470. Connect to.

CPU400は、ノースブリッジ420を介して物理メモリ415にアクセスし、物理メモリ415に格納されているプログラムを実行することによって、プログラムに規定された処理を実行する。また、CPU400は、ノースブリッジ420及びI/Oインターフェース440を介して、物理計算機90の外部にあるI/Oデバイスにアクセスする。   The CPU 400 accesses the physical memory 415 via the north bridge 420 and executes a program stored in the physical memory 415, thereby executing processing defined in the program. Further, the CPU 400 accesses an I / O device outside the physical computer 90 via the north bridge 420 and the I / O interface 440.

ノースブリッジ420は、ホスト物理メモリ415へのデータの入出力を制御する。また、ノースブリッジ420は、グラフィックコントローラを含んでおり、コンソール430に画像やデータを表示する。   The north bridge 420 controls input / output of data to / from the host physical memory 415. The north bridge 420 includes a graphic controller and displays images and data on the console 430.

物理メモリ415には、仮想計算機モニタ(Virtual Machine Monitor、以下、「VMM」と表記する)10とゲスト20(20−1〜20−n)を実現するためのプログラムが格納されている。CPUがこのプログラムを実行することによって、VMM10が実行され、このVMM10によって、ゲスト20が実行される。   The physical memory 415 stores a program for realizing a virtual machine monitor (hereinafter referred to as “VMM”) 10 and a guest 20 (20-1 to 20-n). The VMM 10 is executed by the CPU executing this program, and the guest 20 is executed by the VMM 10.

CPU400(400−1〜400−n)は、VT−i機能を備えるIPF(Itanium Processor Family)プロセッサである。CPU400は、CPU400が備えるレジスタのうち、PSR(Processor Status Register)のVMビットが1であるときはHW操作完全禁止モードで動作する。また、PSRのVMビットが0であり、かつ、PSRのCPL(Current Privilege Level)フィールドが0であるときはHW操作許可モードで動作する。また、何れの条件も満たさない場合は、HW操作部分禁止モードで動作する。   The CPU 400 (400-1 to 400-n) is an IPF (Itanium Processor Family) processor having a VT-i function. CPU 400 operates in the HW operation complete prohibition mode when the VM bit of the PSR (Processor Status Register) is 1, among the registers included in CPU 400. Further, when the VM bit of the PSR is 0 and the CPL (Current Privilege Level) field of the PSR is 0, the operation is performed in the HW operation permission mode. When neither condition is satisfied, the operation is performed in the HW operation partial prohibition mode.

また、CPU400は、命令の仮想アドレスと物理アドレスとを変換するための命令アドレス変換機構を備える。この命令アドレス変換機構は、命令TLB(Translation Lookaside Buffer)を用いる。なお、CPU400が、命令TLBと命令ページテーブルを組み合わせてアドレス変換機構を実現してもよい。   The CPU 400 includes an instruction address conversion mechanism for converting a virtual address and a physical address of an instruction. This instruction address translation mechanism uses an instruction TLB (Translation Lookaside Buffer). Note that the CPU 400 may implement an address translation mechanism by combining the instruction TLB and the instruction page table.

次に、本実施の形態の仮想計算機システムを説明する。   Next, the virtual computer system of this embodiment will be described.

図2は、物理計算機90において、ゲスト20(20−1〜20−n)とゲスト20を稼動させるVMM10とを含むハードウェア及びソフトウェアのブロック図である。   FIG. 2 is a block diagram of hardware and software including the guest 20 (20-1 to 20-n) and the VMM 10 that operates the guest 20 in the physical computer 90.

図2において、物理計算機90上では、複数のゲスト20(20−1〜20−n)を管理するVMM10が稼動している。VMM10は、これら複数のゲスト20が実行するハードウェアへの操作(以下、「HW操作」と表記する)をエミュレーションする。   In FIG. 2, a VMM 10 that manages a plurality of guests 20 (20-1 to 20-n) is operating on the physical computer 90. The VMM 10 emulates hardware operations (hereinafter referred to as “HW operations”) executed by the plurality of guests 20.

各ゲスト20は、稼動に必要なゲストコード21(21−1〜21−m)を1つ以上備える。このゲストコード21は、HW操作コード25を含む。   Each guest 20 includes one or more guest codes 21 (21-1 to 21-m) necessary for operation. This guest code 21 includes an HW operation code 25.

VMM10は、コード管理モジュール30、コード生成モジュール40、例外イベントハンドラモジュール50、エミュレーションモジュール60、頻度判断モジュール70、切り替えモジュール80を含む。   The VMM 10 includes a code management module 30, a code generation module 40, an exception event handler module 50, an emulation module 60, a frequency determination module 70, and a switching module 80.

以降、ゲスト20がHW操作コードを含むゲストコードを実行したときのVMM10の処理を説明する。   Hereinafter, the processing of the VMM 10 when the guest 20 executes the guest code including the HW operation code will be described.

VMM10は、ゲストコード21をHW操作完全禁止モードで実行させる。ゲスト20がHW操作コードを含むゲストコード21を実行した場合は、CPU400は例外イベントを発生させる。そして、CPU400がHW操作許可モードに遷移した後、VMM10の例外イベントハンドラモジュール50が実行される。   The VMM 10 executes the guest code 21 in the HW operation complete prohibition mode. When the guest 20 executes the guest code 21 including the HW operation code, the CPU 400 generates an exception event. Then, after the CPU 400 transitions to the HW operation permission mode, the exception event handler module 50 of the VMM 10 is executed.

例外イベントハンドラモジュール50は、例外イベントの発生要因を解析し、その例外イベント、すなわちHW操作コードに対応するエミュレーションモジュール60を呼び出す。   The exception event handler module 50 analyzes the cause of the exception event and calls the emulation module 60 corresponding to the exception event, that is, the HW operation code.

エミュレーションモジュール60は、必要に応じて物理計算機90を操作する。これによって、HW操作コードに対応するエミュレーションが実施される。エミュレーションモジュール60は、エミュレーションを実施する際に、頻度判断モジュール70を呼び出す。   The emulation module 60 operates the physical computer 90 as necessary. As a result, emulation corresponding to the HW operation code is performed. The emulation module 60 calls the frequency determination module 70 when performing emulation.

頻度判断モジュール70は、アドレスグループ毎のHW操作の頻度を判断し、切り替えモジュール80に判断結果を渡す。   The frequency determination module 70 determines the frequency of the HW operation for each address group, and passes the determination result to the switching module 80.

なお、当該HW操作コードの命令アドレスを含む所定のアドレスの範囲をアドレスグループと呼ぶ。本実施の形態では、アドレスグループに、ページを用いる。   A predetermined address range including the instruction address of the HW operation code is called an address group. In this embodiment, pages are used for address groups.

また、頻度判断モジュール70は、モジュールの初期化時など必要に応じて、物理計算機90が有する記憶装置91を参照して、記憶装置91に格納された方式切り替え条件を取得する。   In addition, the frequency determination module 70 refers to the storage device 91 included in the physical computer 90 as necessary, such as when the module is initialized, and acquires the method switching condition stored in the storage device 91.

切り替えモジュール80は、頻度判断モジュール60からページ毎のHW操作の頻度を取得する。そして、頻度が高いと判断した場合は、コード管理モジュール30に、当該HW操作に対応する変換コードの検索を依頼する。   The switching module 80 acquires the frequency of the HW operation for each page from the frequency determination module 60. If it is determined that the frequency is high, the code management module 30 is requested to search for a conversion code corresponding to the HW operation.

コード管理モジュール30は、変換コードを管理する。コード管理モジュール30は、変換コード管理表35と、変換コードLRU(Least Recent Used)リスト36とを含む。変換コード管理表35は、変換コードを検索するための情報を保持する。変換コードLRUリスト36は、未使用時間が長い変換コードの情報を保持する。   The code management module 30 manages conversion codes. The code management module 30 includes a conversion code management table 35 and a conversion code LRU (Least Recent Used) list 36. The conversion code management table 35 holds information for searching for conversion codes. The conversion code LRU list 36 holds information on conversion codes having a long unused time.

切り替えモジュール80は、コード管理モジュール30への依頼の結果、変換コード管理表35が当該HW操作コードのアドレスが含まれるページに対応する情報を記録していない場合は、コード生成モジュール40を呼び出す。   As a result of the request to the code management module 30, the switching module 80 calls the code generation module 40 when the conversion code management table 35 does not record information corresponding to the page including the address of the HW operation code.

コード生成モジュール40は、当該HW操作コードのアドレスが含まれるページを参照して、対応する複数のシャドウコード31(31−1〜31−p)と複数の昇格コード32(32−1〜32−q)とを、コード管理モジュール30が管理するメモリ上に生成する。そして、その内容を変換コード管理表35に格納する。   The code generation module 40 refers to the page including the address of the HW operation code, and corresponds to a plurality of shadow codes 31 (31-1 to 31-p) and a plurality of promotion codes 32 (32-1 to 32-2). q) is generated on the memory managed by the code management module 30. Then, the contents are stored in the conversion code management table 35.

その後、切り替えモジュール80は、物理計算機90が有する命令アドレス変換機構93に、当該ページの仮想アドレスと、シャドウコード31の物理アドレスとの対応付けを設定する。   Thereafter, the switching module 80 sets an association between the virtual address of the page and the physical address of the shadow code 31 in the instruction address conversion mechanism 93 of the physical computer 90.

以上の操作によって、以降は、ゲスト20によるHW操作コードのアドレスが含まれるページが実行されたときは、シャドウコード31が実行される。   Through the above operation, after that, when a page including the address of the HW operation code by the guest 20 is executed, the shadow code 31 is executed.

VMM10は、一連の処理の最後に、CPUの動作モードをHW操作完全禁止モードに戻すための「rfi命令」を実行する。これによって、シャドウコードはゲストコードと同じく、HW操作完全禁止モードで実行される。   The VMM 10 executes an “rfi instruction” for returning the CPU operation mode to the HW operation complete prohibition mode at the end of the series of processes. As a result, the shadow code is executed in the HW operation complete prohibition mode like the guest code.

シャドウコード31は、HW操作コードの代わりに昇格コード32を呼び出す。   The shadow code 31 calls the promotion code 32 instead of the HW operation code.

昇格コード32は、CPUをHW操作許可モードに遷移させ、エミュレーションモジュール60を呼び出す。又は、エミュレーションモジュール60の部分複製であるエミュレーションコード33(33−1)を実行する。これによって、HW操作のエミュレーションが実行される。その後、CPUをHW操作完全禁止モードに戻す。   The promotion code 32 shifts the CPU to the HW operation permission mode and calls the emulation module 60. Alternatively, the emulation code 33 (33-1), which is a partial copy of the emulation module 60, is executed. As a result, emulation of the HW operation is executed. Thereafter, the CPU is returned to the HW operation complete prohibition mode.

なお、CPUをHW操作許可モードに遷移させるために、昇格コード32は、PSRのVMビットを操作する命令である「vmsw.0」と「vmsw.1」とを含む。   Note that the promotion code 32 includes “vmsw.0” and “vmsw.1” which are instructions for manipulating the VM bit of the PSR in order to cause the CPU to transition to the HW operation permission mode.

なお、ゲスト20によって、シャドウコード31に対応するゲストコード21が書き換えられる場合がある。エミュレーションモジュール60は、この書き換えを検出した場合は、頻度判断モジュール70と切り替えモジュール80に、この書き換えを通知する。頻度判断モジュール70は、書き換えられたページの頻度を「低頻度」に設定する。切り替えモジュール80は、書き換えられたページに対応していた変換コードを無効化し、これを変換コード管理表35に記録する。さらに、物理計算機90が有する命令アドレス変換機構93から、書き換えられたページに関する設定を削除する。   The guest code 21 corresponding to the shadow code 31 may be rewritten by the guest 20. When the emulation module 60 detects this rewriting, the emulation module 60 notifies the frequency determining module 70 and the switching module 80 of the rewriting. The frequency determination module 70 sets the frequency of the rewritten page to “low frequency”. The switching module 80 invalidates the conversion code corresponding to the rewritten page and records this in the conversion code management table 35. Further, the setting relating to the rewritten page is deleted from the instruction address conversion mechanism 93 of the physical computer 90.

物理計算機90は、コンソール92と接続されている。システム管理者がコンソール92を用いてコード変換の設定を変更したときは、コード変換の設定を格納する記憶装置91に、その内容を記録する。また、頻度判断モジュール70及びコード管理モジュール30に、その内容を伝える。   The physical computer 90 is connected to the console 92. When the system administrator changes the code conversion setting using the console 92, the contents are recorded in the storage device 91 that stores the code conversion setting. Further, the contents are transmitted to the frequency determination module 70 and the code management module 30.

図3は、記憶装置91に格納されているコード変換の設定表95の一例の説明図である。   FIG. 3 is an explanatory diagram of an example of the code conversion setting table 95 stored in the storage device 91.

コード変換の設定表95は、ゲスト20毎に、そのゲストが使用するメモリ量の上限と、そのゲストのゲストコードが高頻度であるか低頻度であるかを判断するための頻度の閾値とを格納する。   The code conversion setting table 95 shows, for each guest 20, an upper limit of the memory amount used by the guest and a frequency threshold for determining whether the guest code of the guest is high frequency or low frequency. Store.

コード変換の設定95は、ゲスト識別番号フィールド501、使用するメモリ量の上限フィールド520及び頻度の閾値フィールド521を含む。   The code conversion setting 95 includes a guest identification number field 501, an upper limit field 520 for the amount of memory to be used, and a frequency threshold field 521.

ゲスト識別番号フィールド501は、ゲスト20毎に付された識別子であるゲスト識別番号を格納する。使用するメモリ量の上限フィールド520は、メモリ変換コードを保持するために使用するメモリ量の上限を格納する。頻度の閾値フィールド521は、ゲストコードが高頻度であるか低頻度であるかを判断するための閾値を格納する。   The guest identification number field 501 stores a guest identification number that is an identifier assigned to each guest 20. The upper limit field 520 of the memory amount to be used stores an upper limit of the memory amount used to hold the memory conversion code. The frequency threshold field 521 stores a threshold value for determining whether the guest code has a high frequency or a low frequency.

図4は、頻度判断モジュール70の構成ブロック図である。   FIG. 4 is a configuration block diagram of the frequency determination module 70.

頻度判断モジュール70は、頻度判断コード71とHW操作頻度表72とを含む。   The frequency determination module 70 includes a frequency determination code 71 and a HW operation frequency table 72.

頻度判断コード71は、HW操作頻度表72を参照・更新して、HW操作の頻度を判断するプログラムである。HW操作頻度表72は、ゲスト20によって実行されたHW操作の回数を、ゲストコードの物理ページ単位で格納する表である。   The frequency determination code 71 is a program that refers to and updates the HW operation frequency table 72 to determine the frequency of the HW operation. The HW operation frequency table 72 is a table that stores the number of HW operations executed by the guest 20 in units of physical pages of guest code.

図5は、HW操作頻度表72の一例の説明図である。   FIG. 5 is an explanatory diagram of an example of the HW operation frequency table 72.

HW操作頻度表72は、ゲスト20毎に、ゲストコードの物理ページアドレスと、そのページでのHW操作の実行回数とを格納する。   The HW operation frequency table 72 stores, for each guest 20, the physical page address of the guest code and the number of executions of the HW operation on the page.

HW操作頻度表72は、ゲスト識別番号フィールド501と、ゲストコードの物理ページのアドレスフィールド503と、HW操作実行回数フィールド506とを含む。   The HW operation frequency table 72 includes a guest identification number field 501, an address field 503 of a guest code physical page, and an HW operation execution frequency field 506.

ゲスト識別番号フィールド501は、前述のコード変換の設定表95のゲスト識別番号と同じものを格納する。ゲストコードの物理ページのアドレスフィールド503は、ゲストコードの物理ページのアドレスを格納する。HW操作実行回数フィールド506は、ゲストコードの物理ページに対応するHW操作が実行された回数を格納する。なお、HW操作実行回数の初期値は0である。   The guest identification number field 501 stores the same guest identification number as the code conversion setting table 95 described above. The guest code physical page address field 503 stores the address of the guest code physical page. The HW operation execution frequency field 506 stores the number of times that the HW operation corresponding to the physical page of the guest code has been executed. Note that the initial value of the HW operation execution count is zero.

図6は、変換コード管理表35の一例の説明図である。   FIG. 6 is an explanatory diagram of an example of the conversion code management table 35.

変換コード管理表35は、ゲスト20毎に、ゲストコードの物理ページアドレスと、そのゲストコードに対応する変換コードの物理ページのアドレスを格納する。   The conversion code management table 35 stores, for each guest 20, the physical page address of the guest code and the address of the physical page of the conversion code corresponding to the guest code.

変換コード管理表35は、ゲスト識別番号フィールド501と、ゲストコード物理ページのアドレスフィールド503と、validビットフィールド504と、変換コードの物理ページのアドレス505とを含む。   The conversion code management table 35 includes a guest identification number field 501, a guest code physical page address field 503, a valid bit field 504, and a conversion code physical page address 505.

ゲスト識別番号フィールド501は、前述のコード変換表95及びHW操作頻度表70のゲスト識別番号と同じものを格納する。ゲストコード物理ページのアドレスフィールド503は、前述のHW操作頻度表72のゲストコードの物理ページのアドレスと同じものを格納する。validビットフィールド504は、そのページに対応する変換コードが有効であるか否かを示す識別子であるvalidビットを格納する。このvalidビットの初期値は0(無効)である。変換コードの物理ページのアドレスフィールド505は、ゲストコードの物理ページのアドレスに対応する変換コードの物理ページのアドレスを格納する。   The guest identification number field 501 stores the same guest identification number as that in the code conversion table 95 and the HW operation frequency table 70 described above. The guest code physical page address field 503 stores the same address as the guest code physical page address of the HW operation frequency table 72 described above. The valid bit field 504 stores a valid bit that is an identifier indicating whether or not the conversion code corresponding to the page is valid. The initial value of this valid bit is 0 (invalid). The physical page address field 505 of the conversion code stores the address of the physical page of the conversion code corresponding to the physical page address of the guest code.

図7は、変換コードLRUリスト36の一例の説明図である。   FIG. 7 is an explanatory diagram of an example of the conversion code LRU list 36.

変換コードLRUリスト36は、変換コード物理ページのアドレス毎に、そのアドレスの未使用時間が短い順に保持するための双方向線形リストである。   The conversion code LRU list 36 is a bidirectional linear list for holding, for each address of the conversion code physical page, an order in which the unused time of the address is short.

変換コードLRUリスト36は、prevポインタフィールド530(530−1〜530−t)、変換コードの物理ページのアドレスフィールド505(505−1〜505−t)及びnextポインタフィールド531(531−1〜531−t)を一つの要素とし、これらの要素を、それぞれのポインタによって結合したものである。   The conversion code LRU list 36 includes a prev pointer field 530 (530-1 to 530-t), an address field 505 (505-1 to 505-t) of a conversion code physical page, and a next pointer field 531 (531-1 to 531). -T) is one element, and these elements are connected by respective pointers.

prevポインタフィールド530は前の要素を示すprevポインタを格納する。nextポインタフィールド531は次の要素を示すnextポインタを格納する。変換コードの物理ページのアドレスフィールド505は、前述の変換コード管理表35の変換コードの物理ページのアドレスと同じものを格納する。   The prev pointer field 530 stores a prev pointer indicating the previous element. The next pointer field 531 stores a next pointer indicating the next element. The conversion code physical page address field 505 stores the same address as the conversion code physical page of the conversion code management table 35 described above.

次に、ゲスト20の動作に伴うVMM10の処理を、フローチャートを参照して説明する。   Next, processing of the VMM 10 accompanying the operation of the guest 20 will be described with reference to a flowchart.

図8は、VMM10がゲスト20を稼動するときの処理のフローチャートである。   FIG. 8 is a flowchart of processing when the VMM 10 operates the guest 20.

まず、仮想計算機の電源の投入等によって、ゲスト20が起動すると、VMM10は、自身が有するゲスト情報を参照し、起動されたゲストに関するエントリを初期化する(S200)。   First, when the guest 20 is activated by turning on the power of the virtual machine or the like, the VMM 10 refers to the guest information held by itself and initializes an entry related to the activated guest (S200).

その後、ゲスト20が、HW操作完全禁止モードでゲストコード又は変換コードを実行する(S240)。VMM10は、ゲスト20によるゲストコードの実行によって、HW操作コードの実行を検出したか否かを判断する(S250)。   Thereafter, the guest 20 executes the guest code or the conversion code in the HW operation complete prohibition mode (S240). The VMM 10 determines whether or not execution of the HW operation code is detected by execution of the guest code by the guest 20 (S250).

ゲスト20によるHW操作コードの実行を検出したと判断した場合は、VMM10は、例外イベントを発生させて、CPU400の動作モードをHW操作許可モードに変更する。その後、ステップS210へ進む。また、ゲスト20による昇格コードの実行を検出し、エミュレーションモジュール60が呼ばれたと判断した場合も同様に、VMM10は、CPU動作モードをHW操作許可モードに変更する。その後、S210へ進む。一方、VMM10が、HW操作コード又は昇格コードの実行を検出しないと判断した場合は、ステップS240に戻り、次のゲストコードの実行の検出を待機する。   When it is determined that the execution of the HW operation code by the guest 20 is detected, the VMM 10 generates an exception event and changes the operation mode of the CPU 400 to the HW operation permission mode. Thereafter, the process proceeds to step S210. Similarly, when the execution of the promotion code by the guest 20 is detected and it is determined that the emulation module 60 has been called, the VMM 10 similarly changes the CPU operation mode to the HW operation permission mode. Then, it progresses to S210. On the other hand, if the VMM 10 determines not to detect the execution of the HW operation code or the promotion code, the process returns to step S240 and waits for the detection of the execution of the next guest code.

ステップS210では、VMM10は、HW操作のエミュレーション処理を実施する。また、このエミュレーション処理によって、次に実行するコードの種別を決定する。   In step S210, the VMM 10 performs an emulation process of the HW operation. Also, the type of code to be executed next is determined by this emulation processing.

次に、VMM10は、仮想計算機の電源遮断等によってゲスト20が終了したか否かを判断する。ゲスト20が終了したと判断した場合は、VMM10は、当該ゲスト20の処理を終了する。一方、ゲスト20は終了せず、動作が継続すると判断した場合は、ステップS260に進む。   Next, the VMM 10 determines whether or not the guest 20 has been terminated due to power-off of the virtual machine or the like. If it is determined that the guest 20 has ended, the VMM 10 ends the processing of the guest 20. On the other hand, if it is determined that the guest 20 does not end and the operation continues, the process proceeds to step S260.

S260では、VMM10は、システム管理者によるコード変換の設定の変更がコンソール92に入力されたか否かを判断する。コンソール92への入力によってコード変換の設定95に変更があったと判断した場合は、ステップS270に移行する。一方、コード変換の設定95に変更がなければ、ステップS230に進む。   In S <b> 260, the VMM 10 determines whether a change in code conversion setting by the system administrator has been input to the console 92. If it is determined that the code conversion setting 95 has been changed by the input to the console 92, the process proceeds to step S270. On the other hand, if there is no change in the code conversion setting 95, the process proceeds to step S230.

ステップS270では、物理計算機90は、コンソール92によって設定された内容を受け取り、記憶装置91のコード変換の設定95を更新するコード変換の設定更新処理を実行する。   In step S270, the physical computer 90 receives the content set by the console 92 and executes code conversion setting update processing for updating the code conversion setting 95 of the storage device 91.

次に、VMM10は、ステップS210によって決定したコードの種別を設定する。すなわち、ゲストコード又はシャドウコードに復帰する場合は、VMM10は、CPU動作モードをHW操作完全禁止モードに変更する命令を実行する。その後、ステップS240に戻る。また、昇格コードに復帰する場合は、なにもせずそのままS240に戻る。その後、昇格コード内の命令が実行されることによって、CPU動作モードがHW操作完全禁止モードに変更される。   Next, the VMM 10 sets the code type determined in step S210. That is, when returning to the guest code or the shadow code, the VMM 10 executes an instruction to change the CPU operation mode to the HW operation complete prohibition mode. Thereafter, the process returns to step S240. When returning to the promotion code, the process returns to S240 without doing anything. Thereafter, the CPU operation mode is changed to the HW operation complete prohibition mode by executing the instruction in the promotion code.

図9は、図8のステップS210のVMMのエミュレーション処理のフローチャートである。   FIG. 9 is a flowchart of the VMM emulation processing in step S210 of FIG.

まず、ゲスト20によって実行されたHW操作コードの内容に応じて、VMM10がエミュレーションを実施する(S100)。   First, the VMM 10 performs emulation according to the contents of the HW operation code executed by the guest 20 (S100).

このとき、VMM10は、エミュレーションの内容はコード変換の対象となったゲストコードの変更を含むか否か、すなわち、命令アドレス変換機構93の設定を変更するか否かを判断する(S110)。なお、VMM10は、ゲスト20によってキャッシュ操作命令であるFC(Flush Cache)命令の実行が試みられたと場合に、ゲストコードが書き換えられたと判断する。変更しないと判断した場合は、ステップS130に進む。   At this time, the VMM 10 determines whether or not the contents of the emulation include a change of the guest code subjected to code conversion, that is, whether or not to change the setting of the instruction address conversion mechanism 93 (S110). The VMM 10 determines that the guest code has been rewritten when the guest 20 tries to execute an FC (Flush Cache) instruction that is a cache operation instruction. If it is determined not to change, the process proceeds to step S130.

変更すると判断した場合は、VMM10は、変換コード管理表35を検索して(S111)、該当するゲストコードに対応する変換コードがあるか否かを判断する(S112)。   If it is determined to be changed, the VMM 10 searches the conversion code management table 35 (S111), and determines whether there is a conversion code corresponding to the corresponding guest code (S112).

対応する変換コードがあると判断した場合は、VMM10は、該当するゲストコードの仮想アドレスと変換コードの物理アドレスとの対応付けを命令アドレス変換機構93に設定する(S113)。さらに、VMM10は、当該変換コードの情報を、変換コードLRUリスト36に追加して、変換コードLRUリスト36を更新する(S114)。   If it is determined that there is a corresponding conversion code, the VMM 10 sets the association between the virtual address of the corresponding guest code and the physical address of the conversion code in the instruction address conversion mechanism 93 (S113). Further, the VMM 10 adds the conversion code information to the conversion code LRU list 36 and updates the conversion code LRU list 36 (S114).

一方、対応する変換コードがないと判断した場合は、VMM10は、該当するゲストコードの仮想アドレスと該当するゲストコードの物理アドレスとの対応付けを命令アドレス変換機構93に設定する(S115)。   On the other hand, when determining that there is no corresponding conversion code, the VMM 10 sets the association between the virtual address of the corresponding guest code and the physical address of the corresponding guest code in the instruction address conversion mechanism 93 (S115).

次に、VMM10は、書き換えられたゲストコードに対応する変換コードの無効化処理を実行する。この処理によって、当該ゲストコードのページのエミュレーション方式をVT方式に切り替える(S120)。   Next, the VMM 10 executes a conversion code invalidation process corresponding to the rewritten guest code. With this process, the guest code page emulation method is switched to the VT method (S120).

ステップS130では、VMM10は、HW操作の頻度判定処理を実行する。この処理によって、ゲスト20によってなされたHW操作の頻度が高頻度であるか低頻度であるかが判定される。   In step S130, the VMM 10 executes a frequency determination process for the HW operation. With this process, it is determined whether the frequency of the HW operation performed by the guest 20 is high or low.

次に、VMM10は、HW操作の頻度低処理の結果、頻度が高頻度であるか否かを判断する(S140)。高頻度であると判断した場合はステップS150に進む。低頻度であると判断した場合はステップS160に進む。   Next, the VMM 10 determines whether the frequency is high as a result of the low frequency processing of the HW operation (S140). If it is determined that the frequency is high, the process proceeds to step S150. If it is determined that the frequency is low, the process proceeds to step S160.

ステップS150では、VMM10は、当該ページに含まれるHW操作のエミュレーションにコード変換方式を適用する処理を実行する。   In step S150, the VMM 10 executes processing for applying the code conversion method to emulation of the HW operation included in the page.

ステップS160では、VMM10は、当該HW操作の次の処理の選択処理を実行する。   In step S160, the VMM 10 executes a selection process for the next process of the HW operation.

図10は、前述の図9のステップS120の変換コードの無効化処理のフローチャートである。   FIG. 10 is a flowchart of the conversion code invalidation process in step S120 of FIG.

VMM10は、変換コード管理表35を参照して、書き換えられたゲストコードに対応するエントリのvalidビットをクリアする。すなわち、validビットを0に変更する(S600)。   The VMM 10 refers to the conversion code management table 35 and clears the valid bit of the entry corresponding to the rewritten guest code. That is, the valid bit is changed to 0 (S600).

次に、VMM10は、HW操作頻度表72を参照して、書き換えられたゲストコードに対応するエントリのHW操作の実行回数を0に設定する(S610)。   Next, the VMM 10 refers to the HW operation frequency table 72 and sets the number of executions of the HW operation for the entry corresponding to the rewritten guest code to 0 (S610).

次に、VMM10は、書き換えられたゲストコードの仮想アドレスと当該ゲストコードの物理アドレスとの対応付けを命令アドレス変換機構93に設定する(S630)。   Next, the VMM 10 sets the association between the rewritten virtual address of the guest code and the physical address of the guest code in the instruction address conversion mechanism 93 (S630).

図11は、前述の図9のS130の頻度の判定処理のフローチャートである。   FIG. 11 is a flowchart of the frequency determination process in S130 of FIG.

まず、VMM10は、当該HW操作コードを実行したのは、ゲスト20のアプリケーションであるか否かを判断する(S790)。アプリケーションが実行したと判断した場合は、ステップS730に進む。ゲスト20のOSが実行したと判断した場合は、ステップS700に進む。   First, the VMM 10 determines whether it is an application of the guest 20 that has executed the HW operation code (S790). If it is determined that the application has been executed, the process proceeds to step S730. When it is determined that the OS of the guest 20 has been executed, the process proceeds to step S700.

ステップS700では、VMM10は、当該HW操作コードが属するページの物理アドレスを算出する。   In step S700, the VMM 10 calculates the physical address of the page to which the HW operation code belongs.

次に、VMM10は、HW操作頻度表72を参照して、算出したページの物理アドレスに対応するエントリの、HW操作の実行回数を取得する(S710)。   Next, the VMM 10 refers to the HW operation frequency table 72 and obtains the number of executions of the HW operation for the entry corresponding to the calculated physical address of the page (S710).

次に、VMM10は、コード変換の設定表95を参照して、HW操作コードの要求元のゲスト20の識別番号のエントリから、頻度の閾値を取得する。そして、取得したHW操作の実行回数と取得した頻度の閾値とを比較して、実行回数が閾値以上であるか否かを判断する(S720)。実行回数が閾値以上であると判断した場合は、ステップS740に進む。実行回数が閾値未満であると判断した場合は、ステップS730に進む。   Next, the VMM 10 refers to the code conversion setting table 95 and obtains the frequency threshold value from the entry of the identification number of the guest 20 that has requested the HW operation code. Then, the number of times of execution of the acquired HW operation is compared with the threshold value of the acquired frequency to determine whether or not the number of times of execution is equal to or greater than the threshold value (S720). If it is determined that the number of executions is equal to or greater than the threshold, the process proceeds to step S740. If it is determined that the number of executions is less than the threshold, the process proceeds to step S730.

S740では、VMM10は、当該ページでのHW操作の頻度は高頻度であると判定する。   In S740, the VMM 10 determines that the frequency of the HW operation on the page is high.

S730では、VMM10は、当該ページでのHW操作の頻度が低頻度であると判定する。   In S730, the VMM 10 determines that the frequency of the HW operation on the page is low.

次に、VMM10は、HW操作頻度表72の当該ページのHW操作の実行回数に1を加算して、HW操作頻度表72を更新する(S750)。   Next, the VMM 10 updates the HW operation frequency table 72 by adding 1 to the number of executions of the HW operation for the page in the HW operation frequency table 72 (S750).

図12は、前述の図9のステップS160の次処理の選択処理のフローチャートである。   FIG. 12 is a flowchart of the selection process of the next process in step S160 of FIG.

VMM10は、ゲスト20が終了したか否か、すなわち、ゲスト20が稼働する仮想計算機21の電源がOFFにされたか否かを判断する(S1000)。仮想計算機21の電源がOFFにされたと判断した場合はステップS1010に進む。そうでなければステップS1020に進む。   The VMM 10 determines whether or not the guest 20 has been terminated, that is, whether or not the virtual machine 21 in which the guest 20 is running has been turned off (S1000). If it is determined that the virtual computer 21 has been powered off, the process advances to step S1010. Otherwise, the process proceeds to step S1020.

ステップS1010では、VMM10は、次に実行する処理として、ゲスト終了を選択する。   In step S1010, the VMM 10 selects guest termination as the next process to be executed.

ステップS1020では、VMM10は、次に実行する処理にゲストコード又は変換コードを継続して適用することを決定する。   In step S1020, the VMM 10 determines to continuously apply the guest code or conversion code to the next process to be executed.

図13は、前述の図9のステップS150のコード変換方式の適用処理のフローチャートである。   FIG. 13 is a flowchart of the application process of the code conversion method in step S150 of FIG.

ステップS1200では、VMM10は、変換コード管理表35を参照して、当該HW操作コードを含むページの物理アドレスに対応する変換コードの有無を判断する。変換コードが存在しないと判断した場合は、ステップS1210に進む。変換コードが設定されていると判断した場合は、本処理を終了して、図9のフローチャートに戻る。   In step S1200, the VMM 10 refers to the conversion code management table 35 and determines whether there is a conversion code corresponding to the physical address of the page including the HW operation code. If it is determined that no conversion code exists, the process advances to step S1210. If it is determined that a conversion code has been set, this process ends and the process returns to the flowchart of FIG.

S1210では、VMM10は、変換コードを格納するためのメモリ領域のメモリ容量に必要な空き容量が存在するか否かを判断する。メモリ領域に必要な空き容量が存在しないと判断した場合は、ステップS1220に移行する。必要な空き容量が存在すると判断した場合は、ステップS1230に進む。   In S1210, the VMM 10 determines whether or not there is a free capacity necessary for the memory capacity of the memory area for storing the conversion code. If it is determined that the necessary free space does not exist in the memory area, the process proceeds to step S1220. If it is determined that the necessary free space exists, the process proceeds to step S1230.

ステップS1220では、VMM10は、変換コードLRUリスト36を参照して、未使用時間の最も長い変換コードを含む要素を一つ選択する。そして、選択された要素に含まれる変換コードに属するページの物理アドレスを無効化することによって、変換コードをメモリ領域から破棄する。さらに、選択された要素に含まれる変換コードの情報を、変換コードLRU36から削除する。そして、ステップS1210に戻る。すなわち、必要な空き容量が確保できるまで、未使用時間の最も長い変換コードをメモリ領域から破棄する。   In step S1220, the VMM 10 refers to the conversion code LRU list 36 and selects one element including the conversion code with the longest unused time. Then, the conversion code is discarded from the memory area by invalidating the physical address of the page belonging to the conversion code included in the selected element. Further, the conversion code information included in the selected element is deleted from the conversion code LRU 36. Then, the process returns to step S1210. That is, the conversion code with the longest unused time is discarded from the memory area until the necessary free space can be secured.

ステップS1230では、VMM10は、当該ページのゲストコードに対応する変換コードを生成し、生成された変換コードを保存する。変換コードのうち、シャドウコードはゲストコードと1対1に対応し、HW操作コードの代わりに昇格コードを呼び出す。また、変換コードのうち、昇格コードは、vmsw命令を含み、エミュレーションモジュール60を呼び出すコード、又は、エミュレーションモジュール60の部分複製であるエミュレーションコード33の少なくとも一方を含む。   In step S1230, the VMM 10 generates a conversion code corresponding to the guest code of the page, and stores the generated conversion code. Among the conversion codes, the shadow code has a one-to-one correspondence with the guest code, and calls the promotion code instead of the HW operation code. Of the conversion codes, the promotion code includes a vmsw instruction and includes at least one of a code that calls the emulation module 60 and an emulation code 33 that is a partial copy of the emulation module 60.

次に、VMM10は、生成した変換コードの情報を、変換コード管理表35に格納する。また、生成した変換コードの情報を変換コードLRU36リストに追加する(S1240)。   Next, the VMM 10 stores the generated conversion code information in the conversion code management table 35. Further, the information of the generated conversion code is added to the conversion code LRU 36 list (S1240).

図14は、前述の図8のステップS270のコード変換の設定更新処理のフローチャートである。   FIG. 14 is a flowchart of the code update setting update process in step S270 of FIG.

まず、物理計算機90が、システム管理者によって設定されたコード変換の設定の変更を、コンソールから受信する(S1400)。   First, the physical computer 90 receives a change in code conversion setting set by the system administrator from the console (S1400).

物理計算機90は、受け取った変更内容を、記憶装置91のコード変換の設定表95に反映させて、コード変換の設定表95を更新する(S1410)。   The physical computer 90 reflects the received change contents in the code conversion setting table 95 of the storage device 91 to update the code conversion setting table 95 (S1410).

次に、物理計算機90は、更新されたコード変換の設定表95を、頻度判断モジュール70及びコード管理モジュール30に通知する。これによって、頻度判断モジュール70及びコード管理モジュール30は、自身が格納しているコード変換の設定表95を更新する。   Next, the physical computer 90 notifies the updated code conversion setting table 95 to the frequency determination module 70 and the code management module 30. As a result, the frequency determination module 70 and the code management module 30 update the code conversion setting table 95 stored therein.

以上のように、本発明の第1の実施の形態の仮想計算機システムでは、ゲスト20によってHW操作を含むゲストコードの実行が要求されたときに、VMM10は、当該HW操作の実行頻度に応じて処理方法を変える。すなわち、当該HW操作を二つの部分に分け、実行頻度の高い部分に実行効率の高いコード変換方式を適用し、実行頻度の低い部分にメモリ消費量の少ないVT方式を適用する。このようにすることによって、高性能と省メモリとを両立することが可能なエミュレーション処理が可能となる。   As described above, in the virtual machine system according to the first embodiment of this invention, when the guest 20 requests the execution of the guest code including the HW operation, the VMM 10 determines according to the execution frequency of the HW operation. Change the processing method. That is, the HW operation is divided into two parts, a code conversion method with high execution efficiency is applied to a part with high execution frequency, and a VT method with low memory consumption is applied to a part with low execution frequency. By doing so, it is possible to perform emulation processing capable of achieving both high performance and memory saving.

<実施形態2>
次に、本発明の第2の実施の形態の仮想計算機システムを説明する。第2の実施の形態では、操作の種別である命令タイプによって、HW操作の頻度を判断する。
<Embodiment 2>
Next, a virtual machine system according to a second embodiment of this invention will be described. In the second embodiment, the frequency of the HW operation is determined based on the instruction type that is the type of operation.

なお、第2の実施の形態のハードウェア構成は図1と同一である。また、第1の実施の形態と同一の作用をする構成には同一の符号を付し、その説明は省略する。   The hardware configuration of the second embodiment is the same as that shown in FIG. In addition, the same reference numerals are given to components that perform the same operations as those in the first embodiment, and the description thereof is omitted.

第2の実施形態では、頻度判断に命令タイプを用いるため、コード変換の設定内容、HW操作頻度表のフォーマットの2点のみが実施例1と異なる。   In the second embodiment, since the instruction type is used for frequency determination, only the two points of the code conversion setting contents and the format of the HW operation frequency table are different from the first embodiment.

図15は、第2の実施の形態の、コード変換の設定表95の説明図である。   FIG. 15 is an explanatory diagram of a code conversion setting table 95 according to the second embodiment.

第1の実施の形態において前述した図4とは異なり、コード変換の設定表95は、高頻度を判断するために、閾値ではなく命令タイプを格納する。   Unlike FIG. 4 described above in the first embodiment, the code conversion setting table 95 stores an instruction type instead of a threshold value in order to determine a high frequency.

コード変換の設定95は、ゲスト識別番号フィールド501、使用するメモリ量の上限フィールド502及び命令タイプのリストフィールド522を含む。   The code conversion setting 95 includes a guest identification number field 501, an upper limit field 502 of the amount of memory to be used, and an instruction type list field 522.

ゲスト識別番号フィールド501は、ゲスト20毎に付された識別子であるゲスト識別番号を格納する。使用するメモリ量の上限フィールド520は、メモリ変換コードを保持するために使用するメモリ量の上限を格納する。命令タイプのリストフィールド522は、ゲストコードの命令タイプのうち、高頻度であると判断する命令タイプをリスト形式で格納する。   The guest identification number field 501 stores a guest identification number that is an identifier assigned to each guest 20. The upper limit field 520 of the memory amount to be used stores an upper limit of the memory amount used to hold the memory conversion code. The instruction type list field 522 stores, in a list format, instruction types that are determined to be high in frequency among guest code instruction types.

図16は、第2の実施の形態のHW操作頻度表72の説明図である。   FIG. 16 is an explanatory diagram of the HW operation frequency table 72 according to the second embodiment.

第1の実施の形態において前述した図5とは異なり、HW操作頻度表72は、ゲスト20毎に、命令タイプ507と、その命令タイプが高頻度であるか否かを判断するための頻度フラグ508とを格納する。   Unlike FIG. 5 described above in the first embodiment, the HW operation frequency table 72 includes an instruction type 507 and a frequency flag for determining whether or not the instruction type is high frequency for each guest 20. 508 is stored.

このHW操作頻度表72は、管理者によって設定されたコード変換の設定表95を元に、頻度判断コード71によって生成される。すなわち、コード変換の設定表95のゲスト識別番号及び命令タイプのリストを、ゲスト識別番号と命令タイプとによって並び替えたものである。   The HW operation frequency table 72 is generated by the frequency determination code 71 based on the code conversion setting table 95 set by the administrator. That is, the list of guest identification numbers and instruction types in the code conversion setting table 95 is rearranged by the guest identification number and the instruction type.

HW操作頻度表72は、ゲスト識別番号フィールド501と、命令タイプフィールド507と、頻度フラグフィールド508とを含む。   The HW operation frequency table 72 includes a guest identification number field 501, an instruction type field 507, and a frequency flag field 508.

ゲスト識別番号フィールド501は、前述のコード変換の設定表901のゲスト識別番号と同じものを格納する。命令タイプフィールド507は、ゲストコードの命令タイプを示す識別子を格納する。頻度フラグフィールド508は、命令タイプに対応する頻度フラグ格納する。頻度フラグは1であれば高頻度であることを示し、0であれば低頻度であることを示す。なお、頻度フラグの初期値は、頻度判断モジュール70がコード変換の設定表95から取得する。   The guest identification number field 501 stores the same guest identification number as the code conversion setting table 901 described above. The instruction type field 507 stores an identifier indicating the instruction type of the guest code. The frequency flag field 508 stores a frequency flag corresponding to the instruction type. If the frequency flag is 1, it indicates that the frequency is high, and if it is 0, it indicates that the frequency is low. The initial value of the frequency flag is acquired from the code conversion setting table 95 by the frequency determination module 70.

次に、第2の実施の形態の、ゲスト20の動作に伴うVMM10の処理を、フローチャートを参照して説明する。   Next, processing of the VMM 10 accompanying the operation of the guest 20 according to the second embodiment will be described with reference to a flowchart.

なお、第2の実施の形態の処理の概要は、前述の第1の実施の形態において前述した図8と同一である。   The outline of the processing of the second embodiment is the same as that of FIG. 8 described above in the first embodiment.

また、前述の図8のステップS210のVMMのエミュレーション処理は、前述の図9の処理と同一である。   Further, the VMM emulation process in step S210 of FIG. 8 is the same as the process of FIG.

図17は、前述の図9のステップS120の、第2の実施の形態の変換コードの無効化処理のフローチャートである。   FIG. 17 is a flowchart of the conversion code invalidation process of the second embodiment in step S120 of FIG.

VMM10は、変換コード管理表35を参照して、書き換えられたゲストコードに対応するエントリの、validビットフィールド504をクリアする。すなわち、validビットを0に変更する(S600)。   The VMM 10 refers to the conversion code management table 35 and clears the valid bit field 504 of the entry corresponding to the rewritten guest code. That is, the valid bit is changed to 0 (S600).

次に、VMM10は、書き換えられたゲストコードの仮想アドレスと当該ゲストコードの物理アドレスとの対応付けを命令アドレス変換機構93に設定する(S630)。   Next, the VMM 10 sets the association between the rewritten virtual address of the guest code and the physical address of the guest code in the instruction address conversion mechanism 93 (S630).

図18は、前述の図9のステップS130の、第2の実施の形態の頻度判断処理のフローチャートである。   FIG. 18 is a flowchart of the frequency determination process according to the second embodiment in step S130 of FIG.

まず、VMM10は、当該HW操作コードを実行したのは、ゲスト20のアプリケーションであるか否かを判断する(S790)。アプリケーションが実行したと判断した場合は、ステップS830に進む。ゲスト20のOSが実行したと判断した場合は、ステップS800に進む。   First, the VMM 10 determines whether it is an application of the guest 20 that has executed the HW operation code (S790). If it is determined that the application has been executed, the process proceeds to step S830. When it is determined that the OS of the guest 20 has been executed, the process proceeds to step S800.

ステップS800では、VMM10は、当該HW操作コードの命令タイプを取得する。   In step S800, the VMM 10 acquires the instruction type of the HW operation code.

次に、VMM10は、HW操作頻度表72を参照して、取得した命令タイプに対応するエントリの頻度フラグを取得する(S810)。   Next, the VMM 10 refers to the HW operation frequency table 72 and acquires the frequency flag of the entry corresponding to the acquired instruction type (S810).

次に、VMM10は、取得した頻度フラグが1であるか否かを判断する。頻度フラグが1、すなわち高頻度を示すものであればステップS840に進む。頻度フラグが0、すなわち、低頻度を示すものであればステップS830に進む(S820)。   Next, the VMM 10 determines whether or not the acquired frequency flag is 1. If the frequency flag is 1, that is, indicates a high frequency, the process proceeds to step S840. If the frequency flag is 0, that is, indicates a low frequency, the process proceeds to step S830 (S820).

ステップS840では、VMM10は、当該ページでのHW操作の頻度が高頻度であると判定する。   In step S840, the VMM 10 determines that the frequency of the HW operation on the page is high.

ステップS830では、VMM10は、当該ページでのHW操作の頻度が低頻度であると判定する。   In step S830, the VMM 10 determines that the frequency of the HW operation on the page is low.

なお、図9のステップS160の次処理の選択処理は、前述の第1の実施の形態の図12の処理と同一である。   Note that the selection process of the next process in step S160 of FIG. 9 is the same as the process of FIG. 12 of the first embodiment described above.

また、図9のステップS150のコード変換方式の適用処理は、前述の第1の実施の形態の図13の処理とほぼ同一であるが、以下の1点のみが異なる。   The application process of the code conversion method in step S150 of FIG. 9 is almost the same as the process of FIG. 13 of the first embodiment described above, except for the following one point.

まず、ステップS1230では、VMM10は、当該ページに含まれる命令タイプが高頻度でない命令は、コード変換の対象から除外し、シャドウコードにゲストコードの命令をそのままコピーする。   First, in step S1230, the VMM 10 excludes an instruction whose instruction type included in the page is not high in frequency from the code conversion target, and copies the guest code instruction to the shadow code as it is.

また、図8のステップS270のコード変換の設定更新処理は、前述の第1の実施の形態の図14と同一である。   Further, the code update setting update process in step S270 of FIG. 8 is the same as that of FIG. 14 of the first embodiment described above.

以上のように、本発明の第2の実施の形態では、ゲストコードをHW操作の命令タイプに応じて二つの部分に分類する。そして、実行頻度の高い命令タイプを含む部分に、コード変換方式を適用し、実行頻度の高い命令タイプを含まない部分にVT方式を適用する。このようにすることによって、高性能と省メモリを両立させるエミュレーション処理が可能となる。   As described above, in the second embodiment of the present invention, the guest code is classified into two parts according to the instruction type of the HW operation. Then, the code conversion method is applied to a portion including an instruction type having a high execution frequency, and the VT method is applied to a portion not including an instruction type having a high execution frequency. By doing so, it is possible to perform emulation processing that achieves both high performance and memory saving.

<実施形態3>
次に、本発明の第3の実施の形態の仮想計算機システムを説明する。第3の実施の形態では、HW操作の間隔によって頻度を判断する。
<Embodiment 3>
Next, a virtual machine system according to a third embodiment of this invention will be described. In the third embodiment, the frequency is determined based on the interval between HW operations.

なお、第1の実施の形態と同一の作用をする構成には同一の符号を付し、その説明は省略する。   In addition, the same code | symbol is attached | subjected to the structure which carries out the same effect | action as 1st Embodiment, and the description is abbreviate | omitted.

第3の実施の形態のハードウェア構成は図1とほぼ同一である。しかしながら、第3の実施の形態では、用いられるCPU(400−1〜400−n)の機能が異なる。   The hardware configuration of the third embodiment is almost the same as that of FIG. However, in the third embodiment, the functions of the CPUs (400-1 to 400-n) used are different.

CPU400(400−1〜400−n)は、VT−x機能に対応したx86プロセッサである。このCPU400は、HW操作完全禁止モードと、HW操作許可モードと、HW操作部分禁止モードとを備える。HW操作完全禁止モードはCPU400をVMX non−rootモードに設定することで有効化される。HW操作許可モードはCPU400をVMX rootモードかつ特権レベル(CPL:Current Privilege Level)を0に設定することで有効化される。HW操作部分禁止モードはCPU400をVMX rootモードかつCPLを非0に設定することで有効化される。   The CPU 400 (400-1 to 400-n) is an x86 processor corresponding to the VT-x function. The CPU 400 includes an HW operation complete prohibition mode, an HW operation permission mode, and an HW operation partial prohibition mode. The HW operation complete prohibition mode is enabled by setting the CPU 400 to the VMX non-root mode. The HW operation permission mode is enabled by setting the CPU 400 to the VMX root mode and the privilege level (CPL: Current Privilege Level) to 0. The HW operation partial prohibition mode is enabled by setting the CPU 400 to the VMX root mode and CPL to non-zero.

また、CPU400が、VMX rootモードからVMX non−rootモードに遷移するためには、VMentry操作を実行する必要がある。VMentry操作とは、ゲストOSの起動を指示するためのVMLAUNCH命令の実行と、ゲストOSを一時停止するためのVMRESUME命令の実行との総称である。また、VMX non−rootモードからVMX rootモードに遷移するためには、VMexitイベントを実行する必要がある。VMexitイベントとは、HW操作の実行に起因する例外イベントである。   Further, in order for the CPU 400 to transition from the VMX root mode to the VMX non-root mode, it is necessary to execute a VMEntry operation. The VMEntry operation is a generic term for the execution of the VMLAUNCH instruction for instructing the activation of the guest OS and the execution of the VMRESUME instruction for temporarily stopping the guest OS. Further, in order to transition from the VMX non-root mode to the VMX root mode, it is necessary to execute a VMExit event. The VMexit event is an exception event resulting from the execution of the HW operation.

次に、第3の実施の形態の仮想計算機システムを説明する。   Next, a virtual computer system according to a third embodiment will be described.

図19は、物理計算機90において、ゲスト20(20−1〜20−n)とゲスト20を稼動させるVMM10とを含むハードウェア及びソフトウェアのブロック図である。   FIG. 19 is a block diagram of hardware and software including the guest 20 (20-1 to 20-n) and the VMM 10 that operates the guest 20 in the physical computer 90.

図19は、前述の第1の実施の形態の図2のブロック図とほぼ同一である。しかしながら、コード管理モジュール30の動作が異なる。   FIG. 19 is almost the same as the block diagram of FIG. 2 of the first embodiment described above. However, the operation of the code management module 30 is different.

以降、ゲスト20がHW操作コードを含むゲストコードを実行したときのVMM10の処理を説明する。   Hereinafter, the processing of the VMM 10 when the guest 20 executes the guest code including the HW operation code will be described.

VMM10は、ゲスト20がHW操作コード25を含むゲストコード25を実行した場合は、VMM10は例外イベントを発生させる。この例外イベントによって、CPU400がHW操作許可モードに遷移する。その後、VMM10の例外イベントハンドラモジュール50が実行される。   When the guest 20 executes the guest code 25 including the HW operation code 25, the VMM 10 generates an exception event. Due to this exception event, the CPU 400 shifts to the HW operation permission mode. Thereafter, the exception event handler module 50 of the VMM 10 is executed.

例外イベントハンドラモジュール50は、例外イベントの発生要因を解析し、その例外イベント、すなわち、HW操作コードに対応するエミュレーションモジュール60を呼び出す。   The exception event handler module 50 analyzes the cause of the exception event and calls the emulation module 60 corresponding to the exception event, that is, the HW operation code.

エミュレーションモジュール60は、必要に応じて物理計算機90を操作する。これによって、HW操作コードに対応するエミュレーションが実施される。エミュレーションモジュール60は、エミュレーションを実施する際に、頻度判断モジュール70を呼び出す。   The emulation module 60 operates the physical computer 90 as necessary. As a result, emulation corresponding to the HW operation code is performed. The emulation module 60 calls the frequency determination module 70 when performing emulation.

頻度判断モジュール70は、ゲスト20によって、前回のHW操作がされたときの時刻情報と今回のHW操作がされたときの時刻情報との差から、HW操作間隔の短さ、すなわちHW操作の頻度を算出する。そして、算出された頻度の履歴を用いて、今回のHW操作がされたときの時刻情報と次回にHW操作がされたときの時刻情報の間隔の短さ、すなわち頻度を判断する。この結果を、切り替えモジュール80に渡す。   The frequency determination module 70 determines the short HW operation interval, that is, the frequency of the HW operation from the difference between the time information when the previous HW operation is performed by the guest 20 and the time information when the current HW operation is performed. Is calculated. Then, using the calculated frequency history, the shortness of the interval between the time information when the current HW operation is performed and the time information when the HW operation is performed next time, that is, the frequency is determined. The result is passed to the switching module 80.

なお、時刻情報とは時刻を特定可能な情報であり、本実施形態にではゲストによって実行されたページ間の分岐命令の回数である。時刻情報には、物理計算機90が備える時計の時刻の値や、実行されたゲスト命令数、実行されたゲストのCALL命令及びRET命令数等、時刻を近似できる任意の情報が利用できる。   The time information is information with which the time can be specified, and in this embodiment is the number of branch instructions between pages executed by the guest. As the time information, any information that can approximate the time, such as the time value of the clock provided in the physical computer 90, the number of executed guest instructions, the number of CALL instructions and RET instructions of executed guests, can be used.

頻度判断モジュール70は、モジュール初期化時など、必要に応じて、物理計算機90の記憶装置91に格納された方式切り替え条件を参照し、その内容を頻度判断モジュール70内に格納しておく。   The frequency determination module 70 refers to the method switching condition stored in the storage device 91 of the physical computer 90 as needed, such as when the module is initialized, and stores the contents in the frequency determination module 70.

頻度判断モジュール70によって、今回のHW操作と次回のHW操作の間隔が長い、すなわち、低頻度であると判断された場合は、切り替えモジュール80は、CPU400の動作モードをHW操作完全禁止モードに戻す。すなわち、切り替えモジュール80は、CPU400に対してVMentry操作を実行する。この操作の後に、処理をゲストコードに分岐する。   When the frequency determination module 70 determines that the interval between the current HW operation and the next HW operation is long, that is, the frequency is low, the switching module 80 returns the operation mode of the CPU 400 to the HW operation complete prohibition mode. . That is, the switching module 80 performs a VMEntry operation on the CPU 400. After this operation, the process branches to the guest code.

一方、頻度判断モジュール70によって、今回のHW操作と次回のHW操作の間隔が短い、すなわち、高頻度であると判断された場合は、切り替えモジュール80は、まず、次に実行するゲストコードに対応する変換コードのアドレスを、コード管理モジュール30に問い合わせる。そして、CPU400の動作モードをHW操作部分禁止モードに戻す。すなわち、切り替えモジュール80は、CPL増加分岐命令を実行する。この命令の後に、処理を変換コードに分岐する。この処理によって、変換コードはHW操作部分禁止モードで実行される。なお、CPL増加分岐命令には、IRET命令、SYSRET命令、SYSEXIT命令等を用いる。   On the other hand, when the frequency determination module 70 determines that the interval between the current HW operation and the next HW operation is short, that is, the frequency is high, the switching module 80 first responds to the guest code to be executed next. The code management module 30 is inquired about the address of the conversion code to be processed. Then, the operation mode of the CPU 400 is returned to the HW operation partial prohibition mode. That is, the switching module 80 executes the CPL increase branch instruction. After this instruction, the process branches to the conversion code. By this process, the conversion code is executed in the HW operation part prohibition mode. For the CPL increase branch instruction, an IRET instruction, a SYSRET instruction, a SYSEXIT instruction, or the like is used.

切り替えモジュール80からの問い合わせに対して、コード管理モジュール30は、変換コード管理表35を検索して、問い合わせコードに対応する変換コードが存在するか否かを判断する。変換コードが存在する場合は、当該変換コードのアドレスを返す。問い合わせコードに対応する変換コードが存在しない場合は、コード生成モジュール40を呼び出して、変換コードを生成し、生成された変換コードのアドレスを返す。   In response to the inquiry from the switching module 80, the code management module 30 searches the conversion code management table 35 and determines whether a conversion code corresponding to the inquiry code exists. If a conversion code exists, the address of the conversion code is returned. If there is no conversion code corresponding to the inquiry code, the code generation module 40 is called to generate the conversion code, and the address of the generated conversion code is returned.

コード生成モジュール40は、次のゲストコードページを参照して対応するシャドウコード31(31−1〜31−p)と昇格コード32(32−1)とを、コード管理モジュール30が管理するメモリ上に生成する。そして、その内容を変換コード管理表35に登録する。   The code generation module 40 refers to the next guest code page and stores the corresponding shadow code 31 (31-1 to 31-p) and the promotion code 32 (32-1) on the memory managed by the code management module 30. To generate. Then, the contents are registered in the conversion code management table 35.

なお、シャドウコード31(31−1〜31−p)は、HW操作コードの代わりに昇格コード32(32−1)を含む。昇格コード32(32−1)は、CPUをHW操作許可モードに遷移させ、エミュレーションモジュール60を呼び出してHW操作をエミュレーションし、その後、CPUをHW操作部分禁止モードに戻す。昇格コード32は、CPL減少分岐命令(特権レベル減少分岐命令)を含む。CPL減少分岐命令には、farCALL命令、SYSCALL命令、SYSENTER命令等を用いる。   The shadow code 31 (31-1 to 31-p) includes a promotion code 32 (32-1) instead of the HW operation code. The promotion code 32 (32-1) causes the CPU to transition to the HW operation permission mode, calls the emulation module 60 to emulate the HW operation, and then returns the CPU to the HW operation partial prohibition mode. The promotion code 32 includes a CPL decrease branch instruction (privilege level decrease branch instruction). As the CPL decrement branch instruction, a farCALL instruction, a SYSCALL instruction, a SYSENTER instruction, or the like is used.

なお、ゲスト20によって、シャドウコード31に対応するゲストコード21が書き換えられる場合がある。エミュレーションモジュール60は、この書き換えを検出した場合は、切り替えモジュール80に、この書き換えを通知する。切り替えモジュール80は、書き換えられたページに対応していた変換コードを無効化して、これを変換コード管理表35に記録する。   The guest code 21 corresponding to the shadow code 31 may be rewritten by the guest 20. When the emulation module 60 detects this rewriting, it notifies the switching module 80 of this rewriting. The switching module 80 invalidates the conversion code corresponding to the rewritten page and records this in the conversion code management table 35.

なお、記憶装置91に格納されているコード変換の設定表95は、前述の第1の実施の形態の図3と同一である。   The code conversion setting table 95 stored in the storage device 91 is the same as that in FIG. 3 of the first embodiment described above.

図20は、頻度判断モジュール70の構成ブロック図である。   FIG. 20 is a configuration block diagram of the frequency determination module 70.

頻度判断モジュール70は、第1の実施の形態の頻度判断モジュール71とほぼ同一であるが、HW操作履歴表73を含んでいる。   The frequency determination module 70 is substantially the same as the frequency determination module 71 of the first embodiment, but includes an HW operation history table 73.

HW操作頻度表72は、あるHW操作Xと次に実行されたHW操作との間隔が短い、すなわち高頻度である場合に、そのHW操作Xを実施するゲストコードの物理アドレスを格納する。HW操作履歴表73は、最後に処理されたHW操作を実行した動作主体(OSまたはAP)と、ゲストコードの物理アドレスと、時刻情報を格納する。   The HW operation frequency table 72 stores the physical address of the guest code that executes the HW operation X when the interval between the HW operation X and the next executed HW operation is short, that is, when the frequency is high. The HW operation history table 73 stores the operation subject (OS or AP) that executed the last processed HW operation, the physical address of the guest code, and time information.

図21は、HW操作頻度表72の一例の説明図である。   FIG. 21 is an explanatory diagram of an example of the HW operation frequency table 72.

HW操作頻度表72は、ゲスト20毎に、当該エントリの有効性を示すvalidビットと、ゲストコードの物理アドレスとを格納する。   The HW operation frequency table 72 stores, for each guest 20, a valid bit indicating the validity of the entry and a physical address of the guest code.

HW操作頻度表72は、ゲスト識別番号フィールド501と、validビットフィールド504と、ゲストコードの物理アドレスフィールド509とを含む。   The HW operation frequency table 72 includes a guest identification number field 501, a valid bit field 504, and a guest code physical address field 509.

ゲスト識別番号フィールド501は、ゲスト20毎に付された識別子であるゲスト識別番号を格納する。validビットフィールド504は、ゲストコードのうち、その物理アドレスが、HW操作の間隔が短い、すなわち、高頻度である部分の始点又は中間点であることを示すvalidビットを格納する。ゲストコードの物理のアドレスフィールド509は、ゲストコードの物理アドレスを格納する。   The guest identification number field 501 stores a guest identification number that is an identifier assigned to each guest 20. The valid bit field 504 stores a valid bit indicating that the physical address of the guest code has a short HW operation interval, that is, a start point or an intermediate point of a high-frequency part. The guest code physical address field 509 stores the physical address of the guest code.

なお、本表に含まれないゲストコードの物理アドレスは、HW操作の間隔が長い、すなわち、低頻度である部分の始点又は中間点である。また、validビットの初期値は0、すなわち無効である。   The physical address of the guest code not included in this table is a start point or an intermediate point of a part where the interval of the HW operation is long, that is, the frequency is low. The initial value of the valid bit is 0, that is, invalid.

図22は、HW操作履歴表73の一例の説明図である。   FIG. 22 is an explanatory diagram of an example of the HW operation history table 73.

HW操作履歴表73は、ゲスト識別番号フィールド501と、CPU識別番号フィールド502と、動作主体フィールド523と、ゲストコードの物理アドレスフィールド509と、時刻情報フィールド510とを含む。   The HW operation history table 73 includes a guest identification number field 501, a CPU identification number field 502, an operation subject field 523, a guest code physical address field 509, and a time information field 510.

ゲスト識別番号フィールド501は、前述の図21のゲスト識別番号と同じものを格納する。CPU識別番号フィールド502は、CPU400を識別するための番号を格納する。動作主体フィールド523は、最後に処理されたHW操作を実行した主体はOSであるかAPであるかを区別するための識別子を格納する。ゲストコードの物理アドレス509は、前述の図21のゲストコード物理アドレスと同じものを格納する。時刻情報フィールド510は、前述のように、最後に処理されたHW操作の時点での、ゲストによって実行されたページ間の分岐命令の回数を格納する。なお、物理計算機90が備える時計の時刻の値や、実行されたゲスト命令数、実行されたゲストのCALL命令及びRET命令数等、時刻を近似できる任意の情報が利用できる。   The guest identification number field 501 stores the same guest identification number as that shown in FIG. The CPU identification number field 502 stores a number for identifying the CPU 400. The action subject field 523 stores an identifier for distinguishing whether the subject that executed the last processed HW operation is an OS or an AP. The guest code physical address 509 is the same as the guest code physical address of FIG. As described above, the time information field 510 stores the number of branch instructions between pages executed by the guest at the time of the last processed HW operation. Any information that can approximate the time, such as the time value of the clock provided in the physical computer 90, the number of executed guest instructions, the number of CALL instructions and RET instructions of executed guests, can be used.

図23は、切り替えモジュール80の構成ブロック図である。   FIG. 23 is a configuration block diagram of the switching module 80.

切り替えモジュール80は、方式切り替えコード81と動作方式表82とを含む。   The switching module 80 includes a method switching code 81 and an operation method table 82.

なお、動作方式とは、エミュレーションモジュールの呼び出し方式である。本実施の形態では、VT方式又はコード変換方式を用いる。方式切り替えコード81は、頻度に応じて動作方式であるコード変換方式とVT方式を切り替え、その結果を操作方式表82に格納する。動作方式表82は、現在適用中の動作方式を格納する。   The operation method is a method for calling an emulation module. In this embodiment, a VT method or a code conversion method is used. The method switching code 81 switches between the code conversion method and the VT method which are operation methods according to the frequency, and stores the result in the operation method table 82. The operation method table 82 stores the operation method currently applied.

図24は、動作方式表82の一例の説明図である。   FIG. 24 is an explanatory diagram of an example of the operation method table 82.

動作方式表82は、ゲスト識別番号フィールド501と、CPU識別番号フィールド502と動作方式フィールド513とを含む。   The operation method table 82 includes a guest identification number field 501, a CPU identification number field 502, and an operation method field 513.

ゲスト識別番号フィールド501は、前述の図21のHW操作頻度表72のゲスト識別番号と同じものを格納する。CPU識別番号フィールド502は、前述の図22のHW操作履歴表73のCPU識別番号と同じものを格納する。動作方式フィールド513は、現在適用中の動作方式を格納する。なお、動作方式の初期値は「VT方式」である。   The guest identification number field 501 stores the same guest identification number as that in the HW operation frequency table 72 of FIG. The CPU identification number field 502 stores the same CPU identification number as that of the HW operation history table 73 shown in FIG. The operation method field 513 stores the operation method currently applied. The initial value of the operation method is “VT method”.

図25は、変換コード管理表35の一例の説明図である。   FIG. 25 is an explanatory diagram of an example of the conversion code management table 35.

変換コード管理表35は、ゲスト20毎に、ゲストコードの物理アドレス509と、そのゲストコードに対応する変換コードの物理アドレス511を格納する。   The conversion code management table 35 stores, for each guest 20, a guest code physical address 509 and a conversion code physical address 511 corresponding to the guest code.

変換コード管理表35は、ゲスト識別番号フィールド501と、ゲストコード物理アドレスフィールド509と、validビットフィールド504と、変換コードの物理アドレス511とを含む。   The conversion code management table 35 includes a guest identification number field 501, a guest code physical address field 509, a valid bit field 504, and a conversion code physical address 511.

ゲスト識別番号フィールド501は、前述の図21のHW操作頻度表72のゲスト識別番号と同じものを格納する。ゲストコードの物理アドレス509は、前述の図21のゲストコード物理アドレスと同じものを格納する。validビットフィールド504は、その物理アドレスに対応する変換コードが有効であるか否かを示す識別子であるvalidビットを格納する。このvalidビットの初期値は0(無効)である。変換コードの物理アドレスフィールド509は、ゲストコードの物理アドレスに対応する変換コードの物理アドレスを格納する。   The guest identification number field 501 stores the same guest identification number as that in the HW operation frequency table 72 of FIG. The guest code physical address 509 is the same as the guest code physical address of FIG. The valid bit field 504 stores a valid bit that is an identifier indicating whether or not the conversion code corresponding to the physical address is valid. The initial value of this valid bit is 0 (invalid). The conversion code physical address field 509 stores the physical address of the conversion code corresponding to the physical address of the guest code.

次に、第3の実施の形態の、ゲスト20の動作に伴うVMM10の処理を、フローチャートを参照して説明する。   Next, processing of the VMM 10 accompanying the operation of the guest 20 according to the third embodiment will be described with reference to a flowchart.

図26は、VMM10がゲスト20を稼動するときの処理のフローチャートである。   FIG. 26 is a flowchart of processing when the VMM 10 operates the guest 20.

図26は、前述の第1の実施の形態の図8のフローチャートに類似しているが、最初のHW操作は必ずゲストコードによってエミュレーションされる点が異なる。   FIG. 26 is similar to the flowchart of FIG. 8 of the first embodiment described above, except that the first HW operation is always emulated by the guest code.

まず、仮想計算機の電源の投入等によって、ゲスト20が起動すると、VMM10は、自身が有するゲスト情報を参照し、起動されたゲストに関するエントリを初期化する(S200)。   First, when the guest 20 is activated by turning on the power of the virtual machine or the like, the VMM 10 refers to the guest information held by itself and initializes an entry related to the activated guest (S200).

その後、ゲスト20が、HW操作完全禁止モードでゲストコードを実行する(S340)。VMM10は、ゲスト20によるゲストコードの実行によって、HW操作コードの実行を検出したか否かを判断する(S350)。   Thereafter, the guest 20 executes the guest code in the HW operation complete prohibition mode (S340). The VMM 10 determines whether or not execution of the HW operation code is detected by execution of the guest code by the guest 20 (S350).

ゲスト20によるHW操作コードの実行を検出した場合は、VMM10は、例外イベントを発生させて、CPU400の動作モードをHW操作許可モードに変更する。その後、ステップS210へ進む。一方、VMM10が、HW操作コードの実行を検出しない場合は、ステップS340に戻り、次のゲストコードを実行する。   When the execution of the HW operation code by the guest 20 is detected, the VMM 10 generates an exception event and changes the operation mode of the CPU 400 to the HW operation permission mode. Thereafter, the process proceeds to step S210. On the other hand, if the VMM 10 does not detect the execution of the HW operation code, the process returns to step S340 to execute the next guest code.

ステップS210では、VMM10は、HW操作のエミュレーション処理を実施する。また、このエミュレーション処理によって、次に実行するコードの種別を決定する。   In step S210, the VMM 10 performs an emulation process of the HW operation. Also, the type of code to be executed next is determined by this emulation processing.

次に、VMM10は、仮想計算機の電源遮断等によってゲスト20が終了したか否かを判断する。ゲスト20が終了したと判断した場合は、VMM10は、当該ゲスト20の処理を終了する。一方、ゲスト20は終了せず、動作が継続すると判断した場合は、ステップS260に進む。   Next, the VMM 10 determines whether or not the guest 20 has been terminated due to power-off of the virtual machine or the like. If it is determined that the guest 20 has ended, the VMM 10 ends the processing of the guest 20. On the other hand, if it is determined that the guest 20 does not end and the operation continues, the process proceeds to step S260.

S260では、VMM10は、システム管理者によるコード変換の設定の変更がコンソール92に入力されたか否かを判断する。コンソール92への入力によってコード変換の設定95に変更があったと判断した場合は、ステップS270に移行する。一方、コード変換の設定95に変更がなければ、ステップS330に進む。   In S <b> 260, the VMM 10 determines whether a change in code conversion setting by the system administrator has been input to the console 92. If it is determined that the code conversion setting 95 has been changed by the input to the console 92, the process proceeds to step S270. On the other hand, if there is no change in the code conversion setting 95, the process proceeds to step S330.

ステップS270では、物理計算機90は、コンソール92によって設定された内容を受け取り、記憶装置91のコード変換の設定95を更新するコード変換の設定更新処理を実行する。   In step S270, the physical computer 90 receives the content set by the console 92 and executes code conversion setting update processing for updating the code conversion setting 95 of the storage device 91.

次に、VMM10は、次にゲスト20によって実行される処理が変換コードの実行であるか否かを判断する(S330)。次の処理が変換コードの実行であると判断した場合は、VMM10は、CPL増加分岐命令を実行してCPU動作モードをHW操作部分禁止モードに変更する。その後、ステップS360に進む。一方、次の処理がゲストコードの実行であると判断した場合は、VMM10は、VMentry操作を実行してCPU動作モードをHW操作完全禁止モードに変更する。その後、ステップS340に戻る。   Next, the VMM 10 determines whether or not the next process executed by the guest 20 is execution of a conversion code (S330). If it is determined that the next process is the execution of the conversion code, the VMM 10 executes the CPL increase branch instruction to change the CPU operation mode to the HW operation partial inhibition mode. Thereafter, the process proceeds to step S360. On the other hand, when it is determined that the next process is the execution of the guest code, the VMM 10 executes the VMEntry operation and changes the CPU operation mode to the HW operation complete prohibition mode. Thereafter, the process returns to step S340.

ステップS360では、VMM10は、HW操作部分禁止モードで変換コードを実行する。   In step S360, the VMM 10 executes the conversion code in the HW operation part prohibition mode.

次に、VMM10は、ゲスト20による昇格コードの実行を検出し、エミュレーションモジュール60が呼ばれたか否かを判断する(S370)。昇格コードが実行されてエミュレーションモジュールが呼ばれた場合は、VMM10は、CPU動作モードをHW操作許可モードに変更して、S210へ進む。一方、VMM10が、昇格コードの実行を検出しない場合は、ステップS360に戻り、次の変換コードを実行する。   Next, the VMM 10 detects the execution of the promotion code by the guest 20 and determines whether the emulation module 60 has been called (S370). When the promotion code is executed and the emulation module is called, the VMM 10 changes the CPU operation mode to the HW operation permission mode and proceeds to S210. On the other hand, if the VMM 10 does not detect the execution of the promotion code, the process returns to step S360 and the next conversion code is executed.

図27は、図26のステップS210のVMMのエミュレーション処理のフローチャートである。   FIG. 27 is a flowchart of the VMM emulation processing in step S210 of FIG.

まず、ゲスト20によって実行されたHW操作コードの内容に応じて、VMM10がエミュレーションを実施する(S100)。   First, the VMM 10 performs emulation according to the contents of the HW operation code executed by the guest 20 (S100).

このとき、VMM10は、エミュレーションの内容はコード変換の対象となったゲストコードの変更を含むか否かを判断する(S110)。なお、VMM10は、ライトプロテクトを設定したページに対してゲスト20が書き込みを行った場合に、当該ページにゲストコードが存在するか否かを判定して、ゲストコードの変更の有無を判断する。変更しないと判断した場合は、ステップS130に進む。一方、変更すると判断した場合は、ステップS120に進む。   At this time, the VMM 10 determines whether or not the contents of the emulation include a change in the guest code that has been subjected to code conversion (S110). Note that the VMM 10 determines whether or not the guest code has been changed by determining whether or not the guest code exists in the page when the guest 20 writes to the page for which write protection is set. If it is determined not to change, the process proceeds to step S130. On the other hand, if it is determined to be changed, the process proceeds to step S120.

ステップS120では、VMM10は、書き換えられたゲストコードに対応する変換コードの無効化処理を実行する(S120)。   In step S120, the VMM 10 executes conversion code invalidation processing corresponding to the rewritten guest code (S120).

ステップS130では、VMM10は、HW操作の頻度判定処理を実行する。この処理によって、ゲスト20によってなされたHW操作の頻度が高頻度であるか低頻度であるかが判定される。   In step S130, the VMM 10 executes a frequency determination process for the HW operation. With this process, it is determined whether the frequency of the HW operation performed by the guest 20 is high or low.

次に、VMM10は、HW操作の頻度判定処理の結果、頻度が高頻度であるか否かを判断する(S140)。高頻度であると判断した場合はステップS170に進む。低頻度であると判断した場合はステップS180に進む。   Next, the VMM 10 determines whether the frequency is high as a result of the frequency determination process of the HW operation (S140). If it is determined that the frequency is high, the process proceeds to step S170. If it is determined that the frequency is low, the process proceeds to step S180.

ステップS170では、VMM10は、以降のHW操作の検出手段をコード変換方式に決定する。そして、動作方式表82の当該ゲスト及びCPUに対応する動作方式513をコード変換方式に変更する。   In step S <b> 170, the VMM 10 determines the code conversion method as the subsequent HW operation detection means. Then, the operation method 513 corresponding to the guest and CPU in the operation method table 82 is changed to the code conversion method.

一方、ステップS180では、VMM10は、以降のHW操作の検出手段をVT方式に決定する。そして、動作方式表82の当該ゲスト及びCPUに対応する動作方式513をVT方式に変更する。   On the other hand, in step S180, the VMM 10 determines the detection means for the subsequent HW operation as the VT method. Then, the operation method 513 corresponding to the guest and CPU in the operation method table 82 is changed to the VT method.

次に、VMM10は、S160では、当該HW操作の次の処理の選択処理を実行する。   Next, in S160, the VMM 10 executes a selection process for the next process of the HW operation.

図28は、図27のステップS120の変換コードの無効化処理のフローチャートである。   FIG. 28 is a flowchart of the conversion code invalidation process in step S120 of FIG.

VMM10は、変換コード管理表35を参照して、書き換えられたゲストコードに対応するエントリのvalidビットをクリアする。すなわち、validビットを0に変更する(S600)。   The VMM 10 refers to the conversion code management table 35 and clears the valid bit of the entry corresponding to the rewritten guest code. That is, the valid bit is changed to 0 (S600).

次に、VMM10は、書き換えられたゲストコードに対応するライトプロテクトを解除する(S620)。   Next, the VMM 10 releases the write protect corresponding to the rewritten guest code (S620).

図29は、図27のステップS130の頻度判断処理のフローチャートである。   FIG. 29 is a flowchart of the frequency determination process in step S130 of FIG.

まず、VMM10は、HW操作履歴表73を参照して、1つ前に実行されたHW操作に関するエントリを取得する。そして、当該エントリの、動作主体とゲストコードの物理アドレスと時刻情報とを取得する(S900)。   First, the VMM 10 refers to the HW operation history table 73 and acquires an entry related to the HW operation executed immediately before. Then, the operation subject, the physical address of the guest code, and time information of the entry are acquired (S900).

次にVMM10は、1つ前に実行されたHW操作の動作主体がアプリケーション(AP)であるか否かを判断する(S990)。動作主体がAPであると判断した場合はステップS940に進む。動作主体がAPではない、すなわち動作主体がOSであると判断した場合はステップS910に進む。   Next, the VMM 10 determines whether or not the operating subject of the HW operation executed immediately before is an application (AP) (S990). If it is determined that the operating subject is an AP, the process proceeds to step S940. If it is determined that the operating subject is not an AP, that is, the operating subject is an OS, the process proceeds to step S910.

ステップS910では、VMM10は、今回のHW操作の時刻情報と1つ前のHW操作の時刻情報との差から、HW操作の間隔を算出する。   In step S910, the VMM 10 calculates the interval of the HW operation from the difference between the time information of the current HW operation and the time information of the previous HW operation.

次に、VMM10は、算出したHW操作の間隔と、コード変換の設定表95から取得した閾値とを比較する。比較の結果、算出したHW操作の間隔が取得した閾値の範囲以内であるか否かを判断する(S920)。算出したHW操作の間隔が閾値以内であると判断した場合はステップS930に進む。一方、算出したHW操作の間隔が、閾値を越えると判断した場合はステップS940に進む。   Next, the VMM 10 compares the calculated HW operation interval with the threshold acquired from the code conversion setting table 95. As a result of the comparison, it is determined whether or not the calculated HW operation interval is within the acquired threshold range (S920). If it is determined that the calculated HW operation interval is within the threshold, the process proceeds to step S930. On the other hand, if it is determined that the calculated HW operation interval exceeds the threshold, the process proceeds to step S940.

ステップS930では、VMM10は、1つ前のHW操作に関するエントリのゲストコードの物理アドレスを、HW操作頻度表72に追加する。そして、追加したエントリのvalidビットを1に設定する。これによって、このゲストコードの物理アドレスが、高頻度部分の始点又は中間点として設定される。   In step S930, the VMM 10 adds the physical address of the guest code of the entry related to the previous HW operation to the HW operation frequency table 72. Then, the valid bit of the added entry is set to 1. As a result, the physical address of this guest code is set as the start point or intermediate point of the high-frequency portion.

ステップS940では、VMM10は、今回実行されたHW操作に関するエントリ、すなわち、動作主体とゲストコードの命令アドレスと時刻情報とをHW操作履歴表73に格納する。   In step S940, the VMM 10 stores the entry related to the currently executed HW operation, that is, the operation subject, the instruction address of the guest code, and the time information in the HW operation history table 73.

次に、VMM10は、今回実行されたHW操作に関して、当該HW操作のゲストコードの命令アドレスがHW操作頻度表72に含まれているか否かを判断する(S950)。HW操作頻度表72に含まれていると判断した場合はステップS740に進む。HW操作頻度表72に含まれていないと判断した場合はステップS730に進む。   Next, the VMM 10 determines whether or not the instruction address of the guest code of the HW operation is included in the HW operation frequency table 72 for the currently executed HW operation (S950). If it is determined that it is included in the HW operation frequency table 72, the process proceeds to step S740. If it is determined that it is not included in the HW operation frequency table 72, the process proceeds to step S730.

ステップS740では、VMM10は、今回実行されたHW操作は高頻度部分の始点又は中間点であると判定する。   In step S740, the VMM 10 determines that the HW operation executed this time is the start point or the intermediate point of the high-frequency portion.

ステップS730では、VMM10は、今回実行されたHW操作は低頻度部分の始点又は中間点であると判定する。   In step S730, the VMM 10 determines that the HW operation executed this time is the start point or the intermediate point of the low frequency portion.

図30は、図27のステップS160の次処理の選択処理のフローチャートである。   FIG. 30 is a flowchart of the selection process of the next process in step S160 of FIG.

VMM10は、ゲスト20が終了したか否か、すなわち、ゲスト20が稼働する仮想計算機21の電源がOFFにされたか否かを判断する(S1000)。仮想計算機21の電源がOFFにされたと判断した場合はステップS1010に進む。そうでなければステップS1120に進む。   The VMM 10 determines whether or not the guest 20 has been terminated, that is, whether or not the virtual machine 21 in which the guest 20 is running has been turned off (S1000). If it is determined that the virtual computer 21 has been powered off, the process advances to step S1010. Otherwise, the process proceeds to step S1120.

ステップS1010では、VMM10は、次に実行する処理として、ゲスト終了を選択する。   In step S1010, the VMM 10 selects guest termination as the next process to be executed.

ステップS1120では、VMM10は、動作方式表82を参照して、現在の動作方式がコード変換方式であるか否かを判断する。現在の動作方式がコード変換方式であると判断した場合はステップS1040に進む。現在の動作方式がVT方式であると判断した場合はステップS1060に進む。   In step S1120, the VMM 10 refers to the operation method table 82 and determines whether or not the current operation method is a code conversion method. If it is determined that the current operation method is the code conversion method, the process proceeds to step S1040. If it is determined that the current operation method is the VT method, the process proceeds to step S1060.

ステップS1040では、VMM10は、次に実行する処理に変換コードを適用することを決定する。そして、次に実行する変換コードを検索するための変換コードの検索処理を実行する(S1130)。   In step S1040, the VMM 10 determines to apply the conversion code to the next process to be executed. Then, a conversion code search process for searching for a conversion code to be executed next is executed (S1130).

一方、ステップS1060では、VMM10は、次に実行する処理にゲストコードを適用することを決定する。   On the other hand, in step S1060, the VMM 10 determines to apply the guest code to the process to be executed next.

図31は、図30のステップS1130の変換コードの検索処理のフローチャートである。   FIG. 31 is a flowchart of the conversion code search process in step S1130 of FIG.

まず、VMM10は、変換コード管理表35を参照して、今回処理したHW操作コードの次のゲストコードに対応するエントリを検索する(S1300)。   First, the VMM 10 searches the entry corresponding to the guest code next to the HW operation code processed this time with reference to the conversion code management table 35 (S1300).

次に、VMM10は、該当するエントリが存在するか否かを判断する(S1310)。エントリが存在すると判断した場合はステップS1320に進む。エントリが存在しないと判断した場合はステップS1210に進む。   Next, the VMM 10 determines whether or not the corresponding entry exists (S1310). If it is determined that an entry exists, the process advances to step S1320. If it is determined that no entry exists, the process advances to step S1210.

ステップS1210では、VMM10は、変換コードを格納するためのメモリ領域のメモリ容量に必要な空き容量が存在するか否かを判断する。メモリ領域に必要な空き容量が存在しないと判断した場合は、ステップS1340に移行する。必要な空き容量が存在すると判断した場合は、ステップS1350に進む。   In step S1210, the VMM 10 determines whether there is a free space necessary for the memory capacity of the memory area for storing the conversion code. If it is determined that the necessary free space does not exist in the memory area, the process proceeds to step S1340. If it is determined that the necessary free space exists, the process proceeds to step S1350.

ステップS1340では、VMM10は、変換コードLRUリスト36を参照して、未使用時間の最も長い変換コードを含む要素を一つ選択する。そして、選択された要素に含まれる変換コードに属するページの物理アドレスを無効化することによって、変換コードをメモリ領域から破棄する。さらに、選択された要素に含まれる変換コードの情報を、変換コードLRUリスト36から削除する。そして、ステップS1210に戻る。すなわち、必要な空き容量が確保できるまで、未使用時間の最も長い変換コードをメモリ領域から破棄する。   In step S1340, the VMM 10 refers to the conversion code LRU list 36 and selects one element including the conversion code with the longest unused time. Then, the conversion code is discarded from the memory area by invalidating the physical address of the page belonging to the conversion code included in the selected element. Further, the conversion code information included in the selected element is deleted from the conversion code LRU list 36. Then, the process returns to step S1210. That is, the conversion code with the longest unused time is discarded from the memory area until the necessary free space can be secured.

一方、ステップS1350では、VMM10は、次に実行されるゲストコード以降のコードのうち、デコード可能なコードに対応する変換コードを生成し、生成されたコードを保存する。なお、変換コードはシャドウコードと昇格コードとで構成される。シャドウコードはゲストコードに対応して生成される。また、シャドウコードはゲストコードに含まれるHW操作コードの代わりに、昇格コードを含む。昇格コードはエミュレーションモジュールを呼び出すためのCPL減少分岐命令を含む。なお、本ステップにおいて生成した変換コードを、検索の結果とする。   On the other hand, in step S1350, the VMM 10 generates a conversion code corresponding to a decodable code among the codes after the guest code to be executed next, and stores the generated code. The conversion code includes a shadow code and a promotion code. The shadow code is generated corresponding to the guest code. The shadow code includes a promotion code instead of the HW operation code included in the guest code. The promotion code includes a CPL decrement branch instruction for calling the emulation module. The conversion code generated in this step is used as the search result.

次に、VMM10は、生成した変換コードの情報を変換コード管理表35に格納する。さらに、変換コードLRUリスト36の末尾に生成した変換コードの情報を追加する(S1360)。   Next, the VMM 10 stores the generated conversion code information in the conversion code management table 35. Further, information on the generated conversion code is added to the end of the conversion code LRU list 36 (S1360).

次に、VMM10は、ゲストコードの書き換えを検出するために、当該ゲストコードを含むページにライトプロテクトを設定する(S1370)。   Next, the VMM 10 sets write protection to a page including the guest code in order to detect rewriting of the guest code (S1370).

一方、ステップS1320では、VMM10は、次に実行すべき変換コードのアドレスを、検索されたエントリから取得する。取得された変換コードを検索の結果とする。   On the other hand, in step S1320, the VMM 10 acquires the address of the conversion code to be executed next from the retrieved entry. The obtained conversion code is used as a search result.

次に、VMM10は、当該エントリに対応する変換コードの組を最新に変更することによって、変換コードLRUリスト36を更新する(S1330)。   Next, the VMM 10 updates the conversion code LRU list 36 by changing the set of conversion codes corresponding to the entry to the latest (S1330).

なお、図26のステップS270のコード変換の設定更新処理は、前述の第1の実施の形態の図14のフローチャートと同一である。   Note that the code conversion setting update processing in step S270 of FIG. 26 is the same as the flowchart of FIG. 14 of the first embodiment described above.

以上のように、本発明の第3の実施の形態の仮想計算機システムではゲスト20によってHW操作を含むゲストコードの実行が要求されたときに、VMM10は、当該HW操作の実行間隔に応じて処理方法を変える。すなわち、当該HW操作を二つの部分に分け、実行間隔が小さい部分(すなわち、実行頻度が高い)に実行効率の高いコード変換方式を適用し、実行間隔が大きい(すなわち、実行頻度が高い)部分にメモリ消費量の少ないVT方式を適用する。このようにすることによって、高性能と省メモリとを両立することが可能なエミュレーション処理が可能となる。   As described above, in the virtual machine system according to the third embodiment of this invention, when the guest 20 requests execution of the guest code including the HW operation, the VMM 10 performs processing according to the execution interval of the HW operation. Change the way. That is, the HW operation is divided into two parts, a code conversion method with high execution efficiency is applied to a part where the execution interval is small (that is, execution frequency is high), and a part where the execution interval is large (that is, execution frequency is high) The VT method that consumes less memory is applied. By doing so, it is possible to perform emulation processing capable of achieving both high performance and memory saving.

本発明は、CPUとして、VT−i機能を搭載したIPFやVT−x機能を搭載したx86を備えた仮想計算機システムに適用することができる。   The present invention can be applied to a virtual machine system including an IPF equipped with a VT-i function and an x86 equipped with a VT-x function as a CPU.

本発明の第1の実施の形態の、仮想計算機システムを動作させる物理計算機のブロック図である。1 is a block diagram of a physical computer that operates a virtual computer system according to a first embodiment of this invention. FIG. 本発明の第1の実施の形態の、仮想計算機システムのソフトウェアとハードウェアの要部を示すブロック図である。FIG. 2 is a block diagram illustrating main parts of software and hardware of a virtual computer system according to the first embodiment of this invention. 本発明の第1及び第3の実施の形態の、コード変換の設定表の説明図である。It is explanatory drawing of the setting table | surface of the code conversion of the 1st and 3rd embodiment of this invention. 本発明の第1の実施の形態の、頻度判断モジュールのブロック図である。It is a block diagram of the frequency judgment module of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、HW操作頻度表の説明図である。It is explanatory drawing of the HW operation frequency table | surface of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、変換コード管理表の説明図である。It is explanatory drawing of the conversion code management table | surface of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、変換コードLRUリストの説明図である。It is explanatory drawing of the conversion code LRU list | wrist of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、VMMの動作のフローチャートである。3 is a flowchart of the operation of the VMM according to the first embodiment of this invention. 本発明の第1の実施の形態の、エミュレーション処理を示すフローチャートである。It is a flowchart which shows the emulation process of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、変換コードの無効化処理のフローチャートである。It is a flowchart of the invalidation process of the conversion code of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、ハードウェア操作の頻度判断処理のフローチャートである。3 is a flowchart of hardware operation frequency determination processing according to the first embodiment of this invention. 本発明の第1の実施の形態の、エミュレーション後の次処理選択処理のフローチャートである。It is a flowchart of the next process selection process after emulation of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、コード変換方式の適用処理のフローチャートである。It is a flowchart of the application process of the code conversion system of the 1st Embodiment of this invention. 本発明の第1の実施の形態の、方式切り替え条件の更新処理のフローチャートである。It is a flowchart of the update process of the system switching condition of the 1st Embodiment of this invention. 本発明の第2の実施の形態の、コード変換の設定表の説明図である。It is explanatory drawing of the setting table | surface of the code conversion of the 2nd Embodiment of this invention. 本発明の第2の実施の形態の、HW操作頻度表の説明図である。It is explanatory drawing of the HW operation frequency table | surface of the 2nd Embodiment of this invention. 本発明の第2の実施の形態の、変換コードの無効化処理のフローチャートである。It is a flowchart of the invalidation process of the conversion code of the 2nd Embodiment of this invention. 本発明の第2の実施の形態の、HW操作の頻度判断処理のフローチャートである。It is a flowchart of the frequency judgment process of HW operation of the 2nd Embodiment of this invention. 本発明の第3の実施の形態の、仮想計算機システムのソフトウェアとハードウェアの要部のブロック図である。It is a block diagram of the principal part of the software and hardware of a virtual machine system of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、頻度判断モジュールのブロック図である。It is a block diagram of the frequency judgment module of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、HW操作頻度表の説明図である。It is explanatory drawing of the HW operation frequency table | surface of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、HW操作履歴表の説明図である。It is explanatory drawing of the HW operation history table | surface of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、切り替えモジュールのブロック図である。It is a block diagram of the switching module of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、動作方式表の説明図である。It is explanatory drawing of the operation | movement system table | surface of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、変換コード管理表の説明図である。It is explanatory drawing of the conversion code management table | surface of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、VMMの動作のフローチャートである。It is a flowchart of operation | movement of VMM of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、エミュレーション処理のフローチャートである。It is a flowchart of the emulation process of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、変換コードの無効化処理のフローチャートである。It is a flowchart of the invalidation process of the conversion code of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、ハードウェア操作の頻度判断処理のフローチャートである。It is a flowchart of the frequency judgment process of the hardware operation of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、エミュレーション後の次処理選択処理のフローチャートである。It is a flowchart of the next process selection process after emulation of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の、変換コードの検索処理のフローチャートである。It is a flowchart of the search process of the conversion code of the 3rd Embodiment of this invention.

符号の説明Explanation of symbols

10 VMM
20 ゲスト
30 コード変換モジュール
31 シャドウコード
32 昇格コード
35 変換コード管理表
40 コード生成モジュール
50 例外イベントハンドラモジュール
60 エミュレーションモジュール
70 頻度判断モジュール
80 切り替えモジュール
90 物理計算機
91 記憶装置
92 コンソール
10 VMM
20 guest 30 code conversion module 31 shadow code 32 promotion code 35 conversion code management table 40 code generation module 50 exception event handler module 60 emulation module 70 frequency determination module 80 switching module 90 physical computer 91 storage device 92 console

Claims (28)

一つ以上のCPUと、データ及びプログラムを格納するメモリと、外部とでデータを送受信するインターフェースと、を備えたサーバ装置において、
前記CPUが前記メモリに格納されたプログラムを実行することによって、オペレーティングシステムが稼働する一以上の仮想計算機を稼働させる仮想計算機モニタが実行されており、
前記仮想計算機モニタは、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって前記サーバ装置のハードウェアに対する操作が要求されたときに、前記サーバ装置のハードウェアに対する操作を実行させる操作コードに基づいて前記操作をエミュレーションするエミュレーションモジュールと、
前記サーバ装置のハードウェアに対する操作を検出することによって前記CPUが発生する例外イベントを契機として、前記エミュレーションモジュールを呼び出す例外イベントハンドラモジュールと、
前記CPUの動作モードを切り替え、前記エミュレーションモジュールを呼び出すことによって、前記サーバ装置のハードウェアに対する操作をエミュレーションさせる昇格コードを管理するコード管理モジュールと、
所定の判断条件との比較の結果、前記サーバ装置のハードウェアに対する操作の頻度が高頻度であるか否かを判断する頻度判断モジュールと、
前記判断された頻度に基づいて、前記例外イベントハンドラモジュールによって前記エミュレーションモジュールを呼び出すか、前記昇格コードを実行することによって前記エミュレーションモジュールを呼び出すか、を決定する切り替えモジュールと、を備えることを特徴とするサーバ装置。
In a server device comprising one or more CPUs, a memory for storing data and programs, and an interface for transmitting and receiving data to and from the outside,
When the CPU executes a program stored in the memory, a virtual machine monitor that operates one or more virtual machines on which an operating system operates is executed,
The virtual machine monitor is
Emulation for emulating the operation based on an operation code for executing an operation on the hardware of the server device when an operation on the hardware of the server device is requested by the operating system or an application running on the operating system Modules,
An exception event handler module that calls the emulation module triggered by an exception event generated by the CPU by detecting an operation on the hardware of the server device;
A code management module that manages promotion codes that emulate operations on hardware of the server device by switching the operation mode of the CPU and calling the emulation module;
A frequency determination module that determines whether or not the frequency of the operation of the hardware of the server device is high as a result of comparison with a predetermined determination condition;
A switching module that determines whether to call the emulation module by the exception event handler module or to call the emulation module by executing the promotion code based on the determined frequency. Server device.
前記CPUは、ハードウェア操作許可モードとハードウェア操作禁止モードとの二つの動作モードを備え、前記動作モードが前記ハードウェア操作禁止モードであるときにハードウェアに対する操作を検出すると、例外イベントを発生してハードウェア操作許可モードに切り替え、
前記昇格コードは、前記ハードウェア操作許可モード及び前記ハードウェア操作禁止モードを切り替える命令を含み、
前記仮想計算機モニタは、前記CPUの動作モードが前記ハードウェア操作禁止モードであるときに前記昇格コードを呼び出すことによって、前記サーバ装置のハードウェアに対する操作をエミュレーションさせるシャドウコードを、前記操作コードに対応して生成する生成モジュールを含み、
前記CPUの動作モードを前記ハードウェア操作禁止モードとして、前記操作が要求されたときに、前記切り替えモジュールは、前記サーバ装置のハードウェアに対する操作の頻度が高ければ、前記シャドウコードを呼び出すことによって前記昇格コードを実行し、前記昇格コードによって前記エミュレーションモジュールを呼び出すことを特徴とする請求項1に記載のサーバ装置。
The CPU has two operation modes, a hardware operation permission mode and a hardware operation prohibit mode, and generates an exception event when an operation on the hardware is detected when the operation mode is the hardware operation prohibit mode. To switch to hardware operation permission mode,
The promotion code includes an instruction to switch between the hardware operation permission mode and the hardware operation prohibition mode,
The virtual machine monitor corresponds to the operation code with a shadow code that emulates an operation on the hardware of the server device by calling the promotion code when the operation mode of the CPU is the hardware operation inhibition mode. Including the generation module
When the operation is requested with the operation mode of the CPU as the hardware operation prohibition mode, the switching module calls the shadow code if the frequency of the operation on the hardware of the server device is high. The server device according to claim 1, wherein a promotion code is executed, and the emulation module is called by the promotion code.
前記切り替えモジュールは、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって要求された前記サーバ装置のハードウェアに対する第1の操作の頻度が所定の条件を満たすときに、
前記第1の操作を実行させる第1の操作コードの命令アドレス空間上での近傍にある第2の操作コードを実行するときは、前記例外イベントハンドラモジュールによって前記エミュレーションモジュールを呼び出す代わりに、前記昇格コードを実行することによって前記エミュレーションモジュールを呼び出すことを特徴とする請求項2に記載のサーバ装置。
The switching module is
When the frequency of the first operation on the hardware of the server device requested by the operating system or an application running on the operating system satisfies a predetermined condition,
When executing the second operation code in the vicinity of the instruction address space of the first operation code for executing the first operation, the promotion is performed instead of calling the emulation module by the exception event handler module. The server device according to claim 2, wherein the emulation module is called by executing a code.
前記切り替えモジュールは、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって前記操作を実行させる操作コードが変更されたことを、前記仮想計算機モニタが検出したときに、
前記変更された操作コードに対応するシャドウコードを無効化し、
前記変更された操作コードを実行するときに、前記シャドウコードを実行することによって前記エミュレーションモジュールを呼び出す代わりに、前記例外イベントハンドラモジュールによって前記エミュレーションモジュールを呼び出すことを特徴とする請求項2に記載のサーバ装置。
The switching module is
When the virtual machine monitor detects that the operating code for executing the operation has been changed by the operating system or an application running on the operating system,
Invalidate the shadow code corresponding to the changed operation code,
3. The emulation module is called by the exception event handler module instead of calling the emulation module by executing the shadow code when executing the modified operation code. Server device.
前記切り替えモジュールは、
前記シャドウコード及び前記昇格コードを保持するために必要なメモリの容量が不足したときは、
前記生成されたシャドウコードのうち、実行されなかった期間が最も長いシャドウコードを選択し、前記選択されたシャドウコード及び当該選択されたシャドウコードに関連する昇格コードを前記メモリから削除し、
前記削除されたシャドウコードを実行する代わりに、前記例外イベントハンドラモジュールによって前記エミュレーションモジュールを呼び出すことを特徴とする請求項2に記載のサーバ装置。
The switching module is
When the memory capacity required to hold the shadow code and the promotion code is insufficient,
Selecting a shadow code having the longest non-executed period among the generated shadow codes, and deleting the selected shadow code and a promotion code associated with the selected shadow code from the memory;
3. The server device according to claim 2, wherein the emulation module is called by the exception event handler module instead of executing the deleted shadow code.
前記頻度判断モジュールは、
頻度が高い前記操作を特定可能な頻度情報を保持し、
前記操作が要求されたときに、前記要求された操作の種別が前記保持された頻度情報に含まれているか否かを判断し、
前記要求された操作の種別が前記保持された頻度情報に含まれているときは、前記要求された操作の頻度が高いと判断することを特徴とする請求項1に記載のサーバ装置。
The frequency determination module includes:
Holds frequency information that can identify the operations with high frequency,
When the operation is requested, it is determined whether or not the type of the requested operation is included in the held frequency information,
The server device according to claim 1, wherein when the type of the requested operation is included in the held frequency information, it is determined that the frequency of the requested operation is high.
前記頻度判断モジュールは、
前記操作コードの命令アドレス空間において所定のアドレス範囲に属する操作コードの実行回数を、前記所定のアドレス範囲毎に保持し、
前記操作が要求されたときに、前記要求された操作を実行させる操作コードが属する前記アドレス範囲に含まれる全ての操作コードの実行回数を取得し、前記取得された実行回数が所定の閾値を超えたときは、前記要求された操作の頻度が高いと判断することを特徴とする請求項1に記載のサーバ装置。
The frequency determination module includes:
The number of executions of the operation code belonging to a predetermined address range in the instruction address space of the operation code is held for each predetermined address range,
When the operation is requested, the number of executions of all operation codes included in the address range to which the operation code that executes the requested operation belongs is acquired, and the acquired number of executions exceeds a predetermined threshold The server device according to claim 1, wherein the server device determines that the frequency of the requested operation is high.
前記頻度判断モジュールは、
前記操作が実行された時を特定可能な時刻情報を保持し、
前記操作が要求されたときに、前記要求された操作を実行させる操作コードが実行された時の時刻情報と、前記要求された操作を実行させる操作コードが前回実行された時の時刻情報との間隔を算出し、
前記算出された間隔が所定の閾値よりも小さいときは、前記操作の頻度が高いと判断することを特徴とする請求項1に記載のサーバ装置。
The frequency determination module includes:
Holds time information that can identify when the operation is performed,
Time information when an operation code for executing the requested operation is executed when the operation is requested, and time information when an operation code for executing the requested operation is executed last time Calculate the interval,
The server device according to claim 1, wherein when the calculated interval is smaller than a predetermined threshold, it is determined that the frequency of the operation is high.
管理者によって入力された前記所定の判断条件を受け付ける入力部と、
前記受け付けた所定の判断条件を保存する記憶装置と、を備えることを特徴とする請求項1に記載のサーバ装置。
An input unit for receiving the predetermined determination condition input by an administrator;
The server apparatus according to claim 1, further comprising: a storage device that stores the received predetermined determination condition.
前記CPUは、
VMビットを0に設定することによって、前記ハードウェア操作許可モードに遷移し、
VMビットを0以外に設定することによって、前記ハードウェア操作禁止モードに遷移し、
前記シャドウコードは、前記VMビットが0以外に設定された状態で実行され、
前記昇格コードは、前記VMビットの設定を変更する命令を含み、
前記切り替えモジュールは、
前記サーバ装置のハードウェアに対する操作を実行させる操作コードのアドレスと前記操作コードに対応する前記シャドウコードが格納されたアドレスとを対応付け、
前記操作のエミュレーションを実行するときに、前記対応付けに基づいて、前記操作コードのアドレスを前記シャドウコードのアドレスに置き換えることによって、前記シャドウコードが実行され、前記シャドウコードの実行によって前記エミュレーションモジュールを呼び出すことを特徴とする請求項2に記載のサーバ装置。
The CPU
By setting the VM bit to 0, transition to the hardware operation permission mode,
By setting the VM bit to a value other than 0, the hardware operation prohibit mode is entered,
The shadow code is executed with the VM bit set to non-zero,
The promotion code includes an instruction to change a setting of the VM bit;
The switching module is
Associating an address of an operation code for executing an operation on the hardware of the server device with an address storing the shadow code corresponding to the operation code;
When executing the emulation of the operation, the shadow code is executed by replacing the address of the operation code with the address of the shadow code based on the association, and the emulation module is executed by executing the shadow code. The server device according to claim 2, wherein the server device is called.
前記CPUは、
特権レベルを0、かつ、VMX rootモードに設定することによって、前記ハードウェア操作許可モードに遷移し、
特権レベルを0以外、又は、VMX non‐rootモードに設定することによって、前記ハードウェア操作禁止モードに遷移し、
前記シャドウコードは、前記特権レベルが3、かつ、VMX rootモードに設定された状態で稼働し、
前記昇格コードは、前記特権レベルを変更する命令を含み、
前記切り替えモジュールは、
前記サーバ装置のハードウェアに対する操作を実行させる操作コードのアドレスと前記シャドウコードが格納されたアドレスとを対応付け、
前記操作のエミュレーションを実行するときに、前記対応付けに基づいて、前記操作コードへの処理の分岐の代わりに、前記シャドウコードが格納されたアドレスへの処理の分岐を実行することによって、前記シャドウコードが実行され、前記シャドウコードの実行によって前記エミュレーションモジュールが呼び出されることを特徴とする請求項2に記載のサーバ装置。
The CPU
By setting the privilege level to 0 and the VMX root mode, transition to the hardware operation permission mode,
By setting the privilege level to a value other than 0 or VMX non-root mode, transition to the hardware operation prohibition mode,
The shadow code operates in a state where the privilege level is 3 and the VMX root mode is set.
The promotion code includes an instruction to change the privilege level;
The switching module is
Associating an address of an operation code for executing an operation on the hardware of the server device with an address storing the shadow code,
When executing the emulation of the operation, by executing the processing branch to the address where the shadow code is stored instead of the processing branch to the operation code based on the association, the shadow 3. The server apparatus according to claim 2, wherein a code is executed and the emulation module is called by executing the shadow code.
前記コード生成部は、前記エミュレーションモジュールに含まれるエミュレーションコードを、前記昇格コードに含め、
前記昇格コードに加え前記エミュレーションコードが実行されることによって、前記サーバ装置のハードウェアに対する操作を実行することを特徴とする請求項2に記載のサーバ装置。
The code generation unit includes the emulation code included in the emulation module in the promotion code,
The server apparatus according to claim 2, wherein an operation on hardware of the server apparatus is executed by executing the emulation code in addition to the promotion code.
前記コード生成部は、前記昇格コードを前記シャドウコードに含め、
前記シャドウコードに加え前記昇格コードが実行されることによって、前記サーバ装置のハードウェアに対する操作を、前記仮想計算機モニタ上でエミュレーションすることを特徴とする請求項2に記載のサーバ装置。
The code generation unit includes the promotion code in the shadow code,
3. The server apparatus according to claim 2, wherein an operation on the hardware of the server apparatus is emulated on the virtual machine monitor by executing the promotion code in addition to the shadow code.
一つ以上のCPUと、データ及びプログラムを格納するメモリと、外部とでデータを送受信するインターフェースと、を備えたサーバ装置において、
前記CPUが前記メモリに格納されたプログラムを実行することによって、オペレーティングシステムが稼働する一以上の仮想計算機を稼働させる仮想計算機モニタが実行されており、
前記仮想計算機モニタは、前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって要求された、前記サーバ装置のハードウェアに対する操作毎の実行の頻度を保持することを特徴とするサーバ装置。
In a server device comprising one or more CPUs, a memory for storing data and programs, and an interface for transmitting and receiving data to and from the outside,
When the CPU executes a program stored in the memory, a virtual machine monitor that operates one or more virtual machines on which an operating system operates is executed,
The virtual machine monitor holds a frequency of execution for each operation on the hardware of the server apparatus requested by the operating system or an application running on the operating system.
一つ以上のCPUと、データ及びプログラムを格納するメモリと、外部とでデータを送受信するインターフェースと、を備えたサーバ装置に、オペレーティングシステムが稼働する一以上の仮想計算機を稼働させる仮想計算機の制御プログラムであって、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって前記サーバ装置のハードウェアに対する操作が要求されたときに、前記サーバ装置のハードウェアに対する操作を検出することによって前記CPUが発生する例外イベントを契機として、前記サーバ装置のハードウェアに対する操作を実行させる操作コードに基づいて前記ハードウェアに対する操作をエミュレーションする第1の手順と、
前記CPUの動作モードを切り替え、前記サーバ装置のハードウェアに対する操作をエミュレーションさせる昇格コードを実行する第2の手順と、
所定の判断条件との比較の結果、前記操作の頻度が高頻度であるか否かを判断する第3の手順と、
前記判断された頻度に基づいて、前記1の手順を実行するか、前記第2の手順を実行するか、を決定する第4の手順と、を前記サーバ装置に実行させることを特徴とする仮想計算機の制御プログラム。
Control of a virtual machine that operates one or more virtual machines on which an operating system is operated in a server device having one or more CPUs, a memory for storing data and programs, and an interface for transmitting and receiving data to and from the outside A program,
When an operation on the hardware of the server device is requested by the operating system or an application running on the operating system, an exception event generated by the CPU is detected by detecting the operation on the hardware of the server device. A first procedure for emulating an operation on the hardware based on an operation code for executing an operation on the hardware of the server device;
A second procedure for switching an operation mode of the CPU and executing a promotion code for emulating an operation on hardware of the server device;
A third procedure for determining whether or not the frequency of the operation is high as a result of comparison with a predetermined determination condition;
A virtual procedure that causes the server device to execute a fourth procedure for determining whether to execute the first procedure or the second procedure based on the determined frequency. Computer control program.
前記CPUは、ハードウェア操作許可モードとハードウェア操作禁止モードとの二つの動作モードを備え、動作モードが前記ハードウェア操作禁止モードであるときにハードウェアに対する操作を検出すると、例外イベントを発生してハードウェア操作許可モードに切り替え、
前記第1の手順は、前記CPUの動作モードを前記ハードウェア操作禁止モードとして、前記操作が要求されたときに、前記操作を検出することによって前記CPUが発生する例外イベントを契機として、前記CPUの動作モードを前記ハードウェア操作許可モードに切り替え、前記操作をエミュレーションさせる手順を含み、
前記第2の手順は、前記CPUの動作モードが前記ハードウェア操作禁止モードであるときに前記昇格コードを呼び出すことによって、前記サーバ装置のハードウェアに対する操作をエミュレーションさせるシャドウコードを、前記操作コードに対応して生成する手順を含み、
前記第4の手順は、前記CPUの動作モードを前記ハードウェア操作禁止モードとして、前記操作が要求されたときに、前記サーバ装置のハードウェアへの操作の頻度が高ければ、前記第2の手順を実行することを特徴とする請求項15に記載の仮想計算機の制御プログラム。
The CPU has two operation modes, a hardware operation permission mode and a hardware operation inhibition mode, and generates an exception event when an operation on the hardware is detected when the operation mode is the hardware operation inhibition mode. Switch to hardware operation permission mode,
In the first procedure, the CPU operation mode is set to the hardware operation prohibition mode, and when the operation is requested, the CPU is triggered by an exception event generated by the CPU by detecting the operation. Including a procedure for switching the operation mode to the hardware operation permission mode and emulating the operation,
In the second procedure, a shadow code that emulates an operation on the hardware of the server device is called the operation code by calling the promotion code when the operation mode of the CPU is the hardware operation prohibition mode. Including correspondingly generating steps,
If the operation frequency of the server apparatus is high when the operation is requested when the operation mode of the CPU is set to the hardware operation inhibition mode, the fourth procedure is performed. The virtual machine control program according to claim 15, wherein:
前記第4の手順は、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって要求された前記サーバ装置のハードウェアに対する第1の操作の頻度が所定の条件を満たすときに、
前記第1の操作を実行させる第1の操作コードの命令アドレス空間上での近傍にある第2の操作コードを実行するときは、前記第1の手順の代わりに、前記第2の手順を実行する特徴とする請求項15に記載の仮想計算機の制御プログラム。
The fourth procedure includes:
When the frequency of the first operation on the hardware of the server device requested by the operating system or an application running on the operating system satisfies a predetermined condition,
When executing the second operation code in the vicinity of the instruction address space of the first operation code for executing the first operation, the second procedure is executed instead of the first procedure. The virtual machine control program according to claim 15, wherein:
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって前記操作を実行させる操作コードが変更されたこと、を検出する手順と、
前記変更された操作コードに対応するシャドウコードを無効化する手順と、をさらに含み、
前記第4の手順は、前記変更された操作コードを実行するときに、前記第2の手順の代わりに、前記第1の手順を実行することを特徴とする請求項16に記載の仮想計算機の制御プログラム。
A procedure for detecting that an operation code for executing the operation has been changed by the operating system or an application running on the operating system;
Further comprising a step of invalidating a shadow code corresponding to the changed operation code,
The virtual machine according to claim 16, wherein the fourth procedure executes the first procedure instead of the second procedure when executing the changed operation code. Control program.
前記シャドウコード及び前記昇格コードを保持するために必要な前記メモリの容量が不足したことを検出する手順と、
前記生成されたシャドウコードのうち、実行されなかった期間が最も長いシャドウコードを選択し、前記選択されたシャドウコード及び当該シャドウコードに関連する昇格コードを前記メモリから削除する手順と、をさらに含み、
前記第4の手順は、前記削除されたシャドウコードを実行するときは、前記第2の手順の代わりに、前記第1の手順を実行することを特徴とする請求項16に記載の仮想計算機の制御プログラム。
A procedure for detecting that the memory capacity necessary for holding the shadow code and the promotion code is insufficient;
A step of selecting a shadow code having the longest non-executed period from among the generated shadow codes, and deleting the selected shadow code and a promotion code associated with the shadow code from the memory; ,
The virtual machine according to claim 16, wherein when executing the deleted shadow code, the fourth procedure executes the first procedure instead of the second procedure. Control program.
前記第3の手順は、
前記操作は、前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションの何れによって要求されたかを判断する手順と、
頻度が高い前記操作を特定可能な頻度情報を保持する手順と、
前記オペレーティングシステムによって前記サーバ装置のハードウェアに対する操作が要求されたときに、前記要求された操作の種別が前記保持された頻度情報に含まれているか否かを判断する手順と、
前記要求された操作の種別が前記保持された頻度情報に含まれているときは、前記要求された操作の頻度が高いと判断する手順と、を含むことを特徴とする請求項15に記載の仮想計算機の制御プログラム。
The third procedure is:
A procedure for determining whether the operation is requested by the operating system or an application running on the operating system;
A procedure for holding frequency information that can identify the operation with high frequency,
A procedure for determining whether or not the type of the requested operation is included in the held frequency information when an operation to the hardware of the server device is requested by the operating system;
The method according to claim 15, further comprising: a step of determining that the frequency of the requested operation is high when the type of the requested operation is included in the held frequency information. Virtual computer control program.
前記第3の手順は、
前記操作コードの命令アドレス空間において所定のアドレス範囲に属する操作コードの実行回数を、前記所定のアドレス範囲毎に保持する手順と、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって前記サーバ装置のハードウェアに対する操作の実行が要求されたときに、前記要求された操作を実行させる操作コードが属する前記アドレス範囲に含まれる全ての操作コードの実行回数を取得する手順と、
前記取得された実行回数が所定の閾値を超えたときに、前記要求された操作の頻度が高いと判断する手順と、を含むことを特徴とする請求項15に記載の仮想計算機の制御プログラム。
The third procedure is:
A procedure for holding the number of executions of an operation code belonging to a predetermined address range in the instruction address space of the operation code for each of the predetermined address ranges;
When execution of an operation on the hardware of the server device is requested by the operating system or an application running on the operating system, all the addresses included in the address range to which an operation code that executes the requested operation belongs The procedure to get the number of executions of the operation code,
The virtual computer control program according to claim 15, further comprising: a step of determining that the frequency of the requested operation is high when the acquired number of executions exceeds a predetermined threshold value.
前記第3の手順は、
前記操作は、前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションの何れによって要求されたかを判断する手順と、
前記操作が実行された時を特定可能な時刻情報を保持する手順と、
前記オペレーティングシステムによってサーバ装置のハードウェアに対する操作が要求されたときに、前記要求された操作を実行させる操作コードが実行された時の時刻情報と前記要求された操作を実行させる操作コードが前回実行された時の時刻情報との間隔を算出する手順と、
前記算出した間隔が所定の閾値よりも小さいときに、当該操作の頻度が高いと判断する手順と、を含むことを特徴とする請求項15に記載の仮想計算機の制御プログラム。
The third procedure is:
A procedure for determining whether the operation is requested by the operating system or an application running on the operating system;
A procedure for holding time information that can specify when the operation is performed;
When an operation on the hardware of the server device is requested by the operating system, the time information when the operation code for executing the requested operation is executed and the operation code for executing the requested operation are previously executed. A procedure for calculating an interval with the time information when
The virtual computer control program according to claim 15, further comprising: determining that the frequency of the operation is high when the calculated interval is smaller than a predetermined threshold.
管理者によって入力された前記所定の判断条件を受け付ける手順と、
前記入力された所定の判断条件を記憶装置に保存する手順と、を備えることを特徴とする請求項15に記載の仮想計算機の制御プログラム。
A procedure for receiving the predetermined judgment condition input by an administrator;
The virtual computer control program according to claim 15, further comprising: a procedure for storing the input predetermined determination condition in a storage device.
前記第1の手順は、例外イベントの発生によって前記CPUのVMビットを0に設定することによって、前記ハードウェア操作許可モードに遷移する手順を含み、
前記第2の手順は、vmsw命令を実行して前記CPUのVMビットを0に設定することによって、前記ハードウェア操作許可モードに遷移する手順を含み、
前記第4の手順は、
前記操作コードの命令アドレスと前記操作コードに対応する前記シャドウコードが格納されたアドレスとを対応付け、前記対応付けに基づいて、前記操作コードのアドレスを前記シャドウコードのアドレスに置き換えることによって、前記第1の手順の代わりに前記第2の手順を実行する手順と、
前記操作コードを実行させることによって、前記第2の手順の代わりに前記第1の手順を実行する手順と、を含むことを特徴とする請求項16に記載の仮想計算機の制御プログラム。
The first procedure includes a procedure for transitioning to the hardware operation permission mode by setting a VM bit of the CPU to 0 when an exception event occurs,
The second procedure includes a procedure of transitioning to the hardware operation permission mode by executing a vmsw instruction and setting the VM bit of the CPU to 0,
The fourth procedure includes:
By associating the instruction address of the operation code with the address where the shadow code corresponding to the operation code is stored, and replacing the address of the operation code with the address of the shadow code based on the association, Executing the second procedure instead of the first procedure;
The virtual machine control program according to claim 16, further comprising: a step of executing the first procedure instead of the second procedure by causing the operation code to be executed.
前記第1の手順は、VMexitイベントの発生によって前記CPUをVMX rootモードに設定することによって、前記ハードウェア操作許可モードに遷移する手順を含み、
前記第2の手順は、特権レベル減少分岐命令を実行して前記CPUの特権レベルを0に設定することによって、前記ハードウェア操作許可モードに遷移する手順を含み、
前記第4の手順は、
前記サーバ装置のハードウェアに対する操作を実行させる操作コードの命令アドレスの代わりに、前記シャドウコードが格納された仮想アドレスへの処理の分岐を実行することによって、前記操作のエミュレーションを実行するときに、前記第1の手順の代わりに前記第2の手順を実行する手順と、
前記サーバ装置のハードウェアに対する操作を実行させる操作コードの命令アドレスへの処理の分岐を実行することによって、前記操作のエミュレーションを実行するときに、前記第2の手順の代わりに前記第1の手順を実行する手順と、を含むことを特徴とする請求項16に記載の仮想計算機の制御プログラム。
The first procedure includes a procedure of transitioning to the hardware operation permission mode by setting the CPU to a VMX root mode by occurrence of a VMexit event,
The second procedure includes a procedure of transitioning to the hardware operation permission mode by executing a privilege level decrease branch instruction to set the privilege level of the CPU to 0.
The fourth procedure includes:
When executing emulation of the operation by executing a branch of processing to a virtual address in which the shadow code is stored instead of an instruction address of an operation code for executing an operation on the hardware of the server device, Executing the second procedure instead of the first procedure;
When the emulation of the operation is executed by executing a branch of processing to an instruction address of an operation code for executing an operation on the hardware of the server device, the first procedure is performed instead of the second procedure. The virtual machine control program according to claim 16, further comprising:
前記第2の手順は、
前記操作をエミュレーションするエミュレーションコードを前記昇格コードに含める手順と、
前記昇格コードに加え前記エミュレーションコードが実行されることによって、前記サーバ装置のハードウェアに対する操作のエミュレーションを実行する手順と、を含むことを特徴とする請求項16に記載の仮想計算機の制御プログラム。
The second procedure is:
Including an emulation code for emulating the operation in the promotion code;
The virtual machine control program according to claim 16, further comprising: a procedure for executing an emulation of an operation on hardware of the server device by executing the emulation code in addition to the promotion code.
前記第2の手順は、
前記昇格コードを前記シャドウコードに含め、
前記シャドウコードに加え前記昇格コードが実行されることによって、前記サーバ装置のハードウェアに対する操作をエミュレーションすることを特徴とする請求項16に記載の仮想計算機の制御プログラム。
The second procedure is:
Include the promotion code in the shadow code,
17. The virtual machine control program according to claim 16, wherein an operation on the hardware of the server device is emulated by executing the promotion code in addition to the shadow code.
一つ以上のCPUと、データ及びプログラムを格納するメモリと、外部とでデータを送受信するインターフェースと、を備えたサーバ装置に、オペレーティングシステムが稼働する一以上の仮想計算機を稼働させる仮想計算機の制御プログラムであって、
前記オペレーティングシステム又は前記オペレーティングシステム上で稼働するアプリケーションによって要求された、前記サーバ装置のハードウェアに対する操作毎の実行の頻度を保持する手順を前記サーバ装置に実行させることを特徴とする仮想計算機の制御プログラム。
Control of a virtual machine that operates one or more virtual machines on which an operating system is operated in a server device having one or more CPUs, a memory for storing data and programs, and an interface for transmitting and receiving data to and from the outside A program,
Control of a virtual machine, which causes the server device to execute a procedure that holds the frequency of execution for each operation on the hardware of the server device requested by the operating system or an application running on the operating system program.
JP2006097594A 2006-03-31 2006-03-31 Server apparatus and virtual machine control program Expired - Fee Related JP5010164B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006097594A JP5010164B2 (en) 2006-03-31 2006-03-31 Server apparatus and virtual machine control program
US11/703,662 US8104035B2 (en) 2006-03-31 2007-02-08 Program for controlling a virtual computer and computer system for virtulization technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006097594A JP5010164B2 (en) 2006-03-31 2006-03-31 Server apparatus and virtual machine control program

Publications (3)

Publication Number Publication Date
JP2007272576A true JP2007272576A (en) 2007-10-18
JP2007272576A5 JP2007272576A5 (en) 2008-11-20
JP5010164B2 JP5010164B2 (en) 2012-08-29

Family

ID=38561074

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006097594A Expired - Fee Related JP5010164B2 (en) 2006-03-31 2006-03-31 Server apparatus and virtual machine control program

Country Status (2)

Country Link
US (1) US8104035B2 (en)
JP (1) JP5010164B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022077155A (en) * 2020-11-11 2022-05-23 株式会社日立製作所 Computer system and job execution control method

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7840398B2 (en) * 2006-03-28 2010-11-23 Intel Corporation Techniques for unified management communication for virtualization systems
US8032897B2 (en) * 2007-07-31 2011-10-04 Globalfoundries Inc. Placing virtual machine monitor (VMM) code in guest context to speed memory mapped input/output virtualization
KR101120591B1 (en) 2007-10-29 2012-03-09 씨씨알 주식회사 option code operation system for concoction prevention and computer code analysis.
US8521966B2 (en) * 2007-11-16 2013-08-27 Vmware, Inc. VM inter-process communications
US8949106B2 (en) * 2009-09-18 2015-02-03 International Business Machines Corporation Just in time compiler in spatially aware emulation of a guest computer instruction set
WO2012103367A2 (en) 2011-01-27 2012-08-02 Soft Machines, Inc. Guest to native block address mappings and management of native code storage
WO2012103253A2 (en) * 2011-01-27 2012-08-02 Soft Machines, Inc. Multilevel conversion table cache for translating guest instructions to native instructions
EP2668565B1 (en) 2011-01-27 2019-11-06 Intel Corporation Guest instruction to native instruction range based mapping using a conversion look aside buffer of a processor
WO2012103373A2 (en) 2011-01-27 2012-08-02 Soft Machines, Inc. Variable caching structure for managing physical storage
WO2012103245A2 (en) 2011-01-27 2012-08-02 Soft Machines Inc. Guest instruction block with near branching and far branching sequence construction to native instruction block
WO2012103359A2 (en) 2011-01-27 2012-08-02 Soft Machines, Inc. Hardware acceleration components for translating guest instructions to native instructions
US9063760B2 (en) * 2011-10-13 2015-06-23 International Business Machines Corporation Employing native routines instead of emulated routines in an application being emulated
CN103107905B (en) * 2011-11-14 2017-08-04 华为技术有限公司 Abnormality eliminating method, device and client
US10146545B2 (en) 2012-03-13 2018-12-04 Nvidia Corporation Translation address cache for a microprocessor
US9880846B2 (en) 2012-04-11 2018-01-30 Nvidia Corporation Improving hit rate of code translation redirection table with replacement strategy based on usage history table of evicted entries
US10241810B2 (en) * 2012-05-18 2019-03-26 Nvidia Corporation Instruction-optimizing processor with branch-count table in hardware
US20140189310A1 (en) 2012-12-27 2014-07-03 Nvidia Corporation Fault detection in instruction translations
US10108424B2 (en) 2013-03-14 2018-10-23 Nvidia Corporation Profiling code portions to generate translations
EP2972798B1 (en) 2013-03-15 2020-06-17 Intel Corporation Method and apparatus for guest return address stack emulation supporting speculation
WO2014151652A1 (en) 2013-03-15 2014-09-25 Soft Machines Inc Method and apparatus to allow early dependency resolution and data forwarding in a microprocessor
GB2517494B (en) * 2013-08-23 2021-02-24 Advanced Risc Mach Ltd Handling time intensive instructions
US10963280B2 (en) 2016-02-03 2021-03-30 Advanced Micro Devices, Inc. Hypervisor post-write notification of control and debug register updates
US10387210B2 (en) * 2016-04-04 2019-08-20 International Business Machines Corporation Resource schedule optimization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6231437A (en) * 1985-07-31 1987-02-10 Hitachi Ltd Input and output control system for virtual computer system
JPH01243155A (en) * 1988-03-25 1989-09-27 Hitachi Ltd System for managing channel pass group in virtual computer system
JP2000222221A (en) * 1999-01-29 2000-08-11 Internatl Business Mach Corp <Ibm> Method/device for compiling and method/device for calculating method activity degree

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6397242B1 (en) * 1998-05-15 2002-05-28 Vmware, Inc. Virtualization system including a virtual machine monitor for a computer with a segmented architecture
US7373451B2 (en) * 2003-12-08 2008-05-13 The Board Of Trustees Of The Leland Stanford Junior University Cache-based system management architecture with virtual appliances, network repositories, and virtual appliance transceivers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6231437A (en) * 1985-07-31 1987-02-10 Hitachi Ltd Input and output control system for virtual computer system
JPH01243155A (en) * 1988-03-25 1989-09-27 Hitachi Ltd System for managing channel pass group in virtual computer system
JP2000222221A (en) * 1999-01-29 2000-08-11 Internatl Business Mach Corp <Ibm> Method/device for compiling and method/device for calculating method activity degree

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022077155A (en) * 2020-11-11 2022-05-23 株式会社日立製作所 Computer system and job execution control method
JP7168630B2 (en) 2020-11-11 2022-11-09 株式会社日立製作所 Computer system and job execution control method

Also Published As

Publication number Publication date
US20070234358A1 (en) 2007-10-04
US8104035B2 (en) 2012-01-24
JP5010164B2 (en) 2012-08-29

Similar Documents

Publication Publication Date Title
JP5010164B2 (en) Server apparatus and virtual machine control program
US10394560B2 (en) Efficient recording and replaying of non-deterministic instructions in a virtual machine and CPU therefor
US11614873B2 (en) Virtual disk storage techniques
Steinberg et al. NOVA: A microhypervisor-based secure virtualization architecture
US8775748B2 (en) Method and system for tracking data correspondences
KR101019937B1 (en) Secure operating system switching
US7844954B2 (en) Using branch instruction counts to facilitate replay of virtual machine instruction execution
US9009701B2 (en) Method for controlling a virtual machine and a virtual machine system
US7886293B2 (en) Optimizing system behavior in a virtual machine environment
US8909946B2 (en) Efficient power management of a system with virtual machines
Kloster et al. Efficient memory sharing in the xen virtual machine monitor
US20090164991A1 (en) Computer virtualization apparatus and program and method therefor
Zhang et al. High-density multi-tenant bare-metal cloud
KR101640769B1 (en) Virtual system and instruction executing method thereof
JP6194016B2 (en) Computer and load measuring method
US20230205713A1 (en) Computer device, exception processing method, and interrupt processing method
US20140317633A1 (en) Virtualizing A Processor Time Counter
JP2006155272A (en) Control method and program for virtual computer
US20130346975A1 (en) Memory management method, information processing device, and computer-readable recording medium having stored therein memory management program
Im et al. On-Demand Virtualization for Post-Copy OS Migration in Bare-Metal Cloud
Chiang Optimization techniques for memory virtualization-based resource management
JP2022522740A (en) Conditional yield for hypervisor instructions
Bitchebe et al. Intel page modification logging, a hardware virtualization feature: study and improvement for virtual machine working set estimation
Wei et al. Performance Impact of Host Kernel Page Table Isolation on Virtualized Servers
JP2005056019A (en) Information processor

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081006

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081006

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120306

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120309

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120507

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120601

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150608

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees