From patchwork Fri Feb 3 14:56:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9554297 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 BCD7860424 for ; Fri, 3 Feb 2017 14:59:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A28FF27F95 for ; Fri, 3 Feb 2017 14:59:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97222283FC; Fri, 3 Feb 2017 14:59:08 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no 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 671B327F95 for ; Fri, 3 Feb 2017 14:59:08 +0000 (UTC) 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 1cZfKN-0003f2-Vd; Fri, 03 Feb 2017 14:59:08 +0000 Received: from mail-wj0-f177.google.com ([209.85.210.177]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cZfJi-0002dP-HQ for linux-arm-kernel@lists.infradead.org; Fri, 03 Feb 2017 14:58:30 +0000 Received: by mail-wj0-f177.google.com with SMTP id uo9so1659617wjc.1 for ; Fri, 03 Feb 2017 06:58:06 -0800 (PST) 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=4mm2MqkGGtEVaR5z3puh86s3XfcS91yT4+olBfTkhUk=; b=YfB2kjaiNRfynCKxd102IeYWGFQKjkWvyWTaaeRDpNNcXvVMNU07J36/UZRVy/IT17 uxBzh19+uPjBKl2jGgtnSt2gEtXQS9Bt2HPRoWtsxqZHSdnlDXVpLbXK4y07fR+9YzWJ gM79usoD8ZQ20hgCxt3KgAtqBc/FvXFcC1kbc= 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=4mm2MqkGGtEVaR5z3puh86s3XfcS91yT4+olBfTkhUk=; b=AYDWBRfgGhGrziHhoRCx14OhUi1ti8cBJBTpw+bklQYQLexP4ETibbNEjQbieLOG4g agxHmL0CycR0afZunSSIFRA/HV7He8XOsylp9JO/S9cQUP6HiQwoRy/Zj60j78/7OonD IMtHuP77gV3BL5yaz9dybmRuQ+Cn2GecQ5lqTjRVWTOf0LHqBjH9NsoEd3DkKzr8O0LC b/ZSp/us1SBMTkdYo0OjlHMcrQdb6kOuDSnwcWbt+TMAkw6GKrajj1On+z8tovCknolW IcFVqJxPKWSBXHaU1mIDJerK2uzsbqhew9bCvzsa8/Igkn7zJFqCCp9re5wK2q1laz/J 8hGg== X-Gm-Message-State: AIkVDXJzBSx9U9MRt3CarcWHYBebizUWHS4y3gnCs4b/Wg97B8vkpuUkT89KlEGY8m/5EWbS X-Received: by 10.223.173.40 with SMTP id p37mr13829907wrc.136.1486133824688; Fri, 03 Feb 2017 06:57:04 -0800 (PST) Received: from localhost.localdomain ([217.61.220.40]) by smtp.gmail.com with ESMTPSA id n13sm45466469wrn.40.2017.02.03.06.57.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Feb 2017 06:57:04 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/5] KVM: arm/arm64: Advertise support for KVM_CAP_ARM_USER_IRQ Date: Fri, 3 Feb 2017 15:56:55 +0100 Message-Id: <20170203145655.15007-6-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170203145655.15007-1-cdall@linaro.org> References: <20170203145655.15007-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170203_065826_811800_39571D26 X-CRM114-Status: UNSURE ( 9.99 ) 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: 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 92f38f6..71cf78e 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -226,6 +226,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;