All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: will.auld@intel.com
Cc: Will Auld <will.auld.intel@gmail.com>,
	mtosatti@redhat.com, xiantao.zhang@intel.com,
	kvm@vger.kernel.org, jinsong.liu@intel.com,
	donald.d.dugger@intel.com
Subject: Re: [PATCH] Add code to track call origin for msr assignment.
Date: Tue, 30 Oct 2012 14:42:17 +0200	[thread overview]
Message-ID: <508FCB29.5010601@redhat.com> (raw)
In-Reply-To: <1351545508.4932.13.camel@WillAuldHomeLinux>

On 10/29/2012 11:18 PM, Will Auld wrote:
> In order to track who initiated the call (host or guest) to modify an msr
> value I have changed function call parameters along the call path. The
> specific change is to add a struct pointer parameter that points to (index,
> data, caller) information rather than having this information passed as
> individual parameters.
> 
> The initial use for this capability is for updating the IA32_TSC_ADJUST
> msr while setting the tsc value. It is anticipated that this capability
> is useful for other tasks.

Looks good.

>  
>  struct x86_instruction_info;
>  
> +/*
> + * Defined values for msr_data.initiated_by
> + */
> +#define KVM_GUEST_INITIATED    0x1
> +#define KVM_HOST_INITIATED     0x2
> +
> +struct msr_data {
> +    u32 initiated_by;

But this can be simplified to 'bool host_initiated;'.  Later checks
should look cleaner.

> +    u32 index;
> +    u64 data;
> +};
> +


-- 
error compiling committee.c: too many arguments to function

      parent reply	other threads:[~2012-10-30 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 21:18 [PATCH] Add code to track call origin for msr assignment Will Auld
2012-10-29 22:38 ` Dugger, Donald D
2012-10-29 22:38 ` Dugger, Donald D
2012-10-30 12:42 ` Avi Kivity [this message]

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=508FCB29.5010601@redhat.com \
    --to=avi@redhat.com \
    --cc=donald.d.dugger@intel.com \
    --cc=jinsong.liu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=will.auld.intel@gmail.com \
    --cc=will.auld@intel.com \
    --cc=xiantao.zhang@intel.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.