[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [VMI] How to add support for MOV-TO-DRx events ?


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mathieu Tarral <mathieu.tarral@xxxxxxxxxxxxxx>
  • Date: Thu, 09 May 2019 20:57:27 +0000
  • Delivery-date: Thu, 09 May 2019 20:57:52 +0000
  • Feedback-id: 7ARND6YmrAEqSXE0j3TLm6ZqYiFFaDDEkO_KW8fTUEW0kYwGM1KEsuPxEPVWH5YuEnR43INtqwIKH-usvnxVQQ==:Ext:ProtonMail
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi,

following a previous conversation, i would like to catch MOV-TO-DRx VMI events 
to prevent the guest from disabling my hardware breakpoints.

@Tamas pointed me to this header:
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/vm_event.h;h=b2bafc0d77f9758e42b0d53c05a7e6bb86c86686;hb=HEAD#l154

And, as far as I can tell, I have to
- add a new REASON
#define VM_EVENT_REASON_WRITE_DEBUGREG      15

- add a new struct
struct vm_event_write_debugreg {
    uint32_t index;
    uint32_t _pad;
    uint64_t new_value;
    uint64_t old_value;
};

- insert it into the vm_event_st union

Can you give me more pointer and guidance how to implement this into Xen ?
I have never submitted a patch, nor looked into Xen source code.

Should we create a single event for MOV-TO-REGx VMI events ?
It would void copy pasting and duplicating code.

Thanks !


Sent with ProtonMail Secure Email.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.