qemu-kvm: Mark VCPU state dirty on creation
PATCH 1/1 qemu-kvm: Mark VCPU state dirty on creation
This avoids that early cpu_synchronize_state calls try to retrieve an uninitialized state from the kernel, which even causes a deadlock.
Signed-off-by Jan Kiszka <[email protected]>
---
Corresponding upstream patch will come with next uq/master series.
qemu-kvm.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
qemu-kvm.c +1 -0
@@ -259,6 +259,7 @@ static void kvm_create_vcpu(CPUState *env, int id) env->kvm_fd = r; env->kvm_state = kvm_state; + env->kvm_vcpu_dirty =1 ; mmap_size =kvm_ioctl (kvm_state,KVM_GET_VCPU_MMAP_SIZE ,0 );if (mmap_size <0 ) {
Signature · 1 line
1.7.1
Avi Kivity
AppliedQuoted 2 lines · Jan Kiszka
This avoids that early
cpu_synchronize_statecalls try to retrieve an uninitialized state from the kernel,
Thanks, applied.
Quoted 2 lines
which even causes a deadlock.
How?
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 10 lines · Avi Kivity
Quoted 2 lines · Jan Kiszka
This avoids that early
cpu_synchronize_statecalls try to retrieve an uninitialized state from the kernel,Thanks, applied.
Quoted 2 lines
which even causes a deadlock.
How?
Early hw_error. It collects the CPU states, also during initial device setup, ie. before the VCPUs have been started.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux