[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27193ea74081023b67ab9c98d7050b1e22655e79.camel@redhat.com>
Date: Tue, 06 Apr 2021 14:59:14 +0300
From: Maxim Levitsky <mlevitsk@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org
Cc: "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Sean Christopherson <seanjc@...gle.com>,
Marc Zyngier <maz@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
open list <linux-kernel@...r.kernel.org>,
Julien Thierry <julien.thierry.kdev@...il.com>,
Stefano Garzarella <sgarzare@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Suzuki K Poulose <suzuki.poulose@....com>,
Jonathan Corbet <corbet@....net>, Jessica Yu <jeyu@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Jan Kiszka <jan.kiszka@...mens.com>,
Will Deacon <will@...nel.org>,
"open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)"
<kvmarm@...ts.cs.columbia.edu>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Joerg Roedel <joro@...tes.org>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
Jim Mattson <jmattson@...gle.com>,
Cornelia Huck <cohuck@...hat.com>,
David Hildenbrand <david@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
"open list:S390" <linux-s390@...r.kernel.org>,
Heiko Carstens <hca@...ux.ibm.com>,
Kieran Bingham <kbingham@...nel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
"moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)"
<linux-arm-kernel@...ts.infradead.org>,
James Morse <james.morse@....com>
Subject: Re: [PATCH v2 0/9] KVM: my debug patch queue
On Fri, 2021-04-02 at 19:38 +0200, Paolo Bonzini wrote:
> On 01/04/21 15:54, Maxim Levitsky wrote:
> > Hi!
> >
> > I would like to publish two debug features which were needed for other stuff
> > I work on.
> >
> > One is the reworked lx-symbols script which now actually works on at least
> > gdb 9.1 (gdb 9.2 was reported to fail to load the debug symbols from the kernel
> > for some reason, not related to this patch) and upstream qemu.
>
> Queued patches 2-5 for now. 6 is okay but it needs a selftest. (e.g.
> using KVM_VCPU_SET_EVENTS) and the correct name for the constant.
Thanks!
I will do this very soon.
Best regards,
Maxim Levitsky
>
> Paolo
>
> > The other feature is the ability to trap all guest exceptions (on SVM for now)
> > and see them in kvmtrace prior to potential merge to double/triple fault.
> >
> > This can be very useful and I already had to manually patch KVM a few
> > times for this.
> > I will, once time permits, implement this feature on Intel as well.
> >
> > V2:
> >
> > * Some more refactoring and workarounds for lx-symbols script
> >
> > * added KVM_GUESTDBG_BLOCKEVENTS flag to enable 'block interrupts on
> > single step' together with KVM_CAP_SET_GUEST_DEBUG2 capability
> > to indicate which guest debug flags are supported.
> >
> > This is a replacement for unconditional block of interrupts on single
> > step that was done in previous version of this patch set.
> > Patches to qemu to use that feature will be sent soon.
> >
> > * Reworked the the 'intercept all exceptions for debug' feature according
> > to the review feedback:
> >
> > - renamed the parameter that enables the feature and
> > moved it to common kvm module.
> > (only SVM part is currently implemented though)
> >
> > - disable the feature for SEV guests as was suggested during the review
> > - made the vmexit table const again, as was suggested in the review as well.
> >
> > Best regards,
> > Maxim Levitsky
> >
> > Maxim Levitsky (9):
> > scripts/gdb: rework lx-symbols gdb script
> > KVM: introduce KVM_CAP_SET_GUEST_DEBUG2
> > KVM: x86: implement KVM_CAP_SET_GUEST_DEBUG2
> > KVM: aarch64: implement KVM_CAP_SET_GUEST_DEBUG2
> > KVM: s390x: implement KVM_CAP_SET_GUEST_DEBUG2
> > KVM: x86: implement KVM_GUESTDBG_BLOCKEVENTS
> > KVM: SVM: split svm_handle_invalid_exit
> > KVM: x86: add force_intercept_exceptions_mask
> > KVM: SVM: implement force_intercept_exceptions_mask
> >
> > Documentation/virt/kvm/api.rst | 4 +
> > arch/arm64/include/asm/kvm_host.h | 4 +
> > arch/arm64/kvm/arm.c | 2 +
> > arch/arm64/kvm/guest.c | 5 -
> > arch/s390/include/asm/kvm_host.h | 4 +
> > arch/s390/kvm/kvm-s390.c | 3 +
> > arch/x86/include/asm/kvm_host.h | 12 ++
> > arch/x86/include/uapi/asm/kvm.h | 1 +
> > arch/x86/kvm/svm/svm.c | 87 +++++++++++--
> > arch/x86/kvm/svm/svm.h | 6 +-
> > arch/x86/kvm/x86.c | 14 ++-
> > arch/x86/kvm/x86.h | 2 +
> > include/uapi/linux/kvm.h | 1 +
> > kernel/module.c | 8 +-
> > scripts/gdb/linux/symbols.py | 203 ++++++++++++++++++++----------
> > 15 files changed, 272 insertions(+), 84 deletions(-)
> >
Powered by blists - more mailing lists