>> Looking at xlate.c, the htab and entries are access in following way:
>>     struct vcpu *v = get_current();
>>     struct domain *d = v->>domain;
>>     struct domain_htab *htab = &d->>arch.htab;
>>     union pte volatile *pte;
>>     pte = &htab->map[ptex];

> htab->map is the HTAB, remember it is treated like an array.

>> I've inserted this code into xen/arch/powerpc/domctl.c, just to see  
>> if I could recognize
>> the htab before mapping back to user space. The 'current domain'  
>> has some entries that
>> could be htab. However, the guest domain always contains 0s.
>> current domain:
>> (XEN) XEN_DOMCTL_getshadowlist:
>> (XEN) dd->>arch.htab.map: 0x0000000002000000
>> (XEN) rma_base_mfn: 0x0000000000004000   rma_size_mfn:  
>> 0x0000000000004000
>> (XEN) pte: 0x0000000002000800  vsid: 0x0000181a80047001  rpn:  
>> 0x000000000349b196
>> (XEN) pte: 0x0000000002000810  vsid: 0x0000000000000000  rpn:  
>> 0x0000000000000000
>> (XEN) pte: 0x0000000002000820  vsid: 0x0000000000000000  rpn:  
>> 0x0000000000000000
>> guest domain:
>> (XEN) d->arch.htab.map: 0x0000000000100000
>> (XEN) rma_base_mfn2: 0x000000000001c000   rma_size_mfn2:  
>> 0x0000000000004000
>> (XEN) pte: 0x0000000000100800  vsid: 0x0000000000000000  rpn:  
>> 0x0000000000000000
>> (XEN) pte: 0x0000000000100810  vsid: 0x0000000000000000  rpn:  
>> 0x0000000000000000
>> (XEN) pte: 0x0000000000100820  vsid: 0x0000000000000000  rpn:  
>> 0x0000000000000000

> How early in the guest run is this?

Guest domain is up and running. Printing code is invoked via 'xm save'.

> Remember the "h" in htab stands for Hash, though it is odd to see a  
> whole PTEG (group of 8 PTEs) to be clear for Linux (and you are only  
> showing 3).

>> 1) What is the arch.htab.map address? I thought Xen ran with  
>> translate off and without RMA?

> Xen runs that way but the domains run in RMA while in Real Mode and  
> transalted (uses htab) when not.
> The when we create a domain we allocate the htab it will remain 0  
> until the domain creates the first entries.  The first entries in  
> Linux are created by the domain while it runs in the RMA.

> -JX

After reading your note, I tried printing all non-zero rpns in guest domain.
There are lots- in fact 'bios' got a watchdog timeout and reverted out of SLOF
while printing...

Think I was spooked yesterday, since even page 0 had no rpn address, 
and I thought every domain had to have 2 or 4 pages setup beginning at 0 ?


Xen-ppc-devel mailing list

Reply via email to