Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751557AbdCATrc (ORCPT ); Wed, 1 Mar 2017 14:47:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47284 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbdCATr3 (ORCPT ); Wed, 1 Mar 2017 14:47:29 -0500 Date: Wed, 1 Mar 2017 20:08:07 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Jim Mattson Cc: Dmitry Vyukov , Paolo Bonzini , KVM list , LKML , Steve Rutherford , Xiao Guangrong , haozhong.zhang@intel.com, syzkaller Subject: Re: kvm: WARNING in nested_vmx_merge_msr_bitmap Message-ID: <20170301190806.GC17506@potion> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 01 Mar 2017 19:08:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1371 Lines: 27 2017-02-28 13:07-0800, Jim Mattson: > I believe this happens when the VMCS12 MSR bitmap address is valid, > but no device is configured to respond to the bus request. I agree > that the warning should be removed. However, in this case, the VMCS12 > MSR bitmap should read as all 1s. The same is true everywhere that > nested_get_page returns NULL. Reads should return all 1s and writes > should be ignored. Yes, we have already checked that the address is within physical limits and page-aligned. After that, any errors seem like undefined behavior. Going to do a bare-metal check and send a patch, thanks. > On Tue, Feb 28, 2017 at 11:06 AM, Dmitry Vyukov wrote: >> >> ------------[ cut here ]------------ >> WARNING: CPU: 0 PID: 7832 at arch/x86/kvm/vmx.c:9709 >> warn_slowpath_null+0x2c/0x40 kernel/panic.c:583 >> nested_vmx_merge_msr_bitmap arch/x86/kvm/vmx.c:9709 [inline] >> nested_get_vmcs12_pages+0xfb6/0x15c0 arch/x86/kvm/vmx.c:9640 >> enter_vmx_non_root_mode arch/x86/kvm/vmx.c:10471 [inline] >> nested_vmx_run+0x6186/0xaab0 arch/x86/kvm/vmx.c:10561 >> >> If I am reading this correctly, failure to map msr bitmap is trivially >> trigger-able by guest (specify an invalid address?) and thus should >> not be a warning. The case is already handled by disabling >> acceleration. So can we remove the warning? or replace with pr_err?