From: Christoffer Dall <christoffer.dall@linaro.org>
To: Mario Smarduch <m.smarduch@samsung.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com,
drjones@redhat.com, wei@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] arm, arm64: KVM: handle potential incoherency of readonly memslots
Date: Sat, 22 Nov 2014 11:18:35 +0100 [thread overview]
Message-ID: <20141122101835.GJ3401@cbox> (raw)
In-Reply-To: <546FEBF3.6030401@samsung.com>
On Fri, Nov 21, 2014 at 05:50:43PM -0800, Mario Smarduch wrote:
> On 11/21/2014 03:19 AM, Christoffer Dall wrote:
> > Hi Mario,
> >
> > On Wed, Nov 19, 2014 at 03:32:31PM -0800, Mario Smarduch wrote:
> >> Hi Laszlo,
> >>
> >> couple observations.
> >>
> >> I'm wondering if access from qemu and guest won't
> >> result in mixed memory attributes and if that's acceptable
> >> to the CPU.
> >>
> >> Also is if you update memory from qemu you may break
> >> dirty page logging/migration. Unless there is some other way
> >> you keep track. Of course it may not be applicable in your
> >> case (i.e. flash unused after boot).
> >>
> > I'm not concerned about this particular case; dirty page logging exists
> > so KVM can inform userspace when a page may have been dirtied. If
> > userspace directly dirties (is that a verb?) a page,
> I would think so, I rely on software too much :)
> > then it already knows that it needs to migrate that page and
> > deal with it accordingly.
> >
> > Or did I miss some more subtle point here
>
> QEMU has a global migration bitmap for all regions initially set
> dirty, and it's updated over iterations with KVM's dirty bitmap. Once
> dirty pages are migrated bits are cleared. If QEMU updates a
> memory region directly I can't see how it's reflected in that migration
> bitmap that determines what pages should be migrated as it makes
> it's passes. On x86 if host updates guest memory it marks that
> page dirty.
>
> But virtio writes to guest memory directly and that appears to
> work just fine. I read that code sometime back, and will need to revisit.
>
In any case, that's a QEMU implementation issue and nothing the kernel
needs to be concerned with.
-Christoffer
next prev parent reply other threads:[~2014-11-22 10:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 14:58 [PATCH 1/3] kvm: add a memslot flag for incoherent memory regions Ard Biesheuvel
2014-11-17 14:58 ` [PATCH 2/3] arm, arm64: KVM: allow forced dcache flush on page faults Ard Biesheuvel
2014-11-17 14:58 ` [PATCH 3/3] arm, arm64: KVM: handle potential incoherency of readonly memslots Ard Biesheuvel
2014-11-17 15:29 ` Paolo Bonzini
2014-11-17 15:39 ` Marc Zyngier
2014-11-17 16:03 ` Paolo Bonzini
2014-11-17 15:49 ` Laszlo Ersek
2014-11-19 23:32 ` Mario Smarduch
2014-11-20 8:08 ` Laszlo Ersek
2014-11-20 18:35 ` Mario Smarduch
2014-11-20 18:40 ` Peter Maydell
2014-11-20 19:15 ` Mario Smarduch
2014-11-20 19:49 ` Jon Masters
2014-11-20 20:10 ` Peter Maydell
2014-11-20 21:13 ` Laszlo Ersek
2014-11-20 21:59 ` Peter Maydell
2014-11-21 11:19 ` Christoffer Dall
2014-11-22 1:50 ` Mario Smarduch
2014-11-22 10:18 ` Christoffer Dall [this message]
2014-11-22 10:26 ` Laszlo Ersek
2014-11-22 12:27 ` Peter Maydell
2014-11-19 8:51 ` Ard Biesheuvel
2014-11-19 11:02 ` Paolo Bonzini
2014-11-19 11:03 ` Paolo Bonzini
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=20141122101835.GJ3401@cbox \
--to=christoffer.dall@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=lersek@redhat.com \
--cc=m.smarduch@samsung.com \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=wei@redhat.com \
/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