Received: by 2002:ac2:4841:0:0:0:0:0 with SMTP id 1csp1850524lfy; Thu, 20 Aug 2020 18:48:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy904dQlMki4yhjaGIGKgm83FDpHBXOCW5fk3DRmyvMFzoLn45RZ+1f2B0i7vqf/Mg38Xl5 X-Received: by 2002:a25:d0cb:: with SMTP id h194mr755901ybg.187.1597974488771; Thu, 20 Aug 2020 18:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597974488; cv=none; d=google.com; s=arc-20160816; b=OY8qktdl7eWNB9BH2/M0VIcVPfkzyix6x0kAnxig4EqSm+Ca/uDSpC+0yT8bfUanPK uKmqUTg6mrzap7U+OpnefvzNGHb0SwV+u83zxSOKOZh/yi6Sgt78TD4QhXHmtj/wMxBd gzwKRfiuYUqyiBByexQ5J5AyZQnlCHVMQC0GYXaDF/c+D5SyITlLHNLCjN6TkUx6qoLw yrfzMGhIir2hTv02Shb4pd3t76HuJbcmVe04ZexHevCZnHDsGd/0+dFK4qNwR2nTZQ8A zTq9hMdhwv1jZeJoj0+183UbdPHquak/qCZcVEW9oDpvS5Z1mO7bWKQxpk/SQNUX7uUd klNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=dKBciJQaDFSbb/QcyMaYexWWF8hO6gY0rJjeKjFg+/4=; b=kKpswoMjyP4rJoiSYqZMtceTwVjJOMjab1LvwH+UU+p43oNJWCXtWrip/u3yeVzjzT pkz2T7l6OOVFF0g2KG0aAn1d3gxGnscPl5cXxwAdtnoBmlVHqQ/yLqD0LQKT/+bugKIo pXJRml+N76J9yJsDB01GPnFW4WeYcYQMDsS+MZgBzaU8GoB1U+4ffXwdUDLiPKpJIXgZ 4X/aQO74pWLGq8eDcQti+iWxoUe1lLI1GkfQlpyOczeovI+lPBUOc2Qxk5NQDz1xU+Hl LyRnm22JDYBmBIxJnIMzxBywGAvKrYkrZCKCLPq/bHwZbhi3GIGfQFW6axozIH+3OwNy O7ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=ZKVqEQIs; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n73si471596ybf.0.2020.08.20.18.48.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Aug 2020 18:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=ZKVqEQIs; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:55230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8wA4-0005KC-52 for alex.bennee@linaro.org; Thu, 20 Aug 2020 21:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8w9i-0005JE-NM; Thu, 20 Aug 2020 21:47:47 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:36577 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8w9f-0004yQ-RQ; Thu, 20 Aug 2020 21:47:46 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4BXksz64TCz9sTR; Fri, 21 Aug 2020 11:47:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1597974455; bh=vQUkXkB/SIpxnANIoH2n+Xiy57oZhHTZHpRfkLRPKKY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZKVqEQIsuvJYUrZjYZ4mIZhUXzRZONpnP96F0yxtAfE2Ro0avFLaXwjowBcjrCJ2n H8rQBjoV/ZsKcl7mnWf9DVBDtak8Tn67tuMznSrRKHVaj7z7bn1kYPeHSNNs258kbR 9msXCDymfnlAzeZBa140CiwIS7t41w4TK0O1UdZM= Date: Fri, 21 Aug 2020 11:47:32 +1000 From: David Gibson To: Eduardo Habkost Subject: Re: Suspicious QOM types without instance/class size Message-ID: <20200821014732.GW271315@yekko.fritz.box> References: <20200820215529.GH642093@habkost.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XaepPZQT0uxAV0NY" Content-Disposition: inline In-Reply-To: <20200820215529.GH642093@habkost.net> Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-devel@nongnu.org, Gerd Hoffmann , qemu-block@nongnu.org, David Hildenbrand , Halil Pasic , Christian Borntraeger , =?iso-8859-1?Q?Herv=E9?= Poussineau , Thomas Huth , Alistair Francis , Cameron Esfahani , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, =?iso-8859-1?Q?C=E9dric?= Le Goater , Richard Henderson , "Daniel P. Berrange" , Cornelia Huck , Roman Bolshakov , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: /FSaaPtnqY/B --XaepPZQT0uxAV0NY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: > While trying to convert TypeInfo declarations to the new > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > where instance_size or class_size is not set, despite having type > checker macros that use a specific type. >=20 > The ones with "WARNING" are abstract types (maybe not serious if > subclasses set the appropriate sizes). The ones with "ERROR" > don't seem to be abstract types. Comment on the ones within my area: >=20 > WARNING: hw/input/adb.c:310:1: class_size should be set to sizeof(ADBDevi= ceClass)? Yeah, that looks like a bug (though we'll get away with it because it's abstract). > WARNING: hw/ppc/pnv_lpc.c:771:1: instance_size should be set to sizeof(Pn= vLpcController)? Ditto. Should I make fixes for these, or will you? > ERROR: hw/ppc/spapr_drc.c:771:1: instance_size should be set to sizeof(Sp= aprDrc)? I'm confused by this one. I'm not exactly sure which definition is tripping the error, and AFAICT they should all be correctly inheriting instance_size from either TYPE_SPAPR_DR_CONNECTOR or TYPE_SPAPR_DRC_PHSYICAL. If anything, it looks like TYPE_SPAPR_DRC_PHB could drop it's explicit override of instance_size. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --XaepPZQT0uxAV0NY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAl8/J7QACgkQbDjKyiDZ s5JTyRAAjB3I/c66lz1Uoq9AztTNzW16B3DDj7OZc22ILH3IqKkXWPAxaeiQG1CR Ei3XqjFDX5i9o0xlh5PrkeRsR7qUQ2ULognYZw/5je+M8Lp0saTnwLcnFbIVWLg2 vnvP8whNThplc62cMilXtU3qSPE7aKTZDdBr4wJmdH9lvNiZHU4pPy0DZ/N6Rn/R JSuYPYA7JwCGLul5GpagxaV0A+lvn6xV/UayacrlZz0WwDATSCDxREMIMPdvw+ZR uyb2Leybmf5kMwTHtdji5PYg6Pxhq1ach1Eb3GopAX6ADpCZdTasaFSlpT3ejKf7 uLHsSRk6z8RYM6xlv/QePSf4DHip3/YQ7078NQO0WjpzqbealqcYP2/Z0xZGEPQf lnfNVkg5MXY+MgwY56+gjhWDmc5C8dVeqc7bKkoDDb5VE6bWVBTUj+o8ck+M7tOg xMVDmndJRZFYsP6/aVCPsYqYFl0dclxc3LbWJwB8oU/R9lRYSb+HC3O8Hm2vIO2V GXPvFEcLTjgId/hKMDMusbx66Y4rIMz+Kwz/SieWSIsrwaE2vCR8DBYhLRkvFVDO LOBoYCGmiulQWkyUE4J8KSVirvEfeuQqN44DlQ0SLTKjpehkLsf5pyWG/pTynLek jRob8uuDWEols0ic0xGNq8xNbfZCu10opx+zbmmQ1hGfE51IQUQ= =IFc/ -----END PGP SIGNATURE----- --XaepPZQT0uxAV0NY--