From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH 1/5] xen/vm_event: Added support for XSETBV events Date: Fri, 08 May 2015 15:09:34 +0300 Message-ID: <554CA77E.8060501@bitdefender.com> References: <1430932352-4289-1-git-send-email-rcojocaru@bitdefender.com> <1430932352-4289-2-git-send-email-rcojocaru@bitdefender.com> <554BA904.2020501@citrix.com> <554C7C91.9040208@bitdefender.com> <554C7DA2.50601@citrix.com> <554C9606.7070103@citrix.com> <554CBFA60200007800078360@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <554CBFA60200007800078360@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 05/08/2015 02:52 PM, Jan Beulich wrote: >>>> On 08.05.15 at 13:05, wrote: >> On Fri, May 8, 2015 at 12:55 PM, Andrew Cooper >> wrote: >>> On 08/05/15 11:53, Tamas K Lengyel wrote: >>>> On Fri, May 8, 2015 at 11:10 AM, Andrew Cooper >>>> wrote: >>>>> On 08/05/15 10:06, Razvan Cojocaru wrote: >>>>>> On 05/07/2015 09:03 PM, Andrew Cooper wrote: >>>>>>> In an effort to be architecture neutral, it might be an idea to have >>>>>>> something like >>>>>>> >>>>>>> struct vm_event_write_cr { >>>>>>> uint64_t index; >>>>>>> uint64_t old_val, new_val; >>>>>>> }; >>>>>>> >>>>>>> And have a per-arch index of control registers, such as >>>>>>> >>>>>>> X86_CR0 >>>>>>> X86_CR3 >>>>>>> X86_CR4 >>>>>>> X86_XCR0 >>>>>>> ... >>>>>>> ARM32_$foo >>>> On ARM there are no "cr" registers so IMHO it would be better to >>>> rename the struct vm_event_write_register. Other than that this sounds >>>> like a good addition to the interface. >>> >>> But there are surely the concept of "control registers" ? >>> >>> (I have no knowledge in this area) >>> >>> ~Andrew >> >> (Re-adding xen-devel) >> >> Certainly, they are just not (necessarily) called "CR". For example, >> CR3 equivalent on ARM is TTBR1. So what I meant here is that naming >> the struct should not be x86 specific. > > In which case - vm_event_write_ctrlreg? Looks good. Of course, the underlying footwork will need to stay just as complicated - sync / enabled flags for each supported register, but the interface will be cleaner and there will be less repetition for xc_monitor_*() and hvm_event_*(). Thanks, Razvan