From patchwork Tue Dec 17 05:29:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 22558 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72800202E2 for ; Tue, 17 Dec 2013 05:30:31 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id i17sf10452380qcy.10 for ; Mon, 16 Dec 2013 21:30:31 -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=80og6HTJ1IrV5XgET6X4+RjtWgkK5hLqTu55IJCydXc=; b=aqo27b/L+hBRunQhUSNiokoUnJbx/As11xap7ppkHzJ6k3Dir2ls+BmsAYH5VravSi 8AVnHbggV2QqerZI6t4mjUySg+yBVJp7ptLF8ur6132plhpCIe+kgUFmYiXchqOcoqGo mL/QEMpEl7sDkXqVBUD6Jv0glIK82FD5/Tdtl6wbl5FfeUaUQb+xJPAipjDHRd/bdEBw tXrRRVO71Nj5gnUGx9od53IjEYUGDlTWKHHYnffRuaW11Mq6LGmNuhY3AQ3K3QYB9/ny vJvlPawwRGj/bN4hL+2gnq/7ytTaV2COkwxeunp/v1dzHEoiQcu75pFJFlc9tHQhzKWp 6Rgw== X-Gm-Message-State: ALoCoQm0g1rbQjMv9C7JHJSKmldjJ5hl8Pjn4gEQklQNhzWpP9DiFz2rrGvCBxjVWNY2JLkvwcz0 X-Received: by 10.236.183.43 with SMTP id p31mr1839630yhm.49.1387258231316; Mon, 16 Dec 2013 21:30:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.81.229 with SMTP id d5ls2338165qey.64.gmail; Mon, 16 Dec 2013 21:30:31 -0800 (PST) X-Received: by 10.52.52.137 with SMTP id t9mr8382054vdo.22.1387258231239; Mon, 16 Dec 2013 21:30:31 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id xn8si4544168vdc.152.2013.12.16.21.30.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 21:30:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so3970345veb.39 for ; Mon, 16 Dec 2013 21:30:31 -0800 (PST) X-Received: by 10.52.248.207 with SMTP id yo15mr115435vdc.31.1387258231163; Mon, 16 Dec 2013 21:30:31 -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 u4csp44478vcz; Mon, 16 Dec 2013 21:30:30 -0800 (PST) X-Received: by 10.68.170.225 with SMTP id ap1mr24759212pbc.117.1387258230214; Mon, 16 Dec 2013 21:30:30 -0800 (PST) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id pt8si10768221pac.76.2013.12.16.21.30.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 21:30:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=209.85.160.46; Received: by mail-pb0-f46.google.com with SMTP id md12so6503982pbc.33 for ; Mon, 16 Dec 2013 21:30:29 -0800 (PST) X-Received: by 10.68.217.129 with SMTP id oy1mr24965390pbc.23.1387258229829; Mon, 16 Dec 2013 21:30:29 -0800 (PST) Received: from localhost.localdomain (c-67-169-181-221.hsd1.ca.comcast.net. [67.169.181.221]) by mx.google.com with ESMTPSA id vn10sm30771688pbc.21.2013.12.16.21.30.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 21:30:29 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, Christoffer Dall Subject: [PATCH v5 06/10] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Date: Mon, 16 Dec 2013 21:29:57 -0800 Message-Id: <1387258201-8738-7-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1387258201-8738-1-git-send-email-christoffer.dall@linaro.org> References: <1387258201-8738-1-git-send-email-christoffer.dall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 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: , 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 --- arch/arm/kvm/arm.c | 7 +++++++ 1 file changed, 7 insertions(+) Changelog[v4]: - New in series diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index f290b22..b92ff6d3 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -342,6 +342,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); }