qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Wei Huang <wei@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Juan Quintela <quintela@redhat.com>,
	Andrew Jones <drjones@redhat.com>
Subject: Re: [Qemu-devel] [PATCH V1 1/1] tests: Add migration test for aarch64
Date: Fri, 26 Jan 2018 19:46:00 +0000	[thread overview]
Message-ID: <20180126194559.GI2610@work-vm> (raw)
In-Reply-To: <CAFEAcA_9HJBETLvsUs9dk=Hw-G_eswNt3R+o+fs70vM9buAeBA@mail.gmail.com>

* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 26 January 2018 at 15:47, Wei Huang <wei@redhat.com> wrote:
> >
> >
> > On 01/25/2018 02:05 PM, Dr. David Alan Gilbert wrote:
> >> * Wei Huang (wei@redhat.com) wrote:
> >>> innerloop:
> >>>         /* clean cache because el2 might still cache guest data under KVM */
> >>>         dc      civac, x2
> >>
> >> Can you explain a bit more about that please;  if it's guest
> >> visible acorss migration, doesn't that suggest we need the cache clear
> >> in KVM or QEMU?
> >
> > I think this is ARM specific. This is caused by the inconsistency
> > between guest VM's data accesses and userspace's accesses (in
> > check_guest_ram) at the destination:
> >
> > 1) Because uncacheable (guest) + cacheable (host) ==> uncacheable. So
> > the data accesses from guest VM go directly into memory.
> > 2) QEMU user space will use the cacheable version. So it is possible
> > that data can come from cache, instead of RAM. The difference between
> > (1) and (2) obviously can cause check_guest_ram() to fail sometimes.
> 
> I think the correct fix here is that your test code should turn
> its MMU on. Trying to treat guest RAM as uncacheable doesn't work
> for Arm KVM guests (for the same reason that VGA device video memory
> doesn't work). If it's RAM your guest has to arrange to map it as
> Normal Cacheable, and then everything should work fine.

Does this cause problems with migrating at just the wrong point during
a VM boot?

Dave

> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  parent reply	other threads:[~2018-01-26 19:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 21:22 [Qemu-devel] [PATCH V1 1/1] tests: Add migration test for aarch64 Wei Huang
2018-01-25 20:05 ` Dr. David Alan Gilbert
2018-01-26 15:47   ` Wei Huang
2018-01-26 16:39     ` Peter Maydell
2018-01-26 17:08       ` Wei Huang
2018-01-26 19:46       ` Dr. David Alan Gilbert [this message]
2018-01-28 15:08         ` Peter Maydell
2018-01-29  9:53           ` Dr. David Alan Gilbert
2018-01-29 10:04             ` Peter Maydell
2018-01-29 10:19               ` Dr. David Alan Gilbert
2018-01-29 10:32               ` Marc Zyngier
2018-01-31  9:53                 ` Christoffer Dall
2018-01-31 15:18                   ` Ard Biesheuvel
2018-01-31 15:23                     ` Dr. David Alan Gilbert
2018-01-31 16:53                     ` Christoffer Dall
2018-01-31 16:59                       ` Ard Biesheuvel
2018-01-31 17:39                         ` Christoffer Dall
2018-01-31 18:00                           ` Ard Biesheuvel
2018-01-31 19:12                             ` Christoffer Dall
2018-01-31 20:15                               ` Ard Biesheuvel
2018-02-01  9:17                                 ` Christoffer Dall
2018-02-01  9:33                                   ` Ard Biesheuvel
2018-02-01  9:59                                     ` Christoffer Dall
2018-02-01 10:09                                       ` Ard Biesheuvel
2018-02-01 10:42                                       ` Andrew Jones
2018-02-01 10:48                                         ` Christoffer Dall
2018-02-01 12:25                                           ` Andrew Jones
2018-02-01 14:04                                             ` Christoffer Dall
2018-02-01 20:01     ` Dr. David Alan Gilbert

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=20180126194559.GI2610@work-vm \
    --to=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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;
as well as URLs for NNTP newsgroup(s).