From: Will Auld <will.auld.intel@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
will.auld@intel.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: Mon, 22 Oct 2012 14:58:20 -0700 [thread overview]
Message-ID: <1350943100.5232.1.camel@WillAuldHomeLinux> (raw)
In-Reply-To: <507EC079.3050908@redhat.com>
On Wed, 2012-10-17 at 16:28 +0200, Avi Kivity wrote:
> 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.
>
>
I was working on a different solution and then saw this suggestion just
now. I like this tact and will look at it closer.
Thanks,
Will
next prev parent reply other threads:[~2012-10-22 21:58 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
2012-10-22 21:58 ` Will Auld [this message]
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=1350943100.5232.1.camel@WillAuldHomeLinux \
--to=will.auld.intel@gmail.com \
--cc=avi@redhat.com \
--cc=jinsong.liu@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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