Received: from eggs.gnu.org ([2001:4830:134:3::10]:35373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVHYR-0005f0-5a for qemu-devel@nongnu.org; Tue, 10 Mar 2015 06:38:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVHYH-0002uf-UB for qemu-devel@nongnu.org; Tue, 10 Mar 2015 06:38:27 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:33285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVHYH-0002uV-O1 for qemu-devel@nongnu.org; Tue, 10 Mar 2015 06:38:17 -0400 Received: by wggz12 with SMTP id z12so820129wgg.0 for ; Tue, 10 Mar 2015 03:38:17 -0700 (PDT) Received: from localhost.localdomain (net-188-216-23-124.cust.vodafonedsl.it. [188.216.23.124]) by mx.google.com with ESMTPSA id fs8sm19653201wib.8.2015.03.10.03.38.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 03:38:16 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 10 Mar 2015 11:37:55 +0100 Message-Id: <1425983880-26906-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1425983880-26906-1-git-send-email-pbonzini@redhat.com> References: <1425983880-26906-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 06/11] 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 6a5adab..a6cb4a2 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