From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed. Date: Thu, 17 Nov 2011 17:43:49 +0200 Message-ID: <1321544629.8010.9.camel@lappy> References: <20111117004246.GA1694@dancer.ca.sandia.gov> <1321510055.4221.5.camel@lappy> <1321512998.4221.7.camel@lappy> <20111117153833.GA5915@dancer.ca.sandia.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , kvm@vger.kernel.org, Avi Kivity To: David Evensky Return-path: Received: from mail-ww0-f42.google.com ([74.125.82.42]:62842 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932196Ab1KQPnx (ORCPT ); Thu, 17 Nov 2011 10:43:53 -0500 Received: by wwe3 with SMTP id 3so3501769wwe.1 for ; Thu, 17 Nov 2011 07:43:52 -0800 (PST) In-Reply-To: <20111117153833.GA5915@dancer.ca.sandia.gov> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2011-11-17 at 07:38 -0800, David Evensky wrote: > On Thu, Nov 17, 2011 at 08:56:38AM +0200, Sasha Levin wrote: > > On Thu, 2011-11-17 at 08:53 +0200, Pekka Enberg wrote: > > > On Thu, Nov 17, 2011 at 8:07 AM, Sasha Levin wrote: > > > >> Also, when I start the guest I sometimes get the following error message: > > .... > > > > David, which host kernel do you use? > > I'm using the kernel that ships with Debian Sid, which I last booted as 3.0.0-2-amd64. > My guest kernel is a 32bit kernel built from kernel.org's linux-3.0.8. Hm... This should be new enough... Could you please try compiling and running the code below several times and see if you get an error message? This should help us understand if it's a usermode or a kernel issue. Thanks! ------------ cut here--------------- #include #include #include #include #include int main(void) { struct kvm_cpuid2 *cpuid; int kvm, r = 0; kvm = open("/dev/kvm", O_RDWR); cpuid = malloc(sizeof(*cpuid) + sizeof(struct kvm_cpuid_entry2) * 100); cpuid->nent = 100; r = ioctl(kvm, KVM_GET_SUPPORTED_CPUID, cpuid); if (r) printf("KVM_GET_SUPPORTED_CPUID returned %d with errno %d\n", r, errno); else printf("Returned entries: %d\n", cpuid->nent); free(cpuid); close(kvm); return 0; } -- Sasha.