Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2837693ybl; Sun, 25 Aug 2019 03:23:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZ2tnt7jp6bKA9R09KMgs1BKUxk+j6RccgEFyuVC8w7qMtXfoIGCJzu5tbKBgsiu0A3FNO X-Received: by 2002:a65:6294:: with SMTP id f20mr11964410pgv.349.1566728616801; Sun, 25 Aug 2019 03:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566728616; cv=none; d=google.com; s=arc-20160816; b=uWLG0yhfB3s7Z4clQWI8Kjg9TqCsXYu8missnpfqQ/FKkg6IXoTn+vax6SmzlMrjBN Nt3JKj/wrQ0f7mj8nSte3ei9+FLSTD7sRVg0CrfNQdl5LBkXVbz1CZcMryUS1gbOqgZl 9WKE1eQFNKssWqgJS+aQBTKwVO6Fi/q1gnLrMgeFaQmQrChI2SYNedcKJR/v6z6Zi8+I vs59kT4bGpYC5VkLl3NGI6bk3kegnsHffc6v054bawrJ68d4EGYG5jbvlNleWYbfIKoy lJbIUd54PFSitF0reYo/Wp2JkAkSjr3zyDYVzLkva0ReHIuebmh6T+L2ZcGJMMjrimhw /fEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=0qsKSF1vI585D3N3OET5+qR3XWr7aoSGL/Y+xVXTXCw=; b=QvqSV6FshCPjfaIM5ncADs/LLDmnO7uvU43GK0pfjA6KFzShL5GO+VdsPZ9XjRM7Qz ieyLUyx6gnqtd9c+QUCzToWEBbA2fedAxOlFv8axoyAq1DZUHfiGM8zXz90qs6qGP+8O PeOWHXMSXzvJKITP0A1vnRs4TWy91qwFF71WfLdAbGOrMMefVJzsVcpRnbJAv9w1mY1G j7YhNWHrneEj8K7MTgUJghLWVhPoWtYx3AaVg2CugGCPN/8g2DHSMUrM978dwhrD265q o1apOY9Rykbhx0JLtbluVCSAMmz8/jhBjQQeCbPbDSuJhfEGR2HbzZgBOb/pPBloy4Ak QmDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si6133312pgv.541.2019.08.25.03.23.14; Sun, 25 Aug 2019 03:23:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbfHYKUH (ORCPT + 99 others); Sun, 25 Aug 2019 06:20:07 -0400 Received: from foss.arm.com ([217.140.110.172]:48800 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbfHYKUH (ORCPT ); Sun, 25 Aug 2019 06:20:07 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62E03344; Sun, 25 Aug 2019 03:20:06 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DBC403F246; Sun, 25 Aug 2019 03:20:02 -0700 (PDT) Date: Sun, 25 Aug 2019 11:20:00 +0100 Message-ID: <86wof1mtrj.wl-maz@kernel.org> From: Marc Zyngier To: Auger Eric Cc: eric.auger.pro@gmail.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, yuzenghui@huawei.com, zhang.zhanghailiang@huawei.com, wanghaibin.wang@huawei.com, james.morse@arm.com, qemu-arm@nongnu.org, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, peter.maydell@linaro.org, andre.przywara@arm.com Subject: Re: [PATCH] KVM: arm/arm64: vgic: Use a single IO device per redistributor In-Reply-To: References: <20190823173330.23342-1-eric.auger@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Aug 2019 18:52:32 +0100, Auger Eric wrote: > > Hi Zenghui, Marc, > > On 8/23/19 7:33 PM, Eric Auger wrote: > > At the moment we use 2 IO devices per GICv3 redistributor: one > > one for the RD_base frame and one for the SGI_base frame. > > > > Instead we can use a single IO device per redistributor (the 2 > > frames are contiguous). This saves slots on the KVM_MMIO_BUS > > which is currently limited to NR_IOBUS_DEVS (1000). > > > > This change allows to instantiate up to 512 redistributors and may > > speed the guest boot with a large number of VCPUs. > > > > Signed-off-by: Eric Auger > > I tested this patch with below kernel and QEMU branches: > kernel: https://github.com/eauger/linux/tree/256fix-v1 > (Marc's patch + this patch) > https://github.com/eauger/qemu/tree/v4.1.0-256fix-rfc1-rc0 > (header update + kvm_arm_gic_set_irq modification) A small comment on this: you don't seem to check that KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 is available before allowing more than 256 vcpus. It'd be worth doing that before allowing a guest to start. > > On a machine with 224 pcpus, I was able to boot a 512 vcpu guest. > > As expected, qemu outputs warnings: > > qemu-system-aarch64: warning: Number of SMP cpus requested (512) exceeds > the recommended cpus supported by KVM (224) > qemu-system-aarch64: warning: Number of hotpluggable cpus requested > (512) exceeds the recommended cpus supported by KVM (224) > > on the guest: getconf _NPROCESSORS_ONLN returns 512 > > Then I have no clue about what can be expected of such overcommit config > and I have not further exercised the guest at the moment. It will just work, albeit slowly. I often boot 64 vcpu guests on 4 or 8 core systems, just to check that we don't regress too much. > But at least > it seems to boot properly. I also tested without overcommit and it seems > to behave as before (boot, migration). > > I still need to look at the migration of > 256vcpu guest at qemu level. OK, please let us know how it goes. I'd like some more reviewing on the userspace ABI change before merging it though. Peter, your input would be very good to have. Thanks, M. -- Jazz is not dead, it just smells funny.