From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: APIC: avoid instruction emulation for EOI writes Date: Mon, 29 Aug 2011 11:51:20 +0300 Message-ID: <4E5B5308.6010402@redhat.com> References: <625BA99ED14B2D499DC4E29D8138F15063045B0C0C@shsmsx502.ccr.corp.intel.com> <4E5B3E7F.9030507@redhat.com> <625BA99ED14B2D499DC4E29D8138F15063045B0CFA@shsmsx502.ccr.corp.intel.com> <1314605756.29761.17.camel@sasha> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Tian, Kevin" , "kvm@vger.kernel.org" , "Nakajima, Jun" , "Dong, Eddie" , Marcelo Tosatti To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129Ab1H2IvZ (ORCPT ); Mon, 29 Aug 2011 04:51:25 -0400 In-Reply-To: <1314605756.29761.17.camel@sasha> Sender: kvm-owner@vger.kernel.org List-ID: On 08/29/2011 11:15 AM, Sasha Levin wrote: > > > > +#define APIC_ACCESS_TYPE_W 1 /* Linear write access during inst execution */ > > static int handle_apic_access(struct kvm_vcpu *vcpu) > > { > > + unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); > > + int access_type, offset; > > + > > + access_type = (exit_qualification>> 12)& 0xf; > > + offset = exit_qualification& 0xfff; > > Maybe it's worth moving that #define above, and '#define'ing all the > magic that happens in these 2 lines in vmx.h along with all the other > exit qualification parameters? Sure, that's what vmx.h is for. And 0xfff is ~PAGE_MASK. -- error compiling committee.c: too many arguments to function