public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Borislav Petkov <bp@alien8.de>, KVM <kvm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kvm: Dump guest rIP when the guest tried something unsupported
Date: Fri, 4 Dec 2015 15:42:49 +0100	[thread overview]
Message-ID: <5661A669.8020901@redhat.com> (raw)
In-Reply-To: <1448045532-12281-1-git-send-email-bp@alien8.de>



On 20/11/2015 19:52, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> It looks like this in action:
> 
>   kvm [5197]: vcpu0, guest rIP: 0xffffffff810187ba unhandled rdmsr: 0xc001102
> 
> and helps to pinpoint quickly where in the guest we did the unsupported
> thing.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
>  include/linux/kvm_host.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 5706a2108f0a..597f6607c440 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -439,7 +439,8 @@ struct kvm {
>  
>  /* The guest did something we don't support. */
>  #define vcpu_unimpl(vcpu, fmt, ...)					\
> -	kvm_pr_unimpl("vcpu%i " fmt, (vcpu)->vcpu_id, ## __VA_ARGS__)
> +	kvm_pr_unimpl("vcpu%i, guest rIP: 0x%lx " fmt,			\
> +			(vcpu)->vcpu_id, kvm_rip_read(vcpu), ## __VA_ARGS__)
>  
>  #define vcpu_debug(vcpu, fmt, ...)					\
>  	kvm_debug("vcpu%i " fmt, (vcpu)->vcpu_id, ## __VA_ARGS__)
> 

Thanks, applying this to kvm/queue.

Paolo

      reply	other threads:[~2015-12-04 14:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 18:52 [PATCH] kvm: Dump guest rIP when the guest tried something unsupported Borislav Petkov
2015-12-04 14:42 ` Paolo Bonzini [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=5661A669.8020901@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@alien8.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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