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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5565CC636D4 for ; Fri, 17 Feb 2023 04:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc: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=+MqUNm288y/iFbA8VKg6AX84M/6HBh+DghOZ6MP+YY8=; b=ExIM7ariVzsMRA MVxdGvqh54JdoG+ii9j721IKRN/JaeKoEA2ysR+fHkKvDY1EG0gsfeKB1t9YcBzU08diFCKAtFWcf /QXOl9s9jCODATSd5FL1Q80iDI1XWCGXeuJ0fz9c8qImc4v0fwrapZ5SATLbXCqSVI6TwZUL+B9DU YbHwb9lWN9s5R2Z1eeTqRPlttT4/FhsqS/R0KRpGFu93euP4CU/WM1h05RfxMfvzvz+rNRmO6O9Ji ypvKCqUjFeERT7b28QMUrmfxzboTWvwpvy9c5HYWbgn60VCfnYp/P8iltlqtP5rXhyJ95DjvALl17 SZ+sToxTr2313NADrH5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSsIk-00Cf4H-3N; Fri, 17 Feb 2023 04:24:50 +0000 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSsIh-00Cf35-0Y for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 04:24:48 +0000 Received: by mail-vs1-xe2a.google.com with SMTP id m1so4326493vst.7 for ; Thu, 16 Feb 2023 20:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PJu4vps/ydzm+bD68RapcHOeOMmzQwBmAiW7NmBj0zU=; b=N9QazQscN5/bMrTwGxOfAtM8xQD0zg2C7V00UxsuXtYfAz5LVfV9yZkceaMx30llQS MbtMbGZSrDyQ8f+5wFmT5KPHG7yoVHYuRGjV/K+K1/YBzfts3DWsIWEL2wK13NHsBONL 3WSw5YTZ0a5gR+5SW3CY0ht9ZWgZiEHmWxeYTUfbfTwp27jM0ayQIQmuMeH32n16zCMS LlHALD1+pwPBgt3KwWvli37N4+ulQIAdwqaKEMOyIYnaNF0PxJI5iNKryPEMJ1JxgseD cL+jVcKxymHBK7RZixjBM3EahjNXB2uD4wOmYf/cmuvuGiqT2+UiebhqO4obZD3C2vfh jyHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PJu4vps/ydzm+bD68RapcHOeOMmzQwBmAiW7NmBj0zU=; b=BvZpWRuQrPpfL0qngRniJr+lOYZkV8kmERejjuCA4r2BpEroS5VLFW7lbYSZQay8bX ZkMzLqZx3xTCQ+aPTGs97DeoghWeazztbwrUXZINLHennMbfGL3GK5r41yB6Cq/sX3kk jZDjdBHfUutECGA02RjEsiiMOrogqglDufIja1jUUEo0pgD6g1wqlUtBtx9FdYffVMJP RCh58mBbyF+7X1m1OKFPn6iGNMJKnS/CXvQI+LRs4znpv7GL26tx1uilP0qGeEc3m7vI gm+u/d2TMY/W4H7qt5Wd4Etfh3tb8YqlmCfsbCsHNdLFaLQjvzWuNNhUrBrh34FH5uNg TRcg== X-Gm-Message-State: AO0yUKXLdQF8tGsx/AhIuONVsEDGwueVFrR9+OgRiduoGcPiaW1Mblye Nfcvziw/NvHAkG2/7uGD1a9cjx1fdl5pgw+bp1xF0A== X-Google-Smtp-Source: AK7set+Yem2rWelUagYff1NdlU4Jg460e39X+mAJEfXHa9zcbTd/sITo7f0UTvcIS0NfZcWWeb2tTMWiIhTxmfPdL/A= X-Received: by 2002:a67:cf47:0:b0:411:c1a0:c787 with SMTP id f7-20020a67cf47000000b00411c1a0c787mr1603908vsm.26.1676607885989; Thu, 16 Feb 2023 20:24:45 -0800 (PST) MIME-Version: 1.0 References: <20230217041230.2417228-1-yuzhao@google.com> <20230217041230.2417228-5-yuzhao@google.com> In-Reply-To: <20230217041230.2417228-5-yuzhao@google.com> From: Yu Zhao Date: Thu, 16 Feb 2023 21:24:09 -0700 Message-ID: Subject: Re: [PATCH mm-unstable v1 4/5] kvm/powerpc: add kvm_arch_test_clear_young() To: Michael Ellerman , Nicholas Piggin , Christophe Leroy Cc: Jonathan Corbet , Michael Larabel , kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mm@google.com, Andrew Morton , Paolo Bonzini X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_202447_075205_2297FAC9 X-CRM114-Status: GOOD ( 15.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not nested and run on hardware with Radix MMU enabled. > > It relies on two techniques, RCU and cmpxchg, to safely test and clear > the accessed bit without taking the MMU lock. The former protects KVM > page tables from being freed while the latter clears the accessed bit > atomically against both the hardware and other software page table > walkers. > > Signed-off-by: Yu Zhao > --- > arch/powerpc/include/asm/kvm_host.h | 18 ++++++ > arch/powerpc/include/asm/kvm_ppc.h | 14 +---- > arch/powerpc/kvm/book3s.c | 7 +++ > arch/powerpc/kvm/book3s.h | 2 + > arch/powerpc/kvm/book3s_64_mmu_radix.c | 78 +++++++++++++++++++++++++- > arch/powerpc/kvm/book3s_hv.c | 10 ++-- > 6 files changed, 110 insertions(+), 19 deletions(-) Adding Michael, Nicholas and Christophe. I'm not sure who I should add for this patch. Can you please add any interested parties that I've missed? Thank you. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel