From patchwork Wed Mar 18 08:46:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 6037021 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2FF3BF90F for ; Wed, 18 Mar 2015 08:46:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5F63204E0 for ; Wed, 18 Mar 2015 08:46:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CE99204D9 for ; Wed, 18 Mar 2015 08:46:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754946AbbCRIqY (ORCPT ); Wed, 18 Mar 2015 04:46:24 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:34276 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbbCRIqV (ORCPT ); Wed, 18 Mar 2015 04:46:21 -0400 Received: from 1.general.smb.uk.vpn ([10.172.193.28]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YY9cI-00031h-LX; Wed, 18 Mar 2015 08:46:18 +0000 Message-ID: <55093B52.5090904@canonical.com> Date: Wed, 18 Mar 2015 09:46:10 +0100 From: Stefan Bader User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: kvm@vger.kernel.org, Linux Kernel Mailing List , Paolo Bonzini Subject: regression: nested: L1 3.15+ fails to load kvm-intel on L0 <3.15 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Someone reported[1] that some of their L1 guests fail to load the kvm-intel module (without much details). Turns out that this was (at least) caused by KVM: vmx: Allow the guest to run with dirty debug registers as this adds VM_EXIT_SAVE_DEBUG_CONTROLS to the required MSR_IA32_VMX_EXIT_CTLS bits. Not sure this should be fixed up in pre 3.15 kernels or the other way round. Maybe naively asked but would it be sufficient to add this as required to older kernels vmcs setup (without the code to make any use of it)? Regardless of that, I wonder whether the below (this version untested) sound acceptable for upstream? At least it would make debugging much simpler. :) Thanks, -Stefan [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1431473 --- 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;