JPS6118224B2 - - Google Patents
Info
- Publication number
- JPS6118224B2 JPS6118224B2 JP12451777A JP12451777A JPS6118224B2 JP S6118224 B2 JPS6118224 B2 JP S6118224B2 JP 12451777 A JP12451777 A JP 12451777A JP 12451777 A JP12451777 A JP 12451777A JP S6118224 B2 JPS6118224 B2 JP S6118224B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- emulated
- protection key
- memory
- control program
- 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.)
- Expired
Links
- 230000010365 information processing Effects 0.000 claims description 16
- 238000000034 method Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 7
- 238000001514 detection method Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000006378 damage Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000008676 import Effects 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 231100000989 no adverse effect Toxicity 0.000 description 1
Landscapes
- Storage Device Security (AREA)
Description
【発明の詳細な説明】
(1) 発明の利用分野
本発明は、方式が異る情報処理装置をエミユレ
ートする場合に、従来、一様な記憶保護キーしか
利用できなかつ被エミユレートプログラムに、多
種類の記憶保護キー値を提供し、被エミユレート
プログラムの記憶保護を強化する手段に関するも
のである。DETAILED DESCRIPTION OF THE INVENTION (1) Field of Application of the Invention The present invention provides a method for emulating information processing apparatuses of different systems, in which conventionally only a uniform storage protection key could be used and the emulated program The present invention relates to a means for providing various types of memory protection key values to enhance memory protection of an emulated program.
(2) 従来技術
従来、方式が異る例えば命令セツトが異る情報
処理装置において動作していたプログラムを新し
い方式の情報処理装置で動作させるためにエミユ
レート技法が用いられてきた。エミユレート技法
により、以前に開発したプログラムを新しい情報
処理装置用に変換しなくとも実行可能であるため
に、移行手続きが簡略化できる。しかしながら、
従来のエミユレート技法では、被エミユレートプ
ログラム間の記憶保護動作において、問題があつ
た。以下これを図にそつて説明する。(2) Prior Art Conventionally, emulation techniques have been used to cause a program that was running on an information processing device with a different system, for example a different instruction set, to run on an information processing device with a new system. The emulation technique allows previously developed programs to be executed for a new information processing device without having to be converted, thereby simplifying the migration procedure. however,
Conventional emulation techniques have had problems in memory protection operations between emulated programs. This will be explained below with reference to the figures.
第1図は、エミユレート機構を含む情報処理装
置の概略図である。1は命令解読ユニツト(以下
IUと略す)、2は命令実行ユニツト(以下EUと
略す)、3は記憶装置制御ユニツト(以下SCUと
略す)、4は主記憶装置(以下MSと略す)、5は
診断制御ユニツト(以下SVUと略す)である。
エミユレート機構は、このうち、IUとEUにマイ
クロプログラムの一部と、回路の一部として組込
まれている。 FIG. 1 is a schematic diagram of an information processing device including an emulation mechanism. 1 is an instruction decoding unit (hereinafter referred to as
2 is an instruction execution unit (hereinafter abbreviated as EU), 3 is a storage control unit (hereinafter abbreviated as SCU), 4 is a main memory (hereinafter abbreviated as MS), and 5 is a diagnostic control unit (hereinafter abbreviated as SVU). ).
The emulate mechanism is incorporated into the IU and EU as part of the microprogram and part of the circuit.
第2図は、エミユレート機構を利用するさいに
MS内にどのようにプログラムが配置されるかを
示した模式図である。各番号はMS上のアドレス
に対応し、アドレス範囲1から2の間には、シス
テム全体を統轄する制御プログラムが、アドレス
範囲2から3の間には、被エミユレートプログラ
ムの入出力要求を制御プログラムに対する要求形
式に変換したり、一部の命令のシミュレートをし
たり、エミユレート機構を動作させるための命令
を発行したりなどするエミユレータ制御プログラ
ムがある。アドレス範囲3〜4には、旧方式の命
令で書かれた被エミユレート制御プログラムがあ
り、これを被エミユレートユーザプログラムの制
御を行う。アドレス範囲4から5、アドレス範囲
5から6には、被エミユレートユーザプログラム
があり、これも旧方式の命令で書かれている。ア
ドレス範囲6から7には、新方式の命令で書かれ
たユーザプログラムがある。アドレス範囲4から
6、6から7の間のユーザプログラムの個数は、
制御プログラムで許された個数だけ、同時に存在
する。またアドレスは、実アドレスでも仮想アド
レスでも本発明に影響ない。 Figure 2 shows how to use the emulate mechanism.
FIG. 2 is a schematic diagram showing how programs are arranged within an MS. Each number corresponds to an address on the MS. Address ranges 1 and 2 are for the control program that governs the entire system, and address ranges 2 and 3 are for the input/output requests of the emulated program. There is an emulator control program that converts the control program into a request format, simulates some instructions, and issues instructions for operating the emulation mechanism. In address ranges 3 and 4, there is an emulated control program written using old instructions, which controls the emulated user program. Address ranges 4 to 5 and address ranges 5 to 6 contain emulated user programs, which are also written using old-style instructions. Address ranges 6 to 7 contain user programs written with new style instructions. The number of user programs between address ranges 4 to 6 and 6 to 7 is
Only the number allowed by the control program exists at the same time. Furthermore, whether the address is a real address or a virtual address does not affect the present invention.
制御プログラムにとつては、アドレス範囲2か
ら6まで、アドレス範囲6から7までが、新方式
で書かれたユーザプログラムであると解釈して実
行する。それゆえ、アドレス範囲2から6まで、
アドレス範囲6から7までの各々は一つのジヨブ
を形成し、どちらでも非特権状態で走行する。ま
た、通常各ジヨブには、保護キー値と記憶保護キ
ー値が各々制御プログラムによりあたえられ、
各々のジヨブで実行されるプログラムが誤まつ
て、他のジヨブ領域の情報を破壊することをふせ
いでいる。但し制御プログラムは、MSのどの部
分でも操作可能である。 As for the control program, address ranges 2 to 6 and address ranges 6 to 7 are interpreted as user programs written using the new method and executed. Therefore, from address range 2 to 6,
Each of address ranges 6 to 7 forms a job, and both run unprivileged. In addition, normally each job is given a protection key value and a memory protection key value by the control program.
This prevents programs executed in each job from accidentally destroying information in other job areas. However, the control program can operate any part of the MS.
アドレス範囲2から6は、一つのジヨブとして
構成されるゆえ、記憶保護キー値は同じである。
それゆえ、被エミユレートユーザプログラム同志
が、誤つてたがいに情報をこわしたり、被エミユ
レート制御プログラムの内容をこわしたりするお
それがある。エミユレータ制御プログラムや被エ
ミユレートプログラムつまり被エミユレート制御
プログラムや被エミユレートユーザプログラムが
そのほかのアドレス範囲のプログラムの情報を誤
つて破壊することは、記憶保護キーの値が異るた
めありえない。 Since address ranges 2 to 6 are configured as one job, the protection key values are the same.
Therefore, there is a risk that emulated user programs may accidentally destroy information with each other or destroy the contents of the emulated control program. It is impossible for the emulator control program or the emulated program, that is, the emulated control program or the emulated user program, to accidentally destroy information of programs in other address ranges because the values of the memory protection keys are different.
このようにアドレス範囲2から6の間が一様な
記憶保護キーしか持てないことにより、被エミユ
レートプログラム同志の誤まりによる情報破壊を
ふせぐことが、従来においてはできなかつた。 In this way, since only a uniform memory protection key can be held in the address range 2 to 6, it has not been possible in the past to prevent information destruction due to errors between emulated programs.
アドレス範囲2から3、3から4、4から5、
5から6を、各々シヨブとして、独立の記憶保護
キーを与える方法も考えられるが、そのようにす
ると、被エミユレートプログラム間やエミユレー
タ制御プログラムが被エミユレートプログラムの
情報操作をする場合、いちいち相手プログラムの
持つ記憶保護キーと同じ値となる必要があり、そ
のための手続きを制御プログラムに依頼するため
のオーバヘツド、異るジヨブ間の情報のやりとり
を行うためのオーバヘツドがかかり、被エミユレ
ートプログラムを動かすにあたり、性能低下が著
しい。 address range 2 to 3, 3 to 4, 4 to 5,
It is also possible to assign independent memory protection keys to each of 5 and 6 as jobs, but in this case, when the emulated program or the emulator control program manipulates the information of the emulated program, The value must be the same as the memory protection key held by the other program, and the overhead required to request the control program to perform this procedure and the overhead required to exchange information between different jobs are required, making it difficult to emulate There is a noticeable drop in performance when running the program.
(3) 発明の目的
本発明は、エミユレート技法を持いて、プログ
ラムを実行する場合に、被エミユレートプログラ
ム間での誤りによる情報破壊を防ぐ手段を提供
し、その手段を低オーバヘツドで実現することを
目的とする。(3) Purpose of the Invention The present invention provides a means for preventing information destruction due to errors between emulated programs when programs are executed using an emulation technique, and achieves the means with low overhead. The purpose is to
(4) 実施例
以下、本発明を実施例を参照して詳細に説明す
る。(4) Examples Hereinafter, the present invention will be explained in detail with reference to examples.
通常エミユレート機構は、エミユレート状態に
入るための命令、入出力を行うためのチヤネル指
令語(以下CCWと略す)のアドレスを翻訳する
ための命令を持つ。情報処理装置はエミユレート
状態に入ると、第2図のアドレス3をあたかもア
ドレスの0番地であるかのようにして、プログラ
ムの実行を開始する。このような状態を以後ロー
カル実行状態、第2図のアドレス3を0番地とす
るように変換されたアドレスをローカルアドレ
ス、第2図のアドレス1を、0番地とする通常の
アドレスをプログラムアドレスと呼ぶ。 Usually, an emulate mechanism has an instruction for entering the emulate state and an instruction for translating the address of a channel command word (hereinafter abbreviated as CCW) for performing input/output. When the information processing device enters the emulate state, it treats address 3 in FIG. 2 as if it were address 0 and starts executing the program. Hereinafter, such a state will be referred to as a local execution state, an address converted so that address 3 in Figure 2 becomes address 0 will be referred to as a local address, and a normal address with address 1 in Figure 2 as address 0 will be referred to as a program address. call.
ローカル実行状態に入るために、ローカル実行
命令が発行される。ローカル実行命令は、第3図
の1であり、その命令のオペランドアドレスで
は、ローカル実行リストと呼ばれるパラメータ群
2を示す。この命令が実行されると、以後情報処
理装置は、ローカル実行状態に入り、ローカル実
行リストで示された必要情報を、情報処理装置内
部にとりこむ。ローカル実行リストには、各種の
情報があるが、3にはローカル実行状態になつた
場合の最初に制御を渡す命令アドレスがローカル
アドレスで、4にはローカルアドレス0番地を示
すプログラムアドレスが、5には、第2図の6に
あたるローカルアドレスの最大値がローカルアド
レスで格納されている。ローカルアドレスが、こ
の4と5で示されるローカルアドレス範囲外を示
すと、アドレス例外を示すプログラム割込みが発
生する。これによつて、被エミユレートプログラ
ムが、第2図の3から6以外の範囲を参照するこ
とも、情報を格納することもできない。 To enter the local execution state, a local execution instruction is issued. The locally executed instruction is 1 in FIG. 3, and the operand address of that instruction indicates a parameter group 2 called a local execution list. When this command is executed, the information processing device enters the local execution state and imports the necessary information indicated in the local execution list into the information processing device. The local execution list contains various types of information. 3 is the local address that is the first instruction address to which control is transferred when the local execution state is entered, 4 is the program address indicating local address 0, and 5 is the local address. The maximum value of local addresses corresponding to 6 in FIG. 2 is stored as a local address. If the local address indicates outside the local address range indicated by 4 and 5, a program interrupt indicating an address exception occurs. As a result, the emulated program cannot refer to or store information in a range other than 3 to 6 in FIG. 2.
ローカル実行状態は、何らかの割込みが、情報
処理装置内部で発生すると、停止される。この時
のローカル実行状態に関する情報は、ローカル実
行リストに格納され、また特定の割込みであつた
ならば、次に実行すべき命令のアドレスは、プロ
グラムアドレスで、ローカル実行リストに格納さ
れている。 The local execution state is stopped when some kind of interrupt occurs inside the information processing device. Information regarding the local execution state at this time is stored in the local execution list, and if it is a specific interrupt, the address of the next instruction to be executed is a program address and is stored in the local execution list.
本発明に関連する記憶保護動作は、通常次のよ
うに行なわれる。情報処理装置には、プログラム
の実行状態を示すプログラム状態語(以下PSW
と略す)が存在し、この中に、各プログラムに割
当てられた保護キーを保持するフイールドがあ
る。また主記憶装置のある区画単位ごとに記憶保
護キーがSCU内に記憶されており、プログラム
実行中のPSW中の保護キーと、実行中のプログ
ラムが必要とする主記憶装置アドレスが存在する
主記憶装置の区画の記憶保護キーの値との間に、
一定の法則が成立しない場合は、記憶保護例外の
プログラム割込みが発生し、命令の実行は防止さ
れる。保護キーを変更するためには、プログラム
状態語を変更する命令であるロードPSW命令、
記憶保護キーを変更するためにはセツトストレー
ジキー命令(以下SSK命令と略す)、記憶保護キ
ーを読むためには、インサートストレージキー命
令(以下ISに命令と略す)が存在する。この3命
令は、特権命令であり、プログラム状態語が、特
権状態を示していないと実行できない。 Memory protection operations related to the present invention are typically performed as follows. The information processing device has a program status word (PSW) that indicates the execution status of the program.
), and within this is a field that holds the protection key assigned to each program. In addition, a memory protection key is stored in the SCU for each partition in the main memory, and the protection key in the PSW during program execution and the main memory address required by the program being executed are located in the main memory. between the device partition storage key value and
If a certain rule does not hold, a program interrupt of a memory protection exception occurs and execution of the instruction is prevented. To change the protection key, use the load PSW instruction, which is an instruction that changes the program state word.
There is a set storage key command (hereinafter abbreviated as SSK command) to change the memory protection key, and an insert storage key command (hereinafter abbreviated as IS command) to read the memory protection key. These three instructions are privileged instructions and cannot be executed unless the program status word indicates a privileged status.
第4図に、記憶保護キーと保護キーの間の法則
の例を示す。ここでは、保護キーの値が、0以外
の場合、保護キーの値と、記憶保護キーの値が異
ると、プログラム割込みが発生し、記憶保護動作
が行なわれる。通常、制御プログラムは、保護キ
ーの値が0、特権状態で実行される。しかしなが
ら、被エミユレート制御プログラムは、前述のよ
うに制御プログラムにもかかわらず非特権状態で
かつ保護キーがある、ゼロでない値を持つて実行
される。被エミユレート制御プログラムが発行す
る特権命令は、すべて特権命令例外のプログラム
割込みを発生し、それらは、エミユレータ制御プ
ログラムでシミュレートされる。エミユレータ制
御プログラムも特権状態でないゆえ、特権命令は
発行できない。 FIG. 4 shows an example of the law between storage protection keys and protection keys. Here, if the value of the protection key is other than 0 and the value of the protection key differs from the value of the memory protection key, a program interrupt occurs and a memory protection operation is performed. Normally, the control program is executed in a privileged state with a protection key value of 0. However, the emulated control program executes in an unprivileged state and with a protection key having a non-zero value despite the control program as described above. All privileged instructions issued by the emulated control program generate program interrupts of privileged instruction exceptions, which are simulated by the emulator control program. Since the emulator control program is also not in a privileged state, privileged instructions cannot be issued.
エミユレータ動作中、被エミユレートプログラ
ムに同一の保護キー、記憶保護キーしか割当てら
れていないゆえ、被エミユレートプログラム間の
記憶保護動作が行なわれない。 During operation of the emulator, since only the same protection key and memory protection key are assigned to the emulated programs, the memory protection operation between the emulated programs is not performed.
本発明では、記憶保護キー記憶装置を増設し、
ローカル実行状態中の保護キー、記憶保護キー操
作命令を若干変更し、ローカル実行状態中でも、
記憶保護動作を行なえるようにしたものである。 In the present invention, a memory protection key storage device is added,
The protection key and memory protection key operation instructions during local execution state have been slightly changed, and even during local execution state,
It is designed to perform memory protection operations.
記憶保護キー記憶装置は、近年半導体技術の著
しい進歩により、大量の記憶装置を非常に小型で
かつ安く実現できるようになつたため、本発明の
実施に関して、増設記憶保護キー記憶装置の容量
は、必要十分な量が供給できる。 Due to recent significant advances in semiconductor technology, storage protection key storage devices have become able to realize large amounts of storage devices in a very small size and at low cost. Sufficient quantity can be supplied.
第5図によつて本発明を説明する。1は増設記
憶保護キー記憶装置であり、ローカル実行状態で
実行されたSSK命令により指定された記憶保護キ
ー値を格納しておく。そのさい、記憶保護キー値
は線2を通して送られてくる。また記憶保護キー
記憶装置のどの部分を変更するかは、SSK命令で
示され、そのローカルアドレスが線3を通して送
られてくる。記憶保護キーの値は、各被エミユレ
ートプログラムの主記憶4の記憶領域単位に与え
られ、かつ異なる被エミユレートプログラムの記
憶領域には異なる記憶保護キーの値が割りあてら
れる。ローカル実行命令中で発行されたロード
PSW命令では、PSW中の保護キーの値が、線6
を通して、仮想保護キーレジスタ7にセツトされ
る。レジスタ7にセツトされる保護キーの値は実
行中の一つの被エミユレートプログラムの主記憶
4上の記憶領域に対して割りあてられている増設
記憶保護キーと一致するように設定される。また
ローカル実行命令が実行されると、ローカル実行
状態を示す情報が線13を通じて、ラツチ14に
セツトされる。ラツチ14がオンの場合はローカ
ル実行状態を示す。情報処理装置において割込み
が発生した場合は、線13を通じて、ラツチ14
がリセツトされる。線18を通じて、ラツチ14
の値を読み出すことができる。ローカル実行状態
で、記憶装置の参照する場合は、そのさいのロー
カルアドレスが線3を通じて送られてきて、増設
記憶保護キー記憶装置内の該当記憶保護キー値が
読み出され、それが線4、線19を通じて、比較
回路5に入力される。仮想保護キーレジスタ7に
入つているローカル実行状態中の仮想保護キー値
は、線8を通じて、やはり比較回路5に入力され
ている。この比較回路では、増設記憶保護キーと
仮想保護キーが一致したかいなかを検出し、不一
致の場合には、線12に不一致信号を送る。また
仮想保護キーは線9を通じて、回路10に送られ
る。回路10は、仮想保護キー値が0であるかど
うかを検出する回路で、仮想保護キーの値が0で
ある場合には、0検出信号を、線11に送出す
る。ラツチ14がオンの場合、ローカル実行状態
信号を線18に送出している。線11,12,1
8を通して送られた信号は各々回路16に入る。 The present invention will be explained with reference to FIG. Reference numeral 1 denotes an additional storage protection key storage device, which stores the storage protection key value specified by the SSK instruction executed in the local execution state. The storage key value is then sent over line 2. Also, which part of the storage protection key storage device is to be changed is indicated by the SSK command, and its local address is sent through line 3. The memory protection key value is given to each storage area unit of the main memory 4 of each emulated program, and different memory protection key values are assigned to the storage areas of different emulated programs. Loads issued during local execution instructions
In the PSW instruction, the value of the protection key in the PSW is set to line 6.
The virtual protection key register 7 is set through the virtual protection key register 7. The value of the protection key set in the register 7 is set to match the additional storage protection key assigned to the storage area in the main memory 4 of one emulated program that is being executed. Also, when a locally executed instruction is executed, information indicating the local execution status is set in latch 14 through line 13. When latch 14 is on, it indicates a local execution state. When an interrupt occurs in the information processing device, a latch 14 is sent through line 13.
is reset. Through line 18, latch 14
The value of can be read. In the local execution state, when referencing a storage device, the current local address is sent through line 3, and the corresponding storage key value in the additional storage key storage device is read, and it is transferred to line 4. It is input to the comparator circuit 5 through line 19. The virtual protection key value contained in the virtual protection key register 7 during the local execution state is also input to the comparator circuit 5 via line 8. This comparison circuit detects whether the additional storage protection key and the virtual protection key match or not, and sends a mismatch signal to line 12 if they do not match. The virtual protection key is also sent to circuit 10 via line 9. The circuit 10 is a circuit that detects whether the virtual protection key value is 0 or not, and sends out a 0 detection signal to the line 11 when the virtual protection key value is 0. When latch 14 is on, it is sending a local run status signal on line 18. Line 11, 12, 1
The signals sent through 8 each enter a circuit 16.
回路16は、記憶保護例外検出回路である。こ
こでは、線18でローカル状態信号が送られてき
て、かつその時のMSアクセスが、情報の格納で
あることを示す線21がオンの場合にのみ、第4
図に示す法則に従い、記憶保護例外検出を行う。
つまり線11を通して送られてきた仮想保護キー
0検出信号がオフで、線12を通して送られてき
た、キー不一致信号がオンで線21がオンで、線
18がローカル状態を示している場合に、線17
に、記憶保護例外信号が送出される。これがオン
となると、特定のマイクロプログラムアドレスが
作成され、記憶保護例外のプログラム割込み処理
マイクロプログラムが実行される。 Circuit 16 is a memory protection exception detection circuit. Here, the fourth
Memory protection exception detection is performed according to the rules shown in the figure.
That is, when the virtual protection key 0 detection signal sent through line 11 is off, the key mismatch signal sent through line 12 is on, line 21 is on, and line 18 indicates the local state. line 17
Then, a storage protection exception signal is sent. When this is turned on, a specific microprogram address is created and a program interrupt handling microprogram for memory protection exceptions is executed.
ローカル実行状態でのISK命令では、ローカル
アドレスが線3を通して送られてきて、該当する
仮想記憶保護キーが線4、線20を通して読み出
される。 For an ISK instruction in the local execution state, the local address is sent over line 3 and the corresponding virtual memory protection key is read out over line 4 and line 20.
ローカル実行状態では、ロードPSW命令、
SSK命令、ISK命令を、第6図のフローチヤート
にしたがつて実行する。 In local execution state, load PSW instruction,
The SSK command and ISK command are executed according to the flowchart shown in FIG.
ロードPSW命令の場合は以下のように実行す
る。ロードPSW命令が解読されると、特定のマ
イクロプログラムアドレスが生成され、第6図の
エントリ61に入つてくる。判定子62では、ロ
ーカル実行状態かどうかを判定する。これは、第
5図の線18の値をマイクロプログラムで参照で
きるようにしておけば可能である。ローカル実行
状態の場合は、ボツクス63にゆき、ボツクス3
では、ロードPSW命令のオペランドで示され
た、PSWのうち、保護キーの部分のみを第5図
の仮想保護キーレジスタ7に設定する。その後判
定子64にゆく。ローカル実行状態でない場合
は、ただちに、判定子64にゆく。判定子64で
は、情報処理装置の状態が特権状態かどうかを判
定し、非特権状態の場合は、プログラム割込み処
理マイクロプログラムにゆくべく、出口65にゆ
く。この後プログラム割込み処理マイクロプログ
ラムで、プログラム割込みの動作が行なわれる。
通常ローカル実行状態で発行されるロードPSW
命令は、非特権状態で発行されるので、出口65
にゆく。特権状態で実行されたロードPSW命令
は、ボツクス66で、命令に必要な動作、つまり
PSWに情報をロードし、正常な命令の出口67
にゆく。出口67にゆくと、次の命令が解読さ
れ、実行される。 In case of load PSW instruction, execute as follows. When the load PSW instruction is decoded, a specific microprogram address is generated and enters entry 61 in FIG. The determiner 62 determines whether or not it is in a local execution state. This is possible if the value of line 18 in FIG. 5 can be referenced by the microprogram. In the local execution state, go to box 63 and select box 3.
Now, only the protection key portion of the PSW indicated by the operand of the load PSW instruction is set in the virtual protection key register 7 in FIG. After that, the process goes to the determiner 64. If it is not in the local execution state, the process immediately goes to determiner 64. The determiner 64 determines whether the information processing device is in a privileged state, and if it is in a non-privileged state, the information processing device goes to an exit 65 to go to the program interrupt processing microprogram. Thereafter, the program interrupt operation is performed by the program interrupt processing microprogram.
Load PSW normally issued in local execution state
Since the instruction is issued in an unprivileged state, exit 65
Go to. A load PSW instruction that is executed in a privileged state will perform the operations required by the instruction, i.e., in box 66.
Load information into PSW and exit 67 for normal instructions
Go to. Upon exit 67, the next instruction is decoded and executed.
SSK命令、ISK命令は、以下のように実行され
る。まずSSKまたはISK命令が解読されると、特
定のマイクロプログラムのアドレスが生成され、
第7図のエントリ71に入つてくる。次にマイク
ロプログラムは、判定子72で、ローカル実行状
態かどうかを判定する。ローカル実行状態の場合
は、ボツクス73へゆき、SSK命令の場合は記憶
保護キーを変更すべきローカルアドレスと、変更
すべき記憶保護キーの値を、各々第5図の線3と
線2を通して送り、増設記憶保護キー記憶装置1
に書きこむ。またISK命令の場合は、記憶保護キ
ーを読出すべき、ローカルアドレスを第5図の線
3を通して送り、必要な仮想記憶保護キーの値
を、線4、線20を通して読み出し、汎用レジス
タまたは主記憶装置に書きこんでおく。その後判
定子74へゆく。ローカル実行状態でない場合
は、ただちの判定子74へゆく。判定子74で
は、この命令が実行された状態が、特権状態かい
なかを判定する。特権状態であれば、ボツクス7
6にゆき、通常のISKまたは、SSK命令の処理を
行う。その後、出口77へゆき、次の命令の実行
にうつつてゆく。特権状態でない場合は、出口7
5にゆき、特権命令例外のプログラム割込みをお
こすため、プログラム割込み処理マイクロプログ
ラムルーチンへ分岐する。 The SSK and ISK instructions are executed as follows. First, when the SSK or ISK instruction is decoded, the address of a specific microprogram is generated,
It comes in entry 71 in FIG. Next, the microprogram uses a determiner 72 to determine whether it is in a local execution state. In the case of a local execution state, go to box 73, and in the case of an SSK instruction, send the local address at which the storage protection key should be changed and the value of the storage protection key to be changed through lines 3 and 2 in Figure 5, respectively. , additional memory protection key storage device 1
Write in. In the case of the ISK instruction, the local address from which the memory protection key is to be read is sent through line 3 in Figure 5, the required virtual memory protection key value is read through line 4 and line 20, and the value is read from a general-purpose register or main memory. Write it on the device. After that, the process goes to the determiner 74. If it is not in the local execution state, the process immediately goes to the determiner 74. The determiner 74 determines whether the state in which this instruction is executed is a privileged state or not. If you are in a privileged state, box 7
6, normal ISK or SSK instruction processing is performed. After that, it goes to exit 77 and proceeds to execute the next command. Exit 7 if not in privileged state
At step 5, the program branches to a program interrupt processing microprogram routine in order to cause a program interrupt due to a privileged instruction exception.
ロードPSW命令、ISK、SSK命令を、以上説明
したようにマイクロプログラムで作成しておき、
被エミユレートプログラムを、ローカル実行状態
で、かつ非特権状態で動かしさえすれば、そこで
発行されたロードPSW命令により、仮想の保護
キーが、第5図の仮想保護キーレジスタ7に、
SSK命令により、仮想の記憶保護キーが、増設記
憶保護キー記憶装置の対応するローカルアドレス
の位置に書込まれる。その値はまたISK命令によ
つて読出すことができる。そこでローカル実行状
態で命令を実行すると、その時使用されるローカ
ルアドレスは、第4図の線3を通して増設記憶保
護キー記憶装置に送られ、読出された仮想記憶保
護キーと仮想の保護キーが比較され、一定の法則
に従わない場合でかつMSアクセスが情報の格納
のさいは、記憶保護例外のプログラム割込みが発
生する。プログラム割込み処理マイクロプログラ
ムは、実行状態がローカル実行状態ならば、それ
をリセツトし、ローカル実行リスト中に最後に実
行した命令のプログラムアドレスを格納し、同時
に、記憶保護例外が発生したことを示す割込みコ
ードも格納し、ローカル実行リストから、特定の
プログラム割込みが発生した時に制御をうつすべ
き命令のプログラムアドレスを得て、そこへ分岐
する。通常、そこには、エミユレータ制御プログ
ラム内のプログラム割込み処理プログラムの先頭
アドレスが入つている。 Create the load PSW instruction, ISK, and SSK instructions in a microprogram as explained above,
As long as the emulated program is run in the local execution state and unprivileged state, the load PSW command issued there will cause the virtual protection key to be stored in the virtual protection key register 7 in FIG.
The SSK instruction writes a virtual storage key to the corresponding local address location in the additional storage key storage. Its value can also be read by the ISK instruction. When an instruction is executed in the local execution state, the local address used at that time is sent to the additional memory protection key storage device through line 3 in Figure 4, and the read virtual memory protection key is compared with the virtual protection key. If the MS access does not follow certain rules and the information is stored, a program interrupt with a memory protection exception will occur. If the execution state is the local execution state, the program interrupt handling microprogram resets it, stores the program address of the last executed instruction in the local execution list, and at the same time interrupts the execution state to indicate that a memory protection exception has occurred. It also stores code, obtains from the local execution list the program address of the instruction to which control should be transferred when a specific program interrupt occurs, and branches there. Usually, it contains the start address of the program interrupt handling program within the emulator control program.
プログラム割込み処理プログラムは、記憶保護
例外が発生したことを検知し、該当する被エミユ
レートプログラムを停止させる。記憶保護例外の
プログラム割込みが発生した場合には、情報の格
納動作は抑止されるゆえ、情報の破壊はおこらな
い。 The program interrupt processing program detects the occurrence of a storage protection exception and stops the corresponding emulated program. When a program interruption due to a memory protection exception occurs, the information storage operation is inhibited, so that information is not destroyed.
被エミユレートプログラムを、ローカル実行状
態にするのは、エミユレータ制御プログラムか
ら、被エミユレートプログラムにうつる時に、ロ
ーカル実行命令を実行してやればよい。また第2
図であきらかなように、被エミユレートプログラ
ムと、エミユレータ制御プログラムは、一つのジ
ヨブを構成して、制御プログラムからは、ほかの
ユーザプログラムと同等にみえ、非特権状態で実
行される。 The emulated program can be brought into a locally executed state by executing a local execution command when transferring from the emulator control program to the emulated program. Also the second
As is clear from the figure, the emulated program and the emulator control program constitute one job, and from the control program's perspective, they appear to be the same as other user programs, and are executed in a non-privileged state.
このように被エミユレートプログラムが、ロー
カル実行状態で、かつ特権状態で動作するのは、
一般に行なわれていることである。 In this way, the emulated program operates in the locally executed state and in the privileged state because
This is a common practice.
エミユレータ制御プログラムは、本発明で述べ
た記憶保護をうけない。それは、ローカルアドレ
ス範囲外にいるためである。しかしながら、被エ
ミユレートプログラムは、ローカルアドレス範囲
外をアクセスしようとすると、エミユレート機構
の監視により、アドレス例外のプログラム割込み
が発生するゆえ、被エミユレートプログラムによ
り、エミユレータ制御プログラムが、破壊される
おそれはない。よつて、エミユレータ制御プログ
ラムに、本発明を適用する必要はない。 The emulator control program does not receive the storage protection described in this invention. This is because you are outside the local address range. However, if the emulated program attempts to access outside the local address range, an address exception program interrupt will occur due to monitoring by the emulation mechanism, so the emulator control program will be destroyed by the emulated program. There's no fear. Therefore, it is not necessary to apply the present invention to the emulator control program.
本発明に述べた記憶保護とは別に、第2図のア
ドレス範囲1から、アドレス範囲7までの主記憶
装置全体に対する記憶保護動作は、常に行なわれ
ており、本発明が、それらに何ら悪影響をおよぼ
す心配はない。 Apart from the memory protection described in the present invention, memory protection operations for the entire main storage device from address range 1 to address range 7 in FIG. 2 are always performed, and the present invention has no adverse effect on them. There is no need to worry about it.
個々の被エミユレートプログラムにどのような
記憶保護キーと保護キーを与えるかは、被エミユ
レート制御プログラムが統轄しており、それが発
行するロードPSW命令、SSK命令により、仮想
保護キー、仮想記憶保護キーの値を自由に変えら
れる。 What kind of memory protection key and protection key are given to each emulated program is controlled by the emulated control program, and the virtual protection key, virtual memory You can freely change the value of the protection key.
ローカル実行状態でかつ非特権状態でロード
PSW命令、SSK命令、ISK命令を実行すれば、プ
ログラム割込みが発生し、その時、制御を渡すア
ドレスとしてローカル実行リストにエミユレータ
制御プログラム内の特定のルーチンのアドレスを
書いておけば、本発明に必要な情報が設定された
あと、エミユレータ制御プログラムが必要なプロ
グラム操作を行える。特にISK命令の場合は、第
5図の線20を通して読出された仮想記憶保護キ
ー値を、マイクロプログラムが汎用レジスタに入
れておけば、特権命令例外のプログラム割込みが
ISK命令によつて発生した場合、汎用レジスタの
内容をエミユレータ制御プログラムが退避してお
き、後に被エミユレートプログラムに分岐するさ
い、汎用レジスタを回復しさえすれば、被エミユ
レートプログラムにとつて、ISK命令は、実行さ
れたと同じである。 Load in local execution state and unprivileged state
When a PSW instruction, SSK instruction, or ISK instruction is executed, a program interrupt occurs, and if the address of a specific routine in the emulator control program is written in the local execution list as the address to which control is transferred at that time, it is necessary for the present invention. After the appropriate information is set, the emulator control program can perform the necessary program operations. Particularly in the case of the ISK instruction, if the microprogram stores the virtual memory protection key value read through line 20 in FIG.
If the problem occurs due to an ISK instruction, the emulator control program saves the contents of the general-purpose register, and when branching to the emulated program later, the emulated program only needs to recover the general-purpose register. Therefore, the ISK instruction is the same as if it were executed.
記憶保護機能に他の機能、たとえば、読込み保
護をつけくわえたければ、第5図の増設記憶保護
キー記憶装置のビツト数を増し、読み込み保護動
作に関する法則を実現する回路をつければ、容易
にローカル実行状態での拡張した記憶保護動作に
関する本発明の拡張を行える。 If you want to add other functions to the memory protection function, such as read protection, you can easily perform local execution by increasing the number of bits of the additional memory protection key storage device shown in Figure 5 and adding a circuit that implements the rules regarding read protection operation. Extensions of the present invention can be made with respect to extended storage protection operations in states.
割込み発生後は、ローカル実行状態でなくなる
ゆえ、ロードPSW命令、SSK、ISK命令は、通常
通り実行される。 After an interrupt occurs, the local execution state is no longer present, so the load PSW instruction, SSK, and ISK instructions are executed as usual.
保護キー、記憶保護キー操作命令が、ここで述
べた形態と異つていても、第6図の流れ図と同じ
方式を使用すれば、本発明は実行可能である。 Even if the protection key and storage protection key operation command are different from those described here, the present invention can be carried out by using the same method as the flowchart of FIG.
(5) まとめ
以上述べたごとく、本発明によれば、被エミユ
レートプログラム間に、ローカル実行状態での記
憶保護を行うことができる。本発明は、通常行な
われている記憶保護動作に何ら干渉することなく
実行でき、かつ半導体技術の進歩にともなつて小
型のハードウエアとして実現可能である。(5) Summary As described above, according to the present invention, memory protection can be performed between emulated programs in the local execution state. The present invention can be executed without any interference with normally performed memory protection operations, and can be implemented as small-sized hardware as semiconductor technology advances.
第1図は、エミユレート機構を含む情報処理装
置の内部構成を示す図、第2図は、被エミユレー
トプログラムが実行されるさいの、主記憶装置の
レイアウト図、第3図は、ローカル実行状態にう
つるための命令である、ローカル実行状態と、そ
の命令が使用するローカル実行リストのレイアウ
トを示す図、第4図は、記憶保護動作を行う場合
の法則を示す図、第5図は、本発明の使用するハ
ードウエアとその使用法を示す図、第6図は、本
発明により変更される、ISK又はSSK命令の処理
を示す流れ図、第7図は、本発明により変更され
るロードPSW命令の処理を示す図である。
FIG. 1 is a diagram showing the internal configuration of an information processing device including an emulation mechanism, FIG. 2 is a layout diagram of the main storage device when an emulated program is executed, and FIG. 3 is a diagram showing the local execution A diagram showing the layout of a local execution state, which is an instruction for moving to a state, and a local execution list used by that instruction. FIG. 4 is a diagram showing the rules for performing a memory protection operation. FIG. FIG. 6 is a flowchart showing the processing of ISK or SSK instructions modified by the present invention; FIG. 7 is a load PSW modified by the present invention. FIG. 3 is a diagram showing instruction processing.
Claims (1)
ムと複数の被エミユレートプログラムを格納する
メモリを有し、該エミユレータ制御プログラムと
該複数の該エミユレートプログラムに共通な保護
キーを与え、該メモリ内の、該エミユレータ制御
プログラムと該複数の被エミユレートプログラム
の記憶域に該保護キーと一致する記憶保護を与
え、該制御プログラムの管理下で該エミユレータ
制御プログラムにより該被エミユレートプログラ
ムを実行する情報処理装置において、 該複数の被エミユレートプログラムの各々の該
メモリ内の記憶域ごとに割りあてられた増設記憶
保護キーを格納するための記憶保護キー記憶装置
と、各被エミユレータプログラムに対する該増設
記憶キーと等しくなるように各被エミユレートプ
ログラムごとに定められた、実行中の被エミユレ
ータプログラムに対する保護キーを仮想保護キー
として格納するためのレジスタと、 該被エミユレートプログラムの一つが実行中か
否かを示す情報を格納するラツチと、エミユレー
ト動作時に発生されるローカルアドレスに基づい
て該記憶保護キー記憶装置から読み出された増設
記憶保護キーを該仮想保護キーとを比較する第2
の回路と、 該比較結果が不一致であり、該ラツチが該被エ
ミユレートプログラム実行中を示しており、 該被エミユレート制御プログラムが該メモリへ
の情報格納を指示しているときには、強制的に該
情報の格納動作を抑止させる回路とを有する。 該被エミユレートプログラムの記憶保護を可能
とした情報処理装置。[Scope of Claims] 1. A memory that stores a control program, an emulator control program, and a plurality of emulated programs, and provides a common protection key to the emulator control program and the plurality of emulated programs; A storage area of the emulator control program and the plurality of emulated programs in the memory is given storage protection that matches the protection key, and the emulator control program executes the emulated programs under the control of the control program. An information processing device that executes a program includes a memory protection key storage device for storing an additional memory protection key allocated to each storage area in the memory of each of the plurality of emulated programs; a register for storing a protection key for the emulator program being executed as a virtual protection key, which is determined for each emulated program to be equal to the additional storage key for the emulator program; A latch stores information indicating whether or not one of the programs to be emulated is being executed, and an additional memory protection key read from the memory protection key storage device based on a local address generated during emulation operation is included. The second to compare with the virtual protection key
When the circuit and the comparison result do not match, the latch indicates that the emulated program is being executed, and the emulated control program instructs to store information in the memory, the and a circuit that suppresses the storage operation of the information. An information processing device that enables memory protection of the emulated program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12451777A JPS5458324A (en) | 1977-10-19 | 1977-10-19 | Information processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12451777A JPS5458324A (en) | 1977-10-19 | 1977-10-19 | Information processor |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS5458324A JPS5458324A (en) | 1979-05-11 |
JPS6118224B2 true JPS6118224B2 (en) | 1986-05-12 |
Family
ID=14887427
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP12451777A Granted JPS5458324A (en) | 1977-10-19 | 1977-10-19 | Information processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS5458324A (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6273333A (en) * | 1985-09-26 | 1987-04-04 | Nec Corp | Emulation control system |
-
1977
- 1977-10-19 JP JP12451777A patent/JPS5458324A/en active Granted
Also Published As
Publication number | Publication date |
---|---|
JPS5458324A (en) | 1979-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4347565A (en) | Address control system for software simulation | |
JP2650675B2 (en) | Method and operating system for executing a program in a multi-mode microprocessor | |
US4825358A (en) | Method and operating system for executing programs in a multi-mode microprocessor | |
US4084235A (en) | Emulation apparatus | |
US5561788A (en) | Method and system for executing programs using memory wrap in a multi-mode microprocessor | |
US5701493A (en) | Exception handling method and apparatus in data processing systems | |
US5353411A (en) | Operating system generation method | |
US4414627A (en) | Main memory control system | |
JPS58191046A (en) | Cpu control switching system | |
JPH04247528A (en) | Common access device and method into data space | |
US5745676A (en) | Authority reduction and restoration method providing system integrity for subspace groups and single address spaces during program linkage | |
US5003468A (en) | Guest machine execution control system for virutal machine system | |
US11216280B2 (en) | Exception interception | |
KR20010078371A (en) | Privilege promotion based on check of previous privilege level | |
JPS599937B2 (en) | information processing equipment | |
JPS6049352B2 (en) | data processing equipment | |
JPS6118224B2 (en) | ||
JPH0552535B2 (en) | ||
JPS61184643A (en) | Starting control system for virtual computer | |
JPH1153249A (en) | Memory managing method | |
JPS6212555B2 (en) | ||
JPS6338729B2 (en) | ||
JPS6139135A (en) | Interval timer interrupt controller in virtual computer system | |
JPS5848150A (en) | Failure spillover prevention method | |
JPS63120336A (en) | Switching system for memory access mode |