From: "Jan Beulich" Subject: Re: [PATCH RFC V6 2/5] xen: Optimize introspection access to guest state Date: Tue, 12 Aug 2014 16:01:48 +0100 Message-ID: <53EA487C020000780002BB3A@mail.emea.novell.com> References: <1407769686-7918-1-git-send-email-rcojocaru@bitdefender.com> <1407769686-7918-2-git-send-email-rcojocaru@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1407769686-7918-2-git-send-email-rcojocaru@bitdefender.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: kevin.tian@intel.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 11.08.14 at 17:08, wrote: > Speed optimization for introspection purposes: a handful of registers > are sent along with each mem_event. This requires enlargement of the > mem_event_request / mem_event_response stuctures, and additional code > to fill in relevant values. Since the EPT event processing code needs > more data than CR3 or MSR event processors, hvm_mem_event_fill_regs() > fills in less data than p2m_mem_event_fill_regs(), in order to avoid > overhead. Struct hvm_hw_cpu has been considered instead of the custom > struct mem_event_regs_st, but its size would cause quick filling up > of the mem_event ring buffer. > > Changes since V1: > - Replaced guest_x86_mode with cs_arbytes in the mem_event_regs_st > structure. > - Removed superfluous preprocessor check for __x86_64__ in > p2m_mem_event_fill_regs(). > > Changes since V2: > - Removed inline function compiler suggestions. > - Removed superfluous memset(&ctxt, 0, sizeof(struct hvm_hw_cpu)). > - Padded struct mem_event_regs_st. > - Renamed mem_event_regs_t to mem_event_regs. > - Readability changes. > > Changes since V3: > - Changed the name of VCPU variables referring to the current > VCPU to "curr". > - Renamed "mem_event_regs" to "x86_mem_event_regs" to make it > explicit. > > Changes since V4: > - Renamed "x86_mem_event_regs" to "mem_event_regs_x86" and > removed a typedef. > > Changes since V5: > - Const-correctness. > > Signed-off-by: Razvan Cojocaru Acked-by: Jan Beulich