All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: "Lengyel, Tamas" <tlengyel@novetta.com>
Cc: kevin.tian@intel.com, wei.liu2@citrix.com,
	ian.campbell@citrix.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	tim@xen.org, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
	jbeulich@suse.com, eddie.dong@intel.com, jun.nakajima@intel.com,
	andrew.cooper3@citrix.com, keir@xen.org
Subject: Re: [PATCH V7] xen/vm_event: Clean up control-register-write vm_events and add XCR0 event
Date: Thu, 28 May 2015 17:33:22 +0300	[thread overview]
Message-ID: <55672732.1060408@bitdefender.com> (raw)
In-Reply-To: <CAD33N+58+bLxFTbC49VGpn0jq5fSfr8o91Sue4s7SyERsV9X8A@mail.gmail.com>

On 05/28/2015 05:12 PM, Lengyel, Tamas wrote:
>     diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c
>     index 9d5f9f3..a13195d 100644
>     --- a/xen/arch/x86/hvm/event.c
>     +++ b/xen/arch/x86/hvm/event.c
>     @@ -21,6 +21,7 @@
> 
>      #include <xen/vm_event.h>
>      #include <xen/paging.h>
>     +#include <asm/monitor.h>
>      #include <public/vm_event.h>
> 
>      static void hvm_event_fill_regs(vm_event_request_t *req)
>     @@ -88,55 +89,28 @@ static int hvm_event_traps(uint8_t sync,
>     vm_event_request_t *req)
>          return 1;
>      }
> 
>     -static inline
>     -void hvm_event_cr(uint32_t reason, unsigned long value,
>     -                         unsigned long old, bool_t onchangeonly,
>     bool_t sync)
>     +void (hvm_event_cr)(unsigned int index, unsigned long value,
>     unsigned long old)
> 
> 
> Any reason to have parenthesis around hvm_event_cr? Also, if you could
> make the patch available somewhere via git, that would be great, I would
> like to test it!

Yes, to prevent macro expansion. Jan has suggested that I add a macro to
make the calls look neater, please see this change:

+void hvm_event_cr(unsigned int index, unsigned long value, unsigned
long old);
+#define hvm_event_cr(what, new, old) hvm_event_cr(VM_EVENT_X86_##what,
new, old)

So, unless that call is put in parenthesis, the code you mention is
expanded to hvm_event_cr(VM_EVENT_X86_unsigned int index, ...) or
something of that nature, and it won't compile.

As for a git repo, unfortunately I don't have a public one, but I intend
to submit V8 shortly, and if I understood things correctly it's quite
likely to enter staging, so it should only be a short while now.


Thanks,
Razvan

  reply	other threads:[~2015-05-28 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  5:33 [PATCH V7] xen/vm_event: Clean up control-register-write vm_events and add XCR0 event Razvan Cojocaru
2015-05-28  8:39 ` Jan Beulich
2015-05-28 10:56   ` Razvan Cojocaru
2015-05-28 12:09     ` Jan Beulich
2015-05-28 14:12 ` Lengyel, Tamas
2015-05-28 14:33   ` Razvan Cojocaru [this message]
2015-05-28 16:06     ` Lengyel, Tamas
2015-05-28 16:32       ` Razvan Cojocaru
2015-05-29  9:12         ` Jan Beulich
2015-05-29 13:47           ` Razvan Cojocaru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55672732.1060408@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=tlengyel@novetta.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.