public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: will.auld@intel.com, Will Auld <will.auld.intel@gmail.com>,
	kvm@vger.kernel.org, xiantao.zhang@intel.com,
	jinsong.liu@intel.com
Subject: Re: [PATCH] Added call parameter to track whether invocation originated with guest or elsewhere
Date: Wed, 17 Oct 2012 16:28:09 +0200	[thread overview]
Message-ID: <507EC079.3050908@redhat.com> (raw)
In-Reply-To: <20121017140918.GA4940@amt.cnet>

On 10/17/2012 04:09 PM, Marcelo Tosatti wrote:
> On Wed, Oct 17, 2012 at 12:35:33PM +0200, Avi Kivity wrote:
>> On 10/17/2012 04:10 AM, Will Auld wrote:
>> > Signed-off-by: Will Auld <will.auld@intel.com>
>> > ---
>> > 
>> > Resending to full list
>> > 
>> > Marcelo,
>> > 
>> > This patch is what I believe you ask for as foundational for later
>> > patches to address IA32_TSC_ADJUST. 
>> > 
>> 
>> Please write a changelog to reflect the motivation.
>> 
>> All those bool parameters scattered all over the place aren't very
>> pretty.  Usually we solve this with helpers that embed the parameter
>> name (kvm_set_msr() vs. kvm_set_msr_host()) but there are too many
>> functions for this to work here.
>> 
>> Marcelo, any ideas?
> 
> Its easier to read
> 
> kvm_x86_ops->kvm_set_msr()
> kvm_x86_ops->kvm_set_msr_host()
> 
> then
> 
> kvm_x86_ops->kvm_set_msr(,false)
> kvm_x86_ops->kvm_set_msr(,true)
> 
> So you're right.

Yes, but we have a million functions for setting MSRs.

Maybe

struct msr {
    bool host_requested;
    u32 index;
    u64 data;
};

and change all the APIs to use that.


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

  reply	other threads:[~2012-10-17 14:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17  2:10 [PATCH] Added call parameter to track whether invocation originated with guest or elsewhere Will Auld
2012-10-17 10:35 ` Avi Kivity
2012-10-17 14:09   ` Marcelo Tosatti
2012-10-17 14:28     ` Avi Kivity [this message]
2012-10-22 21:58       ` Will Auld
2012-10-23 19:56         ` Auld, Will
2012-10-26 20:48           ` Marcelo Tosatti
2012-10-17 22:08     ` Auld, Will

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=507EC079.3050908@redhat.com \
    --to=avi@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox