From patchwork Thu Apr 30 09:24:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47785 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 94D4320553 for ; Thu, 30 Apr 2015 09:26:09 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf2942337wic.3 for ; Thu, 30 Apr 2015 02:26:08 -0700 (PDT) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=wllTXBLPRf9NN6KgX9+T06yEl0n39ubjBkJLldbCcPU=; b=hDhuyhs18Cq4iyEEpBASodCKtbd6oiulEauSfl+XKFPsnEq4h9Fu0KEFwqTWs0TyIJ RK5CPqmNJ9Mvb+HDGYftM9eYTQjU/K1eygswCGQyAnUj3iSVMXG1H5MCpQnrOZCPVvOx zKXOFijruDPOEbsZZ+hIV74IM9Jnp/lJ7N8kRflWZdoAKk7nUBNKSMcsiR73vHuOhwI3 GuawfotDPMjGUsI3H1ZoqwOpFfbL7lZYW5Gd0gDNNucasf2WMt/7IN/5oFcHidS9puWe SFxq0LDA5BkYs4fQntwz/WH75rrCOflROj6jHEX47OmjIlD7Lt2t+RRMcmlD3GWxxU9K YPmQ== X-Gm-Message-State: ALoCoQlvQN+kut+fZvjIlqIOTLPyDMPPNQKVOSb5f4DH0rNDDwUOV+7gDQmLmyVO/5df7ocKBDCn X-Received: by 10.152.4.194 with SMTP id m2mr2008495lam.1.1430385968907; Thu, 30 Apr 2015 02:26:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.67 with SMTP id da3ls395203lad.49.gmail; Thu, 30 Apr 2015 02:26:08 -0700 (PDT) X-Received: by 10.152.203.233 with SMTP id kt9mr2995414lac.21.1430385968674; Thu, 30 Apr 2015 02:26:08 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id j11si1329530lbg.95.2015.04.30.02.26.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 02:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by layy10 with SMTP id y10so39628812lay.0 for ; Thu, 30 Apr 2015 02:26:08 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr2924759lac.41.1430385968580; Thu, 30 Apr 2015 02:26:08 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp2995608lbt; Thu, 30 Apr 2015 02:26:07 -0700 (PDT) X-Received: by 10.68.167.162 with SMTP id zp2mr6393628pbb.105.1430385939486; Thu, 30 Apr 2015 02:25:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nf2si2640288pbc.149.2015.04.30.02.25.38; Thu, 30 Apr 2015 02:25:39 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751298AbbD3JZa (ORCPT + 2 others); Thu, 30 Apr 2015 05:25:30 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:52985 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751336AbbD3JZO (ORCPT ); Thu, 30 Apr 2015 05:25:14 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnkiV-0005Mb-VH; Thu, 30 Apr 2015 11:25:11 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Christoffer Dall , Shannon Zhao , Jiri Slaby Subject: [patch added to the 3.12 stable tree] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Date: Thu, 30 Apr 2015 11:24:19 +0200 Message-Id: <1430385911-20480-11-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1430385911-20480-1-git-send-email-jslaby@suse.cz> References: <1430385911-20480-1-git-send-email-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Christoffer Dall This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit e9b152cb957cb194437f37e79f0f3c9d34fe53d6 upstream. The arch-generic KVM code expects the cpu field of a vcpu to be -1 if the vcpu is no longer assigned to a cpu. This is used for the optimized make_all_cpus_request path and will be used by the vgic code to check that no vcpus are running. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall Signed-off-by: Shannon Zhao Signed-off-by: Jiri Slaby --- 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 9cf07789337f..d45c36c31e8c 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -340,6 +340,13 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) { + /* + * The arch-generic KVM code expects the cpu field of a vcpu to be -1 + * if the vcpu is no longer assigned to a cpu. This is used for the + * optimized make_all_cpus_request path. + */ + vcpu->cpu = -1; + kvm_arm_set_running_vcpu(NULL); }