From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH V3] xen/vm_event: Clean up control-register-write vm_events Date: Tue, 19 May 2015 11:35:57 +0300 Message-ID: <555AF5ED.2050303@bitdefender.com> References: <1432024319-3452-1-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: <1432024319-3452-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: xen-devel@lists.xen.org Cc: kevin.tian@intel.com, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, jun.nakajima@intel.com, ian.jackson@eu.citrix.com, tim@xen.org, eddie.dong@intel.com, jbeulich@suse.com, andrew.cooper3@citrix.com, keir@xen.org List-Id: xen-devel@lists.xenproject.org On 05/19/2015 11:31 AM, Razvan Cojocaru wrote: > As suggested by Andrew Cooper, this patch attempts to remove > some redundancy and allow for an easier time when adding vm_events > for new control registers in the future, by having a single > VM_EVENT_REASON_WRITE_CTRLREG vm_event type, meant to serve CR0, > CR3, CR4 and (newly introduced) XCR0. The actual control register > will be deduced by the new .index field in vm_event_write_ctrlreg > (renamed from vm_event_mov_to_cr). The CR0, CR3 and CR4 events are > now pre-write vm_events. The patch has also modified the > xen-access.c test - it is now able to log CR3 events. > > Signed-off-by: Razvan Cojocaru > > --- > Changes since V2: > - The CR0, CR3 and CR4 events are now pre-write vm_events. > - Struct monitor's .write_ctrlreg_enabled, .write_ctrlreg_sync > and .write_ctrlreg_onchangeonly are now 4 bits wide instead > of 8 (previously wider than necessary to reserve them for > future events). > - Consistent use of "curr" in hvm_handle_xsetbv(). I've intentionally lost "Reviewed-by: Tim Deegan " as I thought moving the CR0, CR3 and CR3 events to be pre-write is a serious enough change to warrant a new review. Hopefully it wasn't the wrong thing to do. Thanks, Razvan