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: 9663557 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 66CB9602B8 for ; Wed, 5 Apr 2017 09:31:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 650102684F for ; Wed, 5 Apr 2017 09:31:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59E2D2859A; Wed, 5 Apr 2017 09:31:12 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 856DC2684F for ; Wed, 5 Apr 2017 09:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932403AbdDEJ3S (ORCPT ); Wed, 5 Apr 2017 05:29:18 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37625 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932649AbdDEJ2V (ORCPT ); Wed, 5 Apr 2017 05:28:21 -0400 Received: by mail-wm0-f44.google.com with SMTP id x124so8484341wmf.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=UqN9ASzRdxgy/43E3QXZYsMnLsYDYCnU7pPPmQTMlV5g/G2rO4+ME2lNJtpvZi3PSH HFL0EM5BLSJ3+AfzJ44Ewl7ZyVYinLpm7xn60UZYllQDCnyCx1dm+rt73kqcHDVNsmVI w0XUS9tecdXIqjHvonnaidjM/foi4xyRMVSdPFQ4AQZSmFxtbeSFfkdgwuBeFn1l18vY xB3f08tDRz5rQ+pVCQjz2vvOm3UswcM7CwhkZ803zwn+QEAeQEzxLSDGMbsfRBG0LgLj tYrwyoNRWvj3fhZNEjwvtmlAHGqO9lJTdTa7LXt6Bk7/uLYcRQsn9ZFZptBU8Z0F+REb /6/Q== X-Gm-Message-State: AFeK/H2Bv0S1pVc+wBiK+NlwJ25dRL2v/c6/qfC6sn3YpukIDB7kX7FZj85hEABhPsvIkiT7 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 Cc: kvm@vger.kernel.org, Marc Zyngier , Alexander Graf , Peter Maydell , Pekka Enberg , Christoffer Dall 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> 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 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;