From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi43T-0000oJ-0b for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:37:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi43R-0004zN-Tl for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:37:11 -0400 References: <000e01d3afad$b9a13830$2ce3a890$@codeaurora.org> <20180227104708.GA11391@cbox> <20180227124604.GA2373@cbox> <20180227132131.fipafmnb56a7fj76@kamzik.brq.redhat.com> From: Maran Wilson Message-ID: Date: Tue, 24 Jul 2018 11:35:31 -0700 MIME-Version: 1.0 In-Reply-To: <20180227132131.fipafmnb56a7fj76@kamzik.brq.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [Qemu-devel] VCPU hotplug on KVM/ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvmarm@lists.cs.columbia.edu, bthakur@codeaurora.org Cc: Andrew Jones , Christoffer Dall , Christoffer Dall , qemu-devel@nongnu.org, Christoffer Dall , qemu-arm@nongnu.org, imammedo@redhat.com, peter.maydell@linaro.org, david@redhat.com, marc.zyngier@arm.com It's been a few months since this email thread died off. Has anyone started working on a potential solution that would allow VCPU hotplug on KVM/ARM ? Or is this a project that is still waiting for an owner who has the time and inclination to get started? Thanks, -Maran On 2/27/2018 5:21 AM, Andrew Jones wrote: > On Tue, Feb 27, 2018 at 01:46:04PM +0100, Christoffer Dall wrote: >> On Tue, Feb 27, 2018 at 05:34:28PM +0530, bthakur@codeaurora.org wrote: >>> Hi Christoffer, >>> >>> Thanks for your reply. >>> >>> On 2018-02-27 16:17, Christoffer Dall wrote: >>>> Hi Bhupinder, >>>> >>>> On Tue, Feb 27, 2018 at 03:01:17PM +0530, bthakur@codeaurora.org wrote: >>>>> I hope it is the right forum to post my query. >>>>> >>>>> >>>>> >>>>> I am currently looking at the possibility of adding a new VCPU to a >>>>> running >>>>> guest VM in KVM/ARM. I see that currently, it is not allowed to add a >>>>> new >>>>> VCPU to a guest VM, if it is already initialized. The first check in >>>>> kvm_arch_vcpu_create() returns failure if it is already initialized. >>>>> >>>> This would require a major rework of a lot of logic surrounding the GIC >>>> and other parts of KVM initialization. >>>> >>>>> >>>>> There was some work done in QEMU to add support for VCPU hotplug: >>>>> https://lists.gnu.org/archive/html/qemu-arm/2017-05/msg00404.html >>>>> >>>>> >>>>> >>>>> But I am looking at the KVM side for enabling adding a new VCPU. If you >>>>> can >>>>> point me to any relevant work/resources, which I can refer to then it >>>>> will >>>>> help me. >>>>> >>>> I don't have any specific pointers, but I was always told that the way >>>> we were going to do CPU hotplug would be to instantiate a large number >>>> of VCPUs, and hotplug would be equivalent to turning on a VCPU which was >>>> previously powered off. >>>> >>>> Is this not still a feasible solution? >>> It should be a feasible solution provided the guest VM is not able to >>> control the onlining/offlining of VCPUs. It should be controlled by the >>> Host. >>> >> KVM could simply refuse to turn on some of the CPUs unless given >> permission from host userspace. >> >>>> How does VCPU hotplug work on x86? >>> On x86, you can add a vcpu through libvirt setvcpu command and it shows up >>> in the guest VM as a new CPU if you do lscpu. >>> >> Sure, but what is the mechanism, does x86 qemu actually call >> KVM_CREATE_VCPU, or is this also a question of turning on already >> created vcpus ? >> > CC'ing Igor and qemu-devel > > drew > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maran Wilson Subject: Re: VCPU hotplug on KVM/ARM Date: Tue, 24 Jul 2018 11:35:31 -0700 Message-ID: References: <000e01d3afad$b9a13830$2ce3a890$@codeaurora.org> <20180227104708.GA11391@cbox> <20180227124604.GA2373@cbox> <20180227132131.fipafmnb56a7fj76@kamzik.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7BC7340493 for ; Tue, 24 Jul 2018 16:37:02 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0jAKfkzNTKk1 for ; Tue, 24 Jul 2018 16:37:01 -0400 (EDT) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2E96140184 for ; Tue, 24 Jul 2018 16:37:01 -0400 (EDT) In-Reply-To: <20180227132131.fipafmnb56a7fj76@kamzik.brq.redhat.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: kvmarm@lists.cs.columbia.edu, bthakur@codeaurora.org Cc: Christoffer Dall , Christoffer Dall , marc.zyngier@arm.com, david@redhat.com, qemu-devel@nongnu.org, Christoffer Dall , qemu-arm@nongnu.org, imammedo@redhat.com List-Id: kvmarm@lists.cs.columbia.edu It's been a few months since this email thread died off. Has anyone started working on a potential solution that would allow VCPU hotplug on KVM/ARM ? Or is this a project that is still waiting for an owner who has the time and inclination to get started? Thanks, -Maran On 2/27/2018 5:21 AM, Andrew Jones wrote: > On Tue, Feb 27, 2018 at 01:46:04PM +0100, Christoffer Dall wrote: >> On Tue, Feb 27, 2018 at 05:34:28PM +0530, bthakur@codeaurora.org wrote: >>> Hi Christoffer, >>> >>> Thanks for your reply. >>> >>> On 2018-02-27 16:17, Christoffer Dall wrote: >>>> Hi Bhupinder, >>>> >>>> On Tue, Feb 27, 2018 at 03:01:17PM +0530, bthakur@codeaurora.org wrote: >>>>> I hope it is the right forum to post my query. >>>>> >>>>> >>>>> >>>>> I am currently looking at the possibility of adding a new VCPU to a >>>>> running >>>>> guest VM in KVM/ARM. I see that currently, it is not allowed to add a >>>>> new >>>>> VCPU to a guest VM, if it is already initialized. The first check in >>>>> kvm_arch_vcpu_create() returns failure if it is already initialized. >>>>> >>>> This would require a major rework of a lot of logic surrounding the GIC >>>> and other parts of KVM initialization. >>>> >>>>> >>>>> There was some work done in QEMU to add support for VCPU hotplug: >>>>> https://lists.gnu.org/archive/html/qemu-arm/2017-05/msg00404.html >>>>> >>>>> >>>>> >>>>> But I am looking at the KVM side for enabling adding a new VCPU. If you >>>>> can >>>>> point me to any relevant work/resources, which I can refer to then it >>>>> will >>>>> help me. >>>>> >>>> I don't have any specific pointers, but I was always told that the way >>>> we were going to do CPU hotplug would be to instantiate a large number >>>> of VCPUs, and hotplug would be equivalent to turning on a VCPU which was >>>> previously powered off. >>>> >>>> Is this not still a feasible solution? >>> It should be a feasible solution provided the guest VM is not able to >>> control the onlining/offlining of VCPUs. It should be controlled by the >>> Host. >>> >> KVM could simply refuse to turn on some of the CPUs unless given >> permission from host userspace. >> >>>> How does VCPU hotplug work on x86? >>> On x86, you can add a vcpu through libvirt setvcpu command and it shows up >>> in the guest VM as a new CPU if you do lscpu. >>> >> Sure, but what is the mechanism, does x86 qemu actually call >> KVM_CREATE_VCPU, or is this also a question of turning on already >> created vcpus ? >> > CC'ing Igor and qemu-devel > > drew > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm