|
| From: | Stuart Anderson |
| Subject: | Re: [Qemu-devel] RFC: x86_64 Best way to fix 'cast to pointer from integer of different size' problems? |
| Date: | Tue, 6 Nov 2007 17:19:40 -0500 (EST) |
On Tue, 6 Nov 2007, Paul Brook wrote:
If you're not careful you get double-copying. Once copying the struct from guest to host space, and then again when converting layout/endianess.
Yes, it would be easy to do that by mistake. The approach that has been
taken has been to use typed copy_*_user_<type>() routines for the structs
instead of using a seperate untyped copy_*_user() followed by a
convert_<type>() routine. The copy_*_user_<type>() routines do the copy
and convert in a single step.
This will never be as fast as an optimized buffer copy, but it will also
not be as slow as having seperate routines.
Stuart
Stuart R. Anderson address@hidden
Network & Software Engineering http://www.netsweng.com/
1024D/37A79149: 0791 D3B8 9A4C 2CDC A31F
BD03 0A62 E534 37A7 9149
| [Prev in Thread] | Current Thread | [Next in Thread] |