Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1233086
| From | Eric Auger <eric.auger@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/4] KVM: arm/arm64: check power_off in critical section before VCPU run |
| Date | 2015-09-25 23:50 +0200 |
| Message-ID | <qcJ2r-5nP-21@gated-at.bofh.it> (permalink) |
| References | <qcJ2q-5nP-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
In case a vcpu off PSCI call is called just after we executed the
vcpu_sleep check, we can enter the guest although power_off
is set. Let's check the power_off state in the critical section,
just before entering the guest.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reported-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
---
v2 -> v3:
- reword commit message
---
arch/arm/kvm/arm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 9d16f76..4eb59e3 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -560,7 +560,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
run->exit_reason = KVM_EXIT_INTR;
}
- if (ret <= 0 || need_new_vmid_gen(vcpu->kvm)) {
+ if (ret <= 0 || need_new_vmid_gen(vcpu->kvm) ||
+ vcpu->arch.power_off) {
local_irq_enable();
kvm_timer_sync_hwstate(vcpu);
kvm_vgic_sync_hwstate(vcpu);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/4] KVM: arm/arm64: guest synchronous halt/resume Eric Auger <eric.auger@linaro.org> - 2015-09-25 23:50 +0200 [PATCH v3 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable Eric Auger <eric.auger@linaro.org> - 2015-09-25 23:50 +0200 [PATCH v3 4/4] KVM: arm/arm64: implement kvm_arm_[halt,resume]_guest Eric Auger <eric.auger@linaro.org> - 2015-09-25 23:50 +0200 [PATCH v3 3/4] KVM: arm/arm64: check power_off in critical section before VCPU run Eric Auger <eric.auger@linaro.org> - 2015-09-25 23:50 +0200 [PATCH v3 1/4] KVM: arm/arm64: rename pause into power_off Eric Auger <eric.auger@linaro.org> - 2015-09-25 23:50 +0200
csiph-web