From patchwork Fri Dec 20 14:30:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Murray X-Patchwork-Id: 182287 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp609868ilf; Fri, 20 Dec 2019 06:33:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxMnc9xmALwY63mtqqhgHfSuZZcZcefrxfFSFoTNoaEnvYhKYssOX1V14ANJRu9j3hYDbNR X-Received: by 2002:a05:6830:1e8a:: with SMTP id n10mr4680736otr.303.1576852435575; Fri, 20 Dec 2019 06:33:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576852435; cv=none; d=google.com; s=arc-20160816; b=kX8b6rm2hcG2HMi9b1sKOKADc5tCOtxPbyNLUeRF1iAgh/Yh6ssNv3M/p/Db8rwUCQ Simg9NouljveKmVGsYba0EaWKTZKeHjvAY05hiJSiWS9suewFGGLRrokC7yCwWNdt3ac qatOSZiZBwwhgKSTC9t8FJzZ7J4wrpHGqgi/D8x9UlWqzgCeNPRBgUHdKag4lBuFyALm XFdg3ywqnjRGpT8K3/y9JZmtx67PW/XIhqRRYRO4cmjJOFkd3Hcben0zBR5YPkUHqpI0 QjhRQBKkuMp6YUzgnuQrj12z9foRGCbrKY+XsVub2lMXr6FObE3bGPRvILYNRx8pR8nA +7Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kgh0fpJN8zKbUfowIDGlZY6dkhtNrSfbImWSOLy+PYI=; b=JorvA3F1d3dntyUKPLLUC86aX7uZDH/JF7wfT7ti0j1Bnmvt957nx6V39KtYEbHLgq ZYUwugdsT3/XxQMwsRDvaK9is/Cu/EEP4TfwME6hRWweH9P2mr/6mhYEq1A1CzX5G0xJ 6Hnf4RudZDSzVxAyBFMyC1KovbX3Lo2dUtv/gPmByKoGAprGIAynK4gMSZo4D4xlpVLg PQ0bc3EmVxuGws5yV4AaygXsZdnJNv+9OEWswNdRo+o8MCmiHNGMrNrv8768MPtU0NV/ gFg5M81fckj3kKLDUR3O0Dy7k2S+vcdByjGNWQ/JG4YxJ00NGIYfPZIBI4w8JM7vKzw1 XtxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w64si4972237oib.185.2019.12.20.06.33.47; Fri, 20 Dec 2019 06:33:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbfLTObT (ORCPT + 27 others); Fri, 20 Dec 2019 09:31:19 -0500 Received: from foss.arm.com ([217.140.110.172]:51340 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728039AbfLTObH (ORCPT ); Fri, 20 Dec 2019 09:31:07 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5FC1811B3; Fri, 20 Dec 2019 06:31:07 -0800 (PST) Received: from e119886-lin.cambridge.arm.com (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 87C853F86C; Fri, 20 Dec 2019 06:31:05 -0800 (PST) From: Andrew Murray To: Marc Zyngier , Catalin Marinas , Will Deacon Cc: Sudeep Holla , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland Subject: [PATCH v2 16/18] KVM: arm64: enable SPE support Date: Fri, 20 Dec 2019 14:30:23 +0000 Message-Id: <20191220143025.33853-17-andrew.murray@arm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191220143025.33853-1-andrew.murray@arm.com> References: <20191220143025.33853-1-andrew.murray@arm.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudeep Holla We have all the bits and pieces to enable SPE for guest in place, so lets enable it. Signed-off-by: Sudeep Holla Signed-off-by: Andrew Murray --- virt/kvm/arm/arm.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.21.0 diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index a66085c8e785..fb3ad0835255 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -611,6 +611,10 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu) return ret; ret = kvm_arm_pmu_v3_enable(vcpu); + if (ret) + return ret; + + ret = kvm_arm_spe_v1_enable(vcpu); return ret; }