Received: by 2002:ac2:4841:0:0:0:0:0 with SMTP id 1csp2717956lfy; Mon, 24 Aug 2020 10:07:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt2PHc688Cp7c2B93EW2pGJKTFEjnY6c/bSbyZbkB8t0lnw8dGMeQD2pWzdpvy8A17hmk/ X-Received: by 2002:a25:e83:: with SMTP id 125mr9500063ybo.376.1598288819901; Mon, 24 Aug 2020 10:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598288819; cv=none; d=google.com; s=arc-20160816; b=MX3x3VIfqpBVOLrC8kHXQLWnEn6EqHU2eYtkG33Go4zSRTLZ2gvF3asyls+DJOVIAG oToAF6+z34V/r226oJt4G9HuvHPMOCI/710vNmJ4H7dOVOuGVpfBryq9As680kwBkhHs brPrrq3GA9oYB8FhFnwI3zXGkWkrHNbRO5tncn88NdoYiyrhtxdjYUCeU7npPkWD2VYQ +KNbA9h25FqF10KvEKYjzi2TkkdEMECC1ikRfo32q48yVHjiCTHJaeteWL3/E3zjgaH2 xvk9gFEqwKOVT1YHMViR4TuXKJRG2YCsps3VBkWuf9KXLhBCipRMksZev+EEnEIw0TYd lRvw== 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=CDh/D5GRiksCG7zEpAQwiIMF5S+CM4RvijU2uHWSHkg=; b=BaXGl5NFrGchOzS90WL8u2Eq/8vrP09Ub5VdNslTrch8g/lpRKAfCLBliMkPtk5/t+ 0qnTNv7G8blKfGd/mJkKZP7CoEe0GwNSviLsH5fMmSVmOkncjWI9w7Jj5H62WpP9xjss /HPXALWTvPnzK/Fml+G9LDlDrgBqtfFvQuF7ibLOBgPnnSUMAHQhwrNNlHIWRbFd2pJu sBP2CpM71fy6pmowW6a9WHKFR3ia2wEeBBOpNMvcUVO49bv4LYknKtXDHAFi3JGW+6GL 7WHLmpwI0QjawncH/HcH8aT/ZcDFxJusOnk6KxSSorlIe9DiTi2YcVLROJ2NDklvWV+B aquw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yadro.com header.s=mta-01 header.b="Cn/ER3b0"; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s59si11862287ybi.417.2020.08.24.10.06.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Aug 2020 10:06:59 -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=pass header.i=@yadro.com header.s=mta-01 header.b="Cn/ER3b0"; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yadro.com Received: from localhost ([::1]:35826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAFvv-0003oy-85 for alex.bennee@linaro.org; Mon, 24 Aug 2020 13:06:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAFvm-0003mf-3i; Mon, 24 Aug 2020 13:06:50 -0400 Received: from mta-02.yadro.com ([89.207.88.252]:56234 helo=mta-01.yadro.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAFvj-0003y3-VH; Mon, 24 Aug 2020 13:06:49 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id CAB915750B; Mon, 24 Aug 2020 17:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= in-reply-to:content-disposition:content-type:content-type :mime-version:references:message-id:subject:subject:from:from :date:date:received:received:received; s=mta-01; t=1598288803; x=1600103204; bh=XnIQ3IrKntfHqllpAEx8wYdHdkAHLXNxtXCg2Go/cbM=; b= Cn/ER3b0PPRwNmK5p5/3SZ5jly8Ls7u+hjNV+T3j10g/LTswWaM9pHhBTTRIHbSX 2YKXsR7Ochu4IGMWVLEojiYdAecbOKu4SuOI6vredrnrxpoXXDE/KYWOgiTmDUiH mi/Koq7o6pTmxZoMsJD9r7iTr4DWyDVJjOFAXC5bhsg= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 86PRyNSHABWU; Mon, 24 Aug 2020 20:06:43 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (t-exch-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 4D4F2527D2; Mon, 24 Aug 2020 20:06:43 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 24 Aug 2020 20:06:43 +0300 Date: Mon, 24 Aug 2020 20:06:42 +0300 From: Roman Bolshakov To: Eduardo Habkost Subject: Re: Suspicious QOM types without instance/class size Message-ID: <20200824170642.GB41106@SPB-NB-133.local> References: <20200820215529.GH642093@habkost.net> <20200821105352.GA89922@SPB-NB-133.local> <20200821172927.GJ642093@habkost.net> <20200821174802.GK642093@habkost.net> <20200824164134.GA41106@SPB-NB-133.local> <20200824164552.GP642093@habkost.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200824164552.GP642093@habkost.net> X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-02.corp.yadro.com (172.17.10.102) Received-SPF: pass client-ip=89.207.88.252; envelope-from=r.bolshakov@yadro.com; helo=mta-01.yadro.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/24 12:41:38 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , David Gibson , 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 , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: PcYNx+Ydo9bf On Mon, Aug 24, 2020 at 12:45:52PM -0400, Eduardo Habkost wrote: > On Mon, Aug 24, 2020 at 07:41:34PM +0300, Roman Bolshakov wrote: > > On Fri, Aug 21, 2020 at 01:48:02PM -0400, Eduardo Habkost wrote: > > > Signed-off-by: Eduardo Habkost > > > --- > > > diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c > > > index d81f569aed..81d1662d06 100644 > > > --- a/target/i386/hvf/hvf.c > > > +++ b/target/i386/hvf/hvf.c > > > @@ -878,13 +878,11 @@ static int hvf_accel_init(MachineState *ms) > > > { > > > int x; > > > hv_return_t ret; > > > - HVFState *s; > > > + HVFState *s = HVF_STATE(ms->accelerator); > > > > The file also needs definition of MachineState: > > #include "hw/boards.h" > > > > > > > > ret = hv_vm_create(HV_VM_DEFAULT); > > > assert_hvf_ok(ret); > > > > > > - s = g_new0(HVFState, 1); > > > - > > > s->num_slots = 32; > > > for (x = 0; x < s->num_slots; ++x) { > > > s->slots[x].size = 0; > > > @@ -908,6 +906,7 @@ static void hvf_accel_class_init(ObjectClass *oc, void *data) > > > static const TypeInfo hvf_accel_type = { > > > .name = TYPE_HVF_ACCEL, > > > .parent = TYPE_ACCEL, > > > + .instance_size = sizeof(HVFState), > > > .class_init = hvf_accel_class_init, > > > }; > > > > > > > > However, the hvf patch above shouldn't require it. You should be > able to apply and test it on top of qemu.git master. > Yeah, that's correct, thanks. With the include fix for hw/boards.h, the patch works: Reviewed-By: Roman Bolshakov Tested-By: Roman Bolshakov BTW, am I expected to see the accel in "info qtree" (or qom-tree)? It's not there for a reason. Regards, Roman