Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1862929pxb; Thu, 4 Nov 2021 09:43:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM2Ybfw0S6eAf+h12gYurqyk938TKbSLWwMBXDVwsR41hufq7PLixF+TJNuI+SIbJKqVo0 X-Received: by 2002:a05:6602:2812:: with SMTP id d18mr37000481ioe.53.1636044201389; Thu, 04 Nov 2021 09:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636044201; cv=none; d=google.com; s=arc-20160816; b=r2UBP/B2fQh+H6KtFo8b5+XzVythWvIJqwEpNE/GdayNSvaauKOQXTdKL/JO2tm+Bv eHW/2oHqOuhgV1jDBrGnqfFhKyAs8cnlJf0zJBp18G5sVgSQMjq10cQofxCjMzQ8xCJm 84UKQGAxdXdeNGKFS2+MRZ9H4rjj6FnnGxsvIcM8+2bMS1h6xzJGU2CAir0HfHNxb/NV eAdj8btZOUk5xrdWQNv0tt/7oWP6Ngr+QjFkFT1nZzXMW7l/Jx8izo7CNNMduzRnhQyK zglHG9UAFSrMjH8VStJLBC05pVU7xeoS/bK27CL2RCDOXR3n5uuu374vNW7AvVKkTpl5 4P+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :reply-to:dkim-signature; bh=B/Zu1r2lWoaGRs4vZ4DYzM83YZYEZ7XIPjfjvmaVSuQ=; b=VBUYN//YqDbnkvFl7LI7ux2m7G0YcNMj+EVyXaxTyh85V72p4Klj3lqi7hCOBvT/3p ZyLLePPamZJoivBDuFJedzxUMjeNeMifm6Auq/gfh+Hbdpzo8Kb0C1wahwZLakjWhq7r X+gfbT6HTA7wGq4AKANREStKdq59i6WLX8P6gNUjTvaysjzcSgBMnk2JP7428CiW0O2f SyJO9jXphDqObDnv58zQa0w1nStrTAHkf5Wd0aNlfHRQ5YijHUV/Ej2rtzBNipVu+xKv JBmR5XUnqm55MDawrOtr+ehboXm8IF2p+2zZL9gGFu60ltFw1l5jpN14Y7pLHeSawO5E EIdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ki3AaxqF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si7239416ilm.150.2021.11.04.09.42.45; Thu, 04 Nov 2021 09:43:21 -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=@google.com header.s=20210112 header.b=ki3AaxqF; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbhKDQn4 (ORCPT + 99 others); Thu, 4 Nov 2021 12:43:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbhKDQny (ORCPT ); Thu, 4 Nov 2021 12:43:54 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF966C061714 for ; Thu, 4 Nov 2021 09:41:15 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id n13-20020a170902d2cd00b0014228ffc40dso2481302plc.4 for ; Thu, 04 Nov 2021 09:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:message-id:mime-version:subject:from:to:cc; bh=B/Zu1r2lWoaGRs4vZ4DYzM83YZYEZ7XIPjfjvmaVSuQ=; b=ki3AaxqFOvGvvbJJZVr35PCVsFHsUCxZqbsEF1iDWMjKZKRWHNVpZlaeyll1xDRuqZ Fe9NsSq5NdIlDhb0JLDZfyM4lzNAJm+sMyKu7XG3OZnwhCX0lDAr0jFvnCTVlBd7Rlcf 91yoEX88+q6nDsjG+XcTr8pjIQnVgIspEYZF36luc29Bya+BC7bNTBu763VhyOSfxu1/ ZjYG+aZ9p9yMtavbux/GVKKU3aGIISPuiv5jHwBtGmAL06kN/HT7OfW5saTVeBTigG3Q 3Ld0kCq2NzU5RRSSR7+xT2EDJ1GsS8+HpmW85Q3Hm2ukUg6jrEEJgklHclpTDmpPrHOL OSCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:message-id:mime-version:subject :from:to:cc; bh=B/Zu1r2lWoaGRs4vZ4DYzM83YZYEZ7XIPjfjvmaVSuQ=; b=nXfBIMu9XlBK4INhPlttEq1D5AagJq9hR87+vPumldTsmEx8XPL4Fbq+n8a4DPws4I WXo9G5VvDLnJ4m4O62dMDPygZkib7leR07DGqceVG0ygA0fivF3DJW73O6VyjkS3SdYg SAR2znf8ZAwSFjhoHjFi53EjSB04KN56I0exIr7U01AeUlGK4xa8GUJ3FjkgxY70AY6G MmPQHXjC2Rw3TB309Ge7kAi+jRUw4X2bSEcAYEOK45/is+iMXoFb3Kykqy9r5/j63uFH vaY/fqz46ArM1ZnFOGST+r2Y0qR9zhhD2VyGtoU9afQeuioFsZusunNlN/Ow6qUKIalu 94kA== X-Gm-Message-State: AOAM530MY1mNDRQiDhGtRrnh/EIybQEd/WzTq48VqedSQkwYJ1FD2xr2 VhPM+DnEs09isC/EzsfSPq0A9ft5dFA= X-Received: from seanjc.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e5]) (user=seanjc job=sendgmr) by 2002:a62:1bcc:0:b0:480:fcb7:76a9 with SMTP id b195-20020a621bcc000000b00480fcb776a9mr34631165pfb.22.1636044075227; Thu, 04 Nov 2021 09:41:15 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 4 Nov 2021 16:41:05 +0000 Message-Id: <20211104164107.1291793-1-seanjc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.34.0.rc0.344.g81b53c2807-goog Subject: [PATCH 0/2] KVM: RISC-V: MMU bug fix and cleanup From: Sean Christopherson To: Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Atish Patra , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Sean Christopherson Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bug fix and a cleanup for things I noticed by inspection when working on the scalable memslots series. Regarding the fix, unless there's a magic unmapping hiding in the corners of the MMU, RISC-V completely fails to handle memslot DELETE or MOVE. Compile tested only. Sean Christopherson (2): KVM: RISC-V: Unmap stage2 mapping when deleting/moving a memslot KVM: RISC-V: Use common KVM implementation of MMU memory caches arch/riscv/include/asm/kvm_host.h | 10 +---- arch/riscv/include/asm/kvm_types.h | 2 +- arch/riscv/kvm/mmu.c | 70 ++++++++---------------------- arch/riscv/kvm/vcpu.c | 5 ++- 4 files changed, 22 insertions(+), 65 deletions(-) -- 2.34.0.rc0.344.g81b53c2807-goog