[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/19] s390x/kvm: execute sigp orders on the target v
From: |
Christian Borntraeger |
Subject: |
[Qemu-devel] [PULL 02/19] s390x/kvm: execute sigp orders on the target vcpu thread |
Date: |
Mon, 1 Sep 2014 14:54:13 +0200 |
From: David Hildenbrand <address@hidden>
All sigp orders that can result in ioctls on the target vcpu should be executed
on the associated vcpu thread.
Reviewed-by: Cornelia Huck <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
---
target-s390x/kvm.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index a32d91a..421ff43 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -916,23 +916,30 @@ static int handle_diag(S390CPU *cpu, struct kvm_run *run,
uint32_t ipb)
return r;
}
-static int kvm_s390_cpu_start(S390CPU *cpu)
+static void sigp_cpu_start(void *arg)
{
+ CPUState *cs = arg;
+ S390CPU *cpu = S390_CPU(cs);
+
s390_add_running_cpu(cpu);
- qemu_cpu_kick(CPU(cpu));
DPRINTF("DONE: KVM cpu start: %p\n", &cpu->env);
- return 0;
}
-int kvm_s390_cpu_restart(S390CPU *cpu)
+static void sigp_cpu_restart(void *arg)
{
+ CPUState *cs = arg;
+ S390CPU *cpu = S390_CPU(cs);
struct kvm_s390_irq irq = {
.type = KVM_S390_RESTART,
};
kvm_s390_vcpu_interrupt(cpu, &irq);
s390_add_running_cpu(cpu);
- qemu_cpu_kick(CPU(cpu));
+}
+
+int kvm_s390_cpu_restart(S390CPU *cpu)
+{
+ run_on_cpu(CPU(cpu), sigp_cpu_restart, CPU(cpu));
DPRINTF("DONE: KVM cpu restart: %p\n", &cpu->env);
return 0;
}
@@ -980,10 +987,12 @@ static int handle_sigp(S390CPU *cpu, struct kvm_run *run,
uint8_t ipa1)
switch (order_code) {
case SIGP_START:
- cc = kvm_s390_cpu_start(target_cpu);
+ run_on_cpu(CPU(target_cpu), sigp_cpu_start, CPU(target_cpu));
+ cc = 0;
break;
case SIGP_RESTART:
- cc = kvm_s390_cpu_restart(target_cpu);
+ run_on_cpu(CPU(target_cpu), sigp_cpu_restart, CPU(target_cpu));
+ cc = 0;
break;
case SIGP_SET_ARCH:
*statusreg &= 0xffffffff00000000UL;
--
1.8.4.2
- [Qemu-devel] [PULL 00/19] s390x/kvm: Several updates/fixes/features, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 02/19] s390x/kvm: execute sigp orders on the target vcpu thread,
Christian Borntraeger <=
- [Qemu-devel] [PULL 01/19] s390x/kvm: run guest triggered resets on the target vcpu thread, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 03/19] s390x/kvm: execute "system reset" cpu resets on the vcpu thread, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 10/19] pc-bios/s390-ccw: Do proper console setup, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 09/19] pc-bios/s390-ccw: IPL from DASD with format variations, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 07/19] pc-bios/s390-ccw Improve ECKD informational message, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 04/19] s390x/kvm: execute the first cpu reset on the vcpu thread, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 14/19] s390-virtio: Apply same memory boundaries as virtio-ccw, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 16/19] s390x/gdb: don't touch the cc if tcg is not enabled, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 05/19] pc-bios/s390-ccw: support all virtio block size, Christian Borntraeger, 2014/09/01
- [Qemu-devel] [PULL 13/19] virtio-ccw: Include standby memory when calculating storage increment, Christian Borntraeger, 2014/09/01