Re: [PATCH 3/3] KVM: SVM: allow to intercept all exceptions for debug

Borislav Petkov
2021-03-16T08:35:59Z

On Tue, Mar 16, 2021 at 12:10:20AM +0200, Maxim Levitsky wrote:
> Add a new debug module param 'debug_intercept_exceptions' which will allow the
> KVM to intercept any guest exception, and forward it to the guest.
>
> This can be very useful for guest debugging and/or KVM debugging with kvm trace.
> This is not intended to be used on production systems.
>
> This is based on an idea first shown here:
> https://patchwork.kernel.org/project/kvm/patch/20160301192822.GD22677@pd.tnic/
>
> CC: Borislav Petkov <bp@suse.de>
> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>

> ---
> arch/x86/include/asm/kvm_host.h | 2 +
> arch/x86/kvm/svm/svm.c | 77 ++++++++++++++++++++++++++++++++-
> arch/x86/kvm/svm/svm.h | 5 ++-
> arch/x86/kvm/x86.c | 5 ++-
> 4 files changed, 85 insertions(+), 4 deletions(-)

Looks interesting, I'll give it a try when I get a chance in the coming days.

Thx!

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg