Konrad Rzeszutek Wilk
2012-Oct-15 13:19 UTC
Re: about the patch: persistent grant maps for xen blk drivers
On Mon, Oct 15, 2012 at 01:01:51PM +0800, liuxiaolei1124 wrote:> Dear konrad: > i have seen you put the patch "persisten grant maps for xen blk drivers" into you kernel, then dom0 crash .(https://lkml.org/lkml/2012/9/21/388 )my dom0 kernel is 2.6.32.36-0.5, and i put this patch in my kernel, there is a bug too, and the stack is much like yours. And i found a strange phenomenon. when i add a printk log such as "printk ("enter func") " in blkif_completion or other function in xen-blkfront.c, guest run well. But after i remove this printk log, guest crash when i start.Hey. Roger posted a follow up patch that has this fixed. You should look at that. Also CC-ing xen-devel here.> and the crash stack is : > blkif_int -> blkif_completion > guest page fault in > > + if (bret->operation == BLKIF_OP_READ) > + rq_for_each_segment(bvec, s->request, iter) { > + shared_data = kmap_atomic > + (pfn_to_page(s->grants_used[i++]->frame)); // page fault > + bvec_data = bvec_kmap_irq(bvec, &flags); > + memcpy(bvec_data, shared_data + bvec->bv_offset, > + bvec->bv_len); > + bvec_kunmap_irq(bvec_data, &flags); > + kunmap_atomic(shared_data); > + } > > in kernel 2.6.32.36-0.5, my patch is : > > + if (bret->operation == BLKIF_OP_READ) > + rq_for_each_segment(bvec, s->request, iter) { > + shared_data = kmap_atomic > + (pfn_to_page(s->grants_used[i++]->frame), KM_USER0); > + bvec_data = bvec_kmap_irq(bvec, &flags); > + memcpy(bvec_data, shared_data + bvec->bv_offset, > + bvec->bv_len); > + bvec_kunmap_irq(bvec_data, &flags); > + kunmap_atomic(shared_data, KM_USER0); > + } > > I don''t know what''s wrong? mybe function kmap_atomic in my patch is incorrect. I look forward toyour reply, thank you. > > Best wishes. > eric.liu > > > > > > > > > > > > >
liuxiaolei1124
2012-Oct-16 04:35 UTC
Re: about the patch: persistent grant maps for xen blk drivers
At 2012-10-15 21:19:30,"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote:>On Mon, Oct 15, 2012 at 01:01:51PM +0800, liuxiaolei1124 wrote: >> Dear konrad: >> i have seen you put the patch "persisten grant maps for xen blk drivers" into you kernel, then dom0 crash .(https://lkml.org/lkml/2012/9/21/388 )my dom0 kernel is 2.6.32.36-0.5, and i put this patch in my kernel, there is a bug too, and the stack is much like yours. And i found a strange phenomenon. when i add a printk log such as "printk ("enter func") " in blkif_completion or other function in xen-blkfront.c, guest run well. But after i remove this printk log, guest crash when i start. > > >Hey. Roger posted a follow up patch that has this fixed. You should >look at that.sorry, but i can''t find the patch Roger posted, could you show me the link of the patch? thank you. Best wishes. eric.liu _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Konrad Rzeszutek Wilk
2012-Oct-17 18:28 UTC
Re: about the patch: persistent grant maps for xen blk drivers
On Tue, Oct 16, 2012 at 12:35:23PM +0800, liuxiaolei1124 wrote:> > > > > > > > > > At 2012-10-15 21:19:30,"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote: > >On Mon, Oct 15, 2012 at 01:01:51PM +0800, liuxiaolei1124 wrote: > >> Dear konrad: > >> i have seen you put the patch "persisten grant maps for xen blk drivers" into you kernel, then dom0 crash .(https://lkml.org/lkml/2012/9/21/388 )my dom0 kernel is 2.6.32.36-0.5, and i put this patch in my kernel, there is a bug too, and the stack is much like yours. And i found a strange phenomenon. when i add a printk log such as "printk ("enter func") " in blkif_completion or other function in xen-blkfront.c, guest run well. But after i remove this printk log, guest crash when i start. > > > > > >Hey. Roger posted a follow up patch that has this fixed. You should > >look at that. > sorry, but i can''t find the patch Roger posted, could you show me the link of the patch? thank you.Roger, could you repost them please?> Best wishes. > eric.liu