From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: xen-devel@lists.xen.org
Cc: kevin.tian@intel.com, wei.liu2@citrix.com,
ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
jun.nakajima@intel.com, ian.jackson@eu.citrix.com, tim@xen.org,
eddie.dong@intel.com, jbeulich@suse.com,
andrew.cooper3@citrix.com, keir@xen.org
Subject: Re: [PATCH V4] xen/vm_event: Clean up control-register-write vm_events
Date: Thu, 21 May 2015 16:18:57 +0300 [thread overview]
Message-ID: <555DDB41.602@bitdefender.com> (raw)
In-Reply-To: <1432213223-5211-1-git-send-email-rcojocaru@bitdefender.com>
> diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c
> index 9d5f9f3..310f0e8 100644
> --- a/xen/arch/x86/hvm/event.c
> +++ b/xen/arch/x86/hvm/event.c
> @@ -88,55 +88,29 @@ 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)
> {
> - if ( onchangeonly && value == old )
> + struct arch_domain *currad = ¤t->domain->arch;
> + unsigned int ctrlreg_bitmask = monitor_ctrlreg_bitmask(index);
> +
> + if ( !(currad->monitor.write_ctrlreg_enabled & ctrlreg_bitmask) )
> return;
> - else
> +
> + if ( !(currad->monitor.write_ctrlreg_onchangeonly & ctrlreg_bitmask) ||
> + value != old )
> {
> vm_event_request_t req = {
> - .reason = reason,
> + .reason = VM_EVENT_REASON_WRITE_CTRLREG,
> .vcpu_id = current->vcpu_id,
> - .u.mov_to_cr.new_value = value,
> - .u.mov_to_cr.old_value = old
> + .u.write_ctrlreg.index = index,
> + .u.write_ctrlreg.new_value = value,
> + .u.write_ctrlreg.old_value = old
> };
>
> - hvm_event_traps(sync, &req);
> + hvm_event_traps(currad->monitor.write_ctrlreg_sync & index, &req);
Sorry, I've missed a required change here, the last line should now read
"currad->monitor.write_ctrlreg_sync & ctrlreg_bitmask", of course. I'll
fix this in V5, as well as address other remarks made on this patch.
Thanks,
Razvan
next prev parent reply other threads:[~2015-05-21 13:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 13:00 [PATCH V4] xen/vm_event: Clean up control-register-write vm_events Razvan Cojocaru
2015-05-21 13:18 ` Razvan Cojocaru [this message]
2015-05-22 7:36 ` Jan Beulich
2015-05-22 7:50 ` Razvan Cojocaru
2015-05-22 8:03 ` Jan Beulich
2015-05-22 12:15 ` Razvan Cojocaru
2015-05-22 12:22 ` Jan Beulich
2015-05-22 12:45 ` Razvan Cojocaru
2015-05-22 12:50 ` 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=555DDB41.602@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=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.