From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: Blocking CR and MSR writes via mem_access? Date: Tue, 07 Oct 2014 15:48:40 +0300 Message-ID: <5433E128.6080104@bitdefender.com> References: <542D2DA7.1060903@bitdefender.com> <542E98A1.5070706@citrix.com> <5432A674.7000205@bitdefender.com> <5433BEB3.2070300@bitdefender.com> <5433C4E7.5040102@bitdefender.com> <5433FB41020000780003CDBA@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5433FB41020000780003CDBA@mail.emea.novell.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: Jan Beulich , Tamas K Lengyel Cc: Andrew Cooper , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 10/07/2014 03:40 PM, Jan Beulich wrote: >>>> On 07.10.14 at 14:30, wrote: >> IMHO that entire struct is in dire need of a cleanup. It is really hacky to >> have fields like gla and gfn transfer values that mean different things >> under different event type that don't have anything to do with gla/gfn. >> It's sort of just a legacy struct from the time when we only had EPT events >> and everything else just got hacked on top. I would be in favor of having >> the struct as a union of substructs that nicely define all the values that >> are transferred in the given context, with meaningful struct member names. > > And the whole thing isn't just "mem-event" anymore either ... I agree with the union improvement, and indeed, we might need a more appropriate name for the whole thing (xen-event?). I guess one question would be how this would impact existing clients, but there probably aren't that many, and the changes required to replace the .gla / .gfn logic should be minimal. Thanks, Razvan Cojocaru