Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3259961pxj; Mon, 10 May 2021 23:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9/deUuKTSlhv1r9Mgu7e24gnthbfzD4wMqXf5LyyEOBX3Il43tZ+wKASOzmCuKylMHnj/ X-Received: by 2002:a17:906:cc5d:: with SMTP id mm29mr29484634ejb.362.1620715943902; Mon, 10 May 2021 23:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620715943; cv=none; d=google.com; s=arc-20160816; b=tQU02NFGTESF1IJOSI2+C1mzXz0cmS1a11HwOJe+oWHBqf/SOA0xLrtyjrQyeBSY0F ZXNTtNVKSd6DTPX9aHvF3/9qT69XOfLOouK20Ox92B480zYhINsmu759ghH6RwGJ/qYc znfmkStf/qaFnKxPTYiDD0x1T/ssOWwVUjeARDBux91dziOOMK8B1UemsywLgbTePMPs PDUGndAncZlZkaAJ3oxwMsNhRh8UL2QBis+u81Lx7E5htPSuy8rTSUWRMPHc8Hb0g0Vp 7BGFwm/49/eS039hNGk69Zhqn6GpRb5/Ll4F+WT8Lk5bjnVL5Rg9Ip+A0PnpJwtRat/i +tqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=XuW35qDWctDiXyz8DrlL81LH4zpya/vAt3kl8c8GUpo=; b=IfT0N6amIW5Dc7lYhpY3W2wkjENiDAzX6gyJo57ZjZxLaAgo1+Mg+6XW2lxbKBJs54 8XTZgEf/iGC3zYOEjTKjucfU82aV1EQqQsp+Ehg0IIonASe/JhX6BkFao3ZYfL023Q9m ia0wxJDXaIpmHDUAVUGWL2HcMMPLxQEnBGxS81r3kMv2CP4SCYzySAaNJBI7u+UtV2IQ p6CnxantzCJLWEuB4Xk6pippif6lun4EgfRK8ash2ifpeLWpklGG2PcRk46V5ocfKH7R QbLMkH35+I9sToCkXVbxiBg3G9YlJ09qh8YDxlV58Qq/fupgrPja6B1/NvphVDPw2zSx W1EQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt7si15992938ejb.446.2021.05.10.23.51.58; Mon, 10 May 2021 23:52:23 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbhEKGui (ORCPT + 99 others); Tue, 11 May 2021 02:50:38 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:2440 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhEKGuh (ORCPT ); Tue, 11 May 2021 02:50:37 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FfT3t4RqZzCr86; Tue, 11 May 2021 14:46:50 +0800 (CST) Received: from [10.174.187.224] (10.174.187.224) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 14:49:21 +0800 Subject: Re: [PATCH v3 0/2] KVM: x86: Enable dirty logging lazily for huge pages To: , , Paolo Bonzini , Sean Christopherson , Ben Gardon References: <20210429034115.35560-1-zhukeqian1@huawei.com> CC: From: Keqian Zhu Message-ID: Date: Tue, 11 May 2021 14:49:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20210429034115.35560-1-zhukeqian1@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.187.224] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping. ^_^ On 2021/4/29 11:41, Keqian Zhu wrote: > Hi, > > Currently during start dirty logging, if we're with init-all-set, > we write protect huge pages and leave normal pages untouched, for > that we can enable dirty logging for these pages lazily. > > Actually enable dirty logging lazily for huge pages is feasible > too, which not only reduces the time of start dirty logging, also > greatly reduces side-effect on guest when there is high dirty rate. > > Thanks, > Keqian > > Changelog: > > v3: > - Discussed with Ben and delete RFC comments. Thanks. > > Keqian Zhu (2): > KVM: x86: Support write protect gfn with min_level > KVM: x86: Not wr-protect huge page with init_all_set dirty log > > arch/x86/kvm/mmu/mmu.c | 38 ++++++++++++++++++++++++++------- > arch/x86/kvm/mmu/mmu_internal.h | 3 ++- > arch/x86/kvm/mmu/page_track.c | 2 +- > arch/x86/kvm/mmu/tdp_mmu.c | 16 ++++++++++---- > arch/x86/kvm/mmu/tdp_mmu.h | 3 ++- > arch/x86/kvm/x86.c | 37 +++++++++----------------------- > 6 files changed, 57 insertions(+), 42 deletions(-) >