From patchwork Mon Mar 5 08:36:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 10258367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E159E60211 for ; Mon, 5 Mar 2018 08:38:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD58B274A3 for ; Mon, 5 Mar 2018 08:38:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1E8B2894B; Mon, 5 Mar 2018 08:38:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DFBC42891D for ; Mon, 5 Mar 2018 08:38:10 +0000 (UTC) Received: from localhost ([::1]:47813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esldK-0005GW-47 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Mar 2018 03:38:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eslcC-0004LK-Dw for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:37:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eslcA-0004N6-Ey for qemu-devel@nongnu.org; Mon, 05 Mar 2018 03:37:00 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:40586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eslcA-0004Mf-7x; Mon, 05 Mar 2018 03:36:58 -0500 Received: by mail-wr0-x241.google.com with SMTP id o76so16280144wrb.7; Mon, 05 Mar 2018 00:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=RhclJi7/t4KTVM8o9+C5BDkL4/aXTSeub6+kKz2AD/0=; b=aYIOANV7X9lh7jtZrJb3iAKVHNJRQ64aTDKSy2ylKQp2nh4d++LyiPeuy0qk5K9h6B c9g/Ni5CkMNzInEQCzZXs2W1OhA3rz93FBXIFnoiP1dODXDXjWzw6DIw1oDG0UR4bEMx HnQXCRQN1pJnonpSN2vBdrz7eunQ/z7X+oWohtwNbzjkKbug4qdo30B5XzsO/R4D8gAi zVl2sN6FNSceUK64RY+EIPcNgjK0vpc3Cb3IyzsyMnuDDSJ7a7SVoyyP/NICaMF9BWAG jDpcRU41dsnbbrDI3O3PlxoBu1xdic+kx5EvDSTaFClfn5We9VKGUdEvecU1laVsw7E8 LPKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=RhclJi7/t4KTVM8o9+C5BDkL4/aXTSeub6+kKz2AD/0=; b=QshNFAt9ncpVWOnfEVEB63/F+0Ew5wbHcbioWDKnTXdz3AM3qv1pNh/mdhI11t/YjJ 3EVCh2sdZQM5qL34O2WH/gNkRhsF9Wap4nFpxbByVIud1nHGZBRKOn3Jimda2C+lcZ0G ODnWZCGZCdlKrefehYoLh8bJ9uDkPDvpHxT7D7Z7T+oBYURCe2xM6/TbuMd9P2AGE7NQ 0/vhEA8aY+bek7VbxcPLeIuk9XWhULAsKEGDWXXjYsPeBge4LuHFt+FI8hfT7l/imbyl 51t31CuUFfp4CfA3+pMjiS9v1MCAxYRwC4VOVblzZRVetZejaySewiMuQb9fN+pPsRai 2FjA== X-Gm-Message-State: APf1xPDlx/xXsQ3DHfWHwHiOn0B29WaGPeVmKHEBkR40aIiKu8xTbhrM T5NfWiazs08NS8gurCbh7k5VdBYT X-Google-Smtp-Source: AG47ELtn1aqhQJ2cz9eBqUL8UlMQtNkoYP16RY3oeYHAQzesgg20Gt2iMv5DWx7TD6iZKFkamqlWpw== X-Received: by 10.223.209.11 with SMTP id a11mr11999763wri.122.1520239016815; Mon, 05 Mar 2018 00:36:56 -0800 (PST) Received: from donizetti.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id y23sm13206739wra.9.2018.03.05.00.36.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 00:36:56 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 09:36:49 +0100 Message-Id: <20180305083655.6186-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180305083655.6186-1-pbonzini@redhat.com> References: <20180305083655.6186-1-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH 1/7] openpic_kvm: drop address_space_to_flatview call X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , qemu-stable@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The MemoryListener is registered on address_space_memory, there is not much to assert. This currently works because the callback is invoked only once when the listener is registered, but section->fv is the _new_ FlatView, not the old one on later calls and that would break. This confines address_space_to_flatview to exec.c and memory.c. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini Acked-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/intc/openpic_kvm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index fa83420254..39a6f369c5 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -124,10 +124,6 @@ static void kvm_openpic_region_add(MemoryListener *listener, uint64_t reg_base; int ret; - if (section->fv != address_space_to_flatview(&address_space_memory)) { - abort(); - } - /* Ignore events on regions that are not us */ if (section->mr != &opp->mem) { return;