Below discussion triggered a question I could not answer by RTFM. I had never 
thought about this before in this detail, but now that I do, I wonder if the 
following is correct.

Program allocates >4k of virtual storage. The real frames backing it may or may 
not be contiguous. The program wants to use this area with some interface (I/O, 
etc) that will use real addresses when accessing the storage, so it does a 
PGFIX. PGFIX would move the possibly non-contiguous frames guaranteeing the 
area is backed by contiguous frames. After all, the interface using real 
addresses would expect the the frames to be contiguous. 

Am I wrong? I would have expected to find this documented with the PGFIX or 
PGSER FIX macros, but did not find it.  

Peter Hunkeler

On 10/17/2016 08:23 AM, Paul Schuster wrote: 
> I am issuing DIAGNOSE 8 on my z/os image under VM (z/vm) to do a QUERY 
> VIRTUAL DASD.  It works—up to a certain point: 
> The QUERY VIRTUAL DASD command returns (for me) 38617 (decimal) bytes, 
> according to the CC=0 after the DIAGNOSE 8 command.  My buffer is large 
> enough to accommodate this.  I have tried several different sub-pools of 
> storage.  I PGSER FIX the buffer pages.  I do a SYSEVENT DONTSWAP.  I do a 
> LRA of the virtual address of the start of the buffer.  The DIAGNOSE 
> completes CC=0. But, in my buffer, I am only seeing the first page (4095) 
> bytes of the output.   
> My question: I don’t see any documented restriction in the VM manuals that 
> limits the DIAGNOSE 8 output buffer to 4K (rather the limitation is the 
> architecture limit depending on your amode.) The z/vm manuals say the buffer 
> can cross page boundaries.  So is there a way to force the real storage 
> addresses of the page-fixed pages to be consecutive?  According to the 
> diagnose 8 doc., the buffer needs to be in guest-real storage, hence the LRA. 
>  And it is working for the first 4k page. 
> Thank you for any insight you can provide.  
As you already guessed, the memory you get is virtual, so the pages are not 
consecutive. The LRA will give you the address of the first page, but the 2nd, 
3rd and so on will be somewhere else. Please note that your code will even 
cause random memory overwrites in your z/OS as the diag8 will write to the real 
address of your LRA, the real address of your LRA+4096 and so on. 

For IBM-MAIN subscribe / signoff / archive access instructions,
send email to with the message: INFO IBM-MAIN

Reply via email to