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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,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 E06DDC43470 for ; Thu, 1 Apr 2021 18:17:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAB27601FC for ; Thu, 1 Apr 2021 18:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238903AbhDASPC (ORCPT ); Thu, 1 Apr 2021 14:15:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22510 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236994AbhDAR4n (ORCPT ); Thu, 1 Apr 2021 13:56:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617299803; 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=BxuZH0fayYxgqWic6rTDdDBKKOJFWzcujpzMTkyaNEm9OSRBo2pKuZI/tsdumiaG78gH9b bYKpkQPxpmrvD2KcaHiX5wQH5+auxk2gJ/+Qnz1bsIPo1DIcy86ba62acPMbtziD7fiNwo SpAR4+/kGtkc5bQlpLhUxz+3/vWu/AY= 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 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.26.2