Table of Contents

DMKVMC Source

References

Source Listing

DMKVMC.ASSEMBLE.txt
  1. VMC TITLE 'DMKVMC (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 @V387045 00002000
  3. DMKVMC CSECT @V387045 00003000
  4. MODID DC CL8'DMKVMC' MODULE IDENTIFIER @V387045 00004000
  5. SPACE 00005000
  6. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00006000
  7. * 00007000
  8. * MODULE NAME - 00008000
  9. * 00009000
  10. * DMKVMC 00010000
  11. * 00011000
  12. * DESCRIPTIVE NAME - 00012000
  13. * 00013000
  14. * VIRTUAL MACHINE COMMUNICATION FACILITY SUPPORT MODULE 00014000
  15. * 00015000
  16. * COPYRIGHT - NONE 00016000
  17. * 00017000
  18. * CHANGE ACTIVITY - NOT APPLICABLE 00018000
  19. * 00019000
  20. * CONTENTS: 00020000
  21. * 00021000
  22. * DMKVMCFC - PROCESS USER DIAGNOSE X'0068' REQUEST. 00022000
  23. * DMKVMCEX - REFLECT USER EXTERNAL INTERRUPT DATA. 00023000
  24. * DMKVMCUA - UNAUTHORIZE VMCF USER DURING SYSTEM RESET 00024000
  25. * (THIS ENTRY POINT IS DESCRIBED IN SUBROUTINE DESCRIPTION 00025000
  26. * VMCUAUTH) 00026000
  27. * 00027000
  28. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00028000
  29. * 00029000
  30. * SUBROUTINE NAME - 00030000
  31. * 00031000
  32. * DMKVMCFC 00032000
  33. * 00033000
  34. * FUNCTION - 00034000
  35. * 00035000
  36. * TO PROVIDE A VIRTUAL MACHINE -> VIRTUAL MACHINE 00036000
  37. * COMMUNICATION FACILITY THROUGH CP DIAGNOSE CODE 00037000
  38. * X'0068'. 00038000
  39. * 00039000
  40. * ATTRIBUTES - 00040000
  41. * 00041000
  42. * REENTRANT, PAGEABLE, CALLED VIA SVC FROM DMKHVC 00042000
  43. * 00043000
  44. * ENTRY CONDITIONS - 00044000
  45. * 00045000
  46. * GPR 13 = SAVEAREA ADDRESS 00046000
  47. * GPR 12 = ADDRESS OF DMKVMCFC 00047000
  48. * GPR 11 = ADDRESS OF VMBLOK 00048000
  49. * GPR 2 = LENGTH OF VMCPARM (VMCPLEN) 00049000
  50. * GPR 1 = VIRTUAL ADDRESS OF VMCPARM 00050000
  51. * 00051000
  52. * EXIT CONDITIONS - 00052000
  53. * 00053000
  54. * GPR 14-15 = DESTROYED (VOLATILE) 00054000
  55. * GPR 13 = SAVEAREA 00055000
  56. * GPR 12 = DESTROYED (VOLATILE) 00056000
  57. * GPR 3-11 = RESTORED 00057000
  58. * GPR 2 = RETURN CODE PASSED BACK TO DMKHVC 00058000
  59. * GPR 0-1 = RESTORED 00059000
  60. * 00060000
  61. * CALLS TO OTHER ROUTINES - 00061000
  62. * 00062000
  63. * DMKFREE - GET STORAGE FOR VMCBLOKS - XINTBLOK - CPEXBLOK 00063000
  64. * DMKFRET - FRET VMCBLOK - XINTBLOK STORAGE 00064000
  65. * DMKSCNAU - LOCATE SOURCE / SINK VMBLOKS 00065000
  66. * DMKPTRAN - FETCH USER BUFFERS AND VMCPARM 00066000
  67. * DMKPSASC - CHECK STORAGE PROTECTION 00067000
  68. * DMKPSAFC - CHECK FETCH PROTECTION 00068000
  69. * DMKPSASP - CHECK STORAGE PROTECTION 00069000
  70. * DMKSTKCP - STACK WAKE - UP CPEXBLOKS 00070000
  71. * DMKPTRUL - UNLOCK SOURCE PAGES (DATA TRANSFER) 00071000
  72. * 00072000
  73. * SUBFUNCTION ROUTINES: 00073000
  74. * 00074000
  75. * VMCAUTH - AUTHORIZE 00075000
  76. * VMCUAUTH - UNAUTHORIZE + DMKVMCUA ENTRY POINT 00076000
  77. * VMCSEND - SEND 00077000
  78. * VMCSENDR - SEND/RECV 00078000
  79. * VMCSENDX - SENDX 00079000
  80. * VMCRECV - RECEIVE 00080000
  81. * VMCCNCL - CANCEL 00081000
  82. * VMCREPLY - REPLY 00082000
  83. * VMCQIES - QUIESCE 00083000
  84. * VMCRESUM - RESUME 00084000
  85. * VMCIDENT - IDENTIFY 00085000
  86. * VMCREJEC - REJECT 00086000
  87. * 00087000
  88. * INTERNAL SUBROUTINES: 00088000
  89. * 00089000
  90. * VMCBUILD - INITIALIZE AND ENQ VMCBLOK 00090000
  91. * VMCENQ - ENQ VMCBLOK ON SOURCE/SINK VMCBLOK CHAIN 00091000
  92. * VMCDEQ - DEQ VMCBLOK FROM VMCBLOK CHAIN 00092000
  93. * VMCICHK - INITIAL VALIDITY CHECK OF SINK USER STATUS 00093000
  94. * VMCSCANS - LOCATE VMCBLOK ON SINK VMCBLOK CHAIN 00094000
  95. * VMCSCANR - LOCATE VMCBLOK FOR ACTIVE USER (SOURCE/SINK) 00095000
  96. * VMCWAKUP - WAKE UP SOURCE/SINK USER 00096000
  97. * VMCHECK - VALIDITY CHECK VIRTUAL BUFFER ADDRESSES 00097000
  98. * VMCFRET - FRET VMCBLOK STORAGE 00098000
  99. * VMCSUSER - LOCATE SOURCE USER VMBLOK ADDRESS 00099000
  100. * VMCXFER - DATA TRANSFER SUBROUTINE 00100000
  101. * VMCEXIT - NORMAL EXIT FOR DMKVMCFC ENTRY 00101000
  102. * 00102000
  103. * EXTERNAL REFERENCES - 00103000
  104. * 00104000
  105. * NONE 00105000
  106. * 00106000
  107. * TABLES / WORK AREAS - 00107000
  108. * 00108000
  109. * VMBLOK, VMCBLOK, VMCPARM, XINTBLOK, CPEXBLOK, SAVEAREA 00109000
  110. * ECBLOK 00110000
  111. * 00111000
  112. * MACROS - 00112000
  113. * 00113000
  114. * CALL - USED TO CALL OTHER CP MODULES 00114000
  115. * EXIT - USED TO EXIT FROM DMKVMC 00115000
  116. * TRANS - USED TO FETCH VIRTUAL PAGES 00116000
  117. * PSA - USED TO REFERENCE THE PREFIX STORAGE AREA 00117000
  118. * RELOC - USED TO DEFINE ENTRY POINTS WITHIN DMKVMC 00118000
  119. * 00119000
  120. * REGISTER USAGE - 00120000
  121. * 00121000
  122. * GPR 13 = SAVEAREA REGISTER 00122000
  123. * GPR 12 = BASE REGISTER FOR DMKVMC 00123000
  124. * GPR 11 = VMBLOK ADDRESSABILITY 00124000
  125. * GPR 10 = INTERNAL LINK REGISTER 00125000
  126. * GPR 9 = ADDRESS OF VMCPARM 00126000
  127. * GPR 8 = ADDRESS OF VMCBLOK 00127000
  128. * GPR 7 = ADDRESS OF ALTERNATE VMCBLOK 00128000
  129. * GPR 3 = ADDRESS OF ALTERNATE USER VMBLOK 00129000
  130. * GPR 2 = RETURN CODE REGISTER 00130000
  131. * 00131000
  132. * GPR 0-1, 4-6, 14-15 = WORK REGISTERS 00132000
  133. * 00133000
  134. * NOTES - 00134000
  135. * 00135000
  136. * THIS MODULE CONTAINS THE FOLLOWING VMC DIAGNOSE 00136000
  137. * X'0068' SUB-FUNCTIONS: 00137000
  138. * 00138000
  139. * SUB-FUNCTION CODE (HEX) 00139000
  140. * 00140000
  141. * AUTHORIZE 0 00141000
  142. * UNAUTHORIZE 1 00142000
  143. * SEND 2 00143000
  144. * SEND/RECV 3 00144000
  145. * SENDX 4 00145000
  146. * RECEIVE 5 00146000
  147. * CANCEL 6 00147000
  148. * REPLY 7 00148000
  149. * QUIESCE 8 00149000
  150. * RESUME 9 00150000
  151. * IDENTIFY A 00151000
  152. * REJECT B 00152000
  153. * 00153000
  154. * OPERATION - 00154000
  155. * 00155000
  156. * 00156000
  157. * DMKVMCFC IS CALLED BY DMKHVC WHEN A USER EXECUTES A 00157000
  158. * DIAGNOSE INSTRUCTION WITH A FUNCTION CODE = X'0068'. 00158000
  159. * THE R1 REGISTER AT ENTRY TO DMKVMCFC CONTAINS THE 00159000
  160. * VIRTUAL ADDRESS OF THE USERS PARAMETER LIST VMCPARM. 00160000
  161. * 00161000
  162. EJECT 00162000
  163. * 00163000
  164. * 0 1 2 3 4 5 6 7 8 00164000
  165. * 00165000
  166. * 0 +-----------------------------------------------+ 00166000
  167. * | V*1 | V*2 | VMCPFUNC | VMCPMID | 00167000
  168. * 8 |-----------------------------------------------| 00168000
  169. * | VMCPUSER | 00169000
  170. * 10 |-----------------------------------------------| 00170000
  171. * | VMCPVADA | VMCPLENA | 00171000
  172. * 18 |-----------------------------------------------| 00172000
  173. * | VMCPVADB | VMCPLENB | 00173000
  174. * 20 |-----------------------------------------------| 00174000
  175. * | VMCPUSE | 00175000
  176. * 28 +-----------------------------------------------+ 00176000
  177. * 00177000
  178. * DMKVMCFC OBTAINS FREE STORAGE FOR A VMCBLOK VIA A CALL 00178000
  179. * TO DMKFREE AND COPIES THE USER PARMLIST VMCPARM TO THE 00179000
  180. * VMCBLOK. DMKVMCFC THEN EXTRACTS THE SUBFUNCTION CODE 00180000
  181. * (VMCPFUNC) AND VERIFIES THAT IT IS VALID. (WITHIN RANGE 00181000
  182. * X'0000' TO X'000B') IF THE SUBFUNCTION CODE IS NOT 00182000
  183. * VALID THEN THE STORAGE ACQUIRED FOR THE VMCBLOK IS 00183000
  184. * RELEASED VIA A CALL TO MODULE DMKFRET AND AN EXIT IS 00184000
  185. * MADE TO DMKHVC WITH THE APPROPRIATE RETURN CODE SET IN 00185000
  186. * GPR 2. IF THE SUBFUNCTION CODE IS VALID AND FOR 00186000
  187. * AUTHORIZE A BRANCH IS EXECUTED DIRECTLY TO THE 00187000
  188. * AUTHORIZE SUBROUTINE. IF THE SUB- FUNCTION IS FOR 00188000
  189. * OTHER THAN AUTHORIZE A CHECK IS MADE TO INSURE THAT THE 00189000
  190. * USER IS AUTHORIZED FOR VM COMMUNICATION. IF CP IS THE 00190000
  191. * SENDER OF THE VMCF DATA, THEN NO AUTHORIZE IS REQUIRED 00190100
  192. * FOR CP BUT THE RECEIVER OF THE DATA MUST BE AUTHORIZED. 00190200
  193. * (THE FOLLOWING BIT, VMBCAUTH, IN THE BYTE, VMCXSTAT, 00190300
  194. * OF THE USER'S VMBLOK MUST BE SET 'ON'.) IF THE USER 00191000
  195. * IS NOT AUTHORIZED FOR VM COMMUNICATION RETURN IS MADE 00192000
  196. * TO DMKHVC WITH APPROPRIATE RETURN CODE SET IN GPR 2, 00193000
  197. * OTHERWISE A BRANCH IS MADE DIRECTLY TO THE SUBFUNCTION 00194000
  198. * ROUTINE VIA A BRANCH TABLE. 00195000
  199. * 00196000
  200. * VMCAUTH - AUTHORIZE SUBROUTINE - 00197000
  201. * 00198000
  202. * 1. VALIDITY CHECK USERS EXTERNAL INTERRUPT BUFFER 00199000
  203. * LENGTH VMCPLENA. (MUST NOT BE LESS THAN VMCMLEN) 00200000
  204. * 2. VERIFY THAT USERS EXTERNAL INTERRUPT BUFFER IS 00201000
  205. * DOUBLEWORD ALIGNED. 00202000
  206. * 3. VALIDITY CHECK USER EXTERNAL INTERRUPT BUFFER 00203000
  207. * ADDRESS VIA SUBROUTINE 'VMCHECK'. 00204000
  208. * 4. FETCH USERS EXTERNAL INTERRUPT BUFFER VIA THE 00205000
  209. * 'TRANS' MACRO AND TEST FOR STORE PROTECTION 00206000
  210. * VIOLATIONS VIA MODULE DMKPSASP. 00207000
  211. * 5. INITIALIZE MASTER VMCBLOK AND CHAIN TO VMBLOK 00208000
  212. * ANCHOR VMCPNT. 00209000
  213. * 6. EXIT TO DMKHVC. 00210000
  214. * 00211000
  215. * VMCUAUTH - UNAUTHORIZE SUBROUTINE - 00212000
  216. * 00213000
  217. * 1. UNHOOK VMCBLOK CHAIN FROM VMBLOK AND FRET MASTER 00214000
  218. * VMCBLOK VIA SUBROUTINE VMCFRET. 00215000
  219. * 2. IF MORE VMCBLOKS EXIST CHECK FOR FINAL RESPONSE 00216000
  220. * EXTERNAL INTERRUPT (BIT VMCRESP). IF VMCBLOK IS 00217000
  221. * FOR A FINAL RESPONSE FRET THE BLOCK VIA SUBROUTINE 00218000
  222. * VMCFRET. 00219000
  223. * 3. IF VMCBLOK IS NOT A FINAL RESPONSE VMCBLOK LOCATE 00220000
  224. * SOURCE USERS VMBLOK VIA A CALL TO MODULE 00221000
  225. * DMKSCNAU. 00222000
  226. * 4. ENQUEUE THE VMCBLOK ON THE SOURCE USERS VMCBLOK 00223000
  227. * CHAIN VIA SUBROUTINE VMCENQ. 00224000
  228. * 5. WAKE UP SOURCE USER VIA SUBROUTINE VMCWAKUP. 00225000
  229. * 6. IF MORE VMCBLOKS EXIST ITERATE LOOP (2). 00226000
  230. * 7. SCAN USERS XINTBLOK CHAIN FOR A PENDING VMCF 00227000
  231. * EXTERNAL INTERRUPT AND IF ONE EXISTS DEQUEUE IT 00228000
  232. * FROM THE CHAIN AND RETURN IT TO FREE STORAGE VIA A 00229000
  233. * CALL TO MODULE DMKFREE. 00230000
  234. * 8. EXIT BACK TO MODULE DMKCFP OR DMKHVC VIA THE EXIT 00231000
  235. * MACRO. 00232000
  236. * 00233000
  237. * NOTE - WHEN VMCBLOKS ARE ENQUEUED ON THE SOURCE VMCBLOK 00234000
  238. * CHAIN THE BIT VMCRESP IS SET TO INDICATE FINAL RESPONSE 00235000
  239. * AND A DATA TRANSFER RETURN CODE IS SET INDICATING USER 00236000
  240. * NOT AVAILABLE. 00237000
  241. * 00238000
  242. * VMCSEND - SEND SUBROUTINE - 00239000
  243. * 00240000
  244. * 1. CHECK OUT SINK USER STATUS VIA SUBROUTINE 00241000
  245. * VMCICHK. 00242000
  246. * 2. VALIDITY CHECK USERS SEND BUFFER ADDRESS VIA 00243000
  247. * SUBROUTINE VMCHECK. 00244000
  248. * 3. SCAN FOR DUPLICATE MESSAGE VIA SUBROUTINE 00245000
  249. * VMCSCANS(R). 00246000
  250. * 4. INITIALIZE VMCBLOK AND ENQUEUE ON SINK VMCBLOK 00247000
  251. * CHAIN VIA SUBROUTINE VMCBUILD. 00248000
  252. * 5. WAKE UP SINK USER VIA SUBROUTINE VMCWAKUP. 00249000
  253. * 6. EXIT TO DMKHVC WITH APPROPRIATE RETURN CODE SET IN 00250000
  254. * GPR 2. 00251000
  255. * 00252000
  256. * VMCSENDR - SEND/RECV SUBROUTINE - 00253000
  257. * 00254000
  258. * 1. VALIDITY CHECK SINK USER STATUS VIA SUBROUTINE 00255000
  259. * VMCICHK. 00256000
  260. * 2. VALIDITY CHECK SEND AND REPLY BUFFER ADDRESSES VIA 00257000
  261. * SUBROUTINE VMCHECK. 00258000
  262. * 3. SCAN FOR DUPLICATE MESSAGE VIA SUBROUTINE 00259000
  263. * VMCSCANS(R). 00260000
  264. * 4. INITIALIZE AND ENQUEUE VMCBLOK ON SINK USER 00261000
  265. * VMCBLOK CHAIN VIA SUBROUTINE VMCBUILD. 00262000
  266. * 5. WAKE UP SINK USER VIA SUBROUTINE VMCWAKUP. 00263000
  267. * 6. EXIT TO DMKHVC WITH APPROPRIATE RETURN CODE SET IN 00264000
  268. * GPR 2. 00265000
  269. * 00266000
  270. * VMCSENDX - SENDX SUBROUTINE - 00267000
  271. * 00268000
  272. * 1. VALIDITY CHECK SINK USER STATUS VIA SUBROUTINE 00269000
  273. * VMCICHK. 00270000
  274. * 2. VALIDITY CHECK SEND BUFFER ADDRESS VIA SUBROUTINE 00271000
  275. * VMCHECK. 00272000
  276. * 3. VERIFY THAT SEND DATA WILL FIT IN SINK USER 00273000
  277. * EXTERNAL INTERRUPT BUFFER. 00274000
  278. * 4. SCAN FOR DUPLICATE MESSAGE VIA SUBROUTINE 00275000
  279. * VMCSCANS(R). 00276000
  280. * 5. INITIALIZE AND ENQUEUE VMCBLOK ON SINK VMCBLOK 00277000
  281. * CHAIN VIA SUBROUTINE VMCBUILD. 00278000
  282. * 6. WAKE UP SINK USER VIA SUBROUTINE VMCWAKUP. 00279000
  283. * 7. EXIT TO DMKHVC WITH APPROPRIATE RETURN CODE SET IN 00280000
  284. * GPR 2. 00281000
  285. * 00282000
  286. * VMCRECV - RECEIVE SUBROUTINE - 00283000
  287. * 00284000
  288. * 1. LOCATE SUBJECT VMCBLOK VIA SUBROUTINE VMCSCANR 00285000
  289. * (VMCPMID+ VMCPUSER). 00286000
  290. * 2. CHECK FOR PROTOCOL VIAOLATION AND SYNCHRONIZATION 00287000
  291. * ERRORS. (VMCCRECP - RECEIVE ALREADY EXECUTED) 00288000
  292. * 3. VALIDITY CHECK USER RECEIVE BUFFER ADDRESS VIA 00289000
  293. * SUBROUTINE VMCHECK. 00290000
  294. * 4. MOVE DATA FROM SOURCE SEND BUFFER TO SINK RECEIVE 00291000
  295. * BUFFER VIA SUBROUTINE VMCXFER. 00292000
  296. * 5. IF SUBFUNCTION WAS SEND/RECV EXIT BACK TO DMKHVC 00293000
  297. * (WAIT FOR REPLY). 00294000
  298. * 6. IF SUBFUNCTION WAS NOT SEND/RECV (SEND) DEQUEUE 00295000
  299. * VMCBLOK FROM SINK VMCBLOK CHAIN VIA SUBROUTINE 00296000
  300. * VMCDEQ AND ENQUEUE VMCBLOK ON SOURCE VMCBLOK CHAIN 00297000
  301. * VIA SUBROUTINE VMCENQ. 00298000
  302. * 7. SET FINAL RESPONSE EXTERNAL INTERRUPT IN VMCBLOK 00299000
  303. * (VMCCXINT+ VMCRESP) AND COPY USER DOUBLEWORD. 00300000
  304. * 8. WAKE UP SOURCE USER VIA SUBROUTINE VMCWAKUP. 00301000
  305. * 9. SET APPROPRIATE RETURN CODE IN GPR 2 AND EXIT TO 00302000
  306. * MODULE DMKHVC. 00303000
  307. * 00304000
  308. * VMCCNCL - CANCEL SUBROUTINE - 00305000
  309. * 00306000
  310. * 1. VERIFY THAT SINK USER IS LOGGED ON VIA A CALL TO 00307000
  311. * MODULE DMKSCNAU AND IF LOGGED ON VERIFY THAT THE SINK 00308000
  312. * USER IS AUTHORIZED FOR VM COMMUNICATION. 00309000
  313. * 2. CHECK FOR TOO LATE CONDITION AND PROTOCOL 00310000
  314. * VIOLATIONS. 00311000
  315. * 3. SCAN FOR SUBJECT VMCBLOK ON SINK USER CHAIN VIA 00312000
  316. * SUBROUTINE VMCSCANS. 00313000
  317. * 4. DEQUEUE SUBJECT VMCBLOK FOR SINK USER VMCBLOK 00314000
  318. * CHAIN AND FRET THE BLOCK VIA SUBROUTINE VMCFRET. 00315000
  319. * 5. SET APPROPRIATE RETURN CODE IF SINK HAS ALREADY 00316000
  320. * EXECUTED A RECEIVE BUT NOT A REPLY. 00317000
  321. * 6. DECREMENT MESSAGE COUNT IN MASTER VMCBLOK. 00318000
  322. * 7. SET APPROPRIATE RETURN CODE IN GPR 2 AND RETURN TO 00319000
  323. * MODULE DMKHVC VIA EXIT. 00320000
  324. * 00321000
  325. * VMCREPLY - REPLY SUBROUTINE - 00322000
  326. * 00323000
  327. * 1. SCAN FOR SUBJECT VMCBLOK VIA SUBROUTINE VMCSCANR. 00324000
  328. * 2. VERIFY THAT ORIGINAL REQUEST WAS SEND/RECV. 00325000
  329. * 3. CHECK FOR PROTOCOL VIOLATIONS AND SYNCHRONIZATION 00326000
  330. * ERROR. 00327000
  331. * 4. VALIDITY CHECK USERS REPLY DATA ADDRESS VIA 00328000
  332. * SUBROUTINE VMCHECK. 00329000
  333. * 5. MOVE REPLY DATA TO SOURCE REPLY BUFFER VIA 00330000
  334. * SUBROUTINE VMCXFER. 00331000
  335. * 6. DEQUEUE VMCBLOK FROM SINK VMCBLOK CHAIN VIA 00332000
  336. * SUBROUTINE VMCDEQ. 00333000
  337. * 7. COPY USER DOUBLEWORD AND SET FINAL RESPONSE 00334000
  338. * EXTERNAL INTERRUPT IN VMCBLOK (VMCRESP). 00335000
  339. * 8. ENQUEUE VMCBLOK ON SOURCE USER VMCBLOK CHAIN VIA 00336000
  340. * SUBROUTINE VMCENQ. 00337000
  341. * 9. WAKE UP SOURCE USER VIA SUBROUTINE VMCWAKUP. 00338000
  342. * 10. EXIT TO MODULE DMKHVC WITH APPROPRIATE RETURN CODE 00339000
  343. * SET IN GPR 2. 00340000
  344. * 00341000
  345. * NOTE - DATA TRANSFER RETURN CODE SET IN VMCEFLG OF 00342000
  346. * VMCBLOK. 00343000
  347. * 00344000
  348. * VMCQIES - QUIESCE SUBROUTINE - 00345000
  349. * 00346000
  350. * 1. SET VMACQIES FLAG IN MASTER VMCBLOK AND EXIT TO 00347000
  351. * DMKHVC WITH RC = 0. 00348000
  352. * 00349000
  353. * VMCRESUM - RESUME SUBROUTINE - 00350000
  354. * 00351000
  355. * 1. RESET VMACQIES FLAG IN MASTER VMCBLOK AND EXIT TO 00352000
  356. * MODULE DMKHVC WITH RC = 0. 00353000
  357. * 00354000
  358. * VMCIDENT - IDENTIFY SUBROUTINE - 00355000
  359. * 00356000
  360. * 1. VALIDITY CHECK SINK USER STATUS VIA SUBROUTINE 00357000
  361. * VMCICHK. 00358000
  362. * 2. INITIALIZE AND ENQUEUE VMCBLOK ON SINK VMCBLOK 00359000
  363. * CHAIN VIA SUBROUTINE VMCBUILD. 00360000
  364. * 3. SET FINAL RESPONSE IN VMCBLOK. (VMCRESP) 00361000
  365. * 4. WAKE UP SINK USER VIA SUBROUTINE VMCWAKUP. 00362000
  366. * 5. EXIT TO MODULE DMKHVC WITH APPROPRIATE RETURN CODE 00363000
  367. * SET IN GPR 2. 00364000
  368. * 00365000
  369. * VMCREJEC - REJECT SUBROUTINE - 00366000
  370. * 00367000
  371. * 1. LOCATE SUBJECT VMCBLOK VIA SUBROUTINE VMCSCANR. 00368000
  372. * 2. CHECK FOR PROTOCOL VIOLATION OR SYNCHRONIZATION 00369000
  373. * ERROR. 00370000
  374. * 3. DEQUEUE SUBJECT VMCBLOK FROM SINK VMCBLOK CHAIN 00371000
  375. * VIA SUBROUTINE VMCDEQ. 00372000
  376. * 4. COPY USER DOUBLEWORD AND SET FINAL RESPONSE 00373000
  377. * INTERRUPT AND REJECT FLAGS IN VMCBLOK 00374000
  378. * (VMCRESP+VMCRJCT). 00375000
  379. * 5. ENQUEUE VMCBLOK ON SOURCE VMCBLOK CHAIN VIA 00376000
  380. * SUBROUTINE VMCENQ. 00377000
  381. * 6. WAKE UP SOURCE USER VIA SUBROUTINE VMCWAKUP. 00378000
  382. * 7. EXIT TO MODULE DMKHVC WITH APPROPRIATE RETURN CODE 00379000
  383. * SET IN GPR 2. 00380000
  384. * 00381000
  385. * THE FOLLOWING ARE INTERNAL SUBROUTINES USED BY MODULE 00382000
  386. * DMKVMC SUBFUNCTION ROUTINES: 00383000
  387. * 00384000
  388. * VMCBUILD - INITIALIZE VMCBLOK FOR SOURCE REQUEST AND 00385000
  389. * ENQ ON SINK VMCBLOK CHAIN. 00386000
  390. * 00387000
  391. * 1. INITIALIZE VMCBLOK WITH SOURCE USERS CURRENT PSW 00388000
  392. * KEY (VMCKEY). 00389000
  393. * 2. CLEAR VMCEFLG TO ZERO. 00390000
  394. * 3. CLEAR VMCSTAT TO ZERO (WAS VMCPFLG1). 00391000
  395. * 4. UPDATE MESSAGE COUNT IN SOURCE MASTER VMCBLOK 00392000
  396. * (VMCACNT). 00393000
  397. * 5. BRANCH TO VMCENQ TO ENQUEUE VMCBLOK ON SINK USER 00394000
  398. * VMCBLOK CHAIN. 00395000
  399. * 00396000
  400. * VMCENQ - ENQUEUE VMCBLOK ON SOURCE OR SINK VMCBLOK 00397000
  401. * CHAIN. 00398000
  402. * 00399000
  403. * 1. IF THE VMCBLOK IS FOR A PRIORITY MESSAGE (VMCPRTY) 00400000
  404. * INSERT THE BLOCK AFTER THE LAST EXISTING PRIORITY 00401000
  405. * VMCBLOK, OTHERWISE, QUEUE THE BLOCK LAST ON THE 00402000
  406. * CHAIN. 00403000
  407. * 2. COPY USERID FIELD (VMUSER) TO VMCBLOK (VMCUSER). 00404000
  408. * 3. SET VMCCXINT FLAG IN VMCBLOK. 00405000
  409. * 4. RETURN TO CALLER. 00406000
  410. * 00407000
  411. * VMCDEQ - DEQUEUE SUBJECT VMCBLOK FROM VMCBLOK CHAIN 00408000
  412. * (VMCPNT IN VMBLOK). 00409000
  413. * 00410000
  414. * 1. DEQUEUE VMCBLOK AND RETURN TO CALLER. 00411000
  415. * 00412000
  416. * VMCICHK - INITIAL VALIDITY CHECK OF SINK USER STATUS 00413000
  417. * (VMCPUSER). 00414000
  418. * 00415000
  419. * 1. VERIFY THAT RECEVIER IS NOT CP 00415100
  420. * 2. VERIFY THAT USER IS NOT EXCEEDING THE MESSAGE 00416000
  421. * LIMIT. (VMCACNT IN MASTER VMCBLOK) 00417000
  422. * 3. CHECK TO SEE THAT SINK USER IS LOGGED ON VIA A 00418000
  423. * CALL TO MODULE DMKSCNAU. 00419000
  424. * 4. INSURE THAT SINK USER IS AUTHORIZED FOR VM 00420000
  425. * COMMUNICATION (VMBCAUTH IN VMCXSTAT OF VMBLOK). 00421000
  426. * 5. INSURE THAT USER IS NOT AUTHORIZED SPECIFIC FOR 00422000
  427. * SOME OTHER USER (VMCAAUTS FLAG IN MASTER 00423000
  428. * VMCBLOK). 00424000
  429. * 6. INSURE THAT SINK USER IS NOT QUIESCING STACKED 00425000
  430. * COMMUNICATION MESSAGES (VMACQIES FLAG IN MASTER 00426000
  431. * VMCBLOK). 00427000
  432. * 7. IF MESSAGE IS A PRIORITY MESSAGE (VMCPRTY IN 00428000
  433. * VMCSTAT OF VMCBLOK) VERIFY THAT SINK USER IS 00429000
  434. * AUTHORIZED TO RECEIVE PRIORITY MESSAGES (VMCAPRTY 00430000
  435. * IN VMCASTAT OF MASTER VMCBLOK). 00431000
  436. * 8. SET APPROPRIATE RETURN CODE IN GPR 2 AND EXIT TO 00432000
  437. * MODULE DMKHVC IF ANY ERRORS WERE DETECTED, 00433000
  438. * OTHERWISE, RETURN TO CALLER. 00434000
  439. * 00435000
  440. * VMCSCANS - LOCATE VMCBLOK ON SINK VMCBLOK CHAIN. 00436000
  441. * 00437000
  442. * 1. SCAN SINK VMCBLOK CHAIN FOR SUBJECT VMCBLOK 00438000
  443. * (VMUSER = VMCUSER - VMCPMID = VMCMID). 00439000
  444. * 2. IF VMCBLOK IS FOUND SET CC = 0 AND RETURN TO 00440000
  445. * CALLER, OTHERWISE, SET CC = 2 AND RETURN TO 00441000
  446. * CALLER. 00442000
  447. * 00443000
  448. * VMCSCANR - LOCATE VMCBLOK FOR ACTIVE USER. 00444000
  449. * 00445000
  450. * 1. SCAN VMCBLOK CHAIN ON CURRENT VMBLOK FOR SUBJECT 00446000
  451. * VMCBLOK (VMCPUSER = VMCUSER - VMCPMID = VMCMID). 00447000
  452. * 2. IF VMCBLOK IS FOUND SET CC = 0 AND RETURN TO 00448000
  453. * CALLER, OTHERWISE, SET CC = 2 AND RETURN TO 00449000
  454. * CALLER. 00450000
  455. * 00451000
  456. * VMCWAKUP - WAKE UP SOURCE / SINK USER. 00452000
  457. * 00453000
  458. * 1. SCAN SUBJECT USERS XINTBLOK CHAIN FOR AN ALREADY 00454000
  459. * EXISTING VMCF EXTERNAL INTERRUPT. IF ONE ALREADY 00455000
  460. * EXISTS RETURN TO THE CALLER. 00456000
  461. * 2. ACQUIRE FREE STORAGE FOR AN XINTBLOK VIA A CALL TO 00457000
  462. * MODULE DMKFREE. 00458000
  463. * 3. CHAIN XINTBLOK AT END OF SUBJECT USERS XINTBLOK 00459000
  464. * CHAIN. 00460000
  465. * 4. INITIALIZE XINTBLOK WITH MAXIMUM COLLATING VALUE 00461000
  466. * (X'7FFFFFFF') AND THE VMCF CODE (X'4001') AND MASK 00462000
  467. * (X'0001'). 00463000
  468. * 5. CHECK TO SEE IF TARGET VIRTUAL MACHINE IS ENABLED 00464000
  469. * FOR VMCF EXTERNAL INTERRUPTS (PSW BIT 7 + CR0 BIT 00465000
  470. * 31) AND IF NOT RETURN TO CALLER. 00466000
  471. * 6. IF TARGET VIRTUAL MACHINE IS ENABLED FOR VMCF 00467000
  472. * EXTERNAL INTERRUPTS GET STORAGE FOR A WAKE-UP 00468000
  473. * CPEXBLOK VIA A CALL TO MODULE DMKFREE. 00469000
  474. * 7. INITIALIZE THE CPEXBLOK TO RETURN DIRECTLY TO THE 00470000
  475. * DISPATCHER DMKDSPCH AND STACK THE BLOK VIA MODULE 00471000
  476. * DMKSTKCP. 00472000
  477. * 8. IF FINAL RESPONSE INTERRUPT IS FOR CP, THEN DON'T 00472100
  478. * REFLECT THE INTERRUPT 00472200
  479. * 9. RETURN TO CALLER. 00473000
  480. * 00474000
  481. * VMCHECK - VALIDITY CHECK VIRTUAL BUFFER ADDRESSES. 00475000
  482. * 00476000
  483. * 1. INSURE THAT CREG1 IS LOADED WITH THE CORRECT 00477000
  484. * SEGMENT TABLE ORIGIN. 00478000
  485. * 2. DO AN LRA ON THE STARTING VIRTUAL ADDRESS AND EXIT 00479000
  486. * TO MODULE DMKHVC WITH APPROPRIATE RETURN CODE IF 00480000
  487. * LRA FAILS. 00481000
  488. * 3. IF STARTING ADDRESS IS OK ADD BUFFER LENGTH TO 00482000
  489. * STARTING ADDRESS AND DO ANOTHER LRA. 00483000
  490. * 4. IF LRA FAILS RETURN TO MODULE DMKHVC WITH 00484000
  491. * APPROPRIATE RETURN CODE, OTHERWISE, RETURN TO 00485000
  492. * CALLER. (BEGINNING AND ENDING BUFFER ADDRESSES 00486000
  493. * OK) 00487000
  494. * 00488000
  495. * VMCFRET - RELEASE VMCBLOK STORAGE 00489000
  496. * 00490000
  497. * 1. FRET VMCBLOK VIA A CALL TO MODULE DMKFREE AND 00491000
  498. * RETURN TO CALLER. 00492000
  499. * 00493000
  500. * VMCSUSER - VALIDATE SOURCE USER STATUS 00494000
  501. * 00495000
  502. * 1. LOCATE SOURCE USER VMBLOK ADDRESS VIA A CALL TO 00496000
  503. * MODULE DMKSCNAU. 00497000
  504. * 2. VERIFY THAT SOURCE USER IS STILL AUTHORIZED FOR 00498000
  505. * VM COMMUNICATION. 00499000
  506. * 3. IF SOURCE USER IS NOT LOGGED ON OR NOT AUTHORIZED 00500000
  507. * FRET THE ACTIVE VMCBLOK VIA A CALL TO MODULE DMKFRET 00501000
  508. * AND RETURN TO MODULE DMKHVC WITH APPROPRIATE RETURN 00502000
  509. * CODE SET IN GPR 2, OTHERWISE, RETURN TO CALLER. 00503000
  510. * 00504000
  511. * VMCXFER - DATA TRANSFER SUBROUTINE 00505000
  512. * 00506000
  513. * INPUT = ADDRESS OF SEND AND RECEIVE VMCBLOKS. 00507000
  514. * 00508000
  515. * 1. DETERMINE CONTROLLING DATA TRANSFER COUNT (LOWEST 00509000
  516. * COUNT WINS) AND SET VMCEFLG IF INCORRECT LENGTH 00510000
  517. * CONDITION EXISTS. 00511000
  518. * 2. IF COUNT IS ZERO RETURN TO CALLER. 00512000
  519. * 3. LOCATE SENDER VMBLOK VIA A CALL TO MODULE 00513000
  520. * DMKSCNAU. 00514000
  521. * 4. FETCH SEND DATA AND LOCK THE PAGE IN STORAGE VIA A 00515000
  522. * CALL TO MODULE DMKPTRAN (TRANS MACRO). 00516000
  523. * 5. CHECK SEND BUFFER FOR FETCH PROTECTION VIOLATION 00517000
  524. * VIA A CALL TO MODULE DMKPSAFC. 00518000
  525. * 6. LOCATE RECEIVER VMBLOK VIA A CALL TO MODULE 00519000
  526. * DMKSCNAU. 00520000
  527. * 7. FETCH THE RECEIVE BUFFER VIA A CALL TO MODULE 00521000
  528. * DMKPTRAN (TRANS MACRO). 00522000
  529. * 8. CHECK FOR STORE PROTECTION VIOLATION WITHIN THE 00523000
  530. * RECEIVE BUFFER VIA A CALL TO MODULE DMKPSASC. 00524000
  531. * 9. COMPUTE LENGTH OF MOVE UP TO THE NEXT 2K BOUNDARY 00525000
  532. * (SEND OR RECEIVE). 00526000
  533. * 10. UPDATE SEND AND RECEIVE DATA COUNTS WITHIN THE 00527000
  534. * SOURCE AND SINK VMCBLOK. 00528000
  535. * 11. MOVE UP TO 2K OF DATA VIA THE MVCL INSTRUCTION. 00529000
  536. * 12. IF TOTAL DATA TRANSFER COUNT IS EXHAUSTED UNLOCK 00530000
  537. * SENDER PAGE AND RETURN TO THE CALLER. 00531000
  538. * 13. IF ANY DATA REMAINS IN SENDER 2K BLOCK ITERATE 00532000
  539. * LOOP (7). 00533000
  540. * 14. UNLOCK SENDER PAGE VIA A CALL TO MODULE DMKPTRUL. 00534000
  541. * 15. ITERATE LOOP (3). 00535000
  542. * 00536000
  543. * NOTE - IF ANY ERRORS ARE DETECTED DURING THE DATA 00537000
  544. * TRANSFER OPERATION THE DATA TRANSFER RETURN CODE IS 00538000
  545. * RETURNED TO THE CALLER. 00539000
  546. * 00539100
  547. * NOTE - NO SCANS FOR THE SYSTEM VMBLOK WILL BE MADE NOR 00539200
  548. * WILL THE TRANS MACRO BE EXECUTED FOR THE SENDER OF VMCF 00539300
  549. * DATA WHEN THE SENDER IS CP. 00539400
  550. * 00540000
  551. * VMCEXIT - NORMAL EXIT FROM DMKVMCFC ENTRY. 00541000
  552. * 00542000
  553. * 1. STORE RETURN CODE (R2) IN THE SAVEAREA FROM 00543000
  554. * DMKHVC. (SAVER2) 00544000
  555. * 2. IF FREE STORAGE WAS ACQUIRED FOR A VMCBLOK WHICH 00545000
  556. * WAS NOT USED (USED ONLY TO BUFFER VMCPARM) FRET 00546000
  557. * THE BLOCK VIA A CALL TO MODULE DMKFREE. 00547000
  558. * 3. EXIT TO MODULE DMKHVC VIA THE EXIT MACRO. 00548000
  559. * 00549000
  560. * RESPONSES - 00550000
  561. * 00551000
  562. * NONE 00552000
  563. * 00553000
  564. * ERROR MESSAGES - 00554000
  565. * 00555000
  566. * NONE 00556000
  567. * 00557000
  568. * ABEND CODES - 00558000
  569. * 00559000
  570. * NONE 00560000
  571. * 00561000
  572. * RETURN CODES - 00562000
  573. * 00563000
  574. * REFER TO VMCBLOKS COPY (RETURN CODE EQUATES) 00564000
  575. * 00565000
  576. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00566000
  577. COPY OPTIONS @V407510 00566100
  578. EJECT 00567000
  579. EXTRN DMKPSASC @V387045 00568000
  580. EXTRN DMKPSAFC @V387045 00569000
  581. EXTRN DMKPSASP @V387045 00570000
  582. EXTRN DMKSTKCP @V387045 00571000
  583. EXTRN DMKPTRPW @VA10373 00571100
  584. EXTRN DMKPTRUL @V387045 00572000
  585. EXTRN DMKSCNAU @V387045 00573000
  586. EXTRN DMKSCHDL @VA06441 00573500
  587. SPACE 00574000
  588. USING SAVEAREA,R13 @V387045 00575000
  589. USING VMBLOK,R11 @V387045 00576000
  590. USING VMCPARM,R9 @V387045 00577000
  591. USING VMCBLOK,R8 @V387045 00578000
  592. USING PSA,0 @V387045 00579000
  593. SPACE 00580000
  594. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00581000
  595. * 00582000
  596. * DMKVMCFC - INTERPRET USER FUNCTION CODE 00583000
  597. * 00584000
  598. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00585000
  599. DMKVMCFC RELOC @V387045 00586000
  600. XC SAVEWRK1,SAVEWRK1 CLEAR SAVE AREA @V387045 00587000
  601. LR R3,R2 PARMLIST LENGTH TO R3 @V387045 00588000
  602. LR R4,R1 SAVE VIRTUAL ADDRESS IN R4 @V387045 00589000
  603. LA R0,VMCBSIZE SIZE OF VMCBLOK (DOUBLEWORDS) @V387045 00590000
  604. CALL DMKFREE GET STORAGE FOR PARMLIST BUFFER @V387045 00591000
  605. LR R9,R1 SAVE ADDRESS IN R9 @V387045 00592000
  606. XC VMCPARM(VMCBSIZE*8),VMCPARM CLEAR BUFFER @V387045 00593000
  607. ST R9,SAVEWRK1 SAVE FOR LATER FRET @V387045 00594000
  608. C R11,ASYSVM IS IT REQUEST FROM CP? @V60C2B8 00594100
  609. BNE CPVMCF1 NO - VALIDATE ADDRESS @V60C2B8 00594200
  610. ST R9,VMCPNT STORE VMCBLOK PTR IN CP VMBLOK 00594210
  611. LR R2,R4 POINT REG 2 TO PARM LIST @V60C2B8 00594300
  612. BCTR R3,0 SUBTRACT 1 FOR EXECUTE 00594310
  613. EX R3,VMCFMOVE MOVE DATA DIRECTLY INTO CORE @V60C2B8 00594400
  614. B CPVMCF2 CONTINUE NORMAL PROCESSING @V60C2B8 00594500
  615. CPVMCF1 LR R1,R4 RESTORE VIRTUAL ADDRESS @V60C2B8 00595000
  616. LR R6,R3 SAVE TOTAL LENGTH @V387045 00596000
  617. LA R14,0(R3,R1) ENDING ADDRESS + 1 @V387045 00597000
  618. BCTR R14,0 ENDING ADDRESS @V387045 00598000
  619. L R15,XPAGNUM PAGE NUMBER MASK @V387045 00599000
  620. NR R14,R15 ENDING PAGE ADDRESS @V387045 00600000
  621. NR R15,R1 STARTING PAGE ADDRESS @V387045 00601000
  622. CLR R14,R15 VMCPARM IN ONE PAGE ? @V387045 00602000
  623. BE VMCFFTCH YES..CONTINUE... @V387045 00603000
  624. SLR R14,R1 BYTES REMAINING IN FIRST PAGE @V387045 00604000
  625. LR R6,R14 SAVE AS LENGTH MOVED @V387045 00605000
  626. VMCFFTCH TRANS 2,1,OPT=(BRING+DEFER) FETCH PARMLIST @V387045 00606000
  627. BNZ VMCRC15 EXIT IF PAGING ERROR @V387045 00607000
  628. LR R0,R6 SAVE BYTES BEING MOVED @V387045 00608000
  629. BCTR R6,0 LESS ONE FOR EXECUTE @V387045 00609000
  630. EX R6,VMCFMOVE MOVE ALL OR PART OF VMCPARM @V387045 00610000
  631. ALR R9,R0 ADJUST BUFFER ADDRESS @V387045 00611000
  632. ALR R1,R0 AND VIRTUAL VMCPARM ADDRESS @V387045 00612000
  633. SR R3,R0 AND TOTAL LENGTH OF VMCPARM @V387045 00613000
  634. LR R6,R3 BYTES LEFT (MAYBE) @V387045 00614000
  635. BP VMCFFTCH CONTINUE IF MORE TO DO.. @V387045 00615000
  636. CPVMCF2 L R9,SAVEWRK1 RESTORE ADDRESS OF VMCPARM @V60C2B8 00616000
  637. LH R1,VMCPFUNC DESIRED FUNCTION CODE @V387045 00617000
  638. CL R1,=A(VMCFMAX) WITHIN VALID RANGE ? @V387045 00618000
  639. BNL VMCRC2 NO..SET RC..EXIT @V387045 00619000
  640. SLA R1,2(0) TIMES 4 FOR BRANCH TABLE @V387045 00620000
  641. BZ VMCAUTH AUTHORIZE SUB FUNCTION.. @V387045 00621000
  642. C R11,ASYSVM IS IT A REQUEST FROM CP? @V60C2B8 00621100
  643. BE VMCFTBL YES - CP ALWAYS AUTHORIZED @V60C2B8 00621200
  644. TM VMCXSTAT,VMBCAUTH USER AUTHORIZED ? @V387045 00622000
  645. BZ VMCRC4 NO..SET CC AND EXIT... @V387045 00623000
  646. SPACE 00624000
  647. VMCFTBL B VMCFTBL(R1) GOTO SUBROUTINE @V387045 00625000
  648. * B VMCAUTH FC = 0 AUTHORIZE 00626000
  649. B VMCUAUTH FC = 1 UN-AUTHORIZE @V387045 00627000
  650. B VMCSEND FC = 2 SEND @V387045 00628000
  651. B VMCSENDR FC = 3 SEND/RECEIVE @V387045 00629000
  652. B VMCSENDX FC = 4 SENDX @V387045 00630000
  653. B VMCRECV FC = 5 RECEIVE @V387045 00631000
  654. B VMCCNCL FC = 6 CANCEL @V387045 00632000
  655. B VMCREPLY FC = 7 REPLY @V387045 00633000
  656. B VMCQIES FC = 8 QUIESCE @V387045 00634000
  657. B VMCRESUM FC = 9 RESUME @V387045 00635000
  658. B VMCIDENT FC = 10 IDENTIFY @V387045 00636000
  659. B VMCREJEC FC = 11 REJECT @V387045 00637000
  660. VMCFMAX EQU (*-VMCFTBL)/4 MAXIMUM SUPPORTED FUNCTION CODE @V387045 00638000
  661. VMCFMOVE MVC 0(*-*,R9),0(R2) EXECUTED MOVE @V387045 00639000
  662. EJECT 00640000
  663. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00641000
  664. * 00642000
  665. * AUTHORIZE - AUTHORIZE VM COMMUNICATIONS 00643000
  666. * 00644000
  667. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00645000
  668. VMCAUTH EQU * AUTHORIZE @V387045 00646000
  669. LM R1,R2,VMCPVADA VADDR + LENGTH @V387045 00647000
  670. LR R3,R1 BUFFER ADDRESS TO R3 @V387045 00648000
  671. N R3,F7 DOUBLE WORD ALIGNED ? @V387045 00649000
  672. BNZ VMCRC1 NO..SET RC..EXIT.. @V387045 00650000
  673. CL R2,=A(VMCMLEN) DATA LENGTH VALID ? @V387045 00651000
  674. BL VMCRC1 NO..SET RC..EXIT.. @V387045 00652000
  675. BAL R10,VMCHECK VALIDITY CHECK BUFFER ADDRESS @V387045 00653000
  676. TRANS 2,1,OPT=(BRING+DEFER) FETCH USER BUFFER @V387045 00654000
  677. BNZ VMCRC15 EXIT IF PAGING ERROR... @V387045 00655000
  678. CALL DMKPSASP CHECK STORAGE KEYS @V387045 00656000
  679. BNZ VMCRC6 STORE PROTECT VIOLATION @V387045 00657000
  680. L R8,VMCPNT VMCBLOK CHAIN @V387045 00658000
  681. LTR R8,R8 DO WE HAVE ANY ? @V387045 00659000
  682. BNZ VMCAIUTH YES..CONTINUE... @V387045 00660000
  683. XC SAVEWRK1,SAVEWRK1 CLEAR SAVED ADDRESS @V387045 00661000
  684. LR R8,R9 CONVERT VMCPARM TO VMCBLOK @V387045 00662000
  685. ST R8,VMCPNT CHAIN TO VMBLOK @V387045 00663000
  686. STCK VMCTOD STORE TOD AT AUTH. @VA07113 00663500
  687. VMCAIUTH EQU * @V387045 00664000
  688. LM R0,R1,VMCPVADA BUFFER ADDRESS + LENGTH @V387045 00665000
  689. STM R0,R1,VMCVADA TO VMCBLOK @V387045 00666000
  690. IC R0,VMPSW+1 CURRENT KEY.. @V387045 00667000
  691. STC R0,VMCKEY SAVE IN VMCBLOK @V387045 00668000
  692. NI VMCASTAT,VMCAQIES LEAVE ONLY THIS... @V387045 00669000
  693. TM VMCPFLG1,VMCPAUTS AUTHORIZE SPECIFIC ? @V387045 00670000
  694. BZ VMCATUTH NO..CONTINUE... @V387045 00671000
  695. MVC VMCUSER,VMCPUSER MOVE USERID TO VMCBLOK @V387045 00672000
  696. OI VMCASTAT,VMCAAUTS INDICATE SPECIFIC @V387045 00673000
  697. VMCATUTH EQU * @V387045 00674000
  698. TM VMCPFLG1,VMCPSMSG WANTS TO RECV SP MSG? @V60C2B8 00674100
  699. BZ VMCPRIOR NO..CONTINUE... @V60C2B8 00674200
  700. OI VMSPMFLG,VMSPMON ALLOW USER TO RECV SPM'S @V60C2B8 00674300
  701. VMCPRIOR TM VMCPFLG1,VMCPPRTY AUTHORIZE PRIORITY ? @V60C2B8 00675000
  702. BZ *+8 NO..CONTINUE... @V387045 00676000
  703. OI VMCASTAT,VMCAPRTY INDICATE PRIORITY @V387045 00677000
  704. MVI VMCSTAT,X'00' CLEAR VMCBLOK STATUS @V387045 00678000
  705. OI VMCXSTAT,VMBCAUTH USER NOW AUTHORIZED @V387045 00679000
  706. B VMCRC0 TAKE NORMAL EXIT..RC = 0 @V387045 00680000
  707. EJECT 00681000
  708. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00682000
  709. * 00683000
  710. * UN-AUTHORIZE - UNAUTHORIZE VM COMMUNICATIONS 00684000
  711. * 00685000
  712. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00686000
  713. DMKVMCUA RELOC @V387045 00687000
  714. XC SAVEWRK1,SAVEWRK1 CLEAR PARMLIST POINTER @V387045 00688000
  715. VMCUAUTH EQU * UN-AUTHORIZE @V387045 00689000
  716. NI VMCXSTAT,X'FF'-VMBCAUTH RESET AUTHORIZATION @V387045 00690000
  717. L R8,VMCPNT MASTER VMCBLOK ADDRESS @V387045 00691000
  718. L R4,VMCFPNT NEXT VMCBLOK @V387045 00692000
  719. SR R0,R0 CLEAR VMCBLOK @V387045 00693000
  720. ST R0,VMCPNT ANCHOR @V387045 00694000
  721. VMCUFRET EQU * @V387045 00695000
  722. BAL R10,VMCFRET GET RID OF MASTER BLOK @V387045 00696000
  723. VMCUNXT EQU * @V387045 00697000
  724. LTR R8,R4 ANY MORE VMCBLOKS ? @V387045 00698000
  725. BZ VMCUINT NO..CHECK FOR XINTBLOKS @V387045 00699000
  726. L R4,VMCFPNT NEXT VMCBLOK @V387045 00700000
  727. TM VMCSTAT,VMCRESP FINAL RESPONSE BLOK ? @V387045 00701000
  728. BNZ VMCUFRET YES..GET RID OF BLOCK @V387045 00702000
  729. CLC VMCUSER(8),SYSTEMID IS SOURCE CP? @VA11145 00702050
  730. BNE VMCUFIND NO-FIND SOURCE @VA11145 00702100
  731. CLC VMCFUNC,=AL2(VMCPSENX) IS IT SENDX? @VA11145 00702150
  732. BNE VMCUFIND NO-CONTINUE NORMALLY @VA11145 00702200
  733. TM VMCCSTAT,VMCCXINT WAITNIG FOR EXT INTERRUPT? @VA11145 00702250
  734. BNO VMCUFIND NO-CONTINUE NORNALLY @VA11145 00702300
  735. L R1,VMCVADA GET SOURCE SENDX DATA AREA @VA11145 00702350
  736. LA R2,VMCPLEN GET LENGTH OF VMCPARM @VA11145 00702400
  737. SR R1,R2 POINT TO THE START OF THE BOLCK @VA11145 00702450
  738. L R2,VMCLENA-VMCBLOK(R1) GET THE DATA LENGTH @VA11145 00702500
  739. LA R2,VMCPLEN+7(R2) GET BUFFER LENGTH FOR FRET @VA11145 00702550
  740. LR R0,R2 MOVE LENGHT FOR FRET @VA11145 00702600
  741. SRL R0,3 CONVERT TO DOUBLE WORDS @VA11145 00702650
  742. CALL DMKFRET FRET THE MESSAGE BLOCK @VA11145 00702700
  743. B VMCUFRET FRET THE VMCBLOCK @VA11145 00702750
  744. VMCUFIND EQU * @VA11145 00702800
  745. LA R0,L'VMCUSER LENGTH OF USERID @V387045 00703000
  746. LA R1,VMCUSER ADDRESS OF USERID @V387045 00704000
  747. CALL DMKSCNAU LOCATE SOURCE VMBLOK ADDRESS @V387045 00705000
  748. BNZ VMCUFRET FRET BLOK IF LOGGED OFF @V387045 00706000
  749. LR R3,R1 VMBLOK ADDRESS TO R3 @V387045 00707000
  750. CLR R3,R11 WRAP CONNECTION ? @V387045 00708000
  751. BE VMCUFRET YES..FRET THE BLOCK @V387045 00709000
  752. TM VMCXSTAT-VMBLOK(R3),VMBCAUTH AUTHORIZED ? @V387045 00710000
  753. BZ VMCUFRET NO..FRET THE BLOCK.. @V387045 00711000
  754. OI VMCSTAT,VMCRESP SET FINAL RESPONSE @V387045 00712000
  755. MVI VMCEFLG,VMC05 USER NOT AVAILABLE @V387045 00713000
  756. BAL R10,VMCENQ ENQUEUE VMCBLOK ON SOURCE CHAIN @V387045 00714000
  757. BAL R10,VMCWAKUP WAKE UP SOURCE USER @V387045 00715000
  758. B VMCUNXT ITERATE LOOP... @V387045 00716000
  759. VMCUINT EQU * @V387045 00717000
  760. LA R1,VMPXINT XINT BLOK ANCHOR @V387045 00718000
  761. VMCUXNXT EQU * @V387045 00719000
  762. LR R2,R1 SAVE ANCHOR @V387045 00720000
  763. L R1,XINTNEXT-XINTBLOK(,R2) NEXT BLOK @V387045 00721000
  764. LTR R1,R1 IS THERE ONE ? @V387045 00722000
  765. BZ VMCUTENT NO..EXIT NOW.. @V387045 00723000
  766. CLC XINTCODE-XINTBLOK(L'XINTCODE,R1),=AL2(VMCXCODE) @V387045 00724000
  767. BNE VMCUXNXT ITERATE LOOP IF NOT VMCF CODE @V387045 00725000
  768. L R0,XINTNEXT-XINTBLOK(,R1) NEXT BLOK @V387045 00726000
  769. ST R0,XINTNEXT-XINTBLOK(,R2) REMOVE FROM CHAIN @V387045 00727000
  770. LA R0,XINTSIZE SIZE OF BLOCK (DOUBLEWORDS) @V387045 00728000
  771. CALL DMKFRET FRET THE BLOCK @V387045 00729000
  772. VMCUTENT EQU * @V387045 00730000
  773. L R1,SAVEWRK1 ADDRESS OF PARMLIST @V387045 00731000
  774. LTR R1,R1 DMKCFP ENTRY ? @V387045 00732000
  775. BNZ VMCRC0 NO..EXIT TO DMKHVC @V387045 00733000
  776. EXIT EXIT TO DMKCFP @V387045 00734000
  777. EJECT 00735000
  778. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00736000
  779. * 00737000
  780. * SEND - SEND MESSAGE (VMCPMID) TO USERID (VMCPUSER) 00738000
  781. * 00739000
  782. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00740000
  783. VMCSEND EQU * SEND @V387045 00741000
  784. BAL R10,VMCICHK CHECK MSG COUNT + TARGET USER @V387045 00742000
  785. LM R1,R2,VMCPVADA BUFFER ADDRESS + LENGTH @V387045 00743000
  786. BAL R10,VMCHECK VALIDITY CHECK ADDRESS @V387045 00744000
  787. BAL R10,VMCSCANR AVOID POSSIBLE RACE @V387045 00745000
  788. BZ VMCRC8 CONDITION.... @V387045 00746000
  789. BAL R10,VMCSCANS SCAN FOR DUPLICATE MSG @V387045 00747000
  790. BZ VMCRC8 DUPLICATE MSG @V387045 00748000
  791. BAL R10,VMCBUILD INITIALIZE + ENQ VMCBLOK @V387045 00749000
  792. BAL R10,VMCWAKUP WAKE UP SINK USER @V387045 00750000
  793. B VMCRC0 EXIT TO DMKHVC @V387045 00751000
  794. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00752000
  795. * 00753000
  796. * SEND/RECV - SEND MESSAGE (VMCPMID) TO USERID (VMCPUSER) 00754000
  797. * AND WAIT FOR REPLY. 00755000
  798. * 00756000
  799. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00757000
  800. VMCSENDR EQU * SEND / RECV @V387045 00758000
  801. BAL R10,VMCICHK CHECK MSG COUNT + TARGET USER @V387045 00759000
  802. LM R1,R2,VMCPVADA SEND DATA ADDRESS @V387045 00760000
  803. BAL R10,VMCHECK VALIDITY CHECK ADDRESS @V387045 00761000
  804. LM R1,R2,VMCPVADB REPLY BUFFER ADDRESS @V387045 00762000
  805. BAL R10,VMCHECK VALIDITY CHECK ADDRESS @V387045 00763000
  806. BAL R10,VMCSCANR SCAN FOR EXISTING MSG @V387045 00764000
  807. BZ VMCRC8 DUPLICATE MESSAGE... @V387045 00765000
  808. BAL R10,VMCSCANS SCAN FOR DUPLICATE MSG @V387045 00766000
  809. BZ VMCRC8 DUPLICATE MSG @V387045 00767000
  810. BAL R10,VMCBUILD INITIALIZE + ENQ VMCBLOK @V387045 00768000
  811. BAL R10,VMCWAKUP WAKE UP SINK USER @V387045 00769000
  812. B VMCRC0 EXIT TO DMKHVC.. @V387045 00770000
  813. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00771000
  814. * 00772000
  815. * SENDX - SEND MESSAGE (VMCPMID) TO USERID (VMCPUSER) 00773000
  816. * WITHIN HIS EXTERNAL INTERRUPT BUFFER. 00774000
  817. * 00775000
  818. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00776000
  819. VMCSENDX EQU * @V387045 00777000
  820. BAL R10,VMCICHK CHECK MSG LIMIT + SINK USER @V387045 00778000
  821. LM R1,R2,VMCPVADA SEND DATA ADDRESS + LENGTH @V387045 00779000
  822. BAL R10,VMCHECK VALIDITY CHECK SENDX DATA ADDRESS@V387045 00780000
  823. LA R1,VMCMLEN(,R2) ADD MINIMUM HEADER LENGTH @V387045 00781000
  824. CL R1,VMCLENA WILL IT FIT ? @V387045 00782000
  825. BH VMCRC7 NO..SET RC..EXIT @V387045 00783000
  826. BAL R10,VMCSCANR SCAN RECEIVE QUEUE FOR @V387045 00784000
  827. BZ VMCRC8 DUPLICATE MESSAGE @V387045 00785000
  828. BAL R10,VMCSCANS SCAN FOR DUPLICATE MSG @V387045 00786000
  829. BZ VMCRC8 DUPLICATE MSG IS AN ERROR.. @V387045 00787000
  830. BAL R10,VMCBUILD INITIALIZE + ENQ VMCBLOK @V387045 00788000
  831. BAL R10,VMCWAKUP WAKE UP SINK USER @V387045 00789000
  832. B VMCRC0 EXIT TO DMKHVC @V387045 00790000
  833. EJECT 00791000
  834. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00792000
  835. * 00793000
  836. * RECEIVE - RECEIVE MESSAGE (VMCPMID) FROM USERID 00794000
  837. * (VMCPUSER). 00795000
  838. * 00796000
  839. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00797000
  840. VMCRECV EQU * RECEIVE @V387045 00798000
  841. BAL R10,VMCSCANR LOCATE SUBJECT VMCBLOK @V387045 00799000
  842. BNZ VMCRC12 MESSAGE NOT FOUND @V387045 00800000
  843. TM VMCSTAT,VMCRESP FINAL RESPONSE ? @V387045 00801000
  844. BO VMCRC3 YES..PROTOCOL VIOLATION @V387045 00802000
  845. TM VMCCSTAT,VMCCXINT XINT BLOK ? @V387045 00803000
  846. BO VMCRC13 YES..SYNCHRONIZATION ERROR... @V387045 00804000
  847. TM VMCCSTAT,VMCCRECP RECEIVE ALREADY EXECUTED ? @V387045 00805000
  848. BO VMCRC3 YES..PROTOCOL VIOLATION @V387045 00806000
  849. LM R1,R2,VMCPVADA BUFFER ADDRESS + LENGTH @V387045 00807000
  850. BAL R10,VMCHECK VALIDITY CHECK BUFFER ADDRESS @V387045 00808000
  851. OI VMCCSTAT,VMCCRECP INDICATE RECEIVE PROCESSED @V387045 00809000
  852. MVC VMCUSER,VMUSER SWAP USERID TO SINK @V387045 00810000
  853. LR R7,R8 SOURCE VMCBLOK ADDRESS TO R7 @V387045 00811000
  854. LR R8,R9 SINK VMCBLOK ADDRESS TO R8 @V387045 00812000
  855. IC R0,VMPSW+1 USERS CURRENT PSW KEY + @V387045 00813000
  856. STC R0,VMCKEY SAVE IN VMCBLOK @V387045 00814000
  857. SPACE 00815000
  858. BAL R10,VMCXFER TRANSFER DATA (VM -> VM) @V387045 00816000
  859. SPACE 00817000
  860. LR R8,R7 SWAP BACK TO SOURCE VMCBLOK (R8) @V387045 00818000
  861. MVC VMCUSER,VMCPUSER SWAP USERID BACK TO SOURCE @V387045 00819000
  862. CLC VMCFUNC,=AL2(VMCPSENR) SEND/RECV ? @V387045 00820000
  863. BE VMCREDAT YES..WAIT FOR REPLY... @V387045 00821000
  864. BAL R10,VMCDEQ DEQUEUE VMCBLOK FROM SINK CHAIN @V387045 00822000
  865. BAL R10,VMCSUSER CHECK OUT SOURCE STATUS @V387045 00823000
  866. OI VMCSTAT,VMCRESP SET FINAL RESPONSE @V387045 00824000
  867. MVC VMCUSE,VMCPUSE COPY USER DOUBLEWORD @V387045 00825000
  868. BAL R10,VMCENQ ENQUEUE BLOK ON SOURCE VMCBLOK @V387045 00826000
  869. * CHAIN 00827000
  870. BAL R10,VMCWAKUP WAKE UP SOURCE USER @V387045 00828000
  871. VMCREDAT EQU * @V387045 00829000
  872. SLR R2,R2 CLEAR RETURN CODE REG @V387045 00830000
  873. IC R2,VMCEFLG-VMCBLOK(,R9) SET RETURN CODE @V387045 00831000
  874. B VMCEXIT EXIT @V387045 00832000
  875. EJECT 00833000
  876. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00834000
  877. * 00835000
  878. * CANCEL - CANCEL MESSAGE (VMCPMID) PREVIOUSLY SENT 00836000
  879. * TO USER (VMCPUSER) 00837000
  880. * 00838000
  881. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00839000
  882. VMCCNCL EQU * CANCEL @V387045 00840000
  883. LA R0,L'VMCPUSER LENGTH OF USERID @V387045 00841000
  884. LA R1,VMCPUSER ADDRESS OF USERID @V387045 00842000
  885. CALL DMKSCNAU LOCATE SINK VMBLOK ADDRESS @V387045 00843000
  886. BNZ VMCRC5 USER NOT AVAILABLE @V387045 00844000
  887. LR R3,R1 VMBLOK ADDRESS TO R3 @V387045 00845000
  888. TM VMCXSTAT-VMBLOK(R3),VMBCAUTH AUTHORIZED ? @V387045 00846000
  889. BZ VMCRC5 NO..USER NOT AVAILABLE @V387045 00847000
  890. BAL R10,VMCSCANR CHECK FOR TOO LATE CONDITION @V387045 00848000
  891. BNZ VMCCNSS NOT THERE..LOCATE MESSAGE.. @V387045 00849000
  892. TM VMCSTAT,VMCRESP FINAL RESPONSE ? @V387045 00850000
  893. BO VMCRC14 YES..TOO LATE... @V387045 00851000
  894. CLR R11,R3 WRAP CONNECTION ? @V387045 00852000
  895. BNE VMCRC3 NO..PROTOCOL VIOLATION @V387045 00853000
  896. VMCCNSS EQU * @V387045 00854000
  897. BAL R10,VMCSCANS LOCATE SUBJECT VMCBLOK @V387045 00855000
  898. BNZ VMCRC12 MESSAGE NOT FOUND.. @V387045 00856000
  899. TM VMCCSTAT,VMCCBUSY IN PROCESS ? @V387045 00857000
  900. BNZ VMCRC20 YES..SET RC FOR BUSY.. @V387045 00858000
  901. SLR R4,R4 CLEAR RETURN CODE REGISTER @V387045 00859000
  902. TM VMCCSTAT,VMCCRECP RECEIVE ALREADY EXECUTED ? @V387045 00860000
  903. BZ *+8 NO..CONTINUE... @V387045 00861000
  904. LA R4,VMC11 REPLY CANCELLED @V387045 00862000
  905. L R1,VMCFPNT NEXT VMCBLOK @V387045 00863000
  906. ST R1,VMCFPNT-VMCBLOK(,R2) DECHAIN ACTIVE VMCBLOK @V387045 00864000
  907. BAL R10,VMCFRET AND RETURN IT TO FREE STORAGE @V387045 00865000
  908. L R8,VMCPNT ACCESS MASTER VMCBLOK @V387045 00866000
  909. L R1,VMCFPNT LOAD NEXT VMCBLOK @VA08623 00866100
  910. CLC VMCTOD-VMCBLOK(8,R1),VMCTOD-VMCBLOK(R8) GOOD @VA08623 00866300
  911. * TIME? 00866500
  912. BL VMCCNST NO, DO NOT CHANGE MSG COUNT @VA08623 00866700
  913. LH R1,VMCACNT ACTIVE MESSAGE COUNT @V387045 00867000
  914. BCTR R1,0 LESS ONE @V387045 00868000
  915. STH R1,VMCACNT REPLACE... @V387045 00869000
  916. VMCCNST LR R2,R4 RETURN CODE TO REG 2 @VA08623 00870100
  917. B VMCEXIT EXIT BACK TO DMKHVC.. @V387045 00871000
  918. EJECT 00872000
  919. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00873000
  920. * 00874000
  921. * REPLY - REPLY TO MESSAGE (VMCPMID) FROM USER (VMCPUSER). 00875000
  922. * 00876000
  923. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00877000
  924. VMCREPLY EQU * REPLY @V387045 00878000
  925. BAL R10,VMCSCANR LOCATE SUBJECT MESSAGE VMCBLOK @V387045 00879000
  926. BNZ VMCRC12 MESSAGE NOT FOUND @V387045 00880000
  927. CLC VMCFUNC,=AL2(VMCPSENR) SEND/RECV REQUEST ? @V387045 00881000
  928. BNE VMCRC3 NO..PROTOCOL VIOLATION... @V387045 00882000
  929. TM VMCSTAT,VMCRESP FINAL RESPONSE ? @V387045 00883000
  930. BO VMCRC3 YES..PROTOCOL... @V387045 00884000
  931. TM VMCCSTAT,VMCCXINT XINT BLOK ? @V387045 00885000
  932. BO VMCRC13 YES..SYNCHRONIZATION ERROR.. @V387045 00886000
  933. LM R1,R2,VMCPVADA BUFFER ADDRESS + LENGTH @V387045 00887000
  934. BAL R10,VMCHECK VALIDITY CHECK ADDRESS @V387045 00888000
  935. MVC VMCUSER,VMUSER SENDER USERID TO RECV VMCBLOK @V387045 00889000
  936. LR R7,R9 SENDER VMCBLOK TO R7 @V387045 00890000
  937. BAL R10,VMCRSWAP SWAP BUFFER ADDRESSES @V387045 00891000
  938. SPACE 00892000
  939. BAL R10,VMCXFER TRANSFER DATA (VM -> VM) @V387045 00893000
  940. SPACE 00894000
  941. BAL R10,VMCRSWAP SWAP BACK ADDRESSES @V387045 00895000
  942. BAL R10,VMCDEQ DECHAIN BLOK FROM SINK VMBLOK @V387045 00896000
  943. BAL R10,VMCSUSER SCAN FOR SOURCE VMBLOK @V387045 00897000
  944. OI VMCSTAT,VMCRESP SET FINAL RESPONSE @V387045 00898000
  945. MVC VMCUSE,VMCPUSE COPY USER DOUBLEWORD @V387045 00899000
  946. BAL R10,VMCENQ ENQUEUE BLOK ON SOURCE VMCBLOK @V387045 00900000
  947. * CHAIN 00901000
  948. BAL R10,VMCWAKUP WAKE UP SOURCE USER @V387045 00902000
  949. SLR R2,R2 CLEAR RETURN CODE REGISTER @V387045 00903000
  950. IC R2,VMCEFLG-VMCBLOK(R7) SET RETURN CODE @V387045 00904000
  951. B VMCEXIT EXIT... @V387045 00905000
  952. VMCRSWAP EQU * @V387045 00906000
  953. LM R0,R1,VMCVADA SWAP SEND @V387045 00907000
  954. LM R2,R3,VMCVADB AND REPLY @V387045 00908000
  955. STM R0,R1,VMCVADB BUFFER @V387045 00909000
  956. STM R2,R3,VMCVADA ADDRESSES... @V387045 00910000
  957. BR R10 RETURN @V387045 00911000
  958. EJECT 00912000
  959. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00913000
  960. * 00914000
  961. * QUIESCE - QUIESCE STACKED VMCF EXTERNAL INTERRUPTS 00915000
  962. * 00916000
  963. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00917000
  964. VMCQIES EQU * QUIESCE @V387045 00918000
  965. L R8,VMCPNT ADDRESS OF MASTER VMCBLOK @V387045 00919000
  966. OI VMCASTAT,VMCAQIES SET QUIESCE FLAG @V387045 00920000
  967. B VMCRC0 SET RC = 0...EXIT... @V387045 00921000
  968. SPACE 00922000
  969. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00923000
  970. * 00924000
  971. * RESUME - RESET ACTIVE 'QUIESCING' STATE 00925000
  972. * 00926000
  973. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00927000
  974. VMCRESUM EQU * RESUME VM COMMUNICATIONS @V387045 00928000
  975. L R8,VMCPNT ADDRESS OF MASTER VMCBLOK @V387045 00929000
  976. NI VMCASTAT,X'FF'-VMCAQIES RESET QUIESCE FLAG @V387045 00930000
  977. B VMCRC0 SET RC = 0..EXIT.. @V387045 00931000
  978. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00932000
  979. * 00933000
  980. * IDENTIFY - IDENTIFY SELF TO OTHER USERS 00934000
  981. * 00935000
  982. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00936000
  983. VMCIDENT EQU * IDENTIFY @V387045 00937000
  984. BAL R10,VMCICHK CHECK MSG LIMIT + SINK USER @V387045 00938000
  985. * STATUS 00939000
  986. BAL R10,VMCBUILD INITIALIZE + ENQ VMCBLOK @V387045 00940000
  987. OI VMCSTAT,VMCRESP SET FINAL RESPONSE @V387045 00941000
  988. BAL R10,VMCWAKUP WAKE UP SINK USER @V387045 00942000
  989. B VMCRC0 EXIT TO DMKHVC..RC = 0 @V387045 00943000
  990. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00944000
  991. * 00945000
  992. * REJECT - REJECT MESSAGE (VMCPMID) SENT BY USERID 00946000
  993. * (VMCPUSER) 00947000
  994. * 00948000
  995. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00949000
  996. VMCREJEC EQU * REJECT @V387045 00950000
  997. BAL R10,VMCSCANR LOCATE SUBJECT MESSAGE @V387045 00951000
  998. BNZ VMCRC12 MESSAGE NOT FOUND @V387045 00952000
  999. TM VMCSTAT,VMCRESP FINAL RESPONSE ? @V387045 00953000
  1000. BO VMCRC3 YES..PROTOCOL VIOLATION... @V387045 00954000
  1001. TM VMCCSTAT,VMCCXINT XINT BLOK ? @V387045 00955000
  1002. BO VMCRC13 YES..SYNCHRONIZATION ERROR.. @V387045 00956000
  1003. BAL R10,VMCDEQ DEQUEUE SUBJECT VMCBLOK @V387045 00957000
  1004. BAL R10,VMCSUSER SCAN FOR SOURCE VMBLOK ADDRESS @V387045 00958000
  1005. OI VMCSTAT,VMCRESP+VMCRJCT SET FINAL RESPONSE + @V387045 00959000
  1006. * REJECT 00960000
  1007. MVC VMCUSE,VMCPUSE COPY USER DOUBLEWORD @V387045 00961000
  1008. BAL R10,VMCENQ ENQUEUE ON SOURCE VMCBLOK CHAIN @V387045 00962000
  1009. BAL R10,VMCWAKUP WAKE UP SOURCE USER @V387045 00963000
  1010. B VMCRC0 EXIT WITH RC = 0 @V387045 00964000
  1011. EJECT 00965000
  1012. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00966000
  1013. * 00967000
  1014. * VMCBUILD - INITIALIZE + ENQUEUE SOURCE VMCBLOK 00968000
  1015. * 00969000
  1016. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00970000
  1017. VMCBUILD EQU * @V387045 00971000
  1018. XC SAVEWRK1,SAVEWRK1 CLEAR PARMLIST BUFFER ADDRESS @V387045 00972000
  1019. LR R8,R9 CONVERT PARMLIST BUFFER TO @V387045 00973000
  1020. * VMCBLOK 00974000
  1021. IC R0,VMPSW+1 USER PSW KEY @V387045 00975000
  1022. STC R0,VMCKEY MOVE TO VMCBLOK @V387045 00976000
  1023. TM VMCPFLG1,VMCPPRTY PRIORITY OPTION ? @V387045 00977000
  1024. MVI VMCSTAT,X'00' CLEAR USER STATUS BYTE @V387045 00978000
  1025. BZ *+8 CONTINUE... @V387045 00979000
  1026. OI VMCSTAT,VMCPRTY SET PRIORITY FLAG @V387045 00980000
  1027. MVI VMCEFLG,X'00' CLEAR VMCEFLG @V387045 00981000
  1028. L R1,VMCPNT MASTER VMCBLOK @V387045 00982000
  1029. C R11,ASYSVM IS VMCF SOURCE, 'CP'? 00982100
  1030. BE VMCENQ YES - DON'T UPDATE MESSAGE COUNT 00982200
  1031. LA R2,1 ADD ONE TO @V387045 00983000
  1032. AH R2,VMCACNT-VMCBLOK(,R1) MESSAGE @V387045 00984000
  1033. STH R2,VMCACNT-VMCBLOK(,R1) COUNT... @V387045 00985000
  1034. * B VMCENQ ENQ BLOK ON SINK USER VMCBLOK CHAIN 00986000
  1035. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00987000
  1036. * * 00988000
  1037. * VMCENQ - ENQUEUE VMCBLOK ON SOURCE/SINK VMCBLOK CHAIN 00989000
  1038. * * 00990000
  1039. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 00991000
  1040. VMCENQ EQU * @V387045 00992000
  1041. L R1,VMCPNT-VMBLOK(,R3) ADDRESS OF MASTER BLOK @V387045 00993000
  1042. VMCECHN EQU * @V387045 00994000
  1043. LR R2,R1 SAVE ANCHOR IN R2 @V387045 00995000
  1044. L R1,VMCFPNT-VMCBLOK(,R2) NEXT BLOK @V387045 00996000
  1045. LTR R1,R1 DOES ONE EXIST ? @V387045 00997000
  1046. BZ VMCEAIN NO..CHAIN IN NEW BLOCK @V387045 00998000
  1047. TM VMCSTAT,VMCPRTY PRIORITY MESSAGE ? @V387045 00999000
  1048. BZ VMCECHN NO..SCAN TO END OF CHAIN @V387045 01000000
  1049. TM VMCSTAT-VMCBLOK(R1),VMCPRTY PRIORITY BLOCK ? @V387045 01001000
  1050. BNZ VMCECHN YES..KEEP LOOKING @V387045 01002000
  1051. VMCEAIN EQU * @V387045 01003000
  1052. L R1,VMCFPNT-VMCBLOK(,R2) NEXT POINTER @V387045 01004000
  1053. ST R8,VMCFPNT-VMCBLOK(,R2) PATCH IN NEW BLOCK @V387045 01005000
  1054. ST R1,VMCFPNT AND ADD REST OF CHAIN @V387045 01006000
  1055. MVC VMCUSER,VMUSER COPY USERID TO BLOCK @V387045 01007000
  1056. OI VMCCSTAT,VMCCXINT SET XINT PENDING... @V387045 01008000
  1057. STCK VMCTOD STORE TOD AT BUILD @VA07113 01008500
  1058. BR R10 RETURN TO CALLER @V387045 01009000
  1059. EJECT 01010000
  1060. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01011000
  1061. * * 01012000
  1062. * VMCDEQ - DEQUEUE VMCBLOK FROM CURRENT VMCBLOK CHAIN 01013000
  1063. * * 01014000
  1064. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01015000
  1065. VMCDEQ EQU * @V387045 01016000
  1066. L R1,VMCPNT ADDRESS OF MASTER VMCBLOK @V387045 01017000
  1067. VMCDNEXT EQU * @V387045 01018000
  1068. LR R2,R1 SAVE ANCHOR @V387045 01019000
  1069. L R1,VMCFPNT-VMCBLOK(,R2) NEXT BLOCK @V387045 01020000
  1070. CLR R1,R8 THIS THE BLOCK ? @V387045 01021000
  1071. BNE VMCDNEXT NO..KEEP LOOKING... @V387045 01022000
  1072. L R1,VMCFPNT ADDRESS OF NEXT BLOCK @V387045 01023000
  1073. ST R1,VMCFPNT-VMCBLOK(,R2) DELETE FROM CHAIN @V387045 01024000
  1074. BR R10 RETURN TO CALLER @V387045 01025000
  1075. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01026000
  1076. * 01027000
  1077. * VMCXFER - VM -> VM DATA TRANSFER SUBROUTINE 01028000
  1078. * 01029000
  1079. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01030000
  1080. VMCXFER EQU * @V387045 01031000
  1081. LM R5,R6,VMCVADA BUFFER ADDR + LENGTH (SINK) @V387045 01032000
  1082. LM R0,R1,VMCVADA-VMCBLOK(R7) SAME FOR SOURCE @V387045 01033000
  1083. CLR R1,R6 COMPARE SEND TO RECEIVE @V387045 01034000
  1084. BE VMCXCONT CONTINUE IF EQUAL @V387045 01035000
  1085. BNH VMCXSR1 SEND COUNT LOW..USE IT.. @V387045 01036000
  1086. MVI VMCEFLG,VMC16 SET INCORRECT LENGTH @V387045 01037000
  1087. MVI VMCEFLG-VMCBLOK(R7),VMC16 DITTO... @V387045 01038000
  1088. B VMCXCONT CONTINUE..R6 IS OK.. @V387045 01039000
  1089. VMCXSR1 EQU * @V387045 01040000
  1090. LR R6,R1 USE LOWEST COUNT @V387045 01041000
  1091. VMCXCONT EQU * @V387045 01042000
  1092. ST R5,SAVEWRK5 SAVE BUFFER ADDRESS (SINK) @V387045 01043000
  1093. ST R0,SAVEWRK6 AND BUFFER ADDRESS (SOURCE) @V387045 01044000
  1094. XC SAVEWRK7,SAVEWRK7 CLEAR WORK AREA @V387045 01045000
  1095. LTR R6,R6 DATA COUNT REASONABLE ? @V387045 01046000
  1096. BNPR R10 NO..RETURN TO CALLER @V387045 01047000
  1097. OI VMCCSTAT,VMCCBUSY SET PROCESS FLAG @V387045 01048000
  1098. OI VMCCSTAT-VMCBLOK(R7),VMCCBUSY DITTO... @V387045 01049000
  1099. VMCXLOOP EQU * @V60C2B8 01050000
  1100. L R4,SAVEWRK6 GET SOURCE BUFFER ADDRESS @V60C2B8 01050100
  1101. CLC VMCUSER(8),SYSTEMID IS SOURCE CP? @V60C2B8 01050200
  1102. BE VMCXLOPE YES - THEN ALL SET @V60C2B8 01050300
  1103. LA R0,L'VMCUSER LENGTH OF USERID @V60C2B8 01051000
  1104. LA R1,VMCUSER SOURCE USERID @V387045 01052000
  1105. CALL DMKSCNAU SEE IF STILL LOGGED ON @V387045 01053000
  1106. BNZ VMCEC5 NO..SET RETURN CODE..EXIT @V387045 01054000
  1107. TM VMCXSTAT-VMBLOK(R1),VMBCAUTH AUTHORIZED ? @V60C2B8 01055000
  1108. BZ VMCEC5 NO..EXIT NOW... @V387045 01056000
  1109. SWTCHVM SWITCH TO SOURCE VMBLOK @V407510 01057100
  1110. L R1,SAVEWRK6 SOURCE BUFFER ADDRESS @V387045 01060000
  1111. TRANS 4,1,OPT=(BRING+DEFER+LOCK),ADEX=VMCEC1 @V387045 01061000
  1112. BNZ VMCEC15 PAGING I/O ERROR @V387045 01062000
  1113. ST R4,SAVEWRK7 SAVE ADDRESS OF LOCKED PAGE @V387045 01063000
  1114. LR R2,R4 REAL ADDRESS TO R2 @V387045 01064000
  1115. IC R0,VMCKEY-VMCBLOK(R7) USER KEY @V387045 01065000
  1116. CALL DMKPSAFC CHECK FETCH PROTECTION @V387045 01066000
  1117. BNZ VMCEC6 EXIT OF VIOLATED.. @V387045 01067000
  1118. LA R0,L'VMCUSER LENGTH OF USERID @V387045 01068000
  1119. LA R1,VMCUSER-VMCBLOK(,R7) SINK USERID @V387045 01069000
  1120. CALL DMKSCNAU SEE IF STILL LOGGED ON @V387045 01070000
  1121. BNZ VMCEC5 IF NOT..EXIT.... @V387045 01071000
  1122. TM VMCXSTAT-VMBLOK(R1),VMBCAUTH AUTHORIZED ? @V387045 01072000
  1123. BZ VMCEC5 NO..EXIT NOW... @V387045 01073000
  1124. SWTCHVM SWITCH TO SINK VMBLOK @V407510 01074100
  1125. VMCXLOPE EQU * @V387045 01077000
  1126. L R1,SAVEWRK5 SINK BUFFER ADDRESS @V387045 01078000
  1127. TRANS 2,1,OPT=(BRING+DEFER),ADEX=VMCEC1A @V387045 01079000
  1128. BNZ VMCEC15A PAGING I/O ERROR @V387045 01080000
  1129. LA R0,X'7FF' 2K MASK @V387045 01081000
  1130. LR R3,R0 ALSO IN R3 @V387045 01082000
  1131. OR R0,R4 LAST BYTE OF SOURCE 2K BLOCK @V387045 01083000
  1132. SLR R0,R4 BYTES LEFT IN 2K BLOCK - 1 @V387045 01084000
  1133. OR R3,R2 LAST BYTE OF SINK 2K BLOCK @V387045 01085000
  1134. SLR R3,R2 BYTES LEFT IN 2K BLOCK - 1 @V387045 01086000
  1135. CLR R3,R0 DETERMINE CONTROLLING @V387045 01087000
  1136. BL *+6 TRANSFER @V387045 01088000
  1137. LR R3,R0 COUNT.... @V387045 01089000
  1138. AL R3,F1 ADJUST TO ACTUAL COUNT @V387045 01090000
  1139. CLR R3,R6 MORE THAN BYTES REMAINING ? @V387045 01091000
  1140. BL *+6 NO..USE THIS COUNT... @V387045 01092000
  1141. LR R3,R6 OTHERWISE USE FINAL COUNT.. @V387045 01093000
  1142. IC R0,VMCKEY PSW KEY OF RECEIVER @V387045 01094000
  1143. CALL DMKPSASC CHECK FOR STORE PROTECT VIOLATE @V387045 01095000
  1144. BNZ VMCEC6A TERMINATE IF KEY VIOLATION @V387045 01096000
  1145. LM R0,R1,SAVEWRK5 USER BUFFER ADDRESSES @V387045 01097000
  1146. ALR R0,R3 ADJUST WITH BYTES MOVED @V387045 01098000
  1147. ALR R1,R3 DITTO... @V387045 01099000
  1148. STM R0,R1,SAVEWRK5 REPLACE FOR NEXT PASS @V387045 01100000
  1149. L R0,VMCLENA ADJUST DATA COUNT @V387045 01101000
  1150. SLR R0,R3 FOR RECEIVING @V387045 01102000
  1151. ST R0,VMCLENA VIRTUAL MACHINE... @V387045 01103000
  1152. L R0,VMCLENA-VMCBLOK(,R7) ADJUST @V387045 01104000
  1153. SLR R0,R3 DATA COUNT FOR SENDER @V387045 01105000
  1154. ST R0,VMCLENA-VMCBLOK(,R7) VIRTUAL MACHINE.. @V387045 01106000
  1155. SLR R6,R3 COMPUTE BYTES REMAINING @V387045 01107000
  1156. LR R5,R3 MOVE LENGTH TO R5 @V387045 01108000
  1157. SPACE 01109000
  1158. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01110000
  1159. * * 01111000
  1160. MVCL R2,R4 TRANSFER UP TO 2K OF DATA @V387045 01112000
  1161. * * 01113000
  1162. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01114000
  1163. SPACE 01115000
  1164. BNZ VMCEC17 DESTRUCTIVE OVERLAP @V387045 01116000
  1165. LTR R6,R6 ANY DATA REMAINING ? @V387045 01117000
  1166. BNP VMCXEND NO..EXIT FORTHWITH @V387045 01118000
  1167. LA R1,X'7FF' 2K MASK @V387045 01119000
  1168. NR R1,R4 DATA LEFT IN SOURCE PAGE ? @V387045 01120000
  1169. BNZ VMCXLOPE IF SO..CONTINUE... @V387045 01121000
  1170. CLC VMCUSER(8),SYSTEMID IS SOURCE SYSTEM ? @V60C2B8 01121100
  1171. BE CPVMCF4 YES - SKIP UNLOCK @V60C2B8 01121200
  1172. LR R2,R4 REAL ADDRESS TO R2 @V387045 01122000
  1173. BCTR R2,0 LESS ONE @V387045 01123000
  1174. CALL DMKPTRUL UNLOCK SOURCE PAGE @V387045 01124000
  1175. CPVMCF4 XC SAVEWRK7,SAVEWRK7 CLEAR PAGE ADDRESS @V60C2B8 01125000
  1176. B VMCXLOOP NOW CONTINUE.... @V387045 01126000
  1177. VMCXEND EQU * @V387045 01127000
  1178. CLC VMCUSER(8),SYSTEMID IS SOURCE SYSTEM ? @V60C2B8 01127100
  1179. BE CPVMCF5 YES - SKIP UNLOCK @V60C2B8 01127200
  1180. L R2,SAVEWRK7 SOURCE LOCKED PAGE @V387045 01128000
  1181. LTR R2,R2 ANY PAGES LOCKED ? @V387045 01129000
  1182. BZ VMCXENDF NO..ALL FINISHED @V387045 01130000
  1183. CALL DMKPTRUL UNLOCK SOURCE PAGE @V387045 01131000
  1184. CPVMCF5 XC SAVEWRK7,SAVEWRK7 CLEAR ADDRESS @V60C2B8 01132000
  1185. VMCXENDF EQU * DATA TRANSFER COMPLETE @V387045 01133000
  1186. L R1,SAVER11 GET ORIGINAL VMBLOK @V407510 01134100
  1187. SWTCHVM SWITCH BACK TO CALLER @V407510 01134200
  1188. NI VMCCSTAT,X'FF'-VMCCBUSY RESET PROC FLAG @V387045 01138000
  1189. NI VMCCSTAT-VMCBLOK(R7),X'FF'-VMCCBUSY DITTO... @V387045 01139000
  1190. LTR R6,R6 SET CONDITION CODE IF ERRORS @V387045 01140000
  1191. BR R10 RETURN TO CALLER @V387045 01141000
  1192. EJECT 01142000
  1193. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01143000
  1194. * 01144000
  1195. * VMCWAKUP - POST PENDING EXT INTERRUPT TO TARGET VM 01145000
  1196. * 01146000
  1197. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01147000
  1198. VMCWAKUP EQU * @V387045 01148000
  1199. LA R1,VMPXINT-VMBLOK(,R3) XINTBLOK ANCHOR @V387045 01149000
  1200. VMCWNXT EQU * @V387045 01150000
  1201. LR R2,R1 XINTBLOK ADDRESS TO R2 @V387045 01151000
  1202. L R1,XINTNEXT-XINTBLOK(,R2) NEXT BLOK @V387045 01152000
  1203. LTR R1,R1 DOES IT EXIST ? @V387045 01153000
  1204. BZ VMCWAQR NO..GET NEW BLOK @V387045 01154000
  1205. USING XINTBLOK,R1 @V387045 01155000
  1206. CLC XINTCODE,=AL2(VMCXCODE) VMC INTERRUPT ? @V387045 01156000
  1207. BNE VMCWNXT NO..KEEP LOOKING.. @V387045 01157000
  1208. BR R10 RETURN..NOTHING TO DO HERE.. @V387045 01158000
  1209. VMCWAQR EQU * @V387045 01159000
  1210. LA R0,XINTSIZE SIZE OF XINTBLOK @V387045 01160000
  1211. CALL DMKFREE GET STORAGE FOR BLOK @V387045 01161000
  1212. XC XINTBLOK(XINTSIZE*8),XINTBLOK CLEAR @V387045 01162000
  1213. ST R1,XINTNEXT-XINTBLOK(,R2) PATCH IN CHAIN @V387045 01163000
  1214. L R2,=A(X'7FFFFFFF') MAX COLLATING VALUE @V387045 01164000
  1215. ST R2,XINTSORT TO XINTBLOK.. @V387045 01165000
  1216. L R2,=AL2(VMCXCODE,VMCXMASK) CODE+MASK @V387045 01166000
  1217. ST R2,XINTCODE SAVE IN XINTBLOK @V387045 01167000
  1218. L R2,VMVCR0-VMBLOK(,R3) CR0 (MAYBE) @V387045 01168000
  1219. TM VMPSTAT-VMBLOK(R3),VMV370R ECMODE OPTION ? @V387045 01169000
  1220. BZ *+8 NO..R2 IS OK.. @V387045 01170000
  1221. L R2,EXTCR0-ECBLOK(,R2) VIRTUAL CR0 @V387045 01171000
  1222. N R2,=A(VMCXMASK) ENABLED FOR VMC ? @V387045 01172000
  1223. BZR R10 NO..NOTHING MORE TO DO.. @V387045 01173000
  1224. DROP R1 @V387045 01174000
  1225. TM VMPSW-VMBLOK(R3),VMEXTPND PSW ENABLED ? @V387045 01175000
  1226. BZR R10 NO..WAIT UNTIL ENABLED... @V387045 01176000
  1227. LA R0,CPEXSIZE SIZE OF CPEXBLOK (DOUBLE-WORDS) @V387045 01177000
  1228. CALL DMKFREE GET STORAGE FOR CPEXBLOK @V387045 01178000
  1229. USING CPEXBLOK,R1 @V387045 01179000
  1230. XC CPEXBLOK(CPEXSIZE*8),CPEXBLOK CLEAR IT OUT @V387045 01180000
  1231. LA R2,VMCDSP RETURN AND LOCK @VA12989 01181200
  1232. ST R2,CPEXADD ADDRESS IN R2 @VA12989 01181250
  1233. STM R0,R15,CPEXREGS SAVE REGS @VA12989 01181300
  1234. CALL DMKPTRLK LOCK IN VMC @VA12989 01181350
  1235. ST R3,CPEXR11 AND TARGET VMBLOK ADDRESS @V387045 01184000
  1236. CALL DMKSTKCP STACK THE BLOK @V387045 01185000
  1237. BR R10 RETURN TO CALLER @V387045 01186000
  1238. VMCDSP DS 0H COME HERE ON STACKED CPEXBLOK @VA11766 01186100
  1239. CALL DMKPTRPW MAKE SURE HE'S NOT IN PAGEWAIT @VA11766 01186200
  1240. B VMCXGOTO GOTO DISPATCHER @VA12989 01186310
  1241. DROP R1 @V387045 01187000
  1242. EJECT 01188000
  1243. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01189000
  1244. * 01190000
  1245. * VMCHECK - VALIDITY CHECK USER BUFFER ADDRESSES 01191000
  1246. * 01192000
  1247. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01193000
  1248. VMCHECK EQU * VALIDITY CHECK ROUTINE @V387045 01194000
  1249. C R11,ASYSVM IS THIS VALIDITY CHECK FOR CP? @V60C2B8 01194100
  1250. BCR 8,R10 YES - SKIP VALIDITY CHECKING @V60C2B8 01194200
  1251. LCTL C1,C1,VMSEG ACCESS SEGMENT TABLE @V387045 01195000
  1252. LTR R2,R2 IS IT ZERO DATA LENGTH? @VA05890 01195100
  1253. BZR R10 YES - THEN ADDRESS IS OK. @VA05890 01195200
  1254. LRA R0,0(,R1) TEST FOR VALID ADDRESS @V387045 01196000
  1255. BC 8+2,VMCHECK1 NO SEG EXCEPTION BRANCH @VA08051 01197200
  1256. LR R0,R2 SAVE REG 2 ACROSS CALL @VA08051 01197250
  1257. CALL DMKPTRAN,PARM=DEFER LET PTRAN HANDLE IT @VA08051 01197300
  1258. BC 2,VMCRC1 ADDRESSING PROBLEM @VA08051 01197350
  1259. LR R2,R0 RESTOPE REG2 @VA08051 01197400
  1260. VMCHECK1 DS 0H @VA08051 01197450
  1261. LA R14,0(R2,R1) ADD LENGTH @V387045 01198000
  1262. BCTR R14,0 ADDRESS OF LAST BYTE @V387045 01199000
  1263. L R15,XPAGNUM PAGE NO. MASK @V387045 01200000
  1264. NR R14,R15 ENDING PAGE ADDRESS @V387045 01201000
  1265. LRA R0,0(,R14) ENDING ADDRESS VALID ? @V387045 01202000
  1266. BC 8+2,VMCHECK2 NO SEG EXCEPTION BRANCH @VA08051 01203200
  1267. LR R0,R2 SAVE REG 2 ACROSS CALL @VA08051 01203230
  1268. LR R7,R1 SAVE R1 @VA08051 01203260
  1269. LR R1,R14 GRT ENDING ADDRESS FOR DMKPTRAN @VA08051 01203290
  1270. CALL DMKPTRAN,PARM=DEFER LET PTRAN HANDLE IT @VA08051 01203320
  1271. BC 2,VMCRC1 ADDRESSING PROBLEM @VA08051 01203350
  1272. LR R2,R0 RESTORE REG2 @VA08051 01203380
  1273. LR R1,R7 RESTORE REG1 @VA08051 01203410
  1274. VMCHECK2 DS 0H @VA08051 01203440
  1275. BR R10 RETURN @V387045 01204000
  1276. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01205000
  1277. * 01206000
  1278. * VMCICHK - VALIDITY CHECK SINK VM STATUS 01207000
  1279. * 01208000
  1280. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01209000
  1281. VMCICHK EQU * @V387045 01210000
  1282. L R8,VMCPNT ADDRESS OF MASTER VMCBLOK @V387045 01211000
  1283. CLC VMCACNT,=AL2(VMCSMAX) EXCEEDING MSG LIMIT ? @V387045 01212000
  1284. BNL VMCRC10 YES..EXIT WITH RC SET @V387045 01213000
  1285. CLC VMCPUSER(8),SYSTEMID IS SINK THE SYSTEM? @V60C2B8 01213100
  1286. BE VMCRC9 YES - TELL USER 'CP QUIESCED' @V60C2B8 01213200
  1287. LA R0,L'VMCPUSER LENGTH OF USERID @V387045 01214000
  1288. LA R1,VMCPUSER ADDRESS OF USERID @V387045 01215000
  1289. CALL DMKSCNAU LOCATE SINK VMBLOK ADDRESS @V387045 01216000
  1290. BNZ VMCRC5 USER NOT AVAILABLE @V387045 01217000
  1291. LR R3,R1 SAVE VMBLOK ADDRESS IN R3 @V387045 01218000
  1292. TM VMCXSTAT-VMBLOK(R3),VMBCAUTH USER AUTHORIZED ? @V387045 01219000
  1293. BZ VMCRC5 NO..NOT AVAILABLE @V387045 01220000
  1294. L R8,VMCPNT-VMBLOK(R3) SINK MASTER VMCBLOK @V387045 01221000
  1295. TM VMCASTAT,VMCAQIES USER QUIESCING ? @V387045 01222000
  1296. BO VMCRC9 YES..SET RC..EXIT @V387045 01223000
  1297. TM VMCPFLG1,VMCPPRTY PRIORITY MESSAGE ? @V387045 01224000
  1298. BZ VMCINPRI NO..SKIP NEXT CHECK @V387045 01225000
  1299. TM VMCASTAT,VMCAPRTY AUTHORIZED FOR PRIORITY @V387045 01226000
  1300. * MESSAGES ? 01227000
  1301. BZ VMCRC18 NO..SET RC..EXIT.. @V387045 01228000
  1302. VMCINPRI EQU * @V387045 01229000
  1303. TM VMCASTAT,VMCAAUTS AUTHORIZED SPECIFIC ? @V387045 01230000
  1304. BZR R10 NO..RETURN TO CALLER @V387045 01231000
  1305. CLC VMCUSER,VMUSER THIS THE CORRECT USER ? @V387045 01232000
  1306. BNE VMCRC5 NO..USER NOT AVAILABLE. @V387045 01233000
  1307. BR R10 RETURN TO CALLER @V387045 01234000
  1308. EJECT 01235000
  1309. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01236000
  1310. * 01237000
  1311. * VMCSCANS - LOCATE VMCBLOK ON SINK USER VMCBLOK CHAIN 01238000
  1312. * 01239000
  1313. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01240000
  1314. VMCSCANS EQU * @V387045 01241000
  1315. L R8,VMCPNT-VMBLOK(,R3) SINK VMCBLOK ANCHOR @V387045 01242000
  1316. LA R1,VMUSER USERID WE'RE LOOKING FOR @V387045 01243000
  1317. B VMCSNEXT BRANCH TO SCAN ROUTINE @V387045 01244000
  1318. VMCSCANR EQU * @V387045 01245000
  1319. L R8,VMCPNT VMCBLOK ANCHOR @V387045 01246000
  1320. LA R1,VMCPUSER USERID WE'RE LOOKING FOR @V387045 01247000
  1321. VMCSNEXT EQU * @V387045 01248000
  1322. LR R2,R8 SAVE VMCBLOK ANCHOR @V387045 01249000
  1323. L R8,VMCFPNT NEXT VMCBLOK @V387045 01250000
  1324. LTR R8,R8 DOES IT EXIST ? @V387045 01251000
  1325. BZ VMCSCC2 NO..SET CC = 2 TO CALLER @V387045 01252000
  1326. CLC VMCUSER,0(R1) CORRECT USERID ? @V387045 01253000
  1327. BNE VMCSNEXT NO..KEEP LOOKING... @V387045 01254000
  1328. CLC VMCFUNC,=AL2(VMCPIDEN) IDENTIFY ? @V387045 01255000
  1329. BE VMCSNEXT YES..DOES NOT COUNT... @V387045 01256000
  1330. CLC VMCMID,VMCPMID CORRECT MESSAGE ID @V387045 01257000
  1331. BNE VMCSNEXT NO..KEEP LOOKING... @V387045 01258000
  1332. BR R10 RETURN TO CALLER (CC = 0) @V387045 01259000
  1333. VMCSCC2 EQU * @V387045 01260000
  1334. SLR R8,R8 CLEAR VMCBLOK REG..SET CC = 2 @V387045 01261000
  1335. BR R10 RETURN TO CALLER @V387045 01262000
  1336. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01263000
  1337. * * 01264000
  1338. * VMCSUSER - LOCATE OBJECT USER VMBLOK ADDRESS 01265000
  1339. * * 01266000
  1340. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01267000
  1341. VMCSUSER EQU * @V387045 01268000
  1342. LA R0,L'VMCPUSER LENGTH OF USERID @V387045 01269000
  1343. LA R1,VMCPUSER AND ITS ADDRESS... @V387045 01270000
  1344. CALL DMKSCNAU LOCATE VMBLOK ADDRESS @V387045 01271000
  1345. BNZ VMCSUFR USER LOGGED OFF... @V387045 01272000
  1346. LR R3,R1 SAVE IN R3 @V387045 01273000
  1347. TM VMCXSTAT-VMBLOK(R3),VMBCAUTH AUTHORIZED ? @V387045 01274000
  1348. BNZR R10 YES..RETURN TO CALLER.. @V387045 01275000
  1349. VMCSUFR EQU * @V387045 01276000
  1350. LR R1,R8 VMCBLOK ADDRESS TO R1 @V387045 01277000
  1351. LA R0,VMCBSIZE SIZE OF BLOCK (DOUBLEWORDS) @V387045 01278000
  1352. CALL DMKFRET RETURN TO FREE STORAGE @V387045 01279000
  1353. B VMCRC5 SET RC..USER NOT AVAILABLE... @V387045 01280000
  1354. EJECT 01281000
  1355. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01282000
  1356. * * 01283000
  1357. * VMCFRET - FRET VMCBLOK STORAGE 01284000
  1358. * * 01285000
  1359. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01286000
  1360. VMCFRET EQU * @V387045 01287000
  1361. LR R1,R8 VMCBLOK ADDRESS TO R1 @V387045 01288000
  1362. LA R0,VMCBSIZE SIZE OF BLOCK (DOUBLEWORDS) @V387045 01289000
  1363. CALL DMKFRET FRET THE BLOCK @V387045 01290000
  1364. BR R10 RETURN TO CALLER @V387045 01291000
  1365. EJECT 01292000
  1366. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01293000
  1367. * 01294000
  1368. * 01295000
  1369. * SUBROUTINE NAME - 01296000
  1370. * 01297000
  1371. * DMKVMCEX 01298000
  1372. * 01299000
  1373. * FUNCTION - 01300000
  1374. * 01301000
  1375. * TO REFLECT THE VMC EXTERNAL INTERRUPT MESSAGE HEADER 01302000
  1376. * AND OPTIONAL 'SENDX' DATA TO A VIRTUAL MACHINE. 01303000
  1377. * (VMCMHDR) 01304000
  1378. * 01305000
  1379. * ATTRIBUTES - 01306000
  1380. * 01307000
  1381. * REENTRANT, PAGEABLE, ENTERED VIA 'CALL' FROM DMKDSP 01308000
  1382. * 01309000
  1383. * ENTRY POINTS - 01310000
  1384. * 01311000
  1385. * DMKVMCEX 01312000
  1386. * 01313000
  1387. * ENTRY CONDITIONS - 01314000
  1388. * 01315000
  1389. * GPR 13 = SAVEAREA ADDRESS 01316000
  1390. * GPR 12 = ADDRESS OF DMKVMCEX 01317000
  1391. * GPR 11 = VMBLOK ADDRESS OF USER TO RECEIVE INTERRUPT 01318000
  1392. * GPR 6 = ADDRESS OF XINTBLOK 01319000
  1393. * GPR 5 = ANCHOR FOR UNCHAINING XINTBLOK 01320000
  1394. * GPR 14-15, 0-4, 7-10 = IRRELEVANT 01321000
  1395. * 01322000
  1396. * USER WAS MADE NON-DISPATCHIBLE PRIOR TO CALLING 01323000
  1397. * THIS SUB-ROUTINE. (VMRSTAT (VMEXWAIT)) 01324000
  1398. * 01325000
  1399. * EXIT CONDITIONS - 01326000
  1400. * 01327000
  1401. * NO ERRORS: 01328000
  1402. * 01329000
  1403. * GPR 14-15 = DESTROYED 01330000
  1404. * GPR 13 = SAVEAREA 01331000
  1405. * GPR 12 = DESTROYED 01332000
  1406. * GPR 0-11 = RESTORED 01333000
  1407. * 01334000
  1408. * CONTROL IS RETURNED TO THE DISPATCHER (DMKDSP) WHO WILL 01335000
  1409. * FINISH REFLECTING THE HARDWARE EXTERNAL INTERRUPT. 01336000
  1410. * (CODE X'4001') 01337000
  1411. * 01338000
  1412. * ERRORS: 01339000
  1413. * 01340000
  1414. * THE ACTIVE SAVEAREA IS RELEASED VIA SVC 16, THE XINTBLOK 01341000
  1415. * IS DEQUEUED AND FRETTED (IF NECESSARY) AND RETURN IS MADE 01342000
  1416. * TO THE DISPATCHER VIA A GOTO. (IGNORE INTERRUPT) 01343000
  1417. * 01344000
  1418. * CALLS TO OTHER ROUTINES - 01345000
  1419. * 01346000
  1420. * DMKSCNAU - TO LOCATE THE SOURCE USER VMBLOK 01347000
  1421. * DMKPTRAN - TO FETCH USERS EXTERNAL INTERRUPT BUFFER 01348000
  1422. * DMKPSASC - TO CHECK FOR STORE PROTECT VIOLATION 01349000
  1423. * DMKPTRUL - TO UNLOCK MODULE DMKVMC IF XINT ERROR 01350000
  1424. * DMKFRET - TO FRET XINTBLOK - VMCBLOK STORAGE 01351000
  1425. * DMKDSPCH - TO IGNORE CURRENT INTERRUPT 01352000
  1426. * DMKPSA - TO RELEASE THE SAVEAREA VIA SVC 16 01353000
  1427. * 01354000
  1428. * INTERNAL SUB-ROUTINES: 01355000
  1429. * 01356000
  1430. * VMCXFER - DATA TRANSFER SUB-ROUTINE 01357000
  1431. * VMCFRET - FRET VMCBLOK STORAGE (FINAL RESPONSE) 01358000
  1432. * VMCWAKUP - POST PENDING RESPONSE INTERRUPT TO SOURCE VM 01359000
  1433. * VMCDEQ - DEQUEUE VMCBLOK FROM VMCBLOK CHAIN 01360000
  1434. * VMCENQ - ENQUEUE VMCBLOK ON SOURCE VMCBLOK CHAIN 01361000
  1435. * 01362000
  1436. * EXTERNAL REFERENCES - 01363000
  1437. * 01364000
  1438. * NONE 01365000
  1439. * 01366000
  1440. * TABLES / WORK AREAS - 01367000
  1441. * 01368000
  1442. * VMCBLOK, VMCMHDR, XINTBLOK, VMBLOK, SAVEAREA 01369000
  1443. * 01370000
  1444. * MACROS - 01371000
  1445. * 01372000
  1446. * TRANS - FETCH USER PAGES 01373000
  1447. * RELOC - DEFINE DMKVMCEX ENTRY POINT 01374000
  1448. * CALL - USED TO CALL EXISTING CP MODULES 01375000
  1449. * EXIT - USED TO EXIT FROM DMKVMCEX 01376000
  1450. * PSA - USED TO REFERENCE PREFIX STORAGE AREA 01377000
  1451. * GOTO - USED TO RE-ENTER THE DISPATCHER 01378000
  1452. * 01379000
  1453. * REGISTER USAGE - 01380000
  1454. * 01381000
  1455. * GPR 13 = ADDRESS OF STANDARD SAVEAREA 01382000
  1456. * GPR 12 = BASE REGISTER FOR DMKVMCEX 01383000
  1457. * GPR 11 = ADDRESS OF VMBLOK 01384000
  1458. * GPR 10 = SUB-ROUTINE 'BAL' REGISTER 01385000
  1459. * GPR 8 = ADDRESS OF VMCBLOK 01386000
  1460. * GPR 7 = ADDRESS OF ALTERNATE VMCBLOK 01387000
  1461. * GPR 3 = ADDRESS OF ALTERNATE USER VMBLOK 01388000
  1462. * GPR 0-2, 4-6, 9, 14-15 = WORK REGISTERS 01389000
  1463. * 01390000
  1464. * NOTES - 01391000
  1465. * 01392000
  1466. * NONE 01393000
  1467. * 01394000
  1468. * OPERATION - 01395000
  1469. * 01396000
  1470. * DMKVMCEX IS CALLED BY THE DISPATCHER (DMKDSP) WHEN IT 01397000
  1471. * IS DETERMINED THAT A USER HAS A PENDING VMCF EXTERNAL 01398000
  1472. * INTERRUPT (CODE X'4001'). BEFORE CALLING DMKVMCEX THE 01399000
  1473. * USER IS MADE NON-DISPATCHIBLE (VMRSTAT = VMEXWAIT). 01400000
  1474. * DMKVMCEX WILL REFLECT THE STANDARD VMCF MESSAGE HEADER AND 01401000
  1475. * OPTIONAL SENDX DATA (IF REQUIRED). 01402000
  1476. * 01403000
  1477. * 0 1 2 3 4 5 6 7 8 01404000
  1478. * 01405000
  1479. * 0 +-----------------------------------------------+ 01406000
  1480. * | V*1 | V*2 | VMCMFUNC | VMCMMID | 01407000
  1481. * 8 |-----------------------------------------------| 01408000
  1482. * | VMCMUSER | 01409000
  1483. * 10 |-----------------------------------------------| 01410000
  1484. * | VMCMVADA | VMCMLENA | 01411000
  1485. * 18 |-----------------------------------------------| 01412000
  1486. * | VMCMVADB | VMCMLENB | 01413000
  1487. * 20 |-----------------------------------------------| 01414000
  1488. * | VMCMUSE | 01415000
  1489. * 28 |-----------------------------------------------| 01416000
  1490. * | | 01417000
  1491. * = VMCMBUF = 01418000
  1492. * | OPTIONAL MESSAGE BUFFER | 01419000
  1493. * | | 01420000
  1494. * XX +-----------------------------------------------+ 01421000
  1495. * 01422000
  1496. * 01423000
  1497. * 1. LOCATE FIRST EXTERNAL INTERRUPT VMCBLOK ON USERS 01424000
  1498. * VMCBLOK QUEUE. 01425000
  1499. * 2. RESET VMCCXINT FLAG IN VMCBLOK. 01426000
  1500. * 3. FETCH USERS EXTERNAL INTERRUPT BUFFER VIA THE 01427000
  1501. * 'TRANS' MACRO. 01428000
  1502. * 4. CHECK FOR STORE PROTECTION VIOLATION VIA A CALL 01429000
  1503. * TO MODULE DMKPSASC. 01430000
  1504. * 5. COPY MESSAGE HEADER (VMCMHDR) FROM VMCBLOK TO USERS 01431000
  1505. * EXTERNAL INTERRUPT BUFFER. 01432000
  1506. * 6. IF VMCBLOK IS FOR A FINAL RESPONSE EXTERNAL INTERRUPT 01433000
  1507. * DEQUEUE THE BLOCK FROM THE USERS VMBLOK VIA SUB- 01434000
  1508. * ROUTINE VMCDEQ, FRET THE BLOCK VIA SUBROUTINE 01435000
  1509. * VMCFRET AND RETURN TO THE DISPATCHER. 01436000
  1510. * 7. IF BLOCK IS NOT A FINAL RESPONSE AND NOT A SENDX 01437000
  1511. * REQUEST RETURN DIRECTLY TO THE DISPATCHER. 01438000
  1512. * 8. IF VMCBLOK IS FOR A SENDX REQUEST VERIFY THAT THE 01439000
  1513. * SENDX DATA WILL STILL FIT. 01440000
  1514. * 9. OBTAIN STORAGE FOR THE RECEIVER VMCBLOK VIA A CALL 01441000
  1515. * TO MODULE DMKFREE. 01442000
  1516. * 10. MOVE SENDX DATA TO USERS EXTERNAL INTERRUPT BUFFER 01443000
  1517. * VIA SUBROUTINE VMCXFER. 01444000
  1518. * 11. FRET THE THE RECEIVER VMCBLOK VIA A CALL TO MODULE 01445000
  1519. * DMKFRET. 01446000
  1520. * 12. DEQUEUE THE SUBJECT VMCBLOK FROM THE USERS VMCBLOK 01447000
  1521. * QUEUE VIA SUBROUTINE VMCDEQ. 01448000
  1522. * 13. ENQUEUE THE VMCBLOK ON THE SOURCE USERS VMCBLOK 01449000
  1523. * QUEUE VIA SUBROUTINE VMCENQ. 01450000
  1524. * 14. WAKE UP THE SOURCE USER VIA SUBROUTINE VMCWAKUP. 01451000
  1525. * 15. EXIT BACK TO DMKDSP WHO WILL FINISH REFLECTING THE 01452000
  1526. * HARDWARE EXTERNAL INTERRUPT CODE X'4001'. 01453000
  1527. * 01454000
  1528. * NOTE: IF THE VMCF EXTERNAL INTERRUPT IS FOR A FINAL 01455000
  1529. * RESPONSE AND NOT AN IDENTIFY REQUEST THE MESSAGE COUNT 01456000
  1530. * (VMCACNT) IN THE RECEIVERS MASTER VMCBLOK IS DECREMENTED. 01457000
  1531. * IF THE INTERRUPT IS FOR AN IDENTIFY REQUEST THE MESSAGE 01458000
  1532. * COUNT IS DECREMENTED IN THE MASTER VMCBLOK OF THE SOURCE 01459000
  1533. * USER. 01460000
  1534. * 01461000
  1535. * IF ANY ERRORS ARE DETECTED IN THE PROCESS OF REFLECTING 01462000
  1536. * THE EXTERNAL INTERRUPT HEADER OR SENDX DATA THE SOURCE 01463000
  1537. * IS NOTIFIED VIA A DATA TRANSFER RETURN CODE (WHEN 01464000
  1538. * APPLICABLE). 01465000
  1539. * 01466000
  1540. * RESPONSES - 01467000
  1541. * 01468000
  1542. * NONE 01469000
  1543. * 01470000
  1544. * ERROR MESSAGES - 01471000
  1545. * 01472000
  1546. * NONE 01473000
  1547. * 01474000
  1548. * ABEND CODES - 01475000
  1549. * 01476000
  1550. * NONE 01477000
  1551. * 01478000
  1552. * RETURN CODES - 01479000
  1553. * 01480000
  1554. * REFER TO VMCBLOKS COPY (RETURN CODE EQUATES) 01481000
  1555. * 01482000
  1556. *.::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01483000
  1557. DMKVMCEX RELOC @V387045 01484000
  1558. L R8,VMCPNT MASTER VMCBLOK @V387045 01485000
  1559. LR R7,R8 SAVE IN R7 @V387045 01486000
  1560. VMCXTEX EQU * @V387045 01487000
  1561. L R8,VMCFPNT NEXT VMCBLOK @V387045 01488000
  1562. LTR R8,R8 DOES ONE EXIST ? @V387045 01489000
  1563. BZ VMCXINFT NO..EXIT FORTHWITH... @V387045 01490000
  1564. TM VMCCSTAT,VMCCXINT XINT BLOK ? @V387045 01491000
  1565. BZ VMCXTEX NO..KEEP LOOKING... @V387045 01492000
  1566. NI VMCCSTAT,X'FF'-VMCCXINT RESET FLAG @V387045 01493000
  1567. OI VMCCSTAT,VMCCBUSY SET BUSY FLAG @V387045 01494000
  1568. L R1,VMCVADA-VMCBLOK(,R7) ADDRESS OF XINT BUFFER @V387045 01495000
  1569. LA R6,VMCMLEN-1 LENGTH OF MINIMUM BUFFER -1 @V387045 01496000
  1570. LR R5,R8 ADDRESS OF XINT DATA TO R5 @V387045 01497000
  1571. LA R3,X'7FF' 2K MASK @V387045 01498000
  1572. OR R3,R1 LAST BYTE OF BUFFER IN 2K BLOCK @V387045 01499000
  1573. SLR R3,R1 BYTES TO 2K BOUND - 1 @V387045 01500000
  1574. VMCXFTCH C R11,ASYSVM INTERRUPT REFLECTION TO CP? @V60C2B8 01500100
  1575. BNE CPVMCF6 NO - PROCEED NORMALLY @V60C2B8 01500200
  1576. LR R2,R1 GET BUFFFER INTO REG 2 @V60C2B8 01500300
  1577. B CPVMCF7 SKIP TRANS MACRO @V60C2B8 01500400
  1578. CPVMCF6 TRANS 2,1,OPT=(BRING+DEFER) FETCH USER BUFFER @V387045 01501000
  1579. BNZ VMCXERR PAGING I/O ERROR @V387045 01502000
  1580. IC R0,VMCKEY-VMCBLOK(R7) USER KEY @V387045 01503000
  1581. CALL DMKPSASC CHECK FOR KEY VIOLATION @V387045 01504000
  1582. BNZ VMCXERR BRANCH IF STORE PROTECTION @V387045 01505000
  1583. CPVMCF7 CLR R6,R3 WILL REMAINDER FIT IN 2K BLOCK ? @V60C2B8 01506000
  1584. BNH VMCXVCX YES..DO LAST MOVE @V387045 01507000
  1585. EX R3,VMCXMOVE MOVE PART OF HEADER @V387045 01508000
  1586. LA R5,1(R3,R5) ADJUST DATA ADDRESS @V387045 01509000
  1587. LA R1,1(R3,R1) AND BUFFER ADDRESS @V387045 01510000
  1588. SLR R6,R3 COMPUTE REMAINING COUNT @V387045 01511000
  1589. BCTR R6,0 LESS ONE FOR EXECUTE @V387045 01512000
  1590. B VMCXFTCH FETCH USER BUFFER @V387045 01513000
  1591. VMCXVCX EQU * @V387045 01514000
  1592. EX R6,VMCXMOVE MOVE ALL OR PART OF VMCMHDR @V387045 01515000
  1593. NI VMCCSTAT,X'FF'-VMCCBUSY RESET BUSY FLAG @V387045 01516000
  1594. TM VMCSTAT,VMCRESP FINAL RESPONSE ? @V387045 01517000
  1595. BO VMCXFRET YES..GET RID OF BLOCK.. @V387045 01518000
  1596. CLC VMCFUNC,=AL2(VMCPSENX) SENDX REQUEST ? @V387045 01519000
  1597. BNE VMCXXIT NO..RETURN TO DISPATCHER @V387045 01520000
  1598. LA R0,VMCMLEN LENGTH OF MESSAGE HEADER @V387045 01521000
  1599. L R1,VMCLENA-VMCBLOK(,R7) LENGTH OF XINT BUFFER @V387045 01522000
  1600. SLR R1,R0 ADJUST WITH BYTES ALREADY MOVED @V387045 01523000
  1601. CL R1,VMCLENA WILL SENDX DATA STILL FIT ? @V387045 01524000
  1602. MVI VMCEFLG,VMC07 SET RETURN CODE @V387045 01525000
  1603. BL VMCXERRA NO..CONTINUE... @V387045 01526000
  1604. CALL DMKSCHDL ENSURE USER DOES NOT RUN @VA06441 01526500
  1605. MVI VMCEFLG,X'00' CLEAR RETURN CODE @V387045 01527000
  1606. LA R0,VMCBSIZE SIZE OF VMCBLOK @V387045 01528000
  1607. CALL DMKFREE GET STORAGE FOR VMCBLOK @V387045 01529000
  1608. LR R4,R1 SAVE IN R4 @V387045 01530000
  1609. MVC 0(VMCBSIZE*8,R4),0(R7) COPY BLOCK @V387045 01531000
  1610. LM R1,R2,VMCVADA-VMCBLOK(R4) BUFFER ADDRESS + @V387045 01532000
  1611. * LENGTH 01533000
  1612. LA R0,VMCMLEN LENGTH OF HEADER @V387045 01534000
  1613. ALR R1,R0 ADJUST ADDRESS @V387045 01535000
  1614. SLR R2,R0 AND LENGTH @V387045 01536000
  1615. STM R1,R2,VMCVADA-VMCBLOK(R4) REPLACE @V387045 01537000
  1616. MVC VMCUSER-VMCBLOK(L'VMCUSER,R4),VMCUSER USERID @V387045 01538000
  1617. MVC VMCUSER,VMUSER SINK USERID @V387045 01539000
  1618. LR R7,R8 SENDER VMCBLOK TO R7 @V387045 01540000
  1619. LR R8,R4 RECEIVER VMCBLOK TO R8 @V387045 01541000
  1620. SPACE 01542000
  1621. BAL R10,VMCXFER TRANSFER DATA (VM -> VM) @V387045 01543000
  1622. SPACE 01544000
  1623. MVC VMCUSER-VMCBLOK(L'VMCUSER,R7),VMCUSER USERID @V387045 01545000
  1624. LA R0,VMCBSIZE SIZE OF VMCBLOK (DOUBLEWORDS) @V387045 01546000
  1625. LR R1,R8 VMCBLOK ADDRESS TO R1 @V387045 01547000
  1626. CALL DMKFRET FRET THE BLOCK @V387045 01548000
  1627. LR R8,R7 SWAP BACK TO SOURCE VMCBLOK @V387045 01549000
  1628. CLI VMCEFLG,X'00' ANY ERRORS ? @V387045 01550000
  1629. BNE VMCXERRA YES..QUIT RIGHT NOW... @V387045 01551000
  1630. VMCXESC EQU * @V387045 01552000
  1631. CLC VMCUSER(8),SYSTEMID IS SOURCE THE SYSTEM? @V60C2B8 01552100
  1632. BNE CPVMCF8 NO - GO FIND USER'S VMBLOK @V60C2B8 01552200
  1633. L R1,ASYSVM GET ADDRESS OF SYSTEM VMBLOK 01552300
  1634. LR R3,R1 SAVE VMBLOK ADDRESS IN REG3 01552400
  1635. B CPVMCFB GO DEQUE BLOCK FROM SINK CHAIN 01552500
  1636. CPVMCF8 LA R0,L'VMCUSER LENGTH OF USERID @V387045 01553000
  1637. LA R1,VMCUSER AND ITS ADDRESS @V387045 01554000
  1638. CALL DMKSCNAU LOCATE SOURCE VMBLOK ADDRESS @V387045 01555000
  1639. BNZ VMCXXFRT FRET BLOCK AND EXIT IF LOGGED OFF@V387045 01556000
  1640. LR R3,R1 SAVE VMBLOK ADDRESS IN R3 @V60C2B8 01557000
  1641. TM VMCXSTAT-VMBLOK(R3),VMBCAUTH AUTHORIZED ? @V387045 01558000
  1642. BZ VMCXXFRT NO..GET RID OF BLOCKS... @V387045 01559000
  1643. CPVMCFB BAL R10,VMCDEQ DEQUEUE BLOCK FROM SINK CHAIN @V387045 01560000
  1644. CLC VMCUSER(8),SYSTEMID DID CP ISSUE SENDX? @V60C2B8 01560010
  1645. BNE CPVMCFA NO - THEN CONTINUE NORMALLY @V60C2B8 01560020
  1646. L R1,VMCVADA GET SENDER'S SENDX DATA ADDR @V60C2B8 01560030
  1647. LA R2,VMCPLEN LEN OF VMCPARM (SENDX HEADER) @V60C2B8 01560040
  1648. SR R1,R2 SET POINTER TO BEG OF SENDX BUF @V60C2B8 01560050
  1649. L R2,VMCPLENA-VMCPARM(R1) SENDX DATA LENGTH @VA09656 01560061
  1650. LA R2,VMCPLEN+7(R2) SENDX HEADER+DATA+7 FOR FRET @V60C2B8 01560070
  1651. LR R0,R2 MOVE LENGTH TO R0 FOR FRET @V60C2B8 01560080
  1652. SRL R0,3 CONVERT LEN TO DOUBLE WORDS @V60C2B8 01560090
  1653. CALL DMKFRET FRET SENDER'S VMCPARM LIST @V60C2B8 01560100
  1654. BAL R10,VMCFRET FRET CP'S VMCBLOCK @V60C2B8 01560110
  1655. B VMCXXIT EXIT TO DISPATCHER @V60C2B8 01560120
  1656. CPVMCFA NI VMCCSTAT,X'FF'-VMCCBUSY RESET BUSY FLAG.. @V60C2B8 01561000
  1657. OI VMCSTAT,VMCRESP SET FINAL RESPONSE @V387045 01562000
  1658. BAL R10,VMCENQ ENQ BLOCK ON SOURCE CHAIN @V387045 01563000
  1659. BAL R10,VMCWAKUP WAKE UP SOURCE USER @V387045 01564000
  1660. B VMCXXIT EXIT TO THE DISPATCHER @V387045 01565000
  1661. VMCXERR EQU * @V387045 01566000
  1662. MVI VMCEFLG,VMC19 SET DATA TRANSFER ERROR @V387045 01567000
  1663. VMCXERRA EQU * @V387045 01568000
  1664. LR R1,R8 VMCBLOK TO R1 @V387045 01569000
  1665. VMCXSINT EQU * @V387045 01570000
  1666. L R1,VMCFPNT-VMCBLOK(,R1) NEXT BLOK ? @V387045 01571000
  1667. LTR R1,R1 DOES ONE EXIST ? @V387045 01572000
  1668. BZ VMCXINFT NO..GET RID OF XINTBLOK @V387045 01573000
  1669. TM VMCCSTAT,VMCCXINT XINT BLOK ? @V387045 01574000
  1670. BZ VMCXSINT NO..KEEP LOOKING... @V387045 01575000
  1671. B VMCXRLSV JUST GET RID OF SAVEAREA... @V387045 01576000
  1672. VMCXINFT EQU * @V387045 01577000
  1673. L R2,SAVER5 XINTBLOK ANCHOR @V387045 01578000
  1674. L R1,SAVER6 ADDRESS OF XINTBLOK @V387045 01579000
  1675. L R0,XINTNEXT-XINTBLOK(,R1) UNHOOK THIS @V387045 01580000
  1676. ST R0,XINTNEXT-XINTBLOK(,R2) BLOK..ALWAYS LAST.. @V387045 01581000
  1677. LA R0,XINTSIZE SIZE OF BLOCK (DOUBLEWORDS) @V387045 01582000
  1678. CALL DMKFRET FRET THE BLOCK @V387045 01583000
  1679. VMCXRLSV EQU * @V387045 01584000
  1680. SVC 16 RELEASE ACTIVE SAVEAREA @V387045 01585000
  1681. SLR R13,R13 CLEAR R13..JUST IN CASE... @V387045 01586000
  1682. LTR R8,R8 DO WE HAVE A VMCBLOK ? @V387045 01587000
  1683. BZ VMCXXIT NO..EXIT NOW... @V387045 01588000
  1684. TM VMCSTAT,VMCRESP RESPONSE INTERRUPT ? @V387045 01589000
  1685. BZ VMCXESC NO..SEND IT BACK TO SOURCE.. @V387045 01590000
  1686. VMCXFRET EQU * @V387045 01591000
  1687. L R1,VMCPNT MASTER VMCBLOK @V387045 01592000
  1688. CLC VMCFUNC,=AL2(VMCPIDEN) IDENTIFY ? @V387045 01593000
  1689. BNE VMCXDCNT NO..DECREMENT MESSAGE COUNT.. @V387045 01594000
  1690. LA R0,L'VMCUSER LENGTH OF USERID @V387045 01595000
  1691. LA R1,VMCUSER AND ITS ADDRESS @V387045 01596000
  1692. CALL DMKSCNAU LOCATE SOURCE VMBLOK ADDRESS @V387045 01597000
  1693. BNZ VMCXXFRT NOT THERE..JUST FRET THE BLOCK @V387045 01598000
  1694. TM VMCXSTAT-VMBLOK(R1),VMBCAUTH AUTHORIZED ? @V387045 01599000
  1695. BZ VMCXXFRT NO..FRET THE BLOCK.. @V387045 01600000
  1696. L R1,VMCPNT-VMBLOK(,R1) MASTER BLOCK @V387045 01601000
  1697. VMCXDCNT EQU * @V387045 01602000
  1698. CLC VMCTOD-VMCBLOK(8,8),VMCTOD-VMCBLOK(1) TIME GOOD?@VA07113 01602300
  1699. BL VMCXXFRT NO,DON'T DECREMENT MSG CTR @VA07113 01602600
  1700. LH R2,VMCACNT-VMCBLOK(,R1) MESSAGE COUNT @V387045 01603000
  1701. BCTR R2,0 LESS ONE @V387045 01604000
  1702. STH R2,VMCACNT-VMCBLOK(,R1) REPLACE... @V387045 01605000
  1703. VMCXXFRT EQU * @V387045 01606000
  1704. BAL R10,VMCDEQ DEQUEUE VMCBLOK FROM VMCBLOK @V387045 01607000
  1705. * CHAIN 01608000
  1706. BAL R10,VMCFRET FRET THE BLOCK @V387045 01609000
  1707. VMCXXIT EQU * @V387045 01610000
  1708. NI VMRSTAT,X'FF'-VMEXWAIT USER CAN NOW RUN @V387045 01611000
  1709. CALL DMKSCHDL TELL THE BOSS WE'RE RUNNABLE @VA06441 01611500
  1710. LTR R13,R13 SAVEAREA GONE ? @V387045 01612000
  1711. BZ VMCXGOTO YES..RETURN TO DISPATCHER @V387045 01613000
  1712. CPVMCF9 EXIT @V60C2B8 01614000
  1713. VMCXGOTO EQU * @V387045 01615000
  1714. LR R2,R12 COMPUTE THE DISP INTO @VA08834 01615100
  1715. SRL R2,12 THE SYSTEM CORE TABLE @VA08834 01615200
  1716. SLL R2,4 FOR THIS PAGE FRAME @VA08834 01615300
  1717. AL R2,ACORETBL ADD ADDRESS OF CORE TABLE @VA08834 01615400
  1718. TM CORFLAG-CORTABLE(R2),CORCP IS PAGE RESIDENT ? @VA08834 01615500
  1719. BO VMCXGONE YES, THEN LEAVE @VA08834 01615600
  1720. LR R2,R12 BASE ADDRESS TO R2 @V387045 01616000
  1721. CALL DMKPTRUL UNLOCK MY PAGE SINCE PSA WON'T @V387045 01617000
  1722. VMCXGONE DS 0H @VA08834 01617500
  1723. GOTO DMKDSPCH RETURN TO DISPATCHER @V387045 01618000
  1724. VMCXMOVE MVC 0(*-*,R2),0(R5) EXECUTED MOVE FOR VMCMHDR @V387045 01619000
  1725. EJECT 01620000
  1726. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01621000
  1727. * * 01622000
  1728. * VM COMMUNICATION RETURN CODES 01623000
  1729. * * 01624000
  1730. *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::* 01625000
  1731. VMCRC1 LA R2,VMC01 INVALID VIRTUAL ADDRESS @V387045 01626000
  1732. B VMCEXIT EXIT @V387045 01627000
  1733. VMCRC2 LA R2,VMC02 INVALID SUBFUNCTION CODE @V387045 01628000
  1734. B VMCEXIT EXIT @V387045 01629000
  1735. VMCRC3 LA R2,VMC03 PROTOCOL VIOLATION @V387045 01630000
  1736. B VMCEXIT EXIT @V387045 01631000
  1737. VMCRC4 LA R2,VMC04 USER NOT AUTHORIZED (SOURCE) @V387045 01632000
  1738. B VMCEXIT EXIT @V387045 01633000
  1739. VMCRC5 LA R2,VMC05 USER NOT AVAILABLE @V387045 01634000
  1740. B VMCEXIT EXIT @V387045 01635000
  1741. VMCRC6 LA R2,VMC06 PROTECTION VIOLATION @V387045 01636000
  1742. B VMCEXIT EXIT @V387045 01637000
  1743. VMCRC7 LA R2,VMC07 SENDX DATA TOO LARGE @V387045 01638000
  1744. B VMCEXIT EXIT @V387045 01639000
  1745. VMCRC8 LA R2,VMC08 DUPLICATE MESSAGE @V387045 01640000
  1746. B VMCEXIT EXIT @V387045 01641000
  1747. VMCRC9 LA R2,VMC09 TARGET VM QUIESCING @V387045 01642000
  1748. B VMCEXIT EXIT @V387045 01643000
  1749. VMCRC10 LA R2,VMC10 MESSAGE LIMIT EXCEEDED @V387045 01644000
  1750. B VMCEXIT EXIT @V387045 01645000
  1751. VMCRC11 LA R2,VMC11 CANCEL - RECEIVE PROCESSED @V387045 01646000
  1752. B VMCEXIT EXIT @V387045 01647000
  1753. VMCRC12 LA R2,VMC12 MESSAGE NOT FOUND @V387045 01648000
  1754. B VMCEXIT EXIT @V387045 01649000
  1755. VMCRC13 LA R2,VMC13 SYNCHRONIZATION ERROR @V387045 01650000
  1756. B VMCEXIT EXIT @V387045 01651000
  1757. VMCRC14 LA R2,VMC14 CANCEL BUT TOO LATE @V387045 01652000
  1758. B VMCEXIT EXIT @V387045 01653000
  1759. VMCRC15 LA R2,VMC15 PAGING I/O ERROR @V387045 01654000
  1760. B VMCEXIT EXIT @V387045 01655000
  1761. VMCRC16 LA R2,VMC16 INCORRECT LENGTH @V387045 01656000
  1762. B VMCEXIT EXIT @V387045 01657000
  1763. VMCRC17 LA R2,VMC17 DESTRUCTIVE OVERLAP @V387045 01658000
  1764. B VMCEXIT EXIT @V387045 01659000
  1765. VMCRC18 LA R2,VMC18 USER NOT AUTHORIZED PRIORITY @V387045 01660000
  1766. B VMCEXIT EXIT @V387045 01661000
  1767. VMCRC19 LA R2,VMC19 DATA TRANSFER ERROR @V387045 01662000
  1768. B VMCEXIT EXIT @V387045 01663000
  1769. VMCRC20 LA R2,VMC20 CANCEL - VMCBLOK BUSY @V387045 01664000
  1770. B VMCEXIT EXIT @V387045 01665000
  1771. SPACE 01666000
  1772. VMCEC1 MVI VMCEFLG-VMCBLOK(R7),VMC01 INVALID ADDRESS @V387045 01667000
  1773. MVI VMCEFLG,VMC19 DATA TRANSFER ERROR @V387045 01668000
  1774. B VMCXEND EXIT @V387045 01669000
  1775. VMCEC1A MVI VMCEFLG,VMC01 INVALID ADDRESS @V387045 01670000
  1776. MVI VMCEFLG-VMCBLOK(R7),VMC19 DATA XFER ERROR @V387045 01671000
  1777. B VMCXEND EXIT @V387045 01672000
  1778. VMCEC5 MVI VMCEFLG-VMCBLOK(R7),VMC05 NOT AVAILABLE @V387045 01673000
  1779. MVI VMCEFLG,VMC05 USER NOT AVAILABLE @V387045 01674000
  1780. B VMCXEND EXIT @V387045 01675000
  1781. VMCEC6 MVI VMCEFLG-VMCBLOK(R7),VMC06 PROTECTION ERROR @V387045 01676000
  1782. MVI VMCEFLG,VMC19 DATA TRANSFER ERROR @V387045 01677000
  1783. B VMCXEND EXIT @V387045 01678000
  1784. VMCEC6A MVI VMCEFLG,VMC06 PROTECTION ERROR @V387045 01679000
  1785. MVI VMCEFLG-VMCBLOK(R7),VMC19 DATA TRANSFER ERROR @V387045 01680000
  1786. B VMCXEND EXIT @V387045 01681000
  1787. VMCEC15 MVI VMCEFLG-VMCBLOK(R7),VMC15 PAGING ERROR @V387045 01682000
  1788. MVI VMCEFLG,VMC19 DATA TRANSFER ERROR @V387045 01683000
  1789. B VMCXEND EXIT @V387045 01684000
  1790. VMCEC15A MVI VMCEFLG,VMC15 PAGING I/O ERROR @V387045 01685000
  1791. MVI VMCEFLG-VMCBLOK(R7),VMC19 DATA TRANSFER ERROR @V387045 01686000
  1792. B VMCXEND EXIT @V387045 01687000
  1793. VMCEC17 MVI VMCEFLG,VMC17 DESTRUCTIVE OVERLAP @V387045 01688000
  1794. MVI VMCEFLG-VMCBLOK(R7),VMC17 DESTRUCTIVE OVERLAP @V387045 01689000
  1795. B VMCXEND EXIT @V387045 01690000
  1796. SPACE 01691000
  1797. VMCRC0 SR R2,R2 NORMAL RETURN - NO ERRORS @V387045 01692000
  1798. VMCEXIT EQU * @V387045 01693000
  1799. ST R2,SAVER2 PASS BACK RETURN CODE TO DMKHVC @V387045 01694000
  1800. L R1,SAVEWRK1 ADDRESS OF VMCPARM BUFFER @V387045 01695000
  1801. LTR R1,R1 DID WE GET IT ? @V387045 01696000
  1802. BZ VMCFEXIT NO..EXIT NOW @V387045 01697000
  1803. LA R0,VMCBSIZE SIZE OF VMCBLOK (DOUBLEWORDS) @V387045 01698000
  1804. CALL DMKFRET FRET VMCPARM BUFFER @V387045 01699000
  1805. VMCFEXIT EQU * @V387045 01700000
  1806. EXIT @V387045 01701000
  1807. SPACE 01702000
  1808. SYSTEMID DC CL8'SYSTEM ' LOGONID OF THE SYSTEM @V60C2B8 01702100
  1809. SPACE 01702200
  1810. LTORG @V387045 01703000
  1811. EJECT 01704000
  1812. COPY VMCBLOKS @V387045 01705000
  1813. COPY CORE @VA08834 01705500
  1814. COPY VMBLOK @V387045 01706000
  1815. COPY EQU @V387045 01707000
  1816. COPY XINTBLOK @V387045 01708000
  1817. COPY SAVE @V387045 01709000
  1818. PSA @V387045 01710000
  1819. END DMKVMC 01711000