qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] RE: [PATCH] virtio-net: Fix lduw_p() pointer argument of wr


From: Liu Yu-B13201
Subject: [Qemu-devel] RE: [PATCH] virtio-net: Fix lduw_p() pointer argument of wrong size
Date: Fri, 4 Mar 2011 06:41:30 +0000

 

> -----Original Message-----
> From: Aurelien Jarno [mailto:address@hidden 
> Sent: Friday, March 04, 2011 6:46 AM
> To: Stefan Hajnoczi
> Cc: Liu Yu-B13201; Anthony Liguori; address@hidden
> Subject: Re: [PATCH] virtio-net: Fix lduw_p() pointer 
> argument of wrong size
> 
> On Thu, Mar 03, 2011 at 09:42:28PM +0000, Stefan Hajnoczi wrote:
> > A pointer to a size_t variable was passed as the void * pointer to
> > lduw_p() in virtio_net_receive().  Instead of acting on the 
> 16-bit value
> > this caused failure on big-endian hosts.
> > 
> > Avoid this issue in the future by using stw_p() instead.  
> In general we
> > should use ld*_p() for loading from target memory and st*_p() for
> > storing to target memory anyway, not the other way around.
> > 
> > Also tighten up a correct use of lduw_p() when stw_p() 
> should be used
> > instead in virtio_net_get_config().
> > 
> > Signed-off-by: Stefan Hajnoczi <address@hidden>
> > ---
> >  hw/virtio-net.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> Thanks a lot for the quick patch, I confirm it fixes big 
> endian support.
> I have applied it, also to the stable branch.
> 

Thank you both very much. This solved my issue.

Thanks,
Yu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]