From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Using MSR Load/Store Areas Date: Sun, 05 Jul 2009 11:02:57 +0300 Message-ID: <4A505E31.8000007@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: Sehrawat Nipun Return-path: Received: from mx2.redhat.com ([66.187.237.31]:52691 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbZGEIAu (ORCPT ); Sun, 5 Jul 2009 04:00:50 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 07/04/2009 12:42 AM, Sehrawat Nipun wrote: > Hi Everyone, > > I am trying to use the MSR load and store areas in vmx. I did following: > > 1. Setting vm_entry_msr_load_count: > > vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, 1); > > 2. Setting up vm_entry_msr_load_addr : > > static struct page *vmx_msr_load; > > Then in vmx_init() : > > vmx_msr_load = alloc_page(GFP_KERNEL | __GFP_HIGHMEM); > Don't use highmem for pages you give to vmx -- some implementations only support 32-bit physical addresses. > va=kmap(vmx_msr_load); > memset(va, MSR_P6_PERFCTR0, 32); /*Bits 31:0 contain msr's address*/ > This doesn't do what you think it does. Look at the resulting memory pattern. Use ordinary assignment instead. -- error compiling committee.c: too many arguments to function