From patchwork Thu Dec 12 19:55:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 22307 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E997923FC9 for ; Thu, 12 Dec 2013 19:54:29 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f64sf1871724yha.2 for ; Thu, 12 Dec 2013 11:54:29 -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=mhx11uu4fUq0v0MVs/Y0421Q6WuTfSm7J2bCZYKVmfs=; b=Bkl2gqKVyy+/VoITFxLC3SShEe8FeC9sVTeJc1POcM9+Z5oYW9OwICU2Z2uXRMleC3 rY5AP2QYIs57s+7/5HZA76BGlDGliPXLzYE89CQ6oTBFp+fVbFa91fxA2hzWR8wJoVeY 9sikQFdHJvkJS7Sr4Vx0S6qPE/lxHcmFe6cvIRsreezInojcBZ1KvB8ZzC0dlg9Z9Xdw KAJx13KFPagOzksaX6jmRES1LKcfKA/mMWKej1E775jTC6l+VhwWSkXNS3LwNfiKx3+N Fmm+8HwxHp/tbeBpCJsxSY81UNgVQw9XK2jXjZFHbjrB+7LD2IMEsHFe8dxUWuVWDGFU JRDw== X-Gm-Message-State: ALoCoQn7lotbK6qH57b8HeZSgt1ZE17QmGoVqXHO8DYHCkDNmbH4jdNGVjRQNdeVcJHZ/tqm+9Tf X-Received: by 10.236.194.201 with SMTP id m49mr3383756yhn.0.1386878069706; Thu, 12 Dec 2013 11:54:29 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.102 with SMTP id o6ls692827qek.28.gmail; Thu, 12 Dec 2013 11:54:29 -0800 (PST) X-Received: by 10.52.27.11 with SMTP id p11mr339841vdg.67.1386878069597; Thu, 12 Dec 2013 11:54:29 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id s10si2890691vco.56.2013.12.12.11.54.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 11:54:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 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.176; Received: by mail-ve0-f176.google.com with SMTP id oz11so693469veb.35 for ; Thu, 12 Dec 2013 11:54:29 -0800 (PST) X-Received: by 10.52.162.168 with SMTP id yb8mr3934011vdb.8.1386878069509; Thu, 12 Dec 2013 11:54:29 -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 u4csp381991vcz; Thu, 12 Dec 2013 11:54:29 -0800 (PST) X-Received: by 10.68.143.196 with SMTP id sg4mr15172590pbb.155.1386878068807; Thu, 12 Dec 2013 11:54:28 -0800 (PST) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id q8si17335740pav.115.2013.12.12.11.54.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 11:54:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=209.85.160.53; Received: by mail-pb0-f53.google.com with SMTP id ma3so1098219pbc.40 for ; Thu, 12 Dec 2013 11:54:28 -0800 (PST) X-Received: by 10.68.218.3 with SMTP id pc3mr15246867pbc.71.1386878068429; Thu, 12 Dec 2013 11:54:28 -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 ql10sm4014884pbc.44.2013.12.12.11.54.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 11:54:27 -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 06/10] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Date: Thu, 12 Dec 2013 11:55:45 -0800 Message-Id: <1386878149-13397-7-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1386878149-13397-1-git-send-email-christoffer.dall@linaro.org> References: <1386878149-13397-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.176 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. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier --- Changelog[v4]: - New in series 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 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); }