From patchwork Thu Aug 26 09:22:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 134091 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o7Q9MKk2030414 for ; Thu, 26 Aug 2010 09:22:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726Ab0HZJWS (ORCPT ); Thu, 26 Aug 2010 05:22:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307Ab0HZJWS (ORCPT ); Thu, 26 Aug 2010 05:22:18 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7Q9MIBx008824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Aug 2010 05:22:18 -0400 Received: from [127.0.1.1] (dhcp-65-37.nay.redhat.com [10.66.65.37]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7Q9MFx7014191; Thu, 26 Aug 2010 05:22:16 -0400 Subject: [PATCH kvm-unit-tests v2 08/10] Do not check cr8 access when running in 32 bit To: mtosatti@redhat.com, avi@redhat.com, kvm@vger.kernel.org From: Jason Wang Date: Thu, 26 Aug 2010 17:22:15 +0800 Message-ID: <20100826092215.1690.46419.stgit@FreeLancer> In-Reply-To: <20100826091520.1690.44200.stgit@FreeLancer> References: <20100826091520.1690.44200.stgit@FreeLancer> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 26 Aug 2010 09:22:21 +0000 (UTC) diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..84c384d 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -49,6 +49,7 @@ static void vmcall(void) #define MSR_EFER 0xc0000080 #define EFER_NX_MASK (1ull << 11) +#ifdef __x86_64__ static void mov_from_cr8(void) { unsigned long cr8; @@ -62,6 +63,7 @@ static void mov_to_cr8(void) asm volatile ("mov %0, %%cr8" : : "r"(cr8)); } +#endif static int is_smp(void) { @@ -100,8 +102,10 @@ static struct test { } tests[] = { { cpuid_test, "cpuid", .parallel = 1, }, { vmcall, "vmcall", .parallel = 1, }, +#ifdef __x86_64__ { mov_from_cr8, "mov_from_cr8", .parallel = 1, }, { mov_to_cr8, "mov_to_cr8" , .parallel = 1, }, +#endif { inl_pmtimer, "inl_from_pmtimer", .parallel = 1, }, { ipi, "ipi", is_smp, .parallel = 0, }, { ipi_halt, "ipi+halt", is_smp, .parallel = 0, },