From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUyl4-0002dO-Ax for qemu-devel@nongnu.org; Mon, 09 Mar 2015 10:34:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUykz-0004u1-JN for qemu-devel@nongnu.org; Mon, 09 Mar 2015 10:34:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUykz-0004tr-Cu for qemu-devel@nongnu.org; Mon, 09 Mar 2015 10:34:09 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t29EY7gc027570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 9 Mar 2015 10:34:08 -0400 Received: from donizetti.redhat.com (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t29EY5ZE004766 for ; Mon, 9 Mar 2015 10:34:06 -0400 From: Paolo Bonzini Date: Mon, 9 Mar 2015 15:34:05 +0100 Message-Id: <1425911645-20196-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] cpus: initialize cpu->memory_dispatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This fixes a NULL pointer dereference in s390x-softmmu. On pretty much all other architectures, creating an MMIO region calls cpu_reload_memory_map. On s390, however, there are no MMIO regions and everything is done via hypercalls. Fixes: 9d82b5a792236db31a75b9db5c93af69ac07c7c5 Reported-by: Christian Borntraeger Signed-off-by: Paolo Bonzini --- exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec.c b/exec.c index c85321a..3280e57 100644 --- a/exec.c +++ b/exec.c @@ -548,6 +548,7 @@ void cpu_exec_init(CPUArchState *env) #ifndef CONFIG_USER_ONLY cpu->as = &address_space_memory; cpu->thread_id = qemu_get_thread_id(); + cpu_reload_memory_map(cpu); #endif QTAILQ_INSERT_TAIL(&cpus, cpu, node); #if defined(CONFIG_USER_ONLY) -- 2.3.0