Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757435AbcK3SGi (ORCPT ); Wed, 30 Nov 2016 13:06:38 -0500 Received: from mail-qk0-f174.google.com ([209.85.220.174]:33042 "EHLO mail-qk0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753112AbcK3SGa (ORCPT ); Wed, 30 Nov 2016 13:06:30 -0500 MIME-Version: 1.0 In-Reply-To: <7aad1d11-ef44-9d11-e7b5-c46f84aac5e5@redhat.com> References: <1480472050-58023-1-git-send-email-dmatlack@google.com> <7aad1d11-ef44-9d11-e7b5-c46f84aac5e5@redhat.com> From: David Matlack Date: Wed, 30 Nov 2016 10:05:59 -0800 Message-ID: Subject: Re: [PATCH v3 0/5] VMX Capability MSRs To: Paolo Bonzini Cc: kvm list , "linux-kernel@vger.kernel.org" , Jim Mattson , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1802 Lines: 48 On Wed, Nov 30, 2016 at 3:22 AM, Paolo Bonzini wrote: > > > On 30/11/2016 03:14, David Matlack wrote: >> This patchset adds support setting the VMX capability MSRs from userspace. >> This is required for migration of nested-capable VMs to different CPUs and >> KVM versions. >> >> Patch 1 generates the non-true VMX MSRs using the true MSRs, which allows >> userspace to skip restoring them. >> >> Patch 2 adds support for restoring the VMX capability MSRs. >> >> Patches 3 and 4 make KVM's emulation of MSR_IA32_VMX_CR{0,4}_FIXED1 more >> accurate. >> >> Patch 5 fixes a bug in emulated VM-entry that came up when testing patches >> 3 and 4. >> >> Changes since v2: >> * Generate CR0_FIXED1 in addition to CR4_FIXED1 >> * Generate "non-true" capability MSRs from the "true" versions and remove >> "non-true" MSRs from struct nested_vmx. >> * Disallow restore of CR{0,4}_FIXED1 and "non-true" MSRs since they are >> generated. >> >> Changes since v1: >> * Support restoring less-capable versions of MSR_IA32_VMX_BASIC, >> MSR_IA32_VMX_CR{0,4}_FIXED{0,1}. >> * Include VMX_INS_OUTS in MSR_IA32_VMX_BASIC initial value. >> >> David Matlack (5): >> KVM: nVMX: generate non-true VMX MSRs based on true versions >> KVM: nVMX: support restore of VMX capability MSRs >> KVM: nVMX: fix checks on CR{0,4} during virtual VMX operation >> KVM: nVMX: generate MSR_IA32_CR{0,4}_FIXED1 from guest CPUID >> KVM: nVMX: load GUEST_EFER after GUEST_CR0 during emulated VM-entry >> >> arch/x86/include/asm/vmx.h | 31 +++ >> arch/x86/kvm/vmx.c | 479 +++++++++++++++++++++++++++++++++++++-------- >> 2 files changed, 427 insertions(+), 83 deletions(-) > > Just a small nit that can be fixed on applying. Thanks! Thanks for the thorough review! > > Paolo