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

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



Thanks Wei - please see inline.

> +static void amd_dump_p2m_table_level(struct page_info* pg, int level,
> +                                     paddr_t gpa, int *indent) {
> +    paddr_t address;
> +    void *table_vaddr, *pde;
> +    paddr_t next_table_maddr;
> +    int index, next_level, present;
> +    u32 *entry;
> +
> +    if ( level<= 1 )
> +        return;

So, the l1 page table is not printed, is it by design?
[Santosh Jodh] That was a typo - it should be level < 1


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?
[Santosh Jodh] guest frame number and machine frame number. I had added the 
intermediate PD and PT prints after Jan Beulich suggested it - it's possible I 
misunderstood him. I will resend a new patch. Could you please try it as I 
don't have access to AMD IOMMU system.


_______________________________________________
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®.