From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xen.org>,
Jan Beulich <jbeulich@suse.com>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH V3] vm_event: Allow subscribing to write events for specific MSR-s
Date: Fri, 15 Apr 2016 20:19:17 +0300 [thread overview]
Message-ID: <57112295.1000807@bitdefender.com> (raw)
In-Reply-To: <CABfawhnj_2Kopix=SO5zsqJh71bVzTSQ2ynXmAE+8f=pKCz3HQ@mail.gmail.com>
On 04/15/16 20:12, Tamas K Lengyel wrote:
>
>
> On Fri, Apr 15, 2016 at 3:02 AM, Razvan Cojocaru
> <rcojocaru@bitdefender.com <mailto:rcojocaru@bitdefender.com>> wrote:
>
> Previously, subscribing to MSR write events was an all-or-none
> approach, with special cases for introspection MSR-s. This patch
> allows the vm_event consumer to specify exactly what MSR-s it is
> interested in, and as a side-effect gets rid of the
> vmx_introspection_force_enabled_msrs[] special case.
> This replaces the previously posted "xen: Filter out MSR write
> events" patch.
>
> Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com
> <mailto:rcojocaru@bitdefender.com>>
>
> ---
> Changes since V2:
> - Bumped XEN_DOMCTL_INTERFACE_VERSION.
> - Introduced struct monitor_msr_bitmap as recommended by Andrew
> Cooper, which allowed removing some pointer arithmetic magic.
> - Removed arch_ prefix from monitor functions, as recommended
> by Tamas Lengyel.
> - Replaced the page allocation code with xzalloc() / xfree() for
> struct monitor_msr_bitmap.
> - Now returning -ENXIO instead of -EINVAL from the monitor
> functions, as recommended by Konrad Rzeszutek Wilk.
> ---
> tools/libxc/include/xenctrl.h | 4 +-
> tools/libxc/xc_monitor.c | 6 +--
> xen/arch/x86/hvm/event.c | 3 +-
> xen/arch/x86/hvm/hvm.c | 3 +-
> xen/arch/x86/hvm/vmx/vmcs.c | 26 ++---------
> xen/arch/x86/hvm/vmx/vmx.c | 10 ++--
> xen/arch/x86/monitor.c | 95
> +++++++++++++++++++++++++++++++++-----
> xen/arch/x86/vm_event.c | 9 ++++
> xen/include/asm-x86/domain.h | 4 +-
> xen/include/asm-x86/hvm/hvm.h | 8 ++--
> xen/include/asm-x86/hvm/vmx/vmcs.h | 7 ---
> xen/include/asm-x86/monitor.h | 8 ++++
> xen/include/public/domctl.h | 5 +-
> 13 files changed, 121 insertions(+), 67 deletions(-)
>
> diff --git a/tools/libxc/include/xenctrl.h
> b/tools/libxc/include/xenctrl.h
> index f5a034a..9698d46 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -2183,8 +2183,8 @@ int xc_monitor_get_capabilities(xc_interface
> *xch, domid_t domain_id,
> int xc_monitor_write_ctrlreg(xc_interface *xch, domid_t domain_id,
> uint16_t index, bool enable, bool sync,
> bool onchangeonly);
> -int xc_monitor_mov_to_msr(xc_interface *xch, domid_t domain_id,
> bool enable,
> - bool extended_capture);
> +int xc_monitor_mov_to_msr(xc_interface *xch, domid_t domain_id,
> uint32_t msr,
> + bool enable);
>
>
> So my only concern with this approach here is that the MSR index
> definitions that are supposed to be passed are never exported via a
> public header, are only defined in asm-x86/msr-index.h. Should that also
> be moved to be a public header as part of this patch?
There's usually an OS header defining those constants, at least with
Linux. I've just checked on my Arch Linux now and I have
/usr/include/asm/msr-index.h, so I would say that's not necessary.
Having said that, if you'd prefer that the Xen header file be made
public I'm happy to do that.
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-15 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 9:02 [PATCH V3] vm_event: Allow subscribing to write events for specific MSR-s Razvan Cojocaru
2016-04-15 9:12 ` Wei Liu
2016-04-15 10:44 ` Razvan Cojocaru
2016-04-15 17:12 ` Tamas K Lengyel
2016-04-15 17:18 ` Andrew Cooper
2016-04-15 17:34 ` Tamas K Lengyel
2016-04-15 17:19 ` Razvan Cojocaru [this message]
2016-04-15 17:38 ` Tamas K Lengyel
2016-04-15 17:49 ` 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=57112295.1000807@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=andrew.cooper3@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=tamas@tklengyel.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.