From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI2k6-00048S-SA for qemu-devel@nongnu.org; Thu, 14 Aug 2014 17:39:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XI2k0-0001bS-O2 for qemu-devel@nongnu.org; Thu, 14 Aug 2014 17:39:30 -0400 From: Alex Williamson Date: Thu, 14 Aug 2014 15:39:21 -0600 Message-ID: <20140814213751.16881.91600.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH v3 0/3] Sync MTRRs with KVM and disable on reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kvm@vger.kernel.org Cc: lersek@redhat.com, qemu-stable@nongnu.org v3: - Fix off-by-one identified by Laszlo in 2/3 - Add R-b in 1 & 3 It turns out that not only do we not follow the SDM guidelines for reseting MTRR state on vCPU reset, but we really don't even attempt to keep KVM MTRR state synchronized with QEMU, which affects not only reset, but migration. This series implements the get/put MSR support for KVM, then goes on to properly re-initialize the state on vCPU reset. This resolves the problem described in the last patch as well as some potential mismatches around migration. The migration state is unchanged, other than actually passing valid data. Thanks to Laszlo for his help debugging this and realization of how terribly broken MTRR synchronization is. Thanks, Alex --- Alex Williamson (3): x86: Clear MTRRs on vCPU reset x86: kvm: Add MTRR support for kvm_get|put_msrs() x86: Use common variable range MTRR counts target-i386/cpu.c | 10 +++++ target-i386/cpu.h | 4 +- target-i386/kvm.c | 101 ++++++++++++++++++++++++++++++++++++++++++++++++- target-i386/machine.c | 2 - 4 files changed, 113 insertions(+), 4 deletions(-)