From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH RFC 2/9] xen: Optimize introspection access to guest state Date: Mon, 07 Jul 2014 17:50:07 +0300 Message-ID: <53BAB39F.9040007@bitdefender.com> References: <1404308041-15461-1-git-send-email-rcojocaru@bitdefender.com> <1404308041-15461-2-git-send-email-rcojocaru@bitdefender.com> <53B425B4.3010808@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B425B4.3010808@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , xen-devel@lists.xen.org Cc: tim@xen.org List-Id: xen-devel@lists.xenproject.org On 07/02/2014 06:31 PM, Andrew Cooper wrote: > On 02/07/14 14:33, Razvan Cojocaru 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. >> >> Signed-off-by: Razvan Cojocaru > > The public API already has struct hvm_hw_cpu in > xen/include/public/arch-x86/hvm/save.h > > It might be better to reuse that rather than defining a new structure to > contain a subset of the information. While reinspecting the code to accommodate the critique - the reason why I've not used struct hvm_hw_cpu back when I initially wrote the patch is that sizeof(struct hvm_hw_cpu) is considerably larger that the size of our custom struct. Using hvm_hw_cpu would have filled the mem_event ring buffer fast, with each mem_event carrying an instance of it around. Thanks, Razvan Cojocaru