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.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 61FCFC4360F for ; Fri, 5 Apr 2019 09:35:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 31063217D4 for ; Fri, 5 Apr 2019 09:35:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="axvH66y0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31063217D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uBwdoUe8hz256u2W6dhfLT/KNOnCIwwcOsQG089OoAo=; b=axvH66y0CbAjuj Giq4JoKQesmYXm1Z5fITDYnAqvRBWmeh/eE3VTHcFe2NC7lGnajrHR1aFD4WqZyI2a9GR0hMgglDQ p+ysBn4LMgQyKeNiZ3vqwg7HpJ5ur/+WshZcP1M2RRV6PvuNFWFExbQ3ydQvp9pQU6HcidMCWmCg9 3EHsnjFKTpjQe3TIbdLVrZVrA7Vz+fdbTD0DHAbZF06ypYZckXA1gmnErBKDmzQ0/v48D87L3mmQQ lunTifzo9GgZiioyASpKZ0k29GNtQSPPTZ/Hg8MPxFbNKYVcU6ETuj58fTWx/b8wViPJ5cK0RqcHY P49MBrAg8fKWG7gtmggA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCLGD-0002XY-Vh; Fri, 05 Apr 2019 09:35:45 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hCLGB-0002XA-8l for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2019 09:35:44 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56463168F; Fri, 5 Apr 2019 02:35:41 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 653213F721; Fri, 5 Apr 2019 02:35:39 -0700 (PDT) Date: Fri, 5 Apr 2019 10:35:36 +0100 From: Dave Martin To: Andrew Jones Subject: Re: [PATCH v7 07/27] arm64/sve: Check SVE virtualisability Message-ID: <20190405093536.GJ3567@e103592.cambridge.arm.com> References: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> <1553864452-15080-8-git-send-email-Dave.Martin@arm.com> <20190404212104.qhtklabh7mzwapje@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190404212104.qhtklabh7mzwapje@kamzik.brq.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190405_023543_318010_2F116149 X-CRM114-Status: GOOD ( 22.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Okamoto Takayuki , Christoffer Dall , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , Zhang Lei , Julien Grall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 04, 2019 at 11:21:04PM +0200, Andrew Jones wrote: > On Fri, Mar 29, 2019 at 01:00:32PM +0000, Dave Martin wrote: > > Due to the way the effective SVE vector length is controlled and > > trapped at different exception levels, certain mismatches in the > > sets of vector lengths supported by different physical CPUs in the > > system may prevent straightforward virtualisation of SVE at parity > > with the host. > > > > This patch analyses the extent to which SVE can be virtualised > > safely without interfering with migration of vcpus between physical > > CPUs, and rejects late secondary CPUs that would erode the > > situation further. > > > > It is left up to KVM to decide what to do with this information. > > > > Signed-off-by: Dave Martin > > Reviewed-by: Julien Thierry > > Tested-by: zhang.lei > > > > --- > > > > QUESTION: The final structure of this code makes it quite natural to > > clamp the vector length for KVM guests to the maximum value supportable > > across all CPUs; such a value is guaranteed to exist, but may be > > surprisingly small on a given hardware platform. > > > > Should we be stricter and actually refuse to support KVM at all on such > > hardware? This may help to force people to fix Linux (or the > > architecture) if/when this issue comes up. > > Blocking KVM would be too harsh, since the users of the host may not > care about guests with SVE, but still care about guests. > > > > > For now, I stick with pr_warn() and make do with a limited SVE vector > > length for guests. > > I think that's probably the best we can do. Agreed. Since it fell out quite nicely this way in the code, this was my preferred option. [...] > Reviewed-by: Andrew Jones Thanks ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel