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: 24086 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C1B320445 for ; Tue, 4 Feb 2014 09:48:49 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wp4sf33158200obc.5 for ; Tue, 04 Feb 2014 01:48:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=eOUxIqi5WLwFJTpQAZTOajT5ieQhqCzL4sMTLCp7LMw=; b=RnYILakXMsPb5lqMw/nODX10gCE7zyEcMCtksXJGfEg8zeBE0YFQOg9bINRFFoSTth hIEZ0UY73p+babi3dNhYt0HisimQWqIbM9mZz02NBTgOeJwMfBeW/OUnm6VlLoQ5NbVU dHagFiwZCIwX6hzsSlcKiEqxrSntaSBgi0Ly8PGnC3AqCEGL2bIa0Jzy5efeIRQFQ8hn GtPugjwRkyOoVAHnTQ7m4O37iK2xcaE900mbJbg/LJreRQUKsg5cGcuxTgg16zHuArH+ Hinuterj9IiOIdYxfEyzj/+x8nNRxqLL6suMoCnhrov7yRE5W6ublrSB+YbH3lzKNhW2 GVsw== X-Gm-Message-State: ALoCoQntjqvMvp5yMo+KSaKUcX0qXF5XxdxCWCvbh5ScGVcLwdUeNEowiD2L8F/gzbXWulyUU90c X-Received: by 10.182.19.164 with SMTP id g4mr15674432obe.21.1391507328476; Tue, 04 Feb 2014 01:48:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.52 with SMTP id j49ls2228834qge.7.gmail; Tue, 04 Feb 2014 01:48:48 -0800 (PST) X-Received: by 10.59.6.7 with SMTP id cq7mr33112382ved.14.1391507328407; Tue, 04 Feb 2014 01:48:48 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id uo16si7894272veb.124.2014.02.04.01.48.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 01:48:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so5548553vcb.36 for ; Tue, 04 Feb 2014 01:48:48 -0800 (PST) X-Received: by 10.52.30.230 with SMTP id v6mr26998102vdh.6.1391507328328; Tue, 04 Feb 2014 01:48:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp221554vcz; Tue, 4 Feb 2014 01:48:47 -0800 (PST) X-Received: by 10.66.160.2 with SMTP id xg2mr42396753pab.23.1391507325981; Tue, 04 Feb 2014 01:48:45 -0800 (PST) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by mx.google.com with ESMTPS id ye6si23927120pbc.230.2014.02.04.01.48.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 01:48:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.44 is neither permitted nor denied by best guess record for domain of anup.patel@linaro.org) client-ip=209.85.160.44; Received: by mail-pb0-f44.google.com with SMTP id rq2so8248233pbb.3 for ; Tue, 04 Feb 2014 01:48:45 -0800 (PST) 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 Cc: linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, patches@apm.com, Marc Zyngier , Christoffer Dall , Mark Rutland , Pranavkumar Sawargaonkar , Anup Patel 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anup.patel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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