Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1050599rwb; Thu, 18 Aug 2022 17:58:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6D1s2GNIczV64TQL1YyBZJY4gGeY2edFQ2Bvs3DPQmgIQS4o5gLAh0PmcRQRQSCgUYMMfk X-Received: by 2002:aa7:8890:0:b0:52e:de90:7338 with SMTP id z16-20020aa78890000000b0052ede907338mr5409584pfe.46.1660870691511; Thu, 18 Aug 2022 17:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660870691; cv=none; d=google.com; s=arc-20160816; b=sNYeC0qjJ3XPbiDdHlKoFYpLPdskrOuEkQjHTqaFGsbiV/5avky2mg3zH4Vu2PpyVi GngT22D5qVP5uI0ENhBteZhkxzbE8mnj6cKbzfiTJ+ERJPeMgieyXbGXoZNLFq1KEE6n QZcS0P8HgvczHY0yP6VIeKOrqSEHofpWx0JgN1Yt8ItHhnCHC2iGcA85EXWavZKUdw/M zryRfBiecDUtyGOs6Keh8NpSaR9ZaSMOgduJ5m7zFjNJVsLZB0QWkEDaEuJy+kSvZpnu TXyJ86HkFNB//G4p7WO02ypR4VL9ABo1l2/rUeGmnHJ1Pb2MZwakpcTCoO5ul72KxEZN ny1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0mjtjKvaCKjFD+8hWTDMS94mOG+sVGwcb17W8u/FnUA=; b=p1bw7UtdRGHSlfc9GDnhGN9z70QwQ9CX0o6qae4fU3ggeRnEnyXLVKb1R9rRcprGAw CAq3QtCcGglkwi4ND32s6jwD+pXwNwF6YRrvwysmvLHDhgbw+UQEPTO9xoEmMr2HdFFf HY4uHFd/RpaSYQJWzjqfk8iTd49TCVHCjCJ1AczRXdj5+uwmHioGe2197PcISXjfx6dn soSEqe35WyA3mpKpyKYoZgoSwPpv6dFpSe/sgKXH/V0DYv0A+xroZ4tWEnQi5/ZwaTYX uG3YU0kbhI8VH9JG3vR65PkTmVAMZvJ8BqI+7YjmZmMjGflEHdXOkrt/iRQu9Q+UhvsC fBwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OJewxCy1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a635504000000b00429a2aad7a6si2473208pgb.167.2022.08.18.17.57.59; Thu, 18 Aug 2022 17:58:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OJewxCy1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243277AbiHSA4w (ORCPT + 99 others); Thu, 18 Aug 2022 20:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242143AbiHSA4s (ORCPT ); Thu, 18 Aug 2022 20:56:48 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77743DF0A5 for ; Thu, 18 Aug 2022 17:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660870606; 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: content-transfer-encoding:content-transfer-encoding; bh=0mjtjKvaCKjFD+8hWTDMS94mOG+sVGwcb17W8u/FnUA=; b=OJewxCy1v8Jz/cUhkSlzoPZf8k7hqb0KPRfKOrPPwnc50VefmSxrXV+WXvcYUSwEIqwZ1H CIIZYADXCbsBMRVrifPcabMzIKY2huZzuODnGp+jeN3u5QLBf6VGQF78z+ADrHzVynr2ZZ GLjZyzhm/Ippj8PyZsLPtS5vsSX/VYA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317--evnGzXCP_CdJVefZLfQyg-1; Thu, 18 Aug 2022 20:56:42 -0400 X-MC-Unique: -evnGzXCP_CdJVefZLfQyg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D370802D2C; Fri, 19 Aug 2022 00:56:41 +0000 (UTC) Received: from gshan.redhat.com (vpn2-54-16.bne.redhat.com [10.64.54.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51086C15BB8; Fri, 19 Aug 2022 00:56:31 +0000 (UTC) From: Gavin Shan To: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, peterx@redhat.com, pbonzini@redhat.com, corbet@lwn.net, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org, seanjc@google.com, drjones@redhat.com, dmatlack@google.com, bgardon@google.com, ricarkol@google.com, zhenyzha@redhat.com, shan.gavin@gmail.com Subject: [PATCH v1 0/5] KVM: arm64: Enable ring-based dirty memory tracking Date: Fri, 19 Aug 2022 08:55:56 +0800 Message-Id: <20220819005601.198436-1-gshan@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series enables the ring-based dirty memory tracking for ARM64. The feature has been available and enabled on x86 for a while. It is beneficial when the number of dirty pages is small in a checkpointing system or live migration scenario. More details can be found from fb04a1eddb1a ("KVM: X86: Implement ring-based dirty memory tracking"). The generic part has been comprehensive enough, meaning there isn't too much work, needed to extend it to ARM64. - PATCH[1] enables the feature on ARM64 - PATCH[2-5] improves kvm/selftests/dirty_log_test Testing ======= - kvm/selftests/dirty_log_test - Live migration by QEMU - Host with 4KB or 64KB base page size Gavin Shan (5): KVM: arm64: Enable ring-based dirty memory tracking KVM: selftests: Use host page size to map ring buffer in dirty_log_test KVM: selftests: Dirty host pages in dirty_log_test KVM: selftests: Clear dirty ring states between two modes in dirty_log_test KVM: selftests: Automate choosing dirty ring size in dirty_log_test Documentation/virt/kvm/api.rst | 2 +- arch/arm64/include/uapi/asm/kvm.h | 1 + arch/arm64/kvm/Kconfig | 1 + arch/arm64/kvm/arm.c | 8 ++ tools/testing/selftests/kvm/dirty_log_test.c | 101 ++++++++++++++----- tools/testing/selftests/kvm/lib/kvm_util.c | 2 +- 6 files changed, 88 insertions(+), 27 deletions(-) -- 2.23.0