From patchwork Thu Apr 1 13:54:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 12178131 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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 1961EC433B4 for ; Thu, 1 Apr 2021 13:57:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8FDAD6115C for ; Thu, 1 Apr 2021 13:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FDAD6115C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=269QkE0q+vHFBfbDAQMn2U84purjKCZksrrstzvAymA=; b=QDg+yn7PlqELFkITLJ2pnEVjL UBHoS+KgF+qVtTB4qpkf5Ouu4+lf1IQYlyr7VkveV5YYk6cQXKXDmomB4CMWNFuqENPAMlKyZVDbs v/7bdPxArp0sW8B740PeeqzE1919g0gkUgP7segZw3pA7+nUTH1x7Y4vjik7KppzsL7V3c9kE0DUk 6YD5yMFboixF8DPFKFrrmEodF63XB6hy9lPk+/585wuCQpxMylh3zL9UuoubGiuI++2RAY7ueR8bJ a8qsHBafClpygNDP5WcZpSw6jqZL9HTWmqHzRYTfLy/AiPnXjuPfoiA0ieTb9iM2ygPxmkvjREnjz +4jPUEr4Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRxoB-009kQL-ER; Thu, 01 Apr 2021 13:56:27 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRxo2-009kOC-MQ for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 13:56:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617285377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YJJ/VJwoWhfLVBiD22ep1zPpQ5T3CblMOlviKAdv9s8=; b=GqA3QSepSIcdlwiRPcvYFdW+UxBZzv8KcHoO3+3hKaySvwHmigvvlf2l8UcaoptTFYxEtX KvW+tM5elfxbFcY3ndAIxA/8FgncgMFRr0LC1RMpybhF6dQT/E9Negw1UP7EDVvoVJseix hWfm2xH/tsDNbtOrbvWa5nUrxUY9HVY= 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-266-zfj5oBFjNH2EltbB_XYNcA-1; Thu, 01 Apr 2021 09:55:30 -0400 X-MC-Unique: zfj5oBFjNH2EltbB_XYNcA-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 54D93108598B; Thu, 1 Apr 2021 13:55:23 +0000 (UTC) Received: from localhost.localdomain (unknown [10.35.206.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9288A5D6B1; Thu, 1 Apr 2021 13:55:11 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), Ingo Molnar , Andrew Morton , Thomas Gleixner , Sean Christopherson , Marc Zyngier , Catalin Marinas , linux-kernel@vger.kernel.org (open list), Julien Thierry , Stefano Garzarella , Borislav Petkov , Suzuki K Poulose , Jonathan Corbet , Jessica Yu , "H. Peter Anvin" , Jan Kiszka , Will Deacon , kvmarm@lists.cs.columbia.edu (open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)), Paolo Bonzini , Vitaly Kuznetsov , Vasily Gorbik , Joerg Roedel , Claudio Imbrenda , Jim Mattson , Cornelia Huck , David Hildenbrand , Maxim Levitsky , Wanpeng Li , Janosch Frank , Christian Borntraeger , linux-s390@vger.kernel.org (open list:S390), Heiko Carstens , Kieran Bingham , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-arm-kernel@lists.infradead.org (moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)), James Morse Subject: [PATCH v2 2/9] KVM: introduce KVM_CAP_SET_GUEST_DEBUG2 Date: Thu, 1 Apr 2021 16:54:44 +0300 Message-Id: <20210401135451.1004564-3-mlevitsk@redhat.com> In-Reply-To: <20210401135451.1004564-1-mlevitsk@redhat.com> References: <20210401135451.1004564-1-mlevitsk@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210401_145619_024954_6C1B64F0 X-CRM114-Status: GOOD ( 14.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This capability will allow the user to know which KVM_GUESTDBG_* bits are supported. Signed-off-by: Maxim Levitsky --- Documentation/virt/kvm/api.rst | 3 +++ include/uapi/linux/kvm.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 38e327d4b479..9778b2434c03 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -3357,6 +3357,9 @@ indicating the number of supported registers. For ppc, the KVM_CAP_PPC_GUEST_DEBUG_SSTEP capability indicates whether the single-step debug event (KVM_GUESTDBG_SINGLESTEP) is supported. +Also when supported, KVM_CAP_SET_GUEST_DEBUG2 capability indicates the +supported KVM_GUESTDBG_* bits in the control field. + When debug events exit the main run loop with the reason KVM_EXIT_DEBUG with the kvm_debug_exit_arch part of the kvm_run structure containing architecture specific debug information. diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index f6afee209620..727010788eff 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -1078,6 +1078,7 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_DIRTY_LOG_RING 192 #define KVM_CAP_X86_BUS_LOCK_EXIT 193 #define KVM_CAP_PPC_DAWR1 194 +#define KVM_CAP_SET_GUEST_DEBUG2 195 #ifdef KVM_CAP_IRQ_ROUTING