kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
	"Paul Mackerras" <paulus@samba.org>
Subject: Re: [RFC PATCH] KVM: PPC: Book3S HV: add support for page faults in VM_IO|VM_PFNMAP vmas
Date: Mon, 12 Feb 2018 15:41:30 +0100	[thread overview]
Message-ID: <e9a0fad0-16a8-1fff-904e-0d10a98364f0@redhat.com> (raw)
In-Reply-To: <1518446319.2959.20.camel@kernel.crashing.org>

On 12/02/2018 15:38, Benjamin Herrenschmidt wrote:
> On Mon, 2018-02-12 at 12:01 +0100, Paolo Bonzini wrote:
>> On 12/02/2018 11:54, Benjamin Herrenschmidt wrote:
>>> On Mon, 2018-02-12 at 11:41 +0100, Paolo Bonzini wrote:
>>>> In fact I don't know about PPC but on x86 we actually do
>>>> write-protection except on the newest processors that have a dirty page
>>>> _log_ in addition to the bits.
>>>
>>> Can you explain ? I'm not sure I got what you mean here.
>>
>> On recent processors you can get an exit to the hypervisor every time N
>> dirty pages are marked dirty, and the processor also keeps a log of
>> _which_ pages are marked dirty.  Without the log, you'd have to walk the
>> entire radix tree to find the dirty pages, which is so expensive that
>> without the log we don't use dirty bits at all.
> 
> Oh interesting. How is that log "kept" ? Some kind of HW fifo ?

Yeah, forced vmexit after 512 dirty pages, plus a pointer to the last
written entry (kept in the hypervisor->processor communication block).
Pretty clever.

Paolo

  reply	other threads:[~2018-02-12 14:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 16:03 [RFC PATCH] KVM: PPC: Book3S HV: add support for page faults in VM_IO|VM_PFNMAP vmas Cédric Le Goater
2018-02-08 22:19 ` Benjamin Herrenschmidt
2018-02-09  7:14   ` Cédric Le Goater
2018-02-09 15:01     ` Paolo Bonzini
2018-02-09 21:44       ` Benjamin Herrenschmidt
2018-02-12  9:57         ` Paolo Bonzini
2018-02-12 10:33           ` Benjamin Herrenschmidt
2018-02-12 10:41             ` Paolo Bonzini
2018-02-12 10:54               ` Benjamin Herrenschmidt
2018-02-12 11:01                 ` Paolo Bonzini
2018-02-12 14:38                   ` Benjamin Herrenschmidt
2018-02-12 14:41                     ` Paolo Bonzini [this message]
2018-02-09 21:54     ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9a0fad0-16a8-1fff-904e-0d10a98364f0@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=clg@kaod.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).