From: Dan Magenheimer Subject: compat tool problem with new tmem save/restore tmem_op struct Date: Tue, 28 Jul 2009 11:00:41 -0700 (PDT) Message-ID: <51535100-ad71-40cc-83fe-f09b7bb62c5c@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org Hi Jan -- I'm trying to implement save/restore code for tmem and to do so I need to pass other variants of the tmem_op struct between tools (dom0) and the hypervisor so I made the changes below to struct tmem_op. Unfortunately the nested union seems to break your compat translation tool. Is this an easy fix for your tool? If not, I suppose I can recode to only use a single level of union. Thanks, Dan P.S. I tried renaming the nested "u" to "u2" but it still causes the same problem. struct tmem_op { uint32_t cmd; int32_t pool_id; /* private > 0; shared < 0; 0 is invalid */ union { struct { /* for cmd =3D=3D TMEM_NEW_POOL */ uint64_t uuid[2]; uint32_t flags; } new; struct { uint64_t object; uint32_t index; uint32_t tmem_offset; uint32_t pfn_offset; uint32_t len; tmem_cli_mfn_t cmfn; /* client machine page frame */ } gen; struct { /* for cmd =3D=3D TMEM_CONTROL */ uint32_t subop; uint32_t cli_id; tmem_cli_va_t buf; union { struct { uint32_t arg1; uint32_t arg2; } gen; struct { uint32_t flags; uint64_t uuid[2]; } new; /* also used for auth */ struct { uint64_t oid; uint32_t index; uint32_t bufsize; } restore; struct { tmem_cli_va_t p_pool_id; tmem_cli_va_t p_oid; tmem_cli_va_t p_index; uint32_t bufsize; } save; } u; } ctrl; } u; };