From patchwork Wed Feb 11 08:32:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 44565 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D6C9F21527 for ; Wed, 11 Feb 2015 08:35:36 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf1218839lbd.3 for ; Wed, 11 Feb 2015 00:35:35 -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=CMUhevCHWsPZFzc7E7j7AWB3xbXFf9QbvT949q6IDqI=; b=I/VL/FGqLs9R8gZe0X7Nv6olQGF+BHIxtsEZR6yw5kj7zq9s3kyd/iW7ymAd9lML1T VsBAMoTQGIXtnZYvAfZYL7rlKJoFEui7sr/L0E+EGmHZlbPLf34/fQuCdV92Kyrx+LK4 L7KgONBYLQ9nJF5yIdqILycEuL0LsGYpQkNyfF5yaBHRHdWUhb9VsJW7p0Xhdcy+Q8Gn J1stlbiOUFHRtUL0NF2EdtAusawXMVFlzxliS7PaVdwENUjiuLjHhR1xnArhTRf2/7rJ Vi+DLYdYFHMrCxnG5hEvhph+RAaa64fNh8co1GpL6U7L2TU1WwQeK9RKznk5CNeSPhPK WTRw== X-Gm-Message-State: ALoCoQlJubEsGD2Reniu/XQSHk21wJWbhT4NcXd50rRZ9WrH+LqGnTSFFwk26KLiYkzn+oXOypNt X-Received: by 10.180.105.129 with SMTP id gm1mr222985wib.3.1423643735631; Wed, 11 Feb 2015 00:35:35 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.135 with SMTP id xs7ls33891lab.42.gmail; Wed, 11 Feb 2015 00:35:35 -0800 (PST) X-Received: by 10.112.41.171 with SMTP id g11mr20274990lbl.107.1423643735470; Wed, 11 Feb 2015 00:35:35 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id po2si112946lbc.18.2015.02.11.00.35.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 00:35:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id w7so1784447lbi.10 for ; Wed, 11 Feb 2015 00:35:35 -0800 (PST) X-Received: by 10.152.6.101 with SMTP id z5mr27036082laz.19.1423643735365; Wed, 11 Feb 2015 00:35:35 -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.112.35.133 with SMTP id h5csp1110333lbj; Wed, 11 Feb 2015 00:35:34 -0800 (PST) X-Received: by 10.50.143.106 with SMTP id sd10mr2223809igb.17.1423643733938; Wed, 11 Feb 2015 00:35:33 -0800 (PST) Received: from mail-ig0-f176.google.com (mail-ig0-f176.google.com. [209.85.213.176]) by mx.google.com with ESMTPS id k200si81092ioe.64.2015.02.11.00.35.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 00:35:33 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.213.176 as permitted sender) client-ip=209.85.213.176; Received: by mail-ig0-f176.google.com with SMTP id hl2so29294540igb.3 for ; Wed, 11 Feb 2015 00:35:33 -0800 (PST) X-Received: by 10.42.104.130 with SMTP id r2mr1770641ico.83.1423643733159; Wed, 11 Feb 2015 00:35:33 -0800 (PST) Received: from gnx2579.solutionip.com ([113.28.134.59]) by mx.google.com with ESMTPSA id m38sm62189ioi.39.2015.02.11.00.35.27 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 00:35:31 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, alex.williamson@redhat.com, feng.wu@intel.com Cc: andre.przywara@arm.com, patches@linaro.org, a.motakis@virtualopensystems.com, a.rigo@virtualopensystems.com, b.reynal@virtualopensystems.com, gleb@kernel.org, pbonzini@redhat.com Subject: [RFC v4 09/13] KVM: arm: rename pause into power_off Date: Wed, 11 Feb 2015 09:32:19 +0100 Message-Id: <1423643543-24409-10-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423643543-24409-1-git-send-email-eric.auger@linaro.org> References: <1423643543-24409-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@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.179 as permitted sender) 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 kvm_vcpu_arch pause field is renamed into power_off to prepare for the introduction of a new pause field. Signed-off-by: Eric Auger --- arch/arm/include/asm/kvm_host.h | 4 ++-- arch/arm/kvm/arm.c | 10 +++++----- arch/arm/kvm/psci.c | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 9cbcc53..87f0921 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -128,8 +128,8 @@ struct kvm_vcpu_arch { * here. */ - /* Don't run the guest on this vcpu */ - bool pause; + /* vcpu power-off state*/ + bool power_off; /* IO related fields */ struct kvm_decode mmio_decode; diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 61586a3..6f63ab7 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -459,7 +459,7 @@ static void vcpu_pause(struct kvm_vcpu *vcpu) { wait_queue_head_t *wq = kvm_arch_vcpu_wq(vcpu); - wait_event_interruptible(*wq, !vcpu->arch.pause); + wait_event_interruptible(*wq, !vcpu->arch.power_off); } static int kvm_vcpu_initialized(struct kvm_vcpu *vcpu) @@ -509,7 +509,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) update_vttbr(vcpu->kvm); - if (vcpu->arch.pause) + if (vcpu->arch.power_off) vcpu_pause(vcpu); kvm_vgic_flush_hwstate(vcpu); @@ -731,12 +731,12 @@ static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu, vcpu_reset_hcr(vcpu); /* - * Handle the "start in power-off" case by marking the VCPU as paused. + * Handle the "start in power-off" case. */ if (test_bit(KVM_ARM_VCPU_POWER_OFF, vcpu->arch.features)) - vcpu->arch.pause = true; + vcpu->arch.power_off = true; else - vcpu->arch.pause = false; + vcpu->arch.power_off = false; return 0; } diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c index 58cb324..ec0bd13 100644 --- a/arch/arm/kvm/psci.c +++ b/arch/arm/kvm/psci.c @@ -60,7 +60,7 @@ static unsigned long kvm_psci_vcpu_suspend(struct kvm_vcpu *vcpu) static void kvm_psci_vcpu_off(struct kvm_vcpu *vcpu) { - vcpu->arch.pause = true; + vcpu->arch.power_off = true; } static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu) @@ -92,7 +92,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu) */ if (!vcpu) return PSCI_RET_INVALID_PARAMS; - if (!vcpu->arch.pause) { + if (!vcpu->arch.power_off) { if (kvm_psci_version(source_vcpu) != KVM_ARM_PSCI_0_1) return PSCI_RET_ALREADY_ON; else @@ -120,7 +120,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu) * the general puspose registers are undefined upon CPU_ON. */ *vcpu_reg(vcpu, 0) = context_id; - vcpu->arch.pause = false; + vcpu->arch.power_off = false; smp_mb(); /* Make sure the above is visible */ wq = kvm_arch_vcpu_wq(vcpu); @@ -157,7 +157,7 @@ static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu) kvm_for_each_vcpu(i, tmp, kvm) { mpidr = kvm_vcpu_get_mpidr(tmp); if (((mpidr & target_affinity_mask) == target_affinity) && - !tmp->arch.pause) { + !tmp->arch.power_off) { return PSCI_0_2_AFFINITY_LEVEL_ON; } } @@ -180,7 +180,7 @@ static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type) * re-initialized. */ kvm_for_each_vcpu(i, tmp, vcpu->kvm) { - tmp->arch.pause = true; + tmp->arch.power_off = true; kvm_vcpu_kick(tmp); }