From patchwork Thu Sep 5 17:17:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 272919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CC9352C00A8 for ; Fri, 6 Sep 2013 03:20:33 +1000 (EST) Received: from localhost ([::1]:32937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdEN-0005Gs-Ma for incoming@patchwork.ozlabs.org; Thu, 05 Sep 2013 13:20:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdBt-0001ZR-H7 for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHdBo-00014Y-Cd for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:17:57 -0400 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:65458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHdBo-00014I-5x for qemu-devel@nongnu.org; Thu, 05 Sep 2013 13:17:52 -0400 Received: by mail-ea0-f170.google.com with SMTP id h14so1066034eak.15 for ; Thu, 05 Sep 2013 10:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=S0ad1LZc0e//bneWR/MZPj/XnHmTMe12SWpbT5VYLyk=; b=tjnM1pZ2A7FZUc0BRHgaqw733Hu4lzZ6T+sN7oyOj8xX2PtxrH8FvyzTy+FUAwJEhj t4qQRJVhbXQl1w7Clu86KULRxuNC2CbmtEulwqOAUpcDXALbHskNmo3Ni2+pGbBTHdSZ JPH60Ffl5tC6vRCL93HFbqsC47KAoycFyUhftxCCEglxvyo+lnev+/6lubHCnpSfqL8d eZifJ8Yx4w02pjUXS4AC0UOP1kouE8KEi7Ng6UFnx56L5Hs8f/2A2JCcxV+P2j8CUYff BQVyAITt4RYylu09nAUI277w3HzRw27oHL7nUzkIIwwyx9r6a+KCpUnbjOS3c/zlAtat 5DOQ== X-Received: by 10.14.224.7 with SMTP id w7mr470574eep.82.1378401471319; Thu, 05 Sep 2013 10:17:51 -0700 (PDT) Received: from playground.lan (net-37-117-144-28.cust.dsl.vodafone.it. [37.117.144.28]) by mx.google.com with ESMTPSA id x47sm50345071eea.16.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 05 Sep 2013 10:17:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 5 Sep 2013 19:17:35 +0200 Message-Id: <1378401455-583-6-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1378401455-583-1-git-send-email-pbonzini@redhat.com> References: <1378401455-583-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22a Cc: liguang , anthony@codemonkey.ws Subject: [Qemu-devel] [PULL 5/5] exec: do tcg_commit only when tcg_enabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: liguang Signed-off-by: liguang Signed-off-by: Paolo Bonzini --- exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 3859b02..030118e 100644 --- a/exec.c +++ b/exec.c @@ -1810,7 +1810,9 @@ static void memory_map_init(void) address_space_init(&address_space_io, system_io, "I/O"); memory_listener_register(&core_memory_listener, &address_space_memory); - memory_listener_register(&tcg_memory_listener, &address_space_memory); + if (tcg_enabled()) { + memory_listener_register(&tcg_memory_listener, &address_space_memory); + } } MemoryRegion *get_system_memory(void)