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

Re: [Xen-devel] [PATCH v2 2/7] xen/x86: merge 2 hvm_event_... functions into 1


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
  • Date: Wed, 10 Feb 2016 22:50:56 +0200
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>, Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx, Jun Nakajima <jun.nakajima@xxxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Wed, 10 Feb 2016 20:51:14 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=lwya15OhCX13cFwxGHE0AmQXzAKAtwNAnhslDj18G6ooOLAJqPJuf6sAdSkh4Rp6CIJVy3jo14krKhAHCBTQDyv5D+2/Xep1/8aRlv0Da6kvlYebKi2W7Io4JAkux1vYAr60b4a7XhlBScf/7auEfVkz/TR16VfxrOYEawTlzcheUBVSa2Brm6/eNcAY0rkMgD+nHQ/BKjbdSLshCIcaQ/j61cRUbmr0svjjmdb/ndt7MeegnRyQwoT1o09ztdrinm4nB3SkcW0F/wQnDze3lRnyM8up3H+ET3MCiUYWJBtUZ4iT1MkBjKzpRWdVqULQ1Jih3LMDoyNMaz2mAsQUCA==; 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/10/2016 7:11 PM, Jan Beulich wrote:
On 10.02.16 at 18:04, <czuzu@xxxxxxxxxxxxxxx> wrote:
On 2/10/2016 6:18 PM, Jan Beulich wrote:
On 10.02.16 at 16:50, <czuzu@xxxxxxxxxxxxxxx> wrote:
--- a/xen/include/asm-x86/hvm/event.h
+++ b/xen/include/asm-x86/hvm/event.h
@@ -17,6 +17,12 @@
   #ifndef __ASM_X86_HVM_EVENT_H__
   #define __ASM_X86_HVM_EVENT_H__
+enum hvm_event_breakpoint_type
+{
+    HVM_EVENT_SOFTWARE_BREAKPOINT,
+    HVM_EVENT_SINGLESTEP_BREAKPOINT,
+};
I don't see what good it does to put existing constants into an
enum.
As Andrew pointed out, an enum was requested in v1 instead of the
single_step param.
One could use the already existing VM_EVENT_REASON_* constants, but
conceptually this
function only involves a subset of those (i.e. *breakpoint vm-events*).
Re-using existing constants would seem fine to me.

Yes but then IMHO conceptually that would be wrong, since it would be like saying "that param can be any type of vm-event", even though it can actually be only from a
subset of vm-event types and it will never be *any* type of vm-event.

I only now realize that I've made a mistake while looking at the
above - the capitals made it implicitly "obvious" to me that they're
on the right side of an assignment. Please use capitals only for
#define-d constants, not enumerated ones.

Jan

Most examples of existing enums I've looked at were capital-case, I thought
they're supposed to be like that. Could you please provide an example on how
enum values should look? (there isn't any in CODING_STYLE)

Let me know if you still want me to change this and how.

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®.