From patchwork Wed Jul 1 18:29:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 6705691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D0D279F2F0 for ; Wed, 1 Jul 2015 18:32:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E76CE20708 for ; Wed, 1 Jul 2015 18:32:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FF9D2070B for ; Wed, 1 Jul 2015 18:32:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAMmk-00047P-OC; Wed, 01 Jul 2015 18:31:02 +0000 Received: from mail-wg0-f53.google.com ([74.125.82.53]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAMlp-0001gs-Vk for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2015 18:30:07 +0000 Received: by wguu7 with SMTP id u7so43949865wgu.3 for ; Wed, 01 Jul 2015 11:29:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=VqqsHZ9A6Y8y0z3czBP7s1qhRJQRar347KcFKQ4oTh0=; b=R7+2rqmcG/5JArU0KHhy3MFtQT8+a064jCRZrvUvFhiwvqxEexNc7fgFswVtLU4l+n BDoj28MkEB0Lljdb91LRT8pYuGY/itLg0yr9CvKe6q4rKX/Ei4RNoLBl+wETwxzafKc6 p5YlrQaTomZlU58V0F7R4PSMAAIVyjstf36z0jF03onG5cQIlkMgSTFXK+UF4Vsx5ooh K2iIGzbgs7HJIzmvsCVlVPMFIU3/uKzoyJI/4cL6lXmy6UKn0ybYNf7SKwBf3PaRQLFk 4Wx02b+3/PnMCWnim205CBoXTxNutOlycsp0o9VnUFkRBv1TyoZzvAjdSqFvRbggaNoE QEpQ== X-Gm-Message-State: ALoCoQkOs0vhvPMH3mK98zPizoG6EDY3te2K461v4Kk2SNNk9g5/eQjOFGaUpNNwrKZ4pvLfdjIQ X-Received: by 10.180.82.162 with SMTP id j2mr9323560wiy.54.1435775384329; Wed, 01 Jul 2015 11:29:44 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by mx.google.com with ESMTPSA id c7sm4109021wjb.19.2015.07.01.11.29.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2015 11:29:42 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DB5D73E0796; Wed, 1 Jul 2015 19:29:40 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, peter.maydell@linaro.org, agraf@suse.de, drjones@redhat.com, pbonzini@redhat.com, zhichao.huang@linaro.org Subject: [PATCH v7 10/11] KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG Date: Wed, 1 Jul 2015 19:29:02 +0100 Message-Id: <1435775343-20034-11-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1435775343-20034-1-git-send-email-alex.bennee@linaro.org> References: <1435775343-20034-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150701_113006_286807_22F7C80A X-CRM114-Status: GOOD ( 12.68 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Gleb Natapov , jan.kiszka@siemens.com, Will Deacon , open list , dahi@linux.vnet.ibm.com, r65777@freescale.com, bp@suse.de, =?UTF-8?q?Alex=20Benn=C3=A9e?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Finally advertise the KVM capability for SET_GUEST_DEBUG. Once arm support is added this check can be moved to the common kvm_vm_ioctl_check_extension() code. Signed-off-by: Alex Bennée Acked-by: Christoffer Dall --- v3: - separated capability check from previous patches - moved into arm64 specific ioctl handler. v4: - add a-b-tag --- arch/arm64/kvm/reset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index 21d5a62..88e5331 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c @@ -76,6 +76,9 @@ int kvm_arch_dev_ioctl_check_extension(long ext) case KVM_CAP_GUEST_DEBUG_HW_WPS: r = get_num_wrps(); break; + case KVM_CAP_SET_GUEST_DEBUG: + r = 1; + break; default: r = 0; }