Qian Huibin
2009-Nov-08 13:22 UTC
[Xen-users] DMA Crash when I test GPL Windows PV Driver by iperf
Hey All, When I did a test of GPL Windows PV Driver on Windows XP SP2 by iperf, I found a DMA Crash. And the Crash occurs every times. The test is as following: I install GPL Windows PV Driver (0.10.0.130) for XP as DomU , and Suse 11 as Dom0 on Xen 3.3.1. When I set DomU as iperf''s Client and Dom0 as Server. iperf client on DomU (XP): iperf -c $SERVER_IP -i 1 *-l 1* -w 64k iperf server on Dom0 (Suse 11 & xen 3.3.1) iperf -s *-l 1* l -w 64k *Scatter/gather enabled* IF I SET -l (buff size ) as 1 byte ( in fact from 1 byte to 9 bytes), the DomU (XP) crashed everything (*Scatter/gather enabled*). I use windbg to analyze the Windows Mem Dump, I found the crash callstack as following: XenNet_RxBufferCheck() -> ... -> XenPci_DOP_BuildScatterGatherList() -> XenPci_DOP_BuildScatterGatherListButDontExecute() for (i = 0; remaining > 0; i++) { pfn = MmGetMdlPfnArray(curr_mdl)[pfn_offset + i]; ASSERT(pfn); gref = (grant_ref_t)GntTbl_GrantAccess(xpdd, 0, (ULONG)pfn, FALSE, INVALID_GRANT_REF); * ASSERT(gref != INVALID_GRANT_REF); // gref gets a value of INVALID_GRANT_REF, Crash occurs!!!* sglist->Elements[sg_element].Address.QuadPart = (LONGLONG)(gref << PAGE_SHIFT) | offset; sglist->Elements[sg_element].Length = min(min(PAGE_SIZE - offset, remaining), total_remaining); total_remaining -= sglist->Elements[sg_element].Length; remaining -= sglist->Elements[sg_element].Length; offset = 0; sg_element++; } I donot know how to fix it. I think the Satter/Gather is related to transfer NOT receive, why crash when receving data. because of -l set as 1 byte, then using more gref to store outgoing data, and gref is NOT enough? pls have a look at this problem. Thanks -- Huibin.QIAN Hangzhou,China _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James Harper
2009-Nov-09 02:27 UTC
[Xen-users] RE: DMA Crash when I test GPL Windows PV Driver by iperf
> Hey All, > > When I did a test of GPL Windows PV Driver on Windows XP SP2 by iperf,I found> a DMA Crash. > And the Crash occurs every times. > The test is as following: > I install GPL Windows PV Driver (0.10.0.130) for XP as DomU , and Suse11 as> Dom0 on Xen 3.3.1. > When I set DomU as iperf''s Client and Dom0 as Server. > > iperf client on DomU (XP): > iperf -c $SERVER_IP -i 1 -l 1 -w 64k > iperf server on Dom0 (Suse 11 & xen 3.3.1) > iperf -s -l 1 l -w 64k > > Scatter/gather enabled > > IF I SET -l (buff size ) as 1 byte ( in fact from 1 byte to 9 bytes),the DomU> (XP) crashed everything (Scatter/gather enabled). > > I use windbg to analyze the Windows Mem Dump, I found the crashcallstack as> following: > > XenNet_RxBufferCheck() -> ... -> XenPci_DOP_BuildScatterGatherList()->> XenPci_DOP_BuildScatterGatherListButDontExecute() > > for (i = 0; remaining > 0; i++) > { > pfn = MmGetMdlPfnArray(curr_mdl)[pfn_offset + i]; > ASSERT(pfn); > gref = (grant_ref_t)GntTbl_GrantAccess(xpdd, 0, (ULONG)pfn,FALSE,> INVALID_GRANT_REF); > ASSERT(gref != INVALID_GRANT_REF); // gref gets a value of > INVALID_GRANT_REF, Crash occurs!!! > sglist->Elements[sg_element].Address.QuadPart (LONGLONG)(gref << > PAGE_SHIFT) | offset; > sglist->Elements[sg_element].Length = min(min(PAGE_SIZE -offset,> remaining), total_remaining); > total_remaining -= sglist->Elements[sg_element].Length; > remaining -= sglist->Elements[sg_element].Length; > offset = 0; > sg_element++; > } > I donot know how to fix it. > I think the Satter/Gather is related to transfer NOT receive, whycrash when> receving data. > because of -l set as 1 byte, then using more gref to store outgoingdata, and> gref is NOT enough? > > pls have a look at this problem. >Do you have the full stack trace? James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James Harper
2009-Nov-09 02:42 UTC
[Xen-users] RE: DMA Crash when I test GPL Windows PV Driver by iperf
> -----Original Message----- > From: Qian Huibin [mailto:qianhb@gmail.com] > Sent: Monday, 9 November 2009 00:23 > To: xen-users@lists.xensource.com > Cc: James Harper > Subject: DMA Crash when I test GPL Windows PV Driver by iperf > > Hey All, > > When I did a test of GPL Windows PV Driver on Windows XP SP2 by iperf,I found> a DMA Crash. > And the Crash occurs every times. > The test is as following: > I install GPL Windows PV Driver (0.10.0.130) for XP as DomU , and Suse11 as> Dom0 on Xen 3.3.1. > When I set DomU as iperf''s Client and Dom0 as Server. > > iperf client on DomU (XP): > iperf -c $SERVER_IP -i 1 -l 1 -w 64k > iperf server on Dom0 (Suse 11 & xen 3.3.1) > iperf -s -l 1 l -w 64k > > Scatter/gather enabled > > IF I SET -l (buff size ) as 1 byte ( in fact from 1 byte to 9 bytes),the DomU> (XP) crashed everything (Scatter/gather enabled). > > I use windbg to analyze the Windows Mem Dump, I found the crashcallstack as> following: > > XenNet_RxBufferCheck() -> ... -> XenPci_DOP_BuildScatterGatherList()->> XenPci_DOP_BuildScatterGatherListButDontExecute() > > for (i = 0; remaining > 0; i++) > { > pfn = MmGetMdlPfnArray(curr_mdl)[pfn_offset + i]; > ASSERT(pfn); > gref = (grant_ref_t)GntTbl_GrantAccess(xpdd, 0, (ULONG)pfn,FALSE,> INVALID_GRANT_REF); > ASSERT(gref != INVALID_GRANT_REF); // gref gets a value of > INVALID_GRANT_REF, Crash occurs!!! > sglist->Elements[sg_element].Address.QuadPart (LONGLONG)(gref << > PAGE_SHIFT) | offset; > sglist->Elements[sg_element].Length = min(min(PAGE_SIZE -offset,> remaining), total_remaining); > total_remaining -= sglist->Elements[sg_element].Length; > remaining -= sglist->Elements[sg_element].Length; > offset = 0; > sg_element++; > } > I donot know how to fix it. > I think the Satter/Gather is related to transfer NOT receive, whycrash when> receving data. > because of -l set as 1 byte, then using more gref to store outgoingdata, and> gref is NOT enough? > > pls have a look at this problem. >I don''t have an XP machine at the moment, and it seems to work fine under 2003. Are you able to reproduce it under 2003? There is an upper limit on the number of gref''s that BuildScatterGatherListButDontExecute will get, otherwise it will just tell Windows to coalesce the buffers itself. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users