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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 ED72CC10F11 for ; Wed, 10 Apr 2019 12:42:15 +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 BEEFD20818 for ; Wed, 10 Apr 2019 12:42:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ctLDhGod" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEEFD20818 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=gIpK7iSHpNMEqmukZuEEFd7ZWrn3VuTKvGYd/y6+Rws=; b=ctLDhGodk3HL0v 6E2WkIOE69PMt5y+MmguDquRFwt6DNd+X/vZL1xSg/EUX4grinE70s6z/KgbAFGqomVB0DK3JZLNu dbaW8uL6NfFG2SgS3Hiy1DRD1B3zq3WOu2DGjgr8Juuq9OabZPognZA57UOSqUh4oHVfU+OtLrtMW xX/kqatBFSTK6khfnvSbNLqflx6wH3VMSkkNk1lkFwCGfr62eKmzzkbjWBZBWODxvekhNL6/Y4tmv u0dUaokz2wynlOr4CMxosvto0wG14264Rfivf4xTfrPYBlmFRsPi1V2TdhK6cgq3p3LLT4zqQk522 3ae6Oj2gl6Bua+d6qfEQ==; 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 1hECYM-0002MX-6R; Wed, 10 Apr 2019 12:42:10 +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 1hECYI-0002Lo-VG for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2019 12:42:08 +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 18404A78; Wed, 10 Apr 2019 05:42:05 -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 264E73F59C; Wed, 10 Apr 2019 05:42:03 -0700 (PDT) Date: Wed, 10 Apr 2019 13:42:00 +0100 From: Dave Martin To: Andrew Jones Subject: Re: [PATCH v7 23/27] KVM: arm64/sve: Add pseudo-register for the guest's vector lengths Message-ID: <20190410124200.GI3567@e103592.cambridge.arm.com> References: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> <1553864452-15080-24-git-send-email-Dave.Martin@arm.com> <20190404201854.7dzga3ctjj7427hk@kamzik.brq.redhat.com> <20190405093603.GM3567@e103592.cambridge.arm.com> <20190405101451.xtx7ggyomvrbrpxl@kamzik.brq.redhat.com> <20190405125413.GA3567@e103592.cambridge.arm.com> <20190405153321.r4ide5n2bkiuflqn@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190405153321.r4ide5n2bkiuflqn@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-20190410_054207_043872_A5FE1CA3 X-CRM114-Status: GOOD ( 18.54 ) 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 Fri, Apr 05, 2019 at 05:33:21PM +0200, Andrew Jones wrote: > On Fri, Apr 05, 2019 at 01:54:13PM +0100, Dave Martin wrote: [...] > > If you think the above is enough for ABI documentation purposes, I will > > aim to drop the following comment into set_sve_vls(): > > > > /* > > * Vector lengths supported by the host can't currently be > > * hidden from the guest individually: instead we can only set a > > * maxmium via ZCR_EL2.LEN. So, make sure the available vector > > * length match the set requested exactly up to the requested > > * maximum: > > */ > > for (vq = SVE_VQ_MIN; vq <= max_vq; ++vq) > > if (vq_present(&vqs, vq) != sve_vq_available(vq)) > > return -EINVAL; > > > > Do you think that's enough? > > > > That works for me, and I'm glad I now have it understood, because this > will be a key piece of the QEMU uesr interface to work out. I.e. we > need to be able to provide the user with the current host's VL list > up to the max virtualizable VL when queried, allow them to choose a max > from that list for a guest, and then commit to that VL sublist for the > guest. I'll dive into QEMU on Monday, hopefully I won't drown there. Agreed. How to make this user-friendly is a separate problem, provided that the kernel provides userspace with sufficient tools to do the job. Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel