From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: event injection MACROs Date: Wed, 13 May 2009 12:49:25 +0300 Message-ID: <4A0A97A5.7070508@redhat.com> References: <9832F13BD22FB94A829F798DA4A8280501A80F02A3@pdsmsx503.ccr.corp.intel.com> <20090503105330.GL9795@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A81A8E83@pdsmsx503.ccr.corp.intel.com> <20090508095336.GD25357@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A81A8EFE@pdsmsx503.ccr.corp.intel.com> <9832F13BD22FB94A829F798DA4A8280501A81A8F02@pdsmsx503.ccr.corp.intel.com> <20090508122358.GF25357@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A81A8F2B@pdsmsx503.ccr.corp.intel.com> <20090508184417.GA27255@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A81A9078@pdsmsx503.ccr.corp.intel.com> <4A07C304.2000208@redhat.com> <9832F13BD22FB94A829F798DA4A8280501B24E54F0@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Dong, Eddie" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:56156 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757263AbZEMJt5 (ORCPT ); Wed, 13 May 2009 05:49:57 -0400 In-Reply-To: <9832F13BD22FB94A829F798DA4A8280501B24E54F0@pdsmsx503.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Dong, Eddie wrote: > I noticed the MACRO for SVM vmcb->control.event_inj and VMX VM_EXIT_INTR_INFO are almost same, I have a need to query the event injection situation in common code so plan to expose this register read/write to x86.c. Should we define a new format for evtinj/VM_EXIT_INTR_INFO as common KVM format, or just move those original MACRO to kvm_host.h? > > This is dangerous if additional bits or field values are defined by either architecture. Better to use accessors. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.