From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: [PATCH] KVM: Fix MAXPHYADDR calculation when cpuid does not support it Date: Sun, 11 Apr 2010 16:53:07 +0300 Message-ID: <4BC1D443.4010702@cs.helsinki.fi> References: <1270989212-3117-1-git-send-email-avi@redhat.com> <4BC1CF54.4020804@cs.helsinki.fi> <4BC1CFBC.5060406@redhat.com> <4BC1D005.5090203@cs.helsinki.fi> <4BC1D26E.9080706@cs.helsinki.fi> <4BC1D339.20704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from courier.cs.helsinki.fi ([128.214.9.1]:38983 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718Ab0DKNxO (ORCPT ); Sun, 11 Apr 2010 09:53:14 -0400 In-Reply-To: <4BC1D339.20704@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > On 04/11/2010 04:45 PM, Pekka Enberg wrote: >> Pekka Enberg wrote: >>> Avi Kivity wrote: >>>>> Hmm, doesn't seem to work here. I still that triple fault in guest. >>>> >>>> Can you add a printk to see what value is returned and why? >>> >>> Argh, it's a off-by one bug in my userspace tool... So the CPU really >>> does support 0x80000008 and I'm just an idiot. :-) >> >> So to explain this a bit more: I'm setting 0x80000000 to 0x80000008 >> but failing to install an entry for 0x80000008. I don't quite >> understand why kvm_find_cpuid_entry() doesn't return NULL in this case? > > cpuid is defined to return the highest entry if it doesn't find a match. OK, then it's a bug of my own doing and we don't need to do anything in the kernel. Pekka