From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755578AbbCRJSr (ORCPT ); Wed, 18 Mar 2015 05:18:47 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33845 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753351AbbCRJSo (ORCPT ); Wed, 18 Mar 2015 05:18:44 -0400 Message-ID: <550942ED.4040809@redhat.com> Date: Wed, 18 Mar 2015 10:18:37 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stefan Bader , kvm@vger.kernel.org, Linux Kernel Mailing List Subject: Re: regression: nested: L1 3.15+ fails to load kvm-intel on L0 <3.15 References: <55093B52.5090904@canonical.com> In-Reply-To: <55093B52.5090904@canonical.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/03/2015 09:46, Stefan Bader wrote: > > Regardless of that, I wonder whether the below (this version untested) sound > acceptable for upstream? At least it would make debugging much simpler. :) > > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2953,8 +2953,11 @@ static __init int adjust_vmx_controls(u32 ctl_min, u32 ct > ctl |= vmx_msr_low; /* bit == 1 in low word ==> must be one */ > > /* Ensure minimum (required) set of control bits are supported. */ > - if (ctl_min & ~ctl) > + if (ctl_min & ~ctl) { > + printk(KERN_ERR "vmx: msr(%08x) does not match requirements. " > + "req=%08x cur=%08x\n", msr, ctl_min, ctl); > return -EIO; > + } > > *result = ctl; > return 0; Yes, this is nice. Maybe -ENODEV. Also, a minimal patch for Ubuntu would probably be: @@ -2850,7 +2851,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) vmx_capability.ept, vmx_capability.vpid); } - min = 0; + min = VM_EXIT_SAVE_DEBUG_CONTROLS; #ifdef CONFIG_X86_64 min |= VM_EXIT_HOST_ADDR_SPACE_SIZE; #endif but I don't think it's a good idea to add it to stable kernels. Paolo