From patchwork Wed Apr 5 09:28:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9663617 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 0A1EB6021C for ; Wed, 5 Apr 2017 09:57:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC0C02859A for ; Wed, 5 Apr 2017 09:57:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDE1D285A3; Wed, 5 Apr 2017 09:57:42 +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 6BBCD2859A for ; Wed, 5 Apr 2017 09:57:42 +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=OPpkE4ooeHfQ6TC+YLXgTCfAhV4HMQ5MuSqw31o5PkA=; b=UC/D+HB5+lfas134GEcmvRn0Z4 U7YDQi8DQaMQWM1wIkAOf2COQT9i0hLkQSn7C+pjFRayqss7m5wNo38g6x1Am+GAUaj2XzvnAbXMd WwtvYBez9b4RHbUD7ofTERrzkMgMAoUuQ+uOf6+6o13GJCLYGG94moAI9ynfz3eaBe/IYjVrxfBhA Pt53ELiHTa4qH4IATWFWYTm/CBDrPlDiHvZfaxKUQkUTYqbaKZ0jKvIbweWqwRssYa8fNmqGVl9Eg JnldV9Rp2MidN4bCGkVvARjqC2ulJs9+ukekvJpOQs50EcQn7K+MGKxXGbMCPrkjBuridpR4Lyky1 Le6vBoxw==; 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 1cvhh7-0000Z3-Bk; Wed, 05 Apr 2017 09:57:41 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cvhgn-0008Fh-VS for linux-arm-kernel@bombadil.infradead.org; Wed, 05 Apr 2017 09:57:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=H2gvthL/QZan5JaknJdNy8sg3ckpU3/qMozhJ7kqhXs=; b=XT3I3wyIosLNvgoSwmu/yDyV8 3bW28sHz0R3b9cSIglm0mrFSeGv0XG7E8GHZkRJDEKcNnV9Keqtyw3fc3Buv/Syo7MZMCAAkaFX7/ kCFLwS1TBI/z+71SB1Pmj7+UtZCjYG+Nxh/IYia3midozTk8kCAoRyaDBnzuhRBnqqXQfcBQ71zzG 87QsVDFTyjpf2seI9wExtRSfQoehnJKqvTeEUDMjCQD/WGCK+1M6Jj6Kw/RH0arUPz5DnkEIm0jlx P2RgS3TDS7eblZfq7Azibhsk9xVI21QhVSpXTVr6Sq3kjNVHqQAQwyKo26+EJXBEGlFySjWJweTVS VAKR1w2Cg==; Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cvhF3-0006vy-Jh for linux-arm-kernel@lists.infradead.org; Wed, 05 Apr 2017 09:28:43 +0000 Received: by mail-wm0-x22b.google.com with SMTP id y22so45044175wmh.0 for ; Wed, 05 Apr 2017 02:28:21 -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=H2gvthL/QZan5JaknJdNy8sg3ckpU3/qMozhJ7kqhXs=; b=OUM/+VkLpXLonOfECoJ4PMWSBBr6U8uFQqVf0HXUW6wJF9WTnm+NmwDsOXw+XTeFFJ NOU5VsEppfL7b1/Gv1dDz6Ff5fropebJO+GHzM6/ExSJ9iY3fkO3iXroySFYtFuIb+MK MwC+nlu6RUsudJHRvbHIkbwgDBihr1bIS4/So= 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=H2gvthL/QZan5JaknJdNy8sg3ckpU3/qMozhJ7kqhXs=; b=I0J5iWXsSDMe3EvuCbOe07mWcbpiRgvpHphHUNDh83I8r/3UivuG6rwurmQ2SnFcAw Ox/8Oe5UGeoS5kylLKPZZIVPUc7tH3tS2shF513F3/SLVP166sz684wZN741QGFPXMxe UFj3wjxQ8l6g2iuUX4gOofZ6QbXu6/GuHBDyhLu49xJKfVPxt5wZjFAlBN+RGYCFhzIk kKyc7V2wBj5a6BEXiM5ZVMueArsHMOAMvJ3qO/nmNaugdYeAbNZ5PveKZqKsX1fe6RT9 8a1ET6pu8I7RSZXKR61KTgi2bMeU75YpY+CDdRrn2qOuqXJEG/muNbFALRzLqfh8s1Ph 3oEA== X-Gm-Message-State: AFeK/H336nCXBJxm8LU9dIiDzcmTkFv9GvOnnWvCKcRiR5lRgWnOQyqj8sL2xSnRZVRp3KhS X-Received: by 10.28.95.85 with SMTP id t82mr19136017wmb.107.1491384500436; Wed, 05 Apr 2017 02:28:20 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id g23sm21578135wme.8.2017.04.05.02.28.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 02:28:19 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 5/5] KVM: arm/arm64: Advertise support for KVM_CAP_ARM_USER_IRQ Date: Wed, 5 Apr 2017 11:28:15 +0200 Message-Id: <20170405092815.22503-6-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170405092815.22503-1-cdall@linaro.org> References: <20170405092815.22503-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170405_102841_801267_7F825B0C X-CRM114-Status: GOOD ( 11.43 ) 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: Peter Maydell , kvm@vger.kernel.org, Marc Zyngier , Alexander Graf , Pekka Enberg , Christoffer Dall 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 when we support both the virtual timer and PMU reporting interrupts to userspace, we can advertise this support. 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 f935383..b420aa9 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;