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

Re: [Xen-devel] [PATCH 2/7] x86: hvm events: merge 2 functions into 1


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • From: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
  • Date: Mon, 8 Feb 2016 19:49:06 +0200
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Mon, 08 Feb 2016 17:49:18 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=RVDj8bIA+E+JKNJqjJiag4EW2f+ejyCIaLLaJuGi5Acxx6A2fEyRgNm+GoG5k1DjTHUlMgvfdXdhkDWuHei7WRKdR/4n6XYlABnFsbfAdryERVVgckktcyfdRudhFlEQHyTCgToz54Xf6mX6MgZdwy4cdNAo9janhLhzbNhUdLynqzeGOnNE3IvrCnJs4G3MFNvVQkKmW6T4XmbCRJC4tHwNh6Osd9RojZGIe9X5juIFv3OCV4a9nXL9IEJXrEFHj5Bz/+zb8Xz5Lie45R9o+kQCllMdjjrrknwmetdcLIytz+P5oWsxS6dEH8YA6fw2KC/1V7xBvWkx6kQgsGTd6w==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 2/8/2016 7:15 PM, Andrew Cooper wrote:
On 08/02/16 16:57, Corneliu ZUZU wrote:
diff --git a/xen/include/asm-x86/hvm/event.h b/xen/include/asm-x86/hvm/event.h
index 11eb1fe..7c2252b 100644
--- a/xen/include/asm-x86/hvm/event.h
+++ b/xen/include/asm-x86/hvm/event.h
@@ -27,9 +27,8 @@ bool_t hvm_event_cr(unsigned int index, unsigned long value,
  #define hvm_event_crX(what, new, old) \
      hvm_event_cr(VM_EVENT_X86_##what, new, old)
  void hvm_event_msr(unsigned int msr, uint64_t value);
-/* Called for current VCPU: returns -1 if no listener */
-int hvm_event_int3(unsigned long rip);
-int hvm_event_single_step(unsigned long rip);
+int hvm_event_software_breakpoint(unsigned long rip,
+                                  bool_t single_step);
Are we liable to ever gain any other type of software breakpoint?  Might
it be more sense to pass an enum rather than a bool here?

Otherwise, the changes look sensible.

~Andrew


Well, IMHO, no. Besides breakpointing/trapping after each instruction (i.e. VM_EVENT_REASON_SINGLESTEP) and on arbitrary instructions (VM_EVENT_REASON_SOFTWARE_BREAKPOINT) I don't see what other types of breakpointing one can define (at least from the hypervisor's point of view), and if in the future
there will be other types, that could also be changed into an enum then.
But making that param an enum now would also be fine by me.
Since I noticed Tamas also prefers this option, I will make that change.

Corneliu.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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