From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Tamas K Lengyel <tamas.lengyel@zentific.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
"Dong, Eddie" <eddie.dong@intel.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Jan Beulich <jbeulich@suse.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH V10 for-4.5 3/4] xen, libxc: Force-enable relevant MSR events
Date: Thu, 18 Sep 2014 18:18:06 +0300 [thread overview]
Message-ID: <541AF7AE.3000806@bitdefender.com> (raw)
In-Reply-To: <CAErYnshT4dHK8aDru_ec=P6ngW34=sh=1z9dOYqocm-yaKtc-w@mail.gmail.com>
On 09/18/2014 05:51 PM, Tamas K Lengyel wrote:
>
> diff --git a/xen/arch/x86/mm/mem_event.c b/xen/arch/x86/mm/mem_event.c
> index ba7e71e..fdd5ff6 100644
> --- a/xen/arch/x86/mm/mem_event.c
> +++ b/xen/arch/x86/mm/mem_event.c
> @@ -587,6 +587,7 @@ int mem_event_domctl(struct domain *d,
> xen_domctl_mem_event_op_t *mec,
> switch( mec->op )
> {
> case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE:
> + case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE_INTROSPECTION:
> {
> rc = -ENODEV;
> /* Only HAP is supported */
> @@ -600,13 +601,23 @@ int mem_event_domctl(struct domain *d,
> xen_domctl_mem_event_op_t *mec,
> rc = mem_event_enable(d, mec, med, _VPF_mem_access,
> HVM_PARAM_ACCESS_RING_PFN,
> mem_access_notification);
> +
> + if ( mec->op != XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE &&
> + rc == 0 && hvm_funcs.enable_msr_exit_interception )
> + {
> + d->arch.hvm_domain.introspection_enabled = 1;
> + hvm_funcs.enable_msr_exit_interception(d);
> + }
>
>
> I guess I should have spoken up before this got merged, but it would
> have been better to keep x86 hvm specific code abstracted out here
> considering this function is being moved into common in my series and
> hvm_funcs are not defined for ARM.
It's fine by me if you decide to move the MSR-enabling code somewhere
else in one of your patches (I'm not sure where you'd prefer it to be) -
I would think that is trivial once you know where the code's being moved.
I'm not sure what the best solution would be at this point, if there are
other suggestions I'm listening.
Regards,
Razvan Cojocaru
next prev parent reply other threads:[~2014-09-18 15:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 8:24 [PATCH V10 for-4.5 0/4] Basic guest memory introspection support Razvan Cojocaru
2014-09-18 8:24 ` [PATCH V10 for-4.5 1/4] xen: Emulate with no writes Razvan Cojocaru
2014-09-18 8:24 ` [PATCH V10 for-4.5 2/4] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-09-18 8:24 ` [PATCH V10 for-4.5 3/4] xen, libxc: Force-enable relevant MSR events Razvan Cojocaru
2014-09-18 14:51 ` Tamas K Lengyel
2014-09-18 15:18 ` Razvan Cojocaru [this message]
2014-09-18 17:03 ` Tamas K Lengyel
2014-09-18 8:24 ` [PATCH V10 for-4.5 4/4] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-09-18 11:08 ` [PATCH V10 for-4.5 0/4] Basic guest memory introspection support Tim Deegan
2014-09-18 11:20 ` 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=541AF7AE.3000806@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=tamas.lengyel@zentific.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).