From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB4B3C433ED for ; Mon, 17 May 2021 06:45:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7DCD61242 for ; Mon, 17 May 2021 06:45:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7DCD61242 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liWzr-0002yO-Ob for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 02:44:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liWyz-0001xT-Ta for qemu-devel@nongnu.org; Mon, 17 May 2021 02:44:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liWys-0001Hl-Ac for qemu-devel@nongnu.org; Mon, 17 May 2021 02:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621233837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jnz7vgZp8IFR0leJpkXvhmBpMNZia4tjRUIGnAecZgc=; b=RRLTEoiuPuNZ/MIgjOymdgZ5Wn7cKEk1gHFhnHhaFk2RVyQ2pMegRWTEV36bmnqU0YhdmE DR0MhhUvr9NbYJoVlAw2F5J03MDmJ0yw3w8nUp+JucFVkGZZ4zYZ9zrTgAhs9SwQ49mT7o xz7pobzGMZ0bwCGEGkyrWuXRzwdZ5TA= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-nSXcXjhVPlurmAi-WTctfA-1; Mon, 17 May 2021 02:43:56 -0400 X-MC-Unique: nSXcXjhVPlurmAi-WTctfA-1 Received: by mail-ed1-f72.google.com with SMTP id w22-20020a05640234d6b029038d04376b6aso3321094edc.21 for ; Sun, 16 May 2021 23:43:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jnz7vgZp8IFR0leJpkXvhmBpMNZia4tjRUIGnAecZgc=; b=j+k/CLyZGfI0aie81CeykN7i1+0nblVxp4aqeKZSUqY25YsU0kYjmsMtYfe30aO2uW ij7DbSCTdVZt8TmThmv3Q+MJ9fLP9/QETT01JX8fn6VkwdmMPy5s55HVW0yIFJ0udHbc aE55ugtRiP6rN5NN1m8AIuSR849X5PDoXdQSIp0bw7wbB3LNIjGpM+YVacCUzynVNhu6 EcY+1AN+ptjnRz9+LERmKA+dT6NmWDiA7NraU0esYEIBSO6xZbv4sAhWHQ6HMWyX9yj7 MV7vUJ7txVd3+TjIraalZKhfr/JdSKK8lCBqMUflXHLmw/bs/eT/vAND8S3MM0o55MVT prow== X-Gm-Message-State: AOAM532l3hoCUxyJcwORJTzpyOhDmVG0jDRfFE9aSivml/XL3ECzW+0L +ERvPiyH9m2dVg/eFyPJt+Xql9UmOJVwWV+2582nMyZAXT7ZYj75YPl/SC096iGha/ziLO88k3/ OhcgPspPFjy6DOsU= X-Received: by 2002:a50:ff0a:: with SMTP id a10mr24538685edu.273.1621233834960; Sun, 16 May 2021 23:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRhrjQJSNaGtSyPQ65hxXcnghr7DP2reIbMOmgIbDjXWag+CZBXcKUH3Nw135Xx30ypcdOpw== X-Received: by 2002:a50:ff0a:: with SMTP id a10mr24538658edu.273.1621233834849; Sun, 16 May 2021 23:43:54 -0700 (PDT) Received: from gator.home (cst2-174-132.cust.vodafone.cz. [31.30.174.132]) by smtp.gmail.com with ESMTPSA id gx23sm72736ejb.125.2021.05.16.23.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 23:43:54 -0700 (PDT) Date: Mon, 17 May 2021 08:43:52 +0200 From: Andrew Jones To: Yanan Wang Subject: Re: [RFC PATCH v3 4/9] hw/arm/virt: Initialize the present cpu members Message-ID: <20210517064352.fhif7lomuli3mrzp@gator.home> References: <20210516102900.28036-1-wangyanan55@huawei.com> <20210516102900.28036-5-wangyanan55@huawei.com> MIME-Version: 1.0 In-Reply-To: <20210516102900.28036-5-wangyanan55@huawei.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=drjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=drjones@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.296, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Barry Song , Peter Maydell , "Michael S . Tsirkin" , wanghaibin.wang@huawei.com, zhukeqian1@huawei.com, qemu-devel@nongnu.org, yangyicong@huawei.com, Shannon Zhao , qemu-arm@nongnu.org, Alistair Francis , prime.zeng@hisilicon.com, Paolo Bonzini , yuzenghui@huawei.com, Igor Mammedov , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Sun, May 16, 2021 at 06:28:55PM +0800, Yanan Wang wrote: > We create and initialize a cpuobj for each present cpu in > machvirt_init(). Now we also initialize the cpu member of > structure CPUArchId for each present cpu in the function. > > This will be used to determine whether a cpu is present > when generating ACPI tables in later patches. > > Co-developed-by: Ying Fang > Signed-off-by: Ying Fang > Signed-off-by: Yanan Wang > --- > hw/arm/virt.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index e5dcdebdbc..50e324975f 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -2061,6 +2061,13 @@ static void machvirt_init(MachineState *machine) > } > > qdev_realize(DEVICE(cpuobj), NULL, &error_fatal); > + > + /* > + * As ARM cpu hotplug is not supported yet, we initialize > + * the present cpu members here. > + */ > + machine->possible_cpus->cpus[n].cpu = cpuobj; > + > object_unref(cpuobj); > } > fdt_add_timer_nodes(vms); > -- > 2.19.1 > Reviewed-by: Andrew Jones