From patchwork Sun Apr 23 17:09:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 224AD601E9 for ; Sun, 23 Apr 2017 17:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 215E1209D8 for ; Sun, 23 Apr 2017 17:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14F30262F2; Sun, 23 Apr 2017 17:35:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C0B62621F for ; Sun, 23 Apr 2017 17:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Mm+lgMeoFB9vjH/8RUd0pzWQO0fmD+zFcYfF5pZK0UI=; b=FmqrwhJ+o4DeubCY1sl1WGcfnQ VClrPmbt0vnDDiAgS7pjMtHw0OsV4qLVjea29dErPIw6nhJEGs742pSLwoabBmdsgGDhksX4WUtsU DKDfY+yBSngYwza9Yq/vsp+b0wCNVvHbdv4JYrvwhuI/Wtu/SZJwbN4kNsYjTKypzUmPIzOEIQj2m Qj+G0MNeHkAJG+raSLnmrGBuaznpwZPzfOvF/QWdmZo4IWX+7DpKURLPAitxb5gU10qkUP3kkwxqS YjqCr/iBN1yguXDrbXm9Khk6KLbYgARB6crjxZ+8YklXuTaU7hpzTfUK/VrN8LhwIx/Br9k7/ifgy fiGXtGGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d2LPe-0007kG-0q; Sun, 23 Apr 2017 17:35:06 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2LMM-0002ZO-5W for linux-arm-kernel@bombadil.infradead.org; Sun, 23 Apr 2017 17:31:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9M5OEKvKi2v7NE4MsAJAuYuda1wWp5c/AnGh32hI3kc=; b=loFCNUQvrwPaJBbtCzw9stR5O f1Jqo1qQSofFe8DzxOe6c1AKJJgIJZbAUK4i7UDQDzDwZTcDQKfM/QYzZoyn2U4Hin1TXsdFIEIga PoGqV75S2LA1Lmd8qwv+F8ORpZztgvCOfld2wrmfez3A65LBTfBsEfSzL/2uhX4RH+qrNCqd+81Tw J9xd/0sXBqdEfWtjCjpC0qcSCQber8KylE4Nvi0A0zh6+xI/bPFBGXG7yan23XlU/ufEr2iR0oIKj +ihc/Js7ueWKKgF5ESuKp/hXpqLWr1FlP7/Yz4Vylg9A3cOrN0s0v3XBSFLY7+dopmki/nahLoKCK gvr0WGYcg==; Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2L2W-0005GO-VL for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2017 17:11:14 +0000 Received: by mail-wr0-x231.google.com with SMTP id z52so37739040wrc.2 for ; Sun, 23 Apr 2017 10:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9M5OEKvKi2v7NE4MsAJAuYuda1wWp5c/AnGh32hI3kc=; b=ZHoBDW3TScyr4txnU18IWaml8zFJBpdssf9PBxxksmF/OF/1/+JPcn+c4WOxt9pfPA AIL26OVZ4bvEIzXuV0t/TD5DzZEQ/lR4MbRWdm8XX1ptoSWw+ON5Q2RPpnJvvUvSWO68 j30gOuP28IomwqjzerGM3F9rqL2Uj5R5sOML0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9M5OEKvKi2v7NE4MsAJAuYuda1wWp5c/AnGh32hI3kc=; b=a/qh0J+lqTMfTeDwxMZmMIx/lGm737Yw40bZ699WrSQWcVZe0lcvGePqRM7EwUSPBD ULfMN9EcleHGSYtUbGDbUd10C7Z3Tkh1W3p10Bze7s1XFALqpJ2kR+a2M/5zZd6QrPow bnRe7LPGsH5dnYs9miL8Sv/dm4ICG0slesgSQ+I6YmqQLlBboA9lLGofEg1eQeSclebF +OXML9eO3aEazzGRNGZNCV07YEIvE5y3YOzbPa2a8sY3c2X0Eyav7ycds3i9j0TRiJ4o w+aB5QBhYeMcTqCYattyb3Dhb149lO3aNvsxInNz9zvwhNlC5snFtDHjE7pYx84ahBf3 LPKA== X-Gm-Message-State: AN3rC/713oJIx5Mkzh9xLSQOWlf/xVgMXDTawQIeWqdYQUAc7AWIXTJI GM1yCpPTnu5agLXv X-Received: by 10.223.150.18 with SMTP id b18mr2571535wra.98.1492967450944; Sun, 23 Apr 2017 10:10:50 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.10.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:50 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 74/79] KVM: arm/arm64: Advertise support for KVM_CAP_ARM_USER_IRQ Date: Sun, 23 Apr 2017 19:09:24 +0200 Message-Id: <20170423170929.27334-75-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170423_131113_148693_D12517CF X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christoffer Dall Now that we support both timers and PMU reporting interrupts to userspace, we can advertise this support. Reviewed-by: Alexander Graf Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/kvm/arm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 9eda293..7941699 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -229,6 +229,13 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) else r = kvm->arch.vgic.msis_require_devid; break; + case KVM_CAP_ARM_USER_IRQ: + /* + * 1: EL1_VTIMER, EL1_PTIMER, and PMU. + * (bump this number if adding more devices) + */ + r = 1; + break; default: r = kvm_arch_dev_ioctl_check_extension(kvm, ext); break;