From: Andi Kleen <ak@linux.intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>,
kvm@vger.kernel.org, peterz@infradead.org
Subject: Re: [PATCH] kvm: Fix perf timer mode IP reporting
Date: Wed, 26 Jul 2017 07:07:22 -0700 [thread overview]
Message-ID: <20170726140722.GD5316@tassilo.jf.intel.com> (raw)
In-Reply-To: <234607fb-2e01-f062-290e-0eeb1aff2b2f@redhat.com>
On Wed, Jul 26, 2017 at 11:26:07AM +0200, Paolo Bonzini wrote:
> On 26/07/2017 02:20, Andi Kleen wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > KVM and perf have a special backdoor mechanism to report the IP for interrupts
> > re-executed after vm exit. This works for the NMIs that perf normally uses.
> >
> > However when perf is in timer mode it doesn't work because the timer interrupt
> > doesn't get this special treatment. This is common when KVM is running
> > nested in another hypervisor which may not implement the PMU, so only
> > timer mode is available.
> >
> > Call the functions to set up the backdoor IP also for non NMI interrupts.
> >
> > I renamed the functions to set up the backdoor IP reporting to be more
> > appropiate for their new use. The SVM change is only compile tested.
> >
> > v2: Moved the functions inline.
> > For the normal interrupt case the before/after functions are now
> > called from x86.c, not arch specific code.
>
> You haven't removed the code from vmx_handle_external_intr and
> svm_handle_external_intr.
Ok.
>
> > For the NMI case we still need to call it in the architecture
> > specific code, because it's already needed in the low level *_run
> > functions.
>
> I must have been unclear; what I was asking is, can the calls cover
> a much wider range of vcpu_enter_guest?
Handling the external interrupt case from x86 without exporting
is no problem (like my patch did)
But to handle the NMI case it needs to be exported because
the NMI case is directly handled in the lowlevel vcpu_runs*.
And I'm not sure it's safe to set over the actual low level
guest runs. e.g. the AMD code already seems to change interrupts
there.
-andi
next prev parent reply other threads:[~2017-07-26 14:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 0:20 [PATCH] kvm: Fix perf timer mode IP reporting Andi Kleen
2017-07-26 9:26 ` Paolo Bonzini
2017-07-26 14:07 ` Andi Kleen [this message]
2017-07-26 14:25 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2017-07-25 4:41 Andi Kleen
2017-07-25 7:31 ` Paolo Bonzini
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=20170726140722.GD5316@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
/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