[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/6] x86/mem-paging: use guest handle for XENMEM_paging_op_prep
On 20/04/2020 13:35, Jan Beulich wrote: On 20.04.2020 14:31, Jan Beulich wrote:On 20.04.2020 14:20, Julien Grall wrote:On 20/04/2020 13:12, Jan Beulich wrote:On 20.04.2020 14:08, Julien Grall wrote: Are the unions plain ones? I could see room for behavior like the one you describe with transparent unions, albeit still not quite like you describe it. Getting handle types to be properly type-checked by the compiler is pretty imperative imo.It looks like x86 is using structure, but arm is using plain union: #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \ typedef union { type *p; unsigned long q; } \ __guest_handle_ ## name; \ typedef union { type *p; uint64_aligned_t q; } \ __guest_handle_64_ ## nameI don't see how this would make a difference, and hence ...I will look at introducing a union on Arm.... how this would help. I must be missing something, or there must be a very curious bug in only the Arm gcc.Compiling this (for x86) properly raises two errors: union u1 { void *p; unsigned long v; }; union u2 { void *p; unsigned long v; }; void test(union u1 u1, union u2 u2) { test(u1, u1); test(u2, u2); } You are right. It is just me not compiling properly. Sorry for the noise :( Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |