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: 9695025 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 883B460245 for ; Sun, 23 Apr 2017 17:13:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7236D26530 for ; Sun, 23 Apr 2017 17:13:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67165265B9; Sun, 23 Apr 2017 17:13:05 +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 4F8B8269A3 for ; Sun, 23 Apr 2017 17:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932714AbdDWRNA (ORCPT ); Sun, 23 Apr 2017 13:13:00 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:35968 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163030AbdDWRKw (ORCPT ); Sun, 23 Apr 2017 13:10:52 -0400 Received: by mail-wr0-f179.google.com with SMTP id l50so5314559wrc.3 for ; Sun, 23 Apr 2017 10:10:51 -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=cg4j9Zwh8UtmYsrtz9qprOkDkWVcGTbc+rgUE3T/l5lpMAqGHfVjrvgC86BXYhrGuC dNmcr5Fk852ExPPKq/8aoO0JJTTc/mgP49DAqc9t+RoVayzHZM7dsPkBMnudE2F1jQv/ Mo5p3VRp2jWxTYo2GcxWgKasF8Iipu2R5xzGVsXJKMxg1UqB+opxPmlNlkoNXkrQJZ77 /vArYUfEkzictAEw9qtIfP6wRTsdZhufXfgvp2E7zrm2nWTCSi95lny0B2cxHdZyh9Vr fsqRv4HyeOjswX850WrSu/M5QYSvs8f8CuLFVuKilY60KzX83k+O0zcNyp6I4TnT1gnn qBTA== X-Gm-Message-State: AN3rC/4E+dkT5Wa3P+f6bq9VWAvTIrIkOiROLeIVUPFWptCVN+7yCFSp lZMLXF2avcI6QZ+E 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?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall 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> 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 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;