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 9CBA9C4363C for ; Fri, 2 Oct 2020 16:24:54 +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 4BF4E206FA for ; Fri, 2 Oct 2020 16:24:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tUWRQCeV"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hFahE3Bh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BF4E206FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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: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=PYzcdMOzGMfrFSSfl3u59UvtdqffhRBAM6RRxyWrBO8=; b=tUWRQCeVYj3uJED8Tk/EXU9Zv nt+V3hafRPxs5jwKCeK7CuAtGVgjWVVMcFjqdX27viVZepoQ9FndEWr9KOKcFOLhY+3QvZYU0pB4o eXjn2V9JV2lPS1bdxLqMEClz38c7Baw7DfXwbhXcN9Jvsp7e61SB5UIsE83NeSOIv2TL0V7tDEizt W9nQN/oVghVo7cxcwl4txRrhCSX8a4DYmw3WHaDmQ+SctugJW14uwyOIFVIeMzIdT2BGT3QUH7Vd2 bkwtLnu2Bva7wootdDu0A71kp+t67ui2pXnQptjDo1NiUHAxixlbBlOrp0dav5U734X4NG7NYqZsT DNnVnUpaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kONqC-0003HK-60; Fri, 02 Oct 2020 16:23:28 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kONq6-0003Er-LQ for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 16:23:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601655801; 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=aye1Pb2hwY0JlLJorHYQNOa61uWEXTTAnRL28wGoWj4=; b=hFahE3Bh/hIFOH8/M6FzrAoPgM8XAB8OGJOzXMmbY2oZXheVquIIq+Y7TMtEb6XfOG2iq1 e/C5Kv6t9IkUd5XyvHrgruUIzvfNYRLJg23vi7LTE1HULwRfkFOlx905GfmMP5GoGPi5Bu YsuQmsCa9XBrKu1jyjB6cBJZwDF5jME= 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-562-I0rZ_L8FPfijpuy-niMAjw-1; Fri, 02 Oct 2020 12:23:20 -0400 X-MC-Unique: I0rZ_L8FPfijpuy-niMAjw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 16E2380364B; Fri, 2 Oct 2020 16:23:18 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.40.194.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAF145D9D3; Fri, 2 Oct 2020 16:23:13 +0000 (UTC) Date: Fri, 2 Oct 2020 18:23:10 +0200 From: Andrew Jones To: Steven Price Subject: Re: [PATCH v3 0/2] MTE support for KVM guest Message-ID: <20201002162310.zadgljfjl2uezys6@kamzik.brq.redhat.com> References: <20200925093607.3051-1-steven.price@arm.com> <20201002143640.uzsz3nhr45payhlb@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_122322_829623_E15B6B52 X-CRM114-Status: GOOD ( 32.49 ) 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: Mark Rutland , Peter Maydell , linux-kernel@vger.kernel.org, Haibo Xu , Juan Quintela , Catalin Marinas , Suzuki K Poulose , Richard Henderson , "Dr. David Alan Gilbert" , qemu-devel@nongnu.org, James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Thomas Gleixner , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry , 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 Fri, Oct 02, 2020 at 04:38:11PM +0100, Steven Price wrote: > On 02/10/2020 15:36, Andrew Jones wrote: > > On Fri, Sep 25, 2020 at 10:36:05AM +0100, Steven Price wrote: > > > Version 3 of adding MTE support for KVM guests. See the previous (v2) > > > posting for background: > > > > > > https://lore.kernel.org/r/20200904160018.29481-1-steven.price%40arm.com > > > > > > These patches add support to KVM to enable MTE within a guest. They are > > > based on Catalin's v9 MTE user-space support series[1] (currently in > > > next). > > > > > > Changes since v2: > > > > > > * MTE is no longer a VCPU feature, instead it is a VM cap. > > > > > > * Being a VM cap means easier probing (check for KVM_CAP_ARM_MTE). > > > > > > * The cap must be set before any VCPUs are created, preventing any > > > shenanigans where MTE is enabled for the guest after memory accesses > > > have been performed. > > > > > > [1] https://lore.kernel.org/r/20200904103029.32083-1-catalin.marinas@arm.com > > > > > > Steven Price (2): > > > arm64: kvm: Save/restore MTE registers > > > arm64: kvm: Introduce MTE VCPU feature > > > > > > arch/arm64/include/asm/kvm_emulate.h | 3 +++ > > > arch/arm64/include/asm/kvm_host.h | 7 +++++++ > > > arch/arm64/include/asm/sysreg.h | 3 ++- > > > arch/arm64/kvm/arm.c | 9 +++++++++ > > > arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 14 ++++++++++++++ > > > arch/arm64/kvm/mmu.c | 15 +++++++++++++++ > > > arch/arm64/kvm/sys_regs.c | 20 +++++++++++++++----- > > > include/uapi/linux/kvm.h | 1 + > > > 8 files changed, 66 insertions(+), 6 deletions(-) > > > > > > -- > > > 2.20.1 > > > > > > > > > > Hi Steven, > > > > These patches look fine to me, but I'd prefer we have a working > > implementation in QEMU before we get too excited about the KVM > > bits. kvmtool isn't sufficient since it doesn't support migration > > (at least afaik). In the past we've implemented features in KVM > > that look fine, but then issues have been discovered when trying > > to enable them from QEMU, where we also support migration. This > > feature looks like there's risk of issues with the userspace side. > > Although these two patches would probably stay the same, even if > > userspace requires more support. > > I agree kvmtool isn't a great test because it doesn't support migration. The > support in this series is just the basic support for MTE in a guest and we'd > need to wait for the QEMU implementation before deciding whether we need any > extra support (e.g. kernel interfaces for reading/writing tags as discussed > before). > > However, I don't think there's much danger of the support in this series > changing - so extra support can be added when/if it's needed, but I don't > think we need to block these series on that - QEMU can just probe for > whatever additional support it needs before enabling MTE in a guest. I plan > to rebase/repost after -rc1 when the user space support has been merged. > Fair enough, but it feels like we'll be merging half a feature, leaving the other half for somebody else to pick up later. Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel