All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: tim@xen.org, kevin.tian@intel.com, wei.liu2@citrix.com,
	eddie.dong@intel.com, stefano.stabellini@eu.citrix.com,
	andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
	xen-devel@lists.xen.org, jun.nakajima@intel.com, keir@xen.org,
	ian.campbell@citrix.com
Subject: Re: [PATCH V5] xen/vm_event: Clean up control-register-write vm_events and add XCR0 event
Date: Tue, 26 May 2015 19:21:03 +0300	[thread overview]
Message-ID: <55649D6F.6030104@bitdefender.com> (raw)
In-Reply-To: <5564B1B6020000780007DFC9@mail.emea.novell.com>

On 05/26/2015 06:47 PM, Jan Beulich wrote:
>>>> On 25.05.15 at 10:33, <rcojocaru@bitdefender.com> wrote:
>> --- a/xen/arch/x86/hvm/event.c
>> +++ b/xen/arch/x86/hvm/event.c
>> @@ -19,6 +19,7 @@
>>  * Place - Suite 330, Boston, MA 02111-1307 USA.
>>  */
>>  
>> +#include <asm/monitor.h>
>>  #include <xen/vm_event.h>
>>  #include <xen/paging.h>
> 
> Just like almost everywhere else, please have asm/ includes follow
> xen/ ones.

Ack. I went the sorted-alphabetically route, obviously that's not the
Xen convention.

>> @@ -3349,7 +3354,7 @@ int hvm_set_cr4(unsigned long value)
>>      }
>>  
>>      hvm_update_cr(v, 4, value);
>> -    hvm_event_cr4(value, old_cr);
>> +    hvm_event_cr(CR4, value, old_cr);
> 
> Considering e.g. this one, ...
> 
>> @@ -2010,7 +2012,7 @@ static int vmx_cr_access(unsigned long exit_qualification)
>>          unsigned long old = curr->arch.hvm_vcpu.guest_cr[0];
>>          curr->arch.hvm_vcpu.guest_cr[0] &= ~X86_CR0_TS;
>>          vmx_update_guest_cr(curr, 0);
>> -        hvm_event_cr0(curr->arch.hvm_vcpu.guest_cr[0], old);
>> +        hvm_event_cr(VM_EVENT_X86_CR0, curr->arch.hvm_vcpu.guest_cr[0], old);
> 
> ... does this build at all? Ah - you put the wrapping #define into
> xen/arch/x86/hvm/hvm.c instead of right alongside the function
> declaration. That's not how I would think this should be done -
> either use the wrapper everywhere, or nowhere.

Ack.

>> @@ -156,14 +158,15 @@ struct vm_event_mem_access {
>>      uint32_t _pad;
>>  };
>>  
>> -struct vm_event_mov_to_cr {
>> +struct vm_event_write_ctrlreg {
>> +    uint32_t index;
>>      uint64_t new_value;
>>      uint64_t old_value;
>> +    uint32_t _pad;
>>  };
> 
> Why would you want to add padding anywhere other than between
> index and new_value?

Ack, will move the _pad.


Thanks,
Razvan

  reply	other threads:[~2015-05-26 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25  8:33 [PATCH V5] xen/vm_event: Clean up control-register-write vm_events and add XCR0 event Razvan Cojocaru
2015-05-26 15:47 ` Jan Beulich
2015-05-26 16:21   ` Razvan Cojocaru [this message]
2015-05-26 16:29     ` Jan Beulich

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=55649D6F.6030104@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.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=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.