From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH V2] xen/x86: Clean up vm_event-related code in asm-x86/domain.h Date: Tue, 25 Aug 2015 22:47:56 +0100 Message-ID: <55DCE28C.2070009@citrix.com> References: <1439619810-27333-1-git-send-email-rcojocaru@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZUM52-0001dv-N3 for xen-devel@lists.xenproject.org; Tue, 25 Aug 2015 21:48:32 +0000 In-Reply-To: <1439619810-27333-1-git-send-email-rcojocaru@bitdefender.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: Razvan Cojocaru , xen-devel@lists.xenproject.org Cc: george.dunlap@eu.citrix.com, tamas@tklengyel.com, keir@xen.org, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 15/08/15 07:23, Razvan Cojocaru wrote: > As suggested by Jan Beulich, moved struct monitor_write_data from > struct arch_domain to struct arch_vcpu, as well as moving all > vm_event-related data from asm-x86/domain.h to struct vm_event, > and allocating it dynamically only when needed. > > Signed-off-by: Razvan Cojocaru Apologies - this fell off my radar while travelling. Looks fine, and also looks like a candidate for 4.6 as well? Just one comment. > diff --git a/xen/include/asm-x86/vm_event.h b/xen/include/asm-x86/vm_event.h > index 0ae5952..17ba4eb 100644 > --- a/xen/include/asm-x86/vm_event.h > +++ b/xen/include/asm-x86/vm_event.h > @@ -22,6 +22,18 @@ > #include > #include > > +/* > + * Should we emulate the next matching instruction on VCPU resume > + * after a vm_event? > + */ > +struct vm_event { This should be named arch_vm_event as it is an architecture specific header file, and lives in arch_vcpu. Otherwise, Reviewed-by: Andrew Cooper > + uint32_t emulate_flags; > + unsigned long gpa; > + unsigned long eip; > + struct vm_event_emul_read_data emul_read_data; > + struct monitor_write_data write_data; > +}; > + > int vm_event_init_domain(struct domain *d); > > void vm_event_cleanup_domain(struct domain *d);