Re: [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > On 04/05/2010 11:15 AM, malc wrote: > > Please do not use double leading underscore. > > In contrast to the existing use in: > > >> #define h2g_valid(x) ({ \ > >> unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \ > > What do you sugg

Re: [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread Richard Henderson
On 04/05/2010 11:15 AM, malc wrote: > Please do not use double leading underscore. In contrast to the existing use in: >> #define h2g_valid(x) ({ \ >> unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \ What do you suggest instead? Trailing underscores? r~

Re: [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > To be used by userspace emulation to verify that the memory > range defined by [start, start+len) is valid for the guest, > taking into account TARGET_VIRT_ADDR_SPACE_BITS. > > Signed-off-by: Richard Henderson > --- > cpu-all.h | 10 ++ >

[Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread Richard Henderson
To be used by userspace emulation to verify that the memory range defined by [start, start+len) is valid for the guest, taking into account TARGET_VIRT_ADDR_SPACE_BITS. Signed-off-by: Richard Henderson --- cpu-all.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git