public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Auld, Will" <will.auld@intel.com>
Cc: Avi Kivity <avi@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Zhang, Xiantao" <xiantao.zhang@intel.com>,
	"Liu, Jinsong" <jinsong.liu@intel.com>
Subject: Re: [PATCH] Added call parameter to track whether invocation originated with guest or elsewhere
Date: Fri, 26 Oct 2012 18:48:29 -0200	[thread overview]
Message-ID: <20121026204829.GB4991@amt.cnet> (raw)
In-Reply-To: <96EC5A4F3149B74492D2D9B9B1602C2728B8BDD4@ORSMSX108.amr.corp.intel.com>

On Tue, Oct 23, 2012 at 07:56:54PM +0000, Auld, Will wrote:
> Having looked closer at the tacked of changing out the index and data fields in some
> function calls for a struct parameter with these and a originator field (host or guest)
> it is less attractive than I thought it would be. The only place where we need to know the initiator is in kvm_write_tsc() which has an implicit index.

At the moment yes, but it might have other uses in the future.

> I have been trying to determine whether there is a possibility for taking a context switch while a guest initiated set_msr() is in progress whereby the new thread might invoke the set_msr()/kvm_write_tsc() routines. It looks to me like this is not possible but I can't be sure. 

It is not possible.

> If it is not possible we can set a variable for the vcpu when a guest call is in progress and this would be sufficient. 
>
> What do you think?
> Thanks,

The struct parameter seems the preferred choice as there might be other
uses to this information in the future.

  reply	other threads:[~2012-10-26 20:55 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
2012-10-23 19:56         ` Auld, Will
2012-10-26 20:48           ` Marcelo Tosatti [this message]
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=20121026204829.GB4991@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=jinsong.liu@intel.com \
    --cc=kvm@vger.kernel.org \
    --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