From patchwork Tue May 28 11:49:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyrill Gorcunov X-Patchwork-Id: 2624181 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 45EC8DFB78 for ; Tue, 28 May 2013 11:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933304Ab3E1LvJ (ORCPT ); Tue, 28 May 2013 07:51:09 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:64361 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933225Ab3E1LvC (ORCPT ); Tue, 28 May 2013 07:51:02 -0400 Received: by mail-lb0-f169.google.com with SMTP id 10so7695522lbf.0 for ; Tue, 28 May 2013 04:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:user-agent:date:from:to:cc:subject:references :content-disposition; bh=PI7eH3GnugHcMzsHC/mTYDyUiEfgIKAM967t/GNZqy4=; b=oGvSta+g1GQWw8You7RQWu+kgwjV2DOlN/P+qVC1R2+6ok2bubghICS0g31Q3yvFta Trp75NN4jEVJoePgPa0Rpj9E8PrLyHrA3sj20+ujxYUZ+Mi6TN+eByGvGaD2iArkLA4K GcF8jsuCHA5byWlRVrdOy2yNqcvwzg/OV/J9yDWh1BvktqTVY0fjtNY4QZ9+GLhcCoOI tMpSYelDDkSW6WdyZ8o7cU066S5HZzs2iqjSSoYS+FdBmLCnH/Dhziw77EfVWRFRpQey enKSLbAmo7LKVoPzCwqB9dxZWPmCCccrQn5gPotUqj+uXFIkPhmUzKESKtmL1xP77U4E bK8A== X-Received: by 10.152.29.195 with SMTP id m3mr3244079lah.35.1369741860744; Tue, 28 May 2013 04:51:00 -0700 (PDT) Received: from moon.localdomain ([188.134.39.132]) by mx.google.com with ESMTPSA id w3sm13692166lae.7.2013.05.28.04.50.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 28 May 2013 04:50:59 -0700 (PDT) Received: by moon.localdomain (Postfix, from userid 1000) id 9D80D840326; Tue, 28 May 2013 15:50:58 +0400 (MSK) Message-Id: <20130528115058.538288937@openvz.org> User-Agent: quilt/0.60-1 Date: Tue, 28 May 2013 15:49:44 +0400 From: Cyrill Gorcunov To: Pekka Enberg Cc: mingo@kernel.org, sasha.levin@oracle.com, asias@redhat.com, kvm@vger.kernel.org, Cyrill Gorcunov Subject: [patch 2/2] tools: lkvm - Filter out cpu vendor string References: <20130528114942.157262069@openvz.org> Content-Disposition: inline; filename=kvm-cpuid Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org If cpuvendor string is not filetered in case of host amd machine we get unhandled msr reads | [1709265.368464] kvm: 25706: cpu6 unhandled rdmsr: 0xc0010048 | [1709265.397161] kvm: 25706: cpu7 unhandled rdmsr: 0xc0010048 | [1709265.425774] kvm: 25706: cpu8 unhandled rdmsr: 0xc0010048 thus provide own string and kernel will use generic cpu init. Reported-by: Ingo Molnar CC: Pekka Enberg CC: Sasha Levin CC: Asias He Signed-off-by: Cyrill Gorcunov --- tools/kvm/x86/cpuid.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6.git/tools/kvm/x86/cpuid.c =================================================================== --- linux-2.6.git.orig/tools/kvm/x86/cpuid.c +++ linux-2.6.git/tools/kvm/x86/cpuid.c @@ -12,6 +12,7 @@ static void filter_cpuid(struct kvm_cpuid2 *kvm_cpuid) { + unsigned int signature[3]; unsigned int i; /* @@ -21,6 +22,13 @@ static void filter_cpuid(struct kvm_cpui struct kvm_cpuid_entry2 *entry = &kvm_cpuid->entries[i]; switch (entry->function) { + case 0: + /* Vendor name */ + memcpy(signature, "LKVMLKVMLKVM", 12); + entry->ebx = signature[0]; + entry->ecx = signature[1]; + entry->edx = signature[2]; + break; case 1: /* Set X86_FEATURE_HYPERVISOR */ if (entry->index == 0)