[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] dump_p2m_table: For IOMMU



>>> On 10.08.12 at 14:31, Wei Wang <wei.wang2@xxxxxxx> wrote:
> On 08/10/2012 03:43 AM, Santosh Jodh wrote:
>> +    if ( level<= 1 )
>> +        return;
> 
> So, the l1 page table is not printed, is it by design?

Yeah, that puzzled me too, but I wasn't sure what's right here.

> I tested the amd part with an amd iommu system and I got output like this:
> 
> XEN) domain1 IOMMU p2m table:
> (XEN) gfn: 0000000000000000  mfn: 00000000001b1fb5
> (XEN)   gfn: 0000000000000000  mfn: 000000000021f80b
> (XEN)   gfn: 0000000000000000  mfn: 000000000023f400
> (XEN)   gfn: 0000000000000000  mfn: 000000000010a600
> (XEN)   gfn: 0000000000000000  mfn: 000000000023f200
> (XEN)   gfn: 0000000000000000  mfn: 000000000010a400
> (XEN)   gfn: 0000000000000000  mfn: 000000000023f000
> (XEN)   gfn: 0000000000000000  mfn: 000000000010ae00
> (XEN)   gfn: 0000000000000000  mfn: 000000000023ee00
> (XEN)   gfn: 0000000000000001  mfn: 000000000010ac00
> (XEN)   gfn: 0000000000000001  mfn: 000000000023ec00
> (XEN)   gfn: 0000000000000001  mfn: 000000000010aa00
> (XEN)   gfn: 0000000000000001  mfn: 000000000023ea00
> (XEN)   gfn: 0000000000000001  mfn: 000000000010a800
> (XEN)   gfn: 0000000000000001  mfn: 000000000023e800
> (XEN)   gfn: 0000000000000001  mfn: 000000000010be00
> (XEN)   gfn: 0000000000000001  mfn: 000000000023e600
> (XEN)   gfn: 0000000000000002  mfn: 000000000010bc00
> (XEN)   gfn: 0000000000000002  mfn: 000000000023e400
> (XEN)   gfn: 0000000000000002  mfn: 000000000010ba00
> (XEN)   gfn: 0000000000000002  mfn: 000000000023e200
> (XEN)   gfn: 0000000000000002  mfn: 000000000010b800
> (XEN)   gfn: 0000000000000002  mfn: 000000000023e000
> (XEN)   gfn: 0000000000000002  mfn: 000000000010b600
> (XEN)   gfn: 0000000000000002  mfn: 000000000023de00
> (XEN)   gfn: 0000000000000003  mfn: 000000000010b400
> (XEN)   gfn: 0000000000000003  mfn: 000000000023dc00
> (XEN)   gfn: 0000000000000003  mfn: 000000000010b200
> (XEN)   gfn: 0000000000000003  mfn: 000000000023da00
> (XEN)   gfn: 0000000000000003  mfn: 000000000010b000
> (XEN)   gfn: 0000000000000003  mfn: 000000000023d800
> (XEN)   gfn: 0000000000000003  mfn: 000000000010fe00
> (XEN)   gfn: 0000000000000003  mfn: 000000000023d600
> (XEN)   gfn: 0000000000000004  mfn: 000000000010fc00
> (XEN)   gfn: 0000000000000004  mfn: 000000000023d400
> (XEN)   gfn: 0000000000000004  mfn: 000000000010fa00
> (XEN)   gfn: 0000000000000004  mfn: 000000000023d200
> (XEN)   gfn: 0000000000000004  mfn: 000000000010f800
> (XEN)   gfn: 0000000000000004  mfn: 000000000023d000
> (XEN)   gfn: 0000000000000004  mfn: 000000000010f600
> (XEN)   gfn: 0000000000000004  mfn: 000000000023ce00
> (XEN)   gfn: 0000000000000005  mfn: 000000000010f400
> (XEN)   gfn: 0000000000000005  mfn: 000000000023cc00
> (XEN)   gfn: 0000000000000005  mfn: 000000000010f200
> (XEN)   gfn: 0000000000000005  mfn: 000000000023ca00
> (XEN)   gfn: 0000000000000005  mfn: 000000000010f000
> (XEN)   gfn: 0000000000000005  mfn: 000000000023c800
> (XEN)   gfn: 0000000000000005  mfn: 000000000010ee00
> (XEN)   gfn: 0000000000000005  mfn: 000000000023c600
> (XEN)   gfn: 0000000000000006  mfn: 000000000010ec00
> (XEN)   gfn: 0000000000000006  mfn: 000000000023c400
> (XEN)   gfn: 0000000000000006  mfn: 000000000010ea00
> (XEN)   gfn: 0000000000000006  mfn: 000000000023c200
> (XEN)   gfn: 0000000000000006  mfn: 000000000010e800
> (XEN)   gfn: 0000000000000006  mfn: 000000000023c000
> 
> It looks that the same gfn has been mapped to multiple mfns. Do you want 
> to output only the gfn to mfn mapping or you also want to output the 
> address of intermediate page tables? What do "gfn" and "mfn" stands for 
> here?

Indeed, apart from the apparent brokenness, printing the GFN
with the intermediate levels makes no sense. Nor does it make
sense to print with 16 digits when beyond the 10th a non-zero
one will never be observable. I realize that that's a downside
of using PRIpaddr - I was probably giving a bad recommendation
here (or at least it wasn't applicable to all cases), I'm sorry for
that; instead, when you convert to [GM]FN, you can safely cast
to (and hence print as) unsigned long.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.