[Lguest] [patch] u32 pointer nightmare .....

Rusty Russell rusty at rustcorp.com.au
Fri Sep 14 07:23:25 EST 2007


On Thu, 2007-09-13 at 14:00 +0200, Jes Sorensen wrote:
> Rusty Russell wrote:
> > Well, the alternative is to fix "struct lguest_dma" in lguest_launcher.h
> > to use an unsigned long:
> > 
> > struct lguest_dma
> > {
> > 	/* 0 if free to be used, filled by the Host. */
> >  	u32 used_len;
> > 	unsigned long addr[LGUEST_MAX_DMA_SECTIONS];
> > 	u16 len[LGUEST_MAX_DMA_SECTIONS];
> > };
> 
> Makes sense, I think it would be good to do so - btw. why are the DMA
> sections only 16 bit lengths?

Well, currently they're restricted to a page.  This is all going to
change with virtio, so I wouldn't get too upset about it.

Could just move the used_len to the end of the structure, in fact.

> Do you want me to do a patch for this or will you take it in with the
> other one you are currently disecting?

If you patch it I'll fold it in appropriately...

Thanks,
Rusty.





More information about the Lguest mailing list