public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: David Evensky <evensky@dancer.ca.sandia.gov>
Cc: Pekka Enberg <penberg@kernel.org>,
	kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
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	[thread overview]
Message-ID: <1321544629.8010.9.camel@lappy> (raw)
In-Reply-To: <20111117153833.GA5915@dancer.ca.sandia.gov>

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 <levinsasha928@gmail.com> 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 <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <linux/kvm.h>

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.


  reply	other threads:[~2011-11-17 15:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17  0:42 kvm-tools: can't seem to set guest_mac and KVM_GET_SUPPORTED_CPUID failed David Evensky
2011-11-17  6:07 ` Sasha Levin
2011-11-17  6:53   ` Pekka Enberg
2011-11-17  6:56     ` Sasha Levin
2011-11-17  9:04       ` Avi Kivity
2011-11-17 10:08         ` Sasha Levin
2011-11-17 15:38       ` David Evensky
2011-11-17 15:43         ` Sasha Levin [this message]
2011-11-17 15:50           ` David Evensky
2011-11-17 15:52             ` Sasha Levin
2011-11-17 15:53               ` Avi Kivity
2011-11-17 16:12                 ` David Evensky
2011-11-17 16:20                   ` Sasha Levin
2011-11-17 16:20                   ` Avi Kivity
2011-11-17 16:29                     ` David Evensky
2011-11-17 16:49                       ` Avi Kivity
2011-11-17 17:13                         ` David Evensky
2011-11-17 17:30                           ` Avi Kivity
2011-11-17 15:55   ` David Evensky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321544629.8010.9.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=avi@redhat.com \
    --cc=evensky@dancer.ca.sandia.gov \
    --cc=kvm@vger.kernel.org \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox