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=-5.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 95C95C433E0 for ; Tue, 7 Jul 2020 09:54:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 641A0206DF for ; Tue, 7 Jul 2020 09:54:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L4SGyNtB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 641A0206DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=v9Fba1BepaGoQhIyTrtWXZId7IGLdqlTVr1QsPOj57I=; b=L4SGyNtBdDA8Bmrglg7q7er0n HavREUXGbTNmQeyJKQ4OPI9ql3jIrLJRf3RXI52d4oW3MJsha6lmLqi6mSbd8zyUVjO8LFibBKKd0 3Bk0Xwx+RZO1z1xH06tygU9YsqtfkLHo53lROSHRmaMV6kECaNcafzkNxgaCO5K/ykPIYEIG117aq caKwsToQJrDE9mvdG0zvv9nS3d488eZ9CceCUXuKkxgmGjq6hBPTzyVQBRwNBCJii87/1nTNdSsOu vBnWxN8pr2wqXbAuwtrVkCAvlYw/TkOzz2izJqxED7Sn8ZDAqhpNjmkLYG6uOWeWIdkKrvR27CNj2 sLHwYb8Lg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jskHo-0001t9-HH; Tue, 07 Jul 2020 09:53:12 +0000 Received: from lhrrgout.huawei.com ([185.176.76.210] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jskHl-0001r7-10 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jul 2020 09:53:10 +0000 Received: from lhreml705-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 74C4A9A111BCD6BA87D2; Tue, 7 Jul 2020 10:52:55 +0100 (IST) Received: from lhreml703-chm.china.huawei.com (10.201.108.52) by lhreml705-chm.china.huawei.com (10.201.108.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Tue, 7 Jul 2020 10:52:55 +0100 Received: from lhreml703-chm.china.huawei.com ([10.201.68.198]) by lhreml703-chm.china.huawei.com ([10.201.68.198]) with mapi id 15.01.1913.007; Tue, 7 Jul 2020 10:52:55 +0100 From: Salil Mehta To: "linux-arm-kernel@lists.infradead.org" Subject: RE: [PATCH RFC 0/4] Changes to Support *Virtual* CPU Hotplug for ARM64 Thread-Topic: [PATCH RFC 0/4] Changes to Support *Virtual* CPU Hotplug for ARM64 Thread-Index: AQHWSvaqb7PlQuQ2I0aISfnbFH95/aj77kPg Date: Tue, 7 Jul 2020 09:52:54 +0000 Message-ID: <8efc4efe284641eda3ffeb2301fcca43@huawei.com> References: <20200625133757.22332-1-salil.mehta@huawei.com> In-Reply-To: <20200625133757.22332-1-salil.mehta@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.76.134] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200707_055309_171619_AD723F3D X-CRM114-Status: GOOD ( 16.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "peter.maydell@linaro.org" , "gshan@redhat.com" , "kvm@vger.kernel.org" , "mst@redhat.com" , "catalin.marinas@arm.com" , Linuxarm , "linux-kernel@vger.kernel.org" , "will@kernel.org" , "lorenzo.pieralisi@arm.com" , "maz@kernel.org" , "david@redhat.com" , "drjones@redhat.com" , "andre.przywara@arm.com" , "mehta.salil.lnk@gmail.com" , "richard.henderson@linaro.org" , "eric.auger@redhat.com" , "qemu-arm@nongnu.org" , "imammedo@redhat.com" , "christoffer.dall@arm.com" , "james.morse@arm.com" , "sudeep.holla@arm.com" , "pbonzini@redhat.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, A gentle reminder, any comments regarding this series will help us know your opinion and also confirm/correct our understanding about the topic and will be much appreciated. Thanks in anticipation! Best regards Salil > From: Salil Mehta > Sent: Thursday, June 25, 2020 2:38 PM > To: linux-arm-kernel@lists.infradead.org > Cc: maz@kernel.org; will@kernel.org; catalin.marinas@arm.com; > christoffer.dall@arm.com; andre.przywara@arm.com; james.morse@arm.com; > mark.rutland@arm.com; lorenzo.pieralisi@arm.com; sudeep.holla@arm.com; > qemu-arm@nongnu.org; peter.maydell@linaro.org; richard.henderson@linaro.org; > imammedo@redhat.com; mst@redhat.com; drjones@redhat.com; pbonzini@redhat.com; > eric.auger@redhat.com; gshan@redhat.com; david@redhat.com; > kvm@vger.kernel.org; linux-kernel@vger.kernel.org; Linuxarm > ; mehta.salil.lnk@gmail.com; Salil Mehta > > Subject: [PATCH RFC 0/4] Changes to Support *Virtual* CPU Hotplug for ARM64 > > Changes to support virtual cpu hotplug in QEMU[1] have been introduced to the > community as RFC. These are under review. > > To support virtual cpu hotplug guest kernel must: > 1. Identify disabled/present vcpus and set/unset the present mask of the vcpu > during initialization and hotplug event. It must also set the possible mask > (which includes disabled vcpus) during init of guest kernel. > 2. Provide architecture specific ACPI hooks, for example to map/unmap the > logical cpuid to hwids/MPIDR. Linux kernel already has generic ACPI cpu > hotplug framework support. > > Changes introduced in this patch-set also ensures that initialization of the > cpus when virtual cpu hotplug is not supported remains un-affected. > > Repository: > (*) Kernel changes are at, > https://github.com/salil-mehta/linux.git virt-cpuhp-arm64/rfc-v1 > (*) QEMU changes for vcpu hotplug could be cloned from below site, > https://github.com/salil-mehta/qemu.git virt-cpuhp-armv8/rfc-v1 > > > THINGS TO DO: > 1. Handling of per-cpu variables especially the first-chunk allocations > (which are NUMA aware) when the vcpu is hotplugged needs further attention > and review. > 2. NUMA related stuff has not been fully tested both in QEMU and kernel. > 3. Comprehensive Testing including when cpu hotplug is not supported. > 4. Docs > > DISCLAIMER: > This is not a complete work but an effort to present the arm vcpu hotplug > implementation to the community. This RFC is being used as a way to verify > the idea mentioned above and to support changes presented for QEMU[1] to > support vcpu hotplug. As of now this is *not* a production level code and might > have bugs. Only a basic testing has been done on HiSilicon Kunpeng920 ARM64 > based SoC for Servers to verify the proof-of-concept that has been found working! > > Best regards > Salil. > > REFERENCES: > [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg712010.html > [2] https://lkml.org/lkml/2019/6/28/1157 > [3] https://lists.cs.columbia.edu/pipermail/kvmarm/2018-July/032316.html > > Organization of Patches: > [Patch 1-3] > (*) Changes required during guest boot time to support vcpu hotplug > (*) Max cpu overflow checks > (*) Changes required to pre-setup cpu-operations even for disabled cpus > [Patch 4] > (*) Arch changes required by guest kernel ACPI CPU Hotplug framework. > > > Salil Mehta (4): > arm64: kernel: Handle disabled[(+)present] cpus in MADT/GICC during > init > arm64: kernel: Bound the total(present+disabled) cpus with nr_cpu_ids > arm64: kernel: Init cpu operations for all possible vcpus > arm64: kernel: Arch specific ACPI hooks(like logical cpuid<->hwid > etc.) > > arch/arm64/kernel/smp.c | 153 ++++++++++++++++++++++++++++++++-------- > 1 file changed, 123 insertions(+), 30 deletions(-) > > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel