From patchwork Thu Apr 30 12:11:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47812 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6A3B02121F for ; Thu, 30 Apr 2015 12:12:42 +0000 (UTC) Received: by lamp14 with SMTP id p14sf14940399lam.3 for ; Thu, 30 Apr 2015 05:12:41 -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: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=14Amps6nvKDM9YjwoGII7enttXPjbMUaNeNWYaGYbm0=; b=bN/u4CMfBKcgvfRxgc+RJFw97F8YF/qyl6BiT1WnUwraLxKKpTyCZ7ryBfQJN3Lyx3 jTREMhD0updoWdDud4mid+eSI/MW7UqXyRbnDLCIp3LHeIXUwH+xvDBQ3iNAn7zElPuy DH1qunraGOiA3Z8LcehEHVCmg+kMz9+hLU9nzOLSr6pHpmtHLY9tM+wg4cg4H93jbe0C IWD3HKBwWklVJJPQvFjBMYNSIt4pmNNdS/WTFCfjq5ZrTXRj5u5U8papaaUTwe3AukT0 MSA/D6zddhoIoA9U83n1KXQQENU3dOjwA0WDUBs0GAc7yjXKbv9h8UcCRH9X8qap/WHi Ae4A== X-Gm-Message-State: ALoCoQnM8+e4MCCLuICRSbYEx3RtHrvsuWhA9CzJaIAI8RoxtgO9goF5VslX1rGGV2gSCKwmSMMi X-Received: by 10.194.240.164 with SMTP id wb4mr2369218wjc.1.1430395961371; Thu, 30 Apr 2015 05:12:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.102 with SMTP id s6ls365142lag.73.gmail; Thu, 30 Apr 2015 05:12:41 -0700 (PDT) X-Received: by 10.152.88.46 with SMTP id bd14mr3492962lab.71.1430395961242; Thu, 30 Apr 2015 05:12:41 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id ol5si1632109lbb.79.2015.04.30.05.12.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 05:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbqq2 with SMTP id qq2so42769677lbb.3 for ; Thu, 30 Apr 2015 05:12:41 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr3704967lbc.32.1430395961144; Thu, 30 Apr 2015 05:12:41 -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 l1csp3074470lbt; Thu, 30 Apr 2015 05:12:40 -0700 (PDT) X-Received: by 10.70.138.8 with SMTP id qm8mr7710271pdb.96.1430395959017; Thu, 30 Apr 2015 05:12:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ur10si3273072pac.73.2015.04.30.05.12.37; Thu, 30 Apr 2015 05:12: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 S1751486AbbD3MMf (ORCPT + 2 others); Thu, 30 Apr 2015 08:12:35 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:53589 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750923AbbD3MMe (ORCPT ); Thu, 30 Apr 2015 08:12:34 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnnKS-00089N-Qq; Thu, 30 Apr 2015 14:12:32 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Christoffer Dall , Shannon Zhao , Jiri Slaby Subject: [PATCH 3.12 11/63] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Date: Thu, 30 Apr 2015 14:11:40 +0200 Message-Id: X-Mailer: git-send-email 2.3.5 In-Reply-To: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> References: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> In-Reply-To: References: 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.217.174 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 3.12-stable review patch. If anyone has any objections, please let me 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); }