All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: Tamas K Lengyel <tamas.lengyel@zentific.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	wei.liu2@citrix.com, Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	"Dong, Eddie" <eddie.dong@intel.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Andres Lagar-Cavilla <andres@lagarcavilla.org>,
	Jan Beulich <JBeulich@suse.com>,
	rshriram@cs.ubc.ca, Keir Fraser <keir@xen.org>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	yanghy@cn.fujitsu.com
Subject: Re: [RFC PATCH V2 8/8] x86/hvm: factor out vm_event related functions into separate file
Date: Thu, 22 Jan 2015 17:50:43 +0100	[thread overview]
Message-ID: <20150122165043.GR97314@deinos.phlegethon.org> (raw)
In-Reply-To: <CAErYnsiNPeL3HAy78gt4zKRG_jF+079_WbtrwqJkSvkfpUQK+w@mail.gmail.com>

At 17:42 +0100 on 22 Jan (1421944966), Tamas K Lengyel wrote:
> On Thu, Jan 22, 2015 at 5:25 PM, Jan Beulich <JBeulich@suse.com> wrote:
> >>>> On 18.01.15 at 16:18, <tamas.lengyel@zentific.com> wrote:
> >> +static int hvm_event_traps(long parameters, vm_event_request_t *req)
> >> +{
> >> +    int rc;
> >> +    struct vcpu *v = current;
> >> +    struct domain *d = v->domain;
> >
> > Unless the intention is to have an exact 1:1 copy of the original,
> > please use curr and currd here respectively.
> 
> Ack.
> 
> >
> >> +void hvm_event_cr0(unsigned long value, unsigned long old)
> >> +{
> >> +    vm_event_request_t req = {
> >> +        .reason = VM_EVENT_REASON_CR0,
> >> +        .vcpu_id = current->vcpu_id,
> >> +        .cr_event.new_value = value,
> >> +        .cr_event.old_value = old
> >> +    };
> >> +
> >> +    long parameters = current->domain->arch.hvm_domain
> >> +                        .params[HVM_PARAM_MEMORY_EVENT_CR0];
> >
> > And latch current into a local variable curr here and below.
> 
> Ack.
> 
> >
> >> +void hvm_event_msr(unsigned long msr, unsigned long value)
> >> +{
> >> +    vm_event_request_t req = {
> >> +        .reason = VM_EVENT_REASON_MSR,
> >> +        .vcpu_id = current->vcpu_id,
> >> +        .msr_event.msr = msr,
> >> +        .msr_event.new_value = value,
> >> +    };
> >
> > The .msr_event sub-structure also has an old_value member - how
> > come this doesn't get filled (I realize the old code was this way,
> > but I now doubt earlier patches are all correct in the regard).
> 
> Razvan might have more information on this side as I haven't really
> touched MSR events. I vaguely recall some issues with having access to
> the old MSR value?

Yep - ISTR this is also why the MSR event doesn't respect
HVMPME_onchangeonly.

Tim.

  reply	other threads:[~2015-01-22 16:50 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 15:17 [RFC PATCH V2 0/8] xen: Clean-up of mem_event subsystem Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 1/8] xen/mem_event: Cleanup of mem_event structures Tamas K Lengyel
2015-01-22 12:43   ` Tim Deegan
2015-01-22 12:50     ` Razvan Cojocaru
2015-01-22 12:50     ` Tamas K Lengyel
2015-01-22 12:53       ` Razvan Cojocaru
2015-01-22 13:11       ` Tim Deegan
2015-01-22 15:00   ` Jan Beulich
2015-01-22 15:34     ` Tamas K Lengyel
2015-01-22 16:00       ` Jan Beulich
2015-01-22 16:23         ` Tamas K Lengyel
2015-01-22 16:34           ` Jan Beulich
     [not found]             ` <CAErYnsj8B1Fbo=JD3hLz-8kjtt-FoWTrSkGnbkvVf=iR64MDBQ@mail.gmail.com>
2015-01-23  9:00               ` Jan Beulich
2015-01-23  9:18                 ` Tamas K Lengyel
2015-01-29 11:54       ` Tamas K Lengyel
2015-01-29 12:02         ` Jan Beulich
2015-01-29 12:09           ` Tamas K Lengyel
2015-01-29 12:15             ` Tamas K Lengyel
2015-01-29 12:51             ` Jan Beulich
2015-01-29 13:03               ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 2/8] xen/mem_event: Rename the mem_event ring from 'access' to 'monitor' Tamas K Lengyel
2015-01-22 12:53   ` Tim Deegan
2015-01-22 14:12     ` Tamas K Lengyel
2015-01-22 15:02   ` Jan Beulich
2015-01-22 15:42     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 3/8] xen/mem_paging: Convert mem_event_op to mem_paging_op Tamas K Lengyel
2015-01-22 13:03   ` Tim Deegan
2015-01-22 15:09   ` Jan Beulich
2015-01-22 15:41     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 4/8] x86/hvm: rename hvm_memory_event_* functions to hvm_event_* Tamas K Lengyel
2015-01-22 13:05   ` Tim Deegan
2015-01-22 15:56   ` Andrew Cooper
2015-01-22 16:34     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 5/8] xen/mem_event: Rename mem_event to vm_event Tamas K Lengyel
2015-01-22 14:52   ` Tim Deegan
2015-01-22 15:02     ` Tamas K Lengyel
2015-01-18 15:17 ` [RFC PATCH V2 6/8] xen/vm_event: Decouple vm_event and mem_access Tamas K Lengyel
2015-01-22 14:56   ` Tim Deegan
2015-01-22 15:35     ` Tamas K Lengyel
2015-01-18 15:18 ` [RFC PATCH V2 7/8] tools/tests: Clean-up tools/tests/xen-access Tamas K Lengyel
2015-01-18 15:18 ` [RFC PATCH V2 8/8] x86/hvm: factor out vm_event related functions into separate file Tamas K Lengyel
2015-01-22 15:00   ` Tim Deegan
2015-01-22 15:36     ` Tamas K Lengyel
2015-01-22 16:25   ` Jan Beulich
2015-01-22 16:42     ` Tamas K Lengyel
2015-01-22 16:50       ` Tim Deegan [this message]
2015-01-23  8:56       ` Razvan Cojocaru
2015-01-23  9:03         ` Jan Beulich
2015-01-23  9:21           ` Tamas K Lengyel
2015-01-22 16:32   ` Andrew Cooper
2015-01-22 16:41     ` Tamas K Lengyel
2015-01-19 13:03 ` [RFC PATCH V2 0/8] xen: Clean-up of mem_event subsystem Andrew Cooper
2015-01-21 10:59   ` Tamas K Lengyel

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=20150122165043.GR97314@deinos.phlegethon.org \
    --to=tim@xen.org \
    --cc=JBeulich@suse.com \
    --cc=andres@lagarcavilla.org \
    --cc=dgdegra@tycho.nsa.gov \
    --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=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tamas.lengyel@zentific.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.com \
    /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.