[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL V3 00/20] Net patches
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PULL V3 00/20] Net patches |
Date: |
Thu, 26 May 2016 09:20:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 05/26/2016 09:08 AM, Peter Maydell wrote:
>
> Apologies for the lack of any backtraces in the output, but
> this is almost certainly the result of trying to do le64_to_cpu()
> or cpu_to_le64() on a buffer which isn't necessarily aligned
> (usually some pointer into guest memory). Use the functions
> ldq_le_p() and stq_le_p() instead, which will handle a
> potentially misaligned pointer for you. (There are similar
> functions for other access widths too.)
Since these functions are constructed by ## token pasting, it's very
hard to grep .h files to see what variations-on-a-theme are actually
available, nor is the documentation clear on what they all do (in-place
vs. copy, pass a value vs. a pointer, ...). It might be a nice
bite-sized task to beef up the documentation and at least call out ALL
of the endian-conversion functions in a nice comment (to make it
greppable), along with this tidbit of information on which forms are
optimized but require alignment, vs. work anywhere but potentially slower.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PULL V3 11/20] net_pkt: Name vmxnet3 packet abstractions more generic, (continued)
- [Qemu-devel] [PULL V3 11/20] net_pkt: Name vmxnet3 packet abstractions more generic, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 14/20] vmxnet3: Use pci_dma_* API instead of cpu_physical_memory_*, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 13/20] net_pkt: Extend packet abstraction as required by e1000e functionality, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 15/20] e1000_regs: Add definitions for Intel 82574-specific bits, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 16/20] e1000: Move out code that will be reused in e1000e, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 18/20] e1000e: Introduce qtest for e1000e device, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 19/20] net: vl: Move default_net to vl.c, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 20/20] net/net: Add SocketReadState for reuse codes, Jason Wang, 2016/05/25
- [Qemu-devel] [PULL V3 17/20] net: Introduce e1000e device emulation, Jason Wang, 2016/05/25
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Peter Maydell, 2016/05/26
- Re: [Qemu-devel] [PULL V3 00/20] Net patches,
Eric Blake <=
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Jason Wang, 2016/05/26
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Peter Maydell, 2016/05/27
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Dmitry Fleytman, 2016/05/29
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Peter Maydell, 2016/05/29
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Jason Wang, 2016/05/29
- Re: [Qemu-devel] [PULL V3 00/20] Net patches, Peter Maydell, 2016/05/30