From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: fix bogus warning about reserved bits Date: Fri, 25 Sep 2015 09:49:42 +0200 Message-ID: <5604FC96.1010707@redhat.com> References: <1442910329-3357-1-git-send-email-pbonzini@redhat.com> <20150922175647.GC3568@pd.tnic> <5601C266.4060601@redhat.com> <20150923075635.GA3564@pd.tnic> <560272AF.40802@redhat.com> <56036C9C.9040709@linux.intel.com> <20150924101227.GA3774@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Borislav Petkov , Xiao Guangrong Return-path: In-Reply-To: <20150924101227.GA3774@pd.tnic> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 24/09/2015 12:12, Borislav Petkov wrote: > On Thu, Sep 24, 2015 at 11:23:08AM +0800, Xiao Guangrong wrote: >>> +static inline bool >>> +boot_cpu_is_amd(void) >>> +{ >>> + WARN_ON_ONCE(!tdp_enabled); >>> + return shadow_x_mask != 0; >> >> shadow_x_mask != 0 is Intel's CPU. >> >> Borislav, could you please check shadow_x_mask == 0 instead and test it again? > > That did the trick: > > [ 62.640392] kvm: zapping shadow pages for mmio generation wraparound > [ 63.100301] cpuid(0).ebx = 68747541 > [ 63.193426] kvm [3748]: vcpu0 unhandled rdmsr: 0xc0010112 > [ 64.538294] kvm [3748]: vcpu0 unhandled rdmsr: 0xc0011021 > [ 64.866263] kvm [3748]: vcpu1 unhandled rdmsr: 0xc0011021 > [ 64.971972] kvm [3748]: vcpu2 unhandled rdmsr: 0xc0011021 > [ 65.070376] kvm [3748]: vcpu3 unhandled rdmsr: 0xc0011021 > [ 65.170625] kvm [3748]: vcpu4 unhandled rdmsr: 0xc0011021 > [ 65.272838] kvm [3748]: vcpu5 unhandled rdmsr: 0xc0011021 > [ 65.374288] kvm [3748]: vcpu6 unhandled rdmsr: 0xc0011021 > [ 65.474825] kvm [3748]: vcpu7 unhandled rdmsr: 0xc0011021 > > That's all I got in dmesg from booting the guest - no more mmio PF > warnings. Great, though this doesn't yet explain why guest_cpuid_is_amd failed. I'll look into it next week when Amazon delivers my shiny new AMD mini-PC :) and send the patch to Linus meanwhile. Paolo