Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1010988pxk; Thu, 10 Sep 2020 04:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPkvXQ3q1VUtIJyGyoN9s0HltV5WIql5Iom4/CMWgc7v0ydlpvZc8X682xO4M+U3Pn/oet X-Received: by 2002:a17:906:ce3b:: with SMTP id sd27mr8306600ejb.433.1599739018805; Thu, 10 Sep 2020 04:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599739018; cv=none; d=google.com; s=arc-20160816; b=FqSiEa+R+vokFSfqgbs8USlxswHkPaBx2h/e6pUH4CiiH4oYcrtWIXkj3+2nhhF//r OU58vNRQYeS9glqzyX01zsJ0KPfQ8K7RXhudVSbmsYCaPdUfl4pdPUlgvUgwBmRRaqw2 gEKYoTsPuPXbCYsB6YKN41TiTy/Qi3mJwH2cQnCKtdoQDlzHCaHxRz1Ybw3xG3IYraVS lCoKcAKqV2muXHigVV16g94udcYYGlZse3hPOxcnZTEVXDgIyNmATIBIAOYzluFjU0WS jVW82gVp3t+m07BS9U44ENTPJbXQibDJj+DETzIpaY66pEqYFx1PGzMvqmMPHYFu4O7K HJZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Sjkjxl7XUETbHB6ANruWZFnmDHT7amDR67npklsZH2s=; b=Ec3AI4CNJmFGDzgB13NrH7gxdXR7XnTWi1rNxr28sSF8tJF4GwDz0uAhneOG9kjhyB YbtEnm9Kfw4Ppah8a5u9ac3pd8qn/CRBktNZAkUhKpxcaz6v+QoqEpZAtLXJXz1+53Za qJi/orqd+LJShkqkQGABjciQdbQYu5DU20Bm6YfdhNs715VV8KYllhUsgolfmvjByhFP lmaCSkdKLUvXK74A4SIYBung3eNvVdXQ5wd0Hntl5O5bHAKem539y9xsxZYCnLbs80Rb cRsQBn84VhtpP1VLtD6RpUhxdAXXjn7U00dqm17dVqPKf2zag9PmWsA/ZZ6AosXY4bvN Ka8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mk1gsq4j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si3366356ejw.176.2020.09.10.04.56.35; Thu, 10 Sep 2020 04:56:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mk1gsq4j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729953AbgIJLy3 (ORCPT + 99 others); Thu, 10 Sep 2020 07:54:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38256 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730400AbgIJLwJ (ORCPT ); Thu, 10 Sep 2020 07:52:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599738724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Sjkjxl7XUETbHB6ANruWZFnmDHT7amDR67npklsZH2s=; b=Mk1gsq4jP6JqrEb5NoZcxLDRIAdUm66NloJai3FMW9wKrr9YLoQEAE4JaJIAMGthuiNYXH E0xzh4GOl4fE23uLbWtz0kT8lK/qZZWFRAF7ZBV6RZS2YfIlIU2/Rf42lAAodvQuWUBZWt HAybvSiEozrIUNUafxFL06rgRorl3tc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-63-SgqgcIBnNWOnuR5o4e7goA-1; Thu, 10 Sep 2020 07:49:51 -0400 X-MC-Unique: SgqgcIBnNWOnuR5o4e7goA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A6E9802B6C; Thu, 10 Sep 2020 11:49:49 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.40.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC8FF1A923; Thu, 10 Sep 2020 11:49:45 +0000 (UTC) Date: Thu, 10 Sep 2020 13:49:43 +0200 From: Andrew Jones To: Steven Price Cc: Catalin Marinas , Marc Zyngier , Will Deacon , "Dr. David Alan Gilbert" , Peter Maydell , qemu-devel@nongnu.org, Dave Martin , Juan Quintela , Richard Henderson , linux-kernel@vger.kernel.org, Thomas Gleixner , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/2] arm64: kvm: Introduce MTE VCPU feature Message-ID: <20200910114943.cedbzlqfcgxg7jqs@kamzik.brq.redhat.com> References: <20200904160018.29481-1-steven.price@arm.com> <20200904160018.29481-3-steven.price@arm.com> <20200909154804.mide6szbzgdy7jju@kamzik.brq.redhat.com> <3a7e18af-84bd-cee3-d68f-e08f225fc166@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a7e18af-84bd-cee3-d68f-e08f225fc166@arm.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 10:21:07AM +0100, Steven Price wrote: > > We either need a KVM cap or a new CPU feature probing interface to avoid > > making userspace try features one at a time. It's too bad that VCPU_INIT > > doesn't clear all offending features from the feature set when returning > > EINVAL, because then userspace could create a scratch VCPU with everything > > it supports in order to see what KVM also supports in one go. > > If Peter's TELL_ME_WHAT_YOU_HAVE idea works out then perhaps we don't need > the cap? Or would it still be useful? > We wouldn't need it, but we don't _need_ it now either. It's not very convenient to probe vcpu features with scratch vcpus, especially if we must probe one at a time, but it works. The TELL_ME_WHAT_YOU_HAVE idea will only fix the one at a time issue, but still require a vcpu fd. If this feature becomes a VM feature then a cap or VM level API would help reduce the userspace probing work. Thanks, drew