From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF605C433ED for ; Mon, 26 Apr 2021 13:23:08 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 0DFCA60FD9 for ; Mon, 26 Apr 2021 13:23:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DFCA60FD9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6CDC94B098; Mon, 26 Apr 2021 09:23:07 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N0GfbcUsr4oS; Mon, 26 Apr 2021 09:23:06 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 48A3A4AC78; Mon, 26 Apr 2021 09:23:06 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 139444B165 for ; Mon, 26 Apr 2021 08:44:10 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aPNKSfFHipim for ; Mon, 26 Apr 2021 08:44:09 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 11D5E4B15F for ; Mon, 26 Apr 2021 08:44:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619441048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TSlotn4fBSdFFf3NHGJvYzieEsXBeHjCWbwR+pEgCSM=; b=IDvUY6jOfjwl7qFQXDiidWQC/ldN23dhpADcL3/YJT4KLxFWDvYZjoWceLZD++cDXfYWUO lAlflOly5AXVWaY3QBC/A8ZcxmSNih9ZW88ol6NZiMNxcSzuO7C3WNM5tDSyjeNclqjesq 6/+YX6MHAm9PjppsoH50z6/d9eUMLsw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-W1_il_x5O0-KQwH5hQ0CVw-1; Mon, 26 Apr 2021 08:44:07 -0400 X-MC-Unique: W1_il_x5O0-KQwH5hQ0CVw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3BB3587A83F; Mon, 26 Apr 2021 12:44:03 +0000 (UTC) Received: from starship (unknown [10.40.192.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F70F6268B; Mon, 26 Apr 2021 12:43:49 +0000 (UTC) Message-ID: <6d7146021f3435330b42f2e1b917d4b5dea00edc.camel@redhat.com> Subject: Re: [PATCH v2 0/9] KVM: my debug patch queue From: Maxim Levitsky To: Paolo Bonzini , kvm@vger.kernel.org Date: Mon, 26 Apr 2021 15:43:48 +0300 In-Reply-To: References: <20210401135451.1004564-1-mlevitsk@redhat.com> User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mailman-Approved-At: Mon, 26 Apr 2021 09:23:05 -0400 Cc: Wanpeng Li , David Hildenbrand , Catalin Marinas , "H. Peter Anvin" , Claudio Imbrenda , Will Deacon , "open list:KERNEL VIRTUAL MACHINE FOR ARM64 \(KVM/arm64\)" , "open list:S390" , Janosch Frank , Jonathan Corbet , Marc Zyngier , Joerg Roedel , "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , Christian Borntraeger , Ingo Molnar , Jan Kiszka , Stefano Garzarella , Vasily Gorbik , Heiko Carstens , Kieran Bingham , Borislav Petkov , Thomas Gleixner , Andrew Morton , "moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 \(KVM/arm64\)" , Jim Mattson , Sean Christopherson , Cornelia Huck , "open list:DOCUMENTATION" , open list , Jessica Yu , Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Fri, 2021-04-02 at 10:38 -0700, 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. Do you mean to add a kvm-unit-test or to add a test to kernel's kvm unit tests for this? 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(-) > > _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm