From patchwork Tue Feb 4 09:48:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 3574641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 04DFBC02DC for ; Tue, 4 Feb 2014 09:50:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4BE4A20176 for ; Tue, 4 Feb 2014 09:50:31 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55B2A20170 for ; Tue, 4 Feb 2014 09:50:30 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAcdE-00038E-Ew; Tue, 04 Feb 2014 09:49:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAccz-0001p6-Os; Tue, 04 Feb 2014 09:49:13 +0000 Received: from mail-pd0-f173.google.com ([209.85.192.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAcct-0001mi-Gv for linux-arm-kernel@lists.infradead.org; Tue, 04 Feb 2014 09:49:08 +0000 Received: by mail-pd0-f173.google.com with SMTP id y10so7959134pdj.18 for ; Tue, 04 Feb 2014 01:48:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eOUxIqi5WLwFJTpQAZTOajT5ieQhqCzL4sMTLCp7LMw=; b=OlyQqgErpXs/fmDIr9XrmnHHBUvkiqvjovdoAxz9AvqZK/pVtw1+ts9ExrOAMsTPdd mRRnl216I5uDtEibzpVBr/6SAgSLBg7oAIV+z1oiMHBZT8PUSld3cyajhkyaQtYAl8+d EldIpOc403RBwueoHkApsI4pTFbId2LjNgBYAyymnoVaQrkC+x49fGv/isI51wZvaxqq tKsITMaQI4pq5HIoSK4/l//UlHA+wF6AM/xN4gVMKNZEAC3sxR7921+HZfknyQpiNWgV Tl/5CvCE+WuJ72/1GpC/67wNSpbNpR31IEw216tgaLzanYLotvSTFR4a24HchV0KuJvQ 3jLw== X-Gm-Message-State: ALoCoQlD7sFSOPw5OhZH0m6Bi47LXLd7tBooifBhNur8GCseowbU8voum4306VejxFOILvHF/o8s X-Received: by 10.66.26.176 with SMTP id m16mr12810261pag.142.1391507325574; Tue, 04 Feb 2014 01:48:45 -0800 (PST) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id gg10sm64586644pbc.46.2014.02.04.01.48.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 01:48:44 -0800 (PST) From: Anup Patel To: kvmarm@lists.cs.columbia.edu Subject: [PATCH v3 2/4] KVM: Add capability to advertise PSCI v0.2 support Date: Tue, 4 Feb 2014 15:18:14 +0530 Message-Id: <1391507296-2099-3-git-send-email-anup.patel@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1391507296-2099-1-git-send-email-anup.patel@linaro.org> References: <1391507296-2099-1-git-send-email-anup.patel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140204_044907_683586_9CAF1D7E X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: Mark Rutland , linaro-kernel@lists.linaro.org, Anup Patel , patches@linaro.org, Marc Zyngier , patches@apm.com, linux-arm-kernel@lists.infradead.org, Christoffer Dall , Pranavkumar Sawargaonkar X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP User space (i.e. QEMU or KVMTOOL) should be able to check whether KVM ARM/ARM64 supports in-kernel PSCI v0.2 emulation. For this purpose, we define KVM_CAP_ARM_PSCI_0_2 in KVM user space interface header. Signed-off-by: Anup Patel Signed-off-by: Pranavkumar Sawargaonkar --- arch/arm/kvm/arm.c | 1 + include/uapi/linux/kvm.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 1d8248e..c8a71df 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -197,6 +197,7 @@ int kvm_dev_ioctl_check_extension(long ext) case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: case KVM_CAP_ONE_REG: case KVM_CAP_ARM_PSCI: + case KVM_CAP_ARM_PSCI_0_2: r = 1; break; case KVM_CAP_COALESCED_MMIO: diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 932d7f2..fb3c3f3 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -675,6 +675,7 @@ struct kvm_ppc_smmu_info { #define KVM_CAP_SPAPR_MULTITCE 94 #define KVM_CAP_EXT_EMUL_CPUID 95 #define KVM_CAP_HYPERV_TIME 96 +#define KVM_CAP_ARM_PSCI_0_2 97 #ifdef KVM_CAP_IRQ_ROUTING