In kvm_arch_init_vcpu() a call to cpuid_find_entry() can return NULL so the pointer returned should be checked before dereferencing it.
Signed-off-by: Liam Merwick <liam.merw...@oracle.com> --- target/i386/kvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index dc4047b02fc5..eb19c87a9d25 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1177,7 +1177,9 @@ int kvm_arch_init_vcpu(CPUState *cs) c->ecx = c->edx = 0; c = cpuid_find_entry(&cpuid_data.cpuid, kvm_base, 0); - c->eax = MAX(c->eax, KVM_CPUID_SIGNATURE | 0x10); + if (c) { + c->eax = MAX(c->eax, KVM_CPUID_SIGNATURE | 0x10); + } } cpuid_data.cpuid.nent = cpuid_i; -- 1.8.3.1