From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: monitor flag on native kvm tool guest Date: Thu, 01 Dec 2011 15:48:20 +0200 Message-ID: <4ED785A4.50308@redhat.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060203040809080804010905" Cc: kvm@vger.kernel.org, Sasha Levin To: Daniele Carollo Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2532 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754141Ab1LANsY (ORCPT ); Thu, 1 Dec 2011 08:48:24 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------060203040809080804010905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 12/01/2011 03:37 PM, Daniele Carollo wrote: > Hi, > my name's Daniele and I'm using the native linux kvm tool. > If I try to execute it in this way ./kvm run -d ~/linux-0.2.img I get > a kernel panic like this: http://paste.org/41673 > Only using the addictional option -p "idle=halt" I can run a virtual machine. > Printing cat /proc/cpuinfo on the host i get http://paste.org/41663 > and on the guest http://paste.org/41664 > Sashal from the native linux kvm tool team noticed that there is the > monitor cpu flag even on the guest. > from cpuid.c: /* cpuid 1.ecx */ const u32 kvm_supported_word4_x86_features = F(XMM3) | F(PCLMULQDQ) | 0 /* DTES64, MONITOR */ | so either the masking later on is subtly wrong, or kvm tool doesn't pass it on correctly, or Linux ignores it. Please run the attached program on the host and post its output. -- error compiling committee.c: too many arguments to function --------------060203040809080804010905 Content-Type: text/x-csrc; name="show-supported-cpuid.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="show-supported-cpuid.c" #include #include #include #include #include int main(void) { struct kvm_cpuid2 *cpuid; int kvm, r = 0, i, j; 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); return 1; } for (j = 0; j < cpuid->nent; ++j) { struct kvm_cpuid_entry2 *e = &cpuid->entries[j]; printf("func %08x ind %08x flags %08x -> %08x %08x %08x %08x\n", e->function, e->index, e->flags, e->eax, e->ebx, e->ecx, e->edx); } free(cpuid); close(kvm); return 0; } --------------060203040809080804010905--