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: 9554285 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 0AF0360424 for ; Fri, 3 Feb 2017 14:57:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5B1927F95 for ; Fri, 3 Feb 2017 14:57:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA9392823D; Fri, 3 Feb 2017 14:57:11 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46431283FC for ; Fri, 3 Feb 2017 14:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbdBCO5K (ORCPT ); Fri, 3 Feb 2017 09:57:10 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37574 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbdBCO5G (ORCPT ); Fri, 3 Feb 2017 09:57:06 -0500 Received: by mail-wm0-f50.google.com with SMTP id v77so31816575wmv.0 for ; Fri, 03 Feb 2017 06:57:05 -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=FcC3CMhYeqb7m0hQ7a5b29szLWwoPTu273ZagQHF9t2iQJXug+c0y+leynWWHdBrWD FBurBL3cPHwNEcFpW64hdulB+jmeFERsAJ9xjhyRiJ0buvoALOyFXp/SYPEU1qvJ4fru /1+Pp8gjNLJJ6lPpwIM1U+JoNeDL3X399yzMtNU9NKGYEfICtvBOQlS0nblpkggtoFZZ kxsBvYdE6sA7c96kGFnVVkoeQJyfxRacp6MQrRIBQfo6yZibYsKFZfC4UkJBTJnIB7NQ e7+Gw2psHjRqrk7f4be7fomspoEe9G/vFg0OzfSpBdKASfo30tJHK2Kwh3o9K0DPpX8M RbDg== X-Gm-Message-State: AIkVDXLOw8a4PmyrWT4lxqLBP7xLzA0XyBsyaUchlYKm62Fo+nVxrVXw9AStfp+ZYp+q33yH 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 Cc: kvm@vger.kernel.org, Marc Zyngier , Alexander Graf , Peter Maydell , Pekka Enberg , Christoffer Dall 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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;