From patchwork Mon Oct 26 15:57:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Price X-Patchwork-Id: 11857669 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E6756A2 for ; Mon, 26 Oct 2020 16:01:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 303FB20706 for ; Mon, 26 Oct 2020 16:01:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 303FB20706 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX4vv-0001sK-3e for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Oct 2020 12:01:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX4sY-0006Ic-3A for qemu-devel@nongnu.org; Mon, 26 Oct 2020 11:57:50 -0400 Received: from foss.arm.com ([217.140.110.172]:35860) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX4sV-0005CS-8O for qemu-devel@nongnu.org; Mon, 26 Oct 2020 11:57:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0E5F11042; Mon, 26 Oct 2020 08:57:40 -0700 (PDT) Received: from e112269-lin.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7EC673F719; Mon, 26 Oct 2020 08:57:37 -0700 (PDT) From: Steven Price To: Catalin Marinas , Marc Zyngier , Will Deacon Subject: [PATCH v4 0/2] MTE support for KVM guest Date: Mon, 26 Oct 2020 15:57:25 +0000 Message-Id: <20201026155727.36685-1-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=217.140.110.172; envelope-from=steven.price@arm.com; helo=foss.arm.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/26 11:57:40 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Maydell , "Dr. David Alan Gilbert" , Andrew Jones , Haibo Xu , Suzuki K Poulose , qemu-devel@nongnu.org, Dave Martin , Juan Quintela , Richard Henderson , linux-kernel@vger.kernel.org, Steven Price , James Morse , Julien Thierry , Thomas Gleixner , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This series adds support for Arm's Memory Tagging Extension (MTE) to KVM, allowing KVM guests to make use of it. This builds on the existing user space support already in v5.10-rc1, see [1] for an overview. [1] https://lwn.net/Articles/834289/ Changes since v3[2]: * Rebased on v5.10-rc1 (required updating KVM_CAP number). * Clarified redundant test for system_supports_mte() with a comment. * Added Reviewed-by tags from Andrew - thanks! [2] https://lore.kernel.org/r/20200925093607.3051-1-steven.price%40arm.com Haibo plans to start looking at the QEMU support for this. I believe what is in this series should be sufficient, but there is still some concern that we need more kernel support for easily accessing the tags for migrating the VM. I don't expect any extra support to change the interfaces defined here, but rather build on them. My only reservation would be whether we want to expose the KVM_CAP before everything is ready. 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 | 20 ++++++++++++++++++++ arch/arm64/kvm/sys_regs.c | 20 +++++++++++++++----- include/uapi/linux/kvm.h | 1 + 8 files changed, 71 insertions(+), 6 deletions(-)