* [PATCH] kvm: Dump guest rIP when the guest tried something unsupported
@ 2015-11-20 18:52 Borislav Petkov
2015-12-04 14:42 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Borislav Petkov @ 2015-11-20 18:52 UTC (permalink / raw)
To: KVM; +Cc: Paolo Bonzini, LKML
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__)
--
2.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kvm: Dump guest rIP when the guest tried something unsupported
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
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-12-04 14:42 UTC (permalink / raw)
To: Borislav Petkov, KVM; +Cc: LKML
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-04 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.