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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 6C718C433E2 for ; Wed, 9 Sep 2020 15:54:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0C85720639 for ; Wed, 9 Sep 2020 15:54:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jEw0VBVf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RfcRjoln" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C85720639 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lXNQMxe175GBG1PPRx+VqXsLNpOiqCvmQxmh8JWK0K0=; b=jEw0VBVfobKv6fFNHVO5LV2HJ 6qSrj4Ztz7y+STBdsTC5l68sQcrJeY/v3egqw6GPrrI7fgDUyHTQfabQezG08E7UGp9pVuyzrJByh 9lAlHS7s2WJbwT8AKxchT855w7Mw3ky/s+DwkWtLYAQEzL3kG8IN7DiYgmv+/nnukmOQrnoIRWVit iJhZxJPUHEXGalol4FqvkOxp0dJGiY8SQk5CeZSMalgX/AH766+lvN0Ejg2whFUlg9zKbuHQCChaE 2mKwfHoBOdjkoM05yq92Q/s8ndcAFHyLnSK4WViTknLt8NVBgpn58MBXkUuiu+eUYbLDTJPbZIq6h cxQ5MBlnA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG2PP-0008Lt-J4; Wed, 09 Sep 2020 15:53:19 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG2PM-0008Kw-Mc for linux-arm-kernel@lists.infradead.org; Wed, 09 Sep 2020 15:53:17 +0000 Received: by mail-ed1-x543.google.com with SMTP id q21so3203873edv.1 for ; Wed, 09 Sep 2020 08:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tYTAx4l6f2u8KbHrEy5Rn6tgANLlely6K9NrAKkKaD4=; b=RfcRjolnslna7osjOO1TXCoghzNi2fKgyFZPEMSQax8YEU8v4535p5x6dM2zbOIX8K aGJX4vT0l4XB4cYXiNDKH+3JzRNjm3eijcTc7SfI9q1BpSt79VwY8JZjA17Leq2ZJjYD tOpHiKVDtUz2jt2C6HN0AItE24CYkZLmi72A1fJlHm2sL3JbaocWOehxQ156RbPQE4DY LBdCPb63BwhCd9tiQqsumCNyOc414IoPmrhnv6Dx6RngxPr4gNNW9DYbjhlC3gMkccSL 0WNDOoOdeaTUr5BMaP0jEDoAul/y2Yq5eI7X8LXVuiR4Tsj+mAF5IlR5CJZySYjOgH/B gTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tYTAx4l6f2u8KbHrEy5Rn6tgANLlely6K9NrAKkKaD4=; b=uNyB8XAqIe14ZBkBKFEYHSY1/4z1gjODl0P66bqfAWCcxXR6hvF+T2Dt+BA3FSkMdW 5ORLn3hx9ysVl8b7dZ8UTFP1ht12kPVlZ5jScPFTHHL2oSiVoKekwNxGiz0gzeor+0Up F2MMzGyMvhIVZPuwj4uM4pDa2Ch/5veoElxTi2Qsr0xhAV9bdT4ziEKkju+MMAfvEx/B IdP7VoMshj09PNB96NCK/rPIktN03je6JrUvgXbGC+KStpIt9tPKyWDdEKFk7/1HEqWR RxHjHothkSkxPnjJxdcp/5R0TWaudOvzTf35dX0CnEjWsWEzqcY1WcLJ7qjDd792B84B lyug== X-Gm-Message-State: AOAM531x77SbK+4ZiJf7zLBJ9yF9R77W1lcrp6EpXbCz5ZAxanIUCsCn ywXSu82zfOfLLmv721vPpIy2EzaSPU0IjwXxmgRbAg== X-Google-Smtp-Source: ABdhPJw/klL8m+jTWg8TN2b2YPUs5PNhV2M3PAJmM/yRQZlC76+0uLWD3k61ammc5irNXocl1b/iC7V5ejqeyp86R9g= X-Received: by 2002:aa7:dd4b:: with SMTP id o11mr4647541edw.251.1599666793751; Wed, 09 Sep 2020 08:53:13 -0700 (PDT) MIME-Version: 1.0 References: <20200904160018.29481-1-steven.price@arm.com> <20200904160018.29481-3-steven.price@arm.com> <20200909154804.mide6szbzgdy7jju@kamzik.brq.redhat.com> In-Reply-To: <20200909154804.mide6szbzgdy7jju@kamzik.brq.redhat.com> From: Peter Maydell Date: Wed, 9 Sep 2020 16:53:02 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] arm64: kvm: Introduce MTE VCPU feature To: Andrew Jones X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_115317_047384_C76932B6 X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , lkml - Kernel Mailing List , Juan Quintela , Catalin Marinas , Richard Henderson , QEMU Developers , Steven Price , arm-mail-list , Marc Zyngier , Thomas Gleixner , Will Deacon , kvmarm@lists.cs.columbia.edu, "Dr. David Alan Gilbert" , Dave Martin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 9 Sep 2020 at 16:48, Andrew Jones 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. You could add one if you wanted -- add a new feature bit TELL_ME_WHAT_YOU_HAVE. If the kernel sees that then on filure it clears out feature bits it doesn't support and also clears TELL_ME_WHAT_YOU_HAVE. If QEMU sees EINVAL and TELL_ME_WHAT_YOU_HAVE is still set, then it knows it's dealing with an old kernel and has to do one-at-a-time probing. If it sees EINVAL but not TELL_ME_WHAT_YOU_HAVE then it knows it has a new kernel and has just got all the info. -- PMM _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel