From: Laszlo Ersek <lersek@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset
Date: Thu, 14 Aug 2014 01:44:02 +0200 [thread overview]
Message-ID: <53EBF842.9080604@redhat.com> (raw)
In-Reply-To: <53EBF211.1030701@redhat.com>
On 08/14/14 01:17, Laszlo Ersek wrote:
> - With KVM, the lack of loading MTRR state from KVM, combined with the
> (partial) storing of MTRR state to KVM, has two consequences:
> - migration invalidates (loses) MTRR state,
I'll concede that migration *already* loses MTRR state (on KVM), even
before your patch. On the incoming host, the difference is that
pre-patch, the guest continues running (after migration) with MTRRs in
the "initial" KVM state, while post-patch, the guest continues running
after an explicit zeroing of the variable MTRR masks and the deftype.
I admit that it wouldn't be right to say that the patch "causes" MTRR
state loss.
With that, I think I've actually convinced myself that your patch is
correct:
The x86_cpu_reset() hunk is correct in any case, independently of KVM
vs. TCG. (On TCG it even improves MTRR conformance.) Splitting that hunk
into a separate patch might be worthwhile, but not overly important.
The kvm_put_msrs() hunk forces a zero write to the variable MTRR
PhysMasks and the DefType, on both reset and on incoming migration. For
reset, this is correct behavior. For incoming migration, it is not, but
it certainly shouldn't qualify as a regression, relative to the current
status (where MTRR state is simply lost and replaced with initial MTRR
state on the incoming host).
I think the above "end results" could be expressed more clearly in the
code, but I'm already wondering if you'll ever talk to me again, so I'm
willing to give my R-b if you think that's useful... :)
(Again, I might be wrong, easily.)
Thanks
Laszlo
next prev parent reply other threads:[~2014-08-13 23:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 19:09 [Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset Alex Williamson
2014-08-13 20:33 ` Laszlo Ersek
2014-08-13 22:06 ` Alex Williamson
2014-08-13 23:17 ` Laszlo Ersek
2014-08-13 23:44 ` Laszlo Ersek [this message]
2014-08-14 15:08 ` Alex Williamson
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=53EBF842.9080604@redhat.com \
--to=lersek@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.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).