Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp417490ybl; Mon, 2 Dec 2019 12:45:02 -0800 (PST) X-Google-Smtp-Source: APXvYqw40vYQsuSek/Un83odbNEBT4V1F7jgHfQKOpLhJ0oQt5d4ShLUbwTdz5jgYeRXQ6N8f2DO X-Received: by 2002:a05:6830:12d0:: with SMTP id a16mr771742otq.8.1575319502288; Mon, 02 Dec 2019 12:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575319502; cv=none; d=google.com; s=arc-20160816; b=Q+DT1g5fjfpTz6AylAzyRIGLA9KCZL7Po6KsO9DPmtUL8WW1hJ3sf4WouCRgmntvoL +ZQ7AToj5kYJVZkUHBVfcZ7JmVrGw0CRukakAIcgCcq2lk6MWNcBA7EAP0YY9KIie5YU CS6SS75d1IsQH+MH4diPrkKcmnp30P2wrLerATsHcTiM8AV7e0mmi2dNP0MyBTzSp7C0 SrFzPDm3AfLNpUtzCNUphjKhuyTLF1h3wVNsQQ2grWzgmu+LtdM9ugpQJenbH1fMBy7x dgjAaWF2YZT3DsFPlFWjHLd7AmzSbNsoeo1sAm48FJ4cQ27MFBP0YZDROo3Ge87gT7Rp fO/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+4Ittu/hSmdCI2AmJTvWeXqR6mPDprHDT/ECsEOFBW8=; b=Oda/wRt773qzeNT+l/vU7YD/2Y3UCGCRUvmLAbyv+FbrTXr/DQk+o42qJdbtAOpPw0 +6rYwJStofXKsgeh3O8Y+f1ypDjJTfNdKOyT2oR/xWyoDPfLjNbuM8mZi/iO20Dm+/NZ zN2P/memU2prsAeT2tu9dpOVZpbzUhEEZbuvPpgv/cWjwoAgNKi5e9UgjPTGF9Vv1C80 Bvf6/9erZtJB0NdYEHFJXuQ9IX9OK7zLq7Wcy5S3qYnw4J7J87WMNi3mKimMQprn0rKr r0kQOd9FTNuRPzwiBGLH5qqHYmt4/nwCUmNYjleDGsmnw2HtKw1totys8d6jrtXTvSMB 6alg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DF+7cSLV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t184si190537oig.184.2019.12.02.12.44.50; Mon, 02 Dec 2019 12:45:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DF+7cSLV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1725899AbfLBUny (ORCPT + 99 others); Mon, 2 Dec 2019 15:43:54 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:36999 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725853AbfLBUny (ORCPT ); Mon, 2 Dec 2019 15:43:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575319433; 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: in-reply-to:in-reply-to:references:references; bh=+4Ittu/hSmdCI2AmJTvWeXqR6mPDprHDT/ECsEOFBW8=; b=DF+7cSLV2P7mtzazvIh3kCoWZ3wP7TRZkKQ676BVtaf8zMMrHRgYUdvSa5IGxdFcn5r8CP YIZbZ3z7ruH2cA+hwdkgs8YCx0pYAHk7cFTCIBbMUvjmJ7OdgG9qkq5rp3+jOmf0TkKTX2 dOh6Va476lSMdrn9UWnCWKeL+SdUtYw= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-58-_8VivcW4PYi1t23xw-pDHA-1; Mon, 02 Dec 2019 15:43:46 -0500 Received: by mail-qv1-f69.google.com with SMTP id g9so589554qvx.12 for ; Mon, 02 Dec 2019 12:43:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=USlZJP//e42ZzE68GTx4OckfDz65LYntsCtyMUYxiWU=; b=RjHrbB31+9uWS2+vkn3wabmcaMOahAH5oGySjuslNN/oEEtuq3bZk1ZS+XWJfslOU/ K4R7Ui7nntyzcCLGkp5v/o6/sZ0WRVoiwoS1e5BhphU4I7/fgT0fVVia9VznWZdxsdQb LmoQAu6YZEWypzXm4osNqbl2c8tzNeGqB4RYvHiuD6nUTDmiUW9JOGEymbW80ltZTK6g QiZRS5YgAy5s0hvJPdRCi4UltFIF3FOzqYAv8LNB1XvqRncwP2/YJbkJroB6e4JOPj7K 5Z8HzJg3esLsD2eE7v5cLE0njvEBGVRUXVlB72Qtuy0abufiJj00pIT0qe4QuBd+VCdi 1cZQ== X-Gm-Message-State: APjAAAXgwK9SjGjIsKBWf4u0VFr1HRLELakLIBpsZ0FPnK2nhCffyYVv CLBr0HZfUix7z7uLxziKt2b4EQKXUnDEGEFs6Eoe1EfxK7+y6XjoW2af7/xxDo0jDP5fb64xy4O vPyPMh4rB2hcWX+K04A9JmV/J X-Received: by 2002:a37:8185:: with SMTP id c127mr984218qkd.43.1575319426231; Mon, 02 Dec 2019 12:43:46 -0800 (PST) X-Received: by 2002:a37:8185:: with SMTP id c127mr984192qkd.43.1575319425943; Mon, 02 Dec 2019 12:43:45 -0800 (PST) Received: from xz-x1 ([104.156.64.74]) by smtp.gmail.com with ESMTPSA id l7sm395150qtf.84.2019.12.02.12.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 12:43:45 -0800 (PST) Date: Mon, 2 Dec 2019 15:43:44 -0500 From: Peter Xu To: Sean Christopherson Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "Dr . David Alan Gilbert" , Vitaly Kuznetsov Subject: Re: [PATCH RFC 00/15] KVM: Dirty ring interface Message-ID: <20191202204344.GB31681@xz-x1> References: <20191129213505.18472-1-peterx@redhat.com> <20191202202119.GK4063@linux.intel.com> MIME-Version: 1.0 In-Reply-To: <20191202202119.GK4063@linux.intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-MC-Unique: _8VivcW4PYi1t23xw-pDHA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 02, 2019 at 12:21:19PM -0800, Sean Christopherson wrote: > On Sat, Nov 30, 2019 at 09:29:42AM +0100, Paolo Bonzini wrote: > > Hi Peter, > >=20 > > thanks for the RFC! Just a couple comments before I look at the series > > (for which I don't expect many surprises). > >=20 > > On 29/11/19 22:34, Peter Xu wrote: > > > I marked this series as RFC because I'm at least uncertain on this > > > change of vcpu_enter_guest(): > > >=20 > > > if (kvm_check_request(KVM_REQ_DIRTY_RING_FULL, vcpu)) { > > > vcpu->run->exit_reason =3D KVM_EXIT_DIRTY_RING_FULL; > > > /* > > > * If this is requested, it means that we've > > > * marked the dirty bit in the dirty ring BUT > > > * we've not written the date. Do it now. > > > */ > > > r =3D kvm_emulate_instruction(vcpu, 0); > > > r =3D r >=3D 0 ? 0 : r; > > > goto out; > > > } > >=20 > > This is not needed, it will just be a false negative (dirty page that > > actually isn't dirty). The dirty bit will be cleared when userspace > > resets the ring buffer; then the instruction will be executed again and > > mark the page dirty again. Since ring full is not a common condition, > > it's not a big deal. >=20 > Side topic, KVM_REQ_DIRTY_RING_FULL is misnamed, it's set when a ring goe= s > above its soft limit, not when the ring is actually full. It took quite = a > bit of digging to figure out whether or not PML was broken... Yeah it's indeed a bit confusing. Do you like KVM_REQ_DIRTY_RING_COLLECT? Pair with KVM_EXIT_DIRTY_RING_COLLECT. Or, suggestions? --=20 Peter Xu